/* ========== АДАПТИВНЫЕ СТИЛИ ========== */
/* Этот файл подключается ПОСЛЕ style.css и имеет приоритет в каскаде */

/* ========== 1200px BREAKPOINT ========== */
@media (max-width: 1200px) {
    .creative-background {
        width: 100%;
        left: 0;
        transform: none;
    }
}

@media (max-width: 1200px) {
    .navbar {
        width: 100%;
        left: 0;
        transform: none;
    }
}

@media (max-width: 1200px) {
    .container {padding: 0 20px;}
    .nav-container {
        padding: 0 20px;
    }
}

/* ========== 1024px BREAKPOINT ========== */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 20px;
        justify-content: center;
        overflow-y: auto;
    }
    .nav-menu a {
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    /* allow two columns on tablet/large phones instead of single stack */
    .process-grid,
    .work-types-grid,
    .why-us-grid,
    .facts-grid,
    .contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px,1fr)) !important;
    }
    /* partners and services can also show two across */
    .partners-grid,
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px,1fr)) !important;
    }
    /* contacts showcase, footer, other multi-column blocks */
    .contact-showcase {
        grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
    }
    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    }
}

/* ========== 992px BREAKPOINT ========== */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

/* ========== 768px BREAKPOINT ========== */
@media (max-width: 768px) {
    /* ensure about-showcase remains single column with tighter gap */
    .about-showcase {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    
    .about-stats-carousel {
        order: -1;
        margin-bottom: 50px;
        height: 420px;
        width: auto;
    }
    .carousel-number {
        font-size: 90px;
        margin-bottom: 5px;
    }
    .carousel-title {
        font-size: 24px;
    }
    /* parallax content gets narrow margins and smaller text on tablet sizes */
    .parallax-content {
        margin: 0 10px;
        padding: 40px 20px;
    }
    .parallax-content h2 { font-size: 48px; }
    .parallax-content p { font-size: 16px; }

    .contact-card {
            padding: 50px 30px;
    }
    .contact-icon {
        margin-bottom: 0px;
    }
    
    .contact-link {
        font-size: 12px;
        padding: 9px 20px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        position: fixed;
        top: 0;
        width: 100%;
        height: 100vh;
        /* solid overlay to completely hide underlying content */
        background: rgba(0,0,0,1);
        display: none;
        gap: 0;
        justify-content: center;
        align-items: center;
        z-index: 9999; /* highest priority so it covers everything */
        /* prevent underlying content from being clicked */
    }
    .nav-menu .menu-close {
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 2rem;
        cursor: pointer;
        color: #FFFFFF;
        display: block; /* show close icon when mobile menu active */
    }
    .nav-menu.active { display: flex; z-index: 9999; }
    .nav-menu a {
        padding: 20px 0; /* more vertical breathing room */
        border-bottom: 1px solid rgba(197,165,114,0.1);
        font-size: 18px;
    }
    .nav-menu {
        gap: 40px; /* increase distance between items */
    }
    /* force 2 columns for grids on mobile */
    .process-grid,
    .work-types-grid,
    .why-us-grid,
    .facts-grid,
    .contact-grid,
    .stats-grid,
    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .menu-toggle { display: block; }
    .contact-showcase {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
    .nav-menu .logo {
        font-size: 52px;
        top: -40px;
        display: block;
    }
}

@media (max-width: 768px) {
    /* make dropdowns expandable full-width and easier to read */
    .dropdown {
        width: 100%;
        position: relative;
        text-align: center; /* center the whole trigger in viewport */
    }
    .dropdown-trigger {
        padding: 15px 20px;
        width: 100%;
        box-sizing: border-box;
        justify-content: center !important; /* arrow + text centered */
    }

    /* hide underline for dropdown items on small screens */
    .dropdown-trigger::before {
        display: none !important;
    }

    /* keep the panel in flow and animate its height so things below
       slide down rather than teleport.  use a large max-height
       because "auto" cannot be transitioned. */
    .dropdown-content {
        position: static;
        background: rgba(0,0,0,0.95);
        backdrop-filter: none;
        box-shadow: none;
        border: none;
        padding: 0 20px; /* match parent link padding */
        margin-top: 5px;
        width: 100%;
        box-sizing: border-box;
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .dropdown.open .dropdown-content {
        max-height: 800px; /* big enough for any menu */
    }
    .dropdown-content a {
        padding: 15px 20px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .contact-showcase {
        grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
    }
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ========== 576px BREAKPOINT ========== */
@media (max-width: 576px) {
    .process-grid,
    .work-types-grid,
    .why-us-grid,
    .facts-grid,
    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    /* make individual partner items stack too */
    .partners-list {
        grid-template-columns: 1fr !important;
    }
    /* about showcase becomes single column with carousel on top */
    .about-showcase {
        grid-template-columns: 1fr;
    }
    .about-text-block {
        padding-left: 0px; 
        border-left: none;
        max-width: 310px;
        justify-self: center;
    }
    .about-text-block p {
        font-size: 15px;   
    }
    .about-content h3 {
        font-size: 32px;
        justify-self: center;

    }
    .contact-grid {
        gap: 20px;
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

@media (max-width: 576px) {
    body { font-size: 13px; }
    h1 { font-size: 48px; }
    h2 { font-size: 32px; }
    .work-type-card i,
    .process-icon,
    .fact-card i,
    .why-us-card i {
        font-size: 2rem;
    }
    .work-type-card p,
    .fact-card p,
    .why-us-card p {
        display: none;
    }

    /* parallax content spacing and text scaling on very small screens */
    .parallax-content {
        margin: 0 10px;
        padding: 40px 20px;
    }
    .parallax-content h2 { font-size: 36px; }
    .parallax-content p { font-size: 14px; }

    /* contact page icons and text smaller */
    .contact-details i,
    .legal-info i {
        width: 25px;
        font-size: 1rem;
    }
    .contact-details p,
    .legal-info p {
        font-size: 14px;
    }
    .fact-card {
        padding: 30px 30px;
    }
    .fact-card i {
        font-size: 46px;
        margin-bottom: 0px;
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== 500px BREAKPOINT ========== */
@media (max-width: 500px) {
    body { font-size: 13px; }
    h1 { font-size: 36px; }
    h2 { font-size: 28px; }
    h3 { font-size: 22px; }
    .container { padding: 0 15px; }
    .hero { padding: 80px 20px 40px; }
    .hero-title { font-size: 48px; }
    .nav-menu a { font-size: 16px; padding: 15px 0; }
    .work-type-card, .process-card, .fact-card, .why-us-card, .service-card, .contact-card, .partners-section {
        padding: 20px 15px;
    }
    .work-type-card i,
    .process-icon,
    .fact-card i,
    .why-us-card i,
    .service-icon,
    .contact-icon,
    .partner-item i {
        font-size: 1.5rem;
    }
    .footer-grid { gap: 20px; }
    .footer-col h4 { font-size: 18px; }
    .footer-col ul a,
    .footer-col p { font-size: 13px; }

    .contact-details h3,
    .legal-info h3 {
        font-size: 24px;
    }
}

@media (max-width: 500px) {
    .service-card {
        padding: 20px 15px;
    }
    .service-card h3 { font-size: 18px; }
    .service-icon i { font-size: 2rem; }

    .about-stats-carousel {
        order: -1;
        margin-bottom: 50px;
        height: 360px;
        width: 300px;
        margin: 0 auto;
    }
    .carousel-number {
        font-size: 90px;
        margin-bottom: 5px;
    }
    .carousel-title {
        font-size: 24px;
    }
    .carousel-text {
        font-size: 12px;
    }
    .about-text-block {
        font-size: 12px;
    }
    .about-content {
        width: 310px;
    }
}

/* ========== УСИЛЕННЫЕ ПАРАЛЛАКС АНИМАЦИИ ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    /* усиленная задержка 0.4s для более заметного параллакс-эффекта */
    /* увеличенное время анимации 1.5s для плавного появления */
    transition: all 1.5s cubic-bezier(0.165, 0.84, 0.44, 1) 0.4s;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
