/* Mobile polish + scroll reveal animations */

/* ——— Reveal animations ——— */
.reveal {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}
.reveal.reveal-fade {
    transform: none;
}
.reveal.reveal-scale {
    transform: scale(0.96);
}
.reveal.reveal-left {
    transform: translate3d(-28px, 0, 0);
}
.reveal.reveal-right {
    transform: translate3d(28px, 0, 0);
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ——— Mobile navigation ——— */
@media (max-width: 991px) {
    body.nav-open {
        overflow: hidden;
    }

    .site-header .header-content {
        grid-template-columns: 1fr auto auto;
        align-items: center;
        column-gap: 8px;
    }

    .site-header .logo {
        grid-column: 1;
        justify-self: start;
    }

    .site-header .mobile-header-tools {
        grid-column: 2;
    }

    .site-header .menu-button {
        grid-column: 3;
    }

    .site-header .main-nav {
        grid-column: 1 / -1;
    }

    .site-header.w-nav {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #fff;
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    }

    .site-header .main-nav {
        display: none;
        grid-column: 1 / -1;
        width: 100%;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 8px 0 20px;
        border-top: 1px solid #eef2f8;
        margin-top: 4px;
        animation: nav-slide-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .site-header .main-nav.w--open,
    .site-header .main-nav.open {
        display: block !important;
    }

    @keyframes nav-slide-in {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: none;
        }
    }

    .site-header .nav-links > li {
        width: 100%;
        border-bottom: 1px solid #f0f3f8;
    }

    .site-header .nav-links > li:last-child {
        border-bottom: 0;
    }

    .site-header .nav-link,
    .site-header .nav-link.drop,
    .site-header .nav-link.not-active {
        display: block;
        width: 100%;
        padding: 14px 4px !important;
        font-size: 16px !important;
        white-space: normal;
    }

    .site-header .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
    }

    .site-header .nav-submenu-toggle {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: #f4f7fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23003399' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E") center / 12px no-repeat;
        cursor: pointer;
        transition: transform 0.25s ease, background-color 0.2s ease;
    }

    .site-header .has-dropdown.is-open .nav-submenu-toggle {
        transform: rotate(180deg);
        background-color: #e8f0ff;
    }

    .site-header .has-dropdown .dropdown-list {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border: 0 !important;
        padding: 0 0 10px 8px !important;
        margin: 0 !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.25s ease;
    }

    .site-header .has-dropdown.is-open .dropdown-list {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 480px;
    }

    .site-header .dropdown-link {
        padding: 10px 12px !important;
        font-size: 15px !important;
        border-radius: 6px;
    }

    .site-header .menu-button {
        position: relative;
        z-index: 2;
    }

    .site-header .menu-button.w--open .burger-line.top {
        transform: translateY(7px) rotate(45deg);
    }

    .site-header .menu-button.w--open .burger-line.middle {
        opacity: 0;
        transform: scaleX(0);
    }

    .site-header .menu-button.w--open .burger-line.bottom {
        transform: translateY(-7px) rotate(-45deg);
    }

    .site-header .burger-line {
        transition: transform 0.3s ease, opacity 0.2s ease;
    }

    .site-header .mobile-header-tools {
        display: flex;
        align-items: center;
        gap: 10px;
        grid-column: 2;
        justify-self: end;
    }

    .site-header .mobile-header-tools .lang-switcher {
        margin: 0;
    }

    .site-header .mobile-header-tools .header-phone-link {
        display: none;
    }

    .site-header .mobile-header-tools .lang-switcher .lang-btn {
        padding: 6px 8px;
        font-size: 12px;
    }
}

@media (max-width: 479px) {
    .site-header .mobile-header-tools .header-phone-link {
        display: none;
    }
}

@media (min-width: 480px) and (max-width: 991px) {
    .site-header .mobile-header-tools .header-phone-link {
        display: inline-flex;
        font-size: 13px;
        font-weight: 700;
        color: #003399;
        text-decoration: none;
        white-space: nowrap;
    }
}

@media (min-width: 992px) {
    .site-header .nav-submenu-toggle,
    .site-header .mobile-header-tools {
        display: none !important;
    }
}

/* ——— Hero ——— */
@media (max-width: 991px) {
    .section-1 .section-1-content {
        display: flex;
        flex-direction: column;
    }

    .section-1-content.slides-count-2 .section-item,
    .section-1 .section-item.div-block-2 {
        width: 100% !important;
        min-height: clamp(300px, 52vh, 460px);
        height: auto !important;
    }

    .section-1 .section-item-content {
        padding: 28px 22px;
        align-items: center;
        text-align: center;
    }

    .section-1 .section-1-title {
        max-width: min(360px, 92%);
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .section-1 .h3 {
        font-size: clamp(1.5rem, 6vw, 2rem);
        line-height: 1.15;
        text-align: center;
    }

    .section-1 .btn.on-sec-1 {
        min-width: 160px;
        padding: 12px 22px;
    }
}

@media (max-width: 479px) {
    .section-1-content.slides-count-2 .section-item,
    .section-1 .section-item.div-block-2 {
        min-height: clamp(260px, 48vh, 380px);
    }
}

/* ——— About section ——— */
@media (max-width: 991px) {
    .section-2 .container._1 {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-2 .section-2-row {
        flex-direction: column;
        min-height: 0;
    }

    .section-2 .sec-2-img-and-bg {
        flex: none;
        width: 100%;
        padding: 40px 24px;
    }

    .section-2 .sec-2-img-and-bg .sec-2-img {
        width: min(240px, 70vw);
    }

    .section-2 .section-2-content {
        padding: 32px 20px 40px;
    }

    .section-2 .h2.on-section-2 {
        text-align: center;
    }

    .section-2 .sec-2-features {
        justify-content: center;
        gap: 28px;
    }

    .section-2 .features-item {
        text-align: center;
    }

    .section-2 .h3.on-features,
    .section-2 .h3.on-features._1 {
        text-align: center;
    }
}

/* ——— Products section ——— */
@media (max-width: 991px) {
    .products-featured .h2.on-section-3 {
        font-size: clamp(1.6rem, 5vw, 2rem);
        padding: 0 16px;
    }

    .products-featured .sec-3-row {
        flex-direction: column;
    }

    .products-featured .sec-3-item {
        width: 100% !important;
        text-align: left;
    }

    .products-featured .h3.on-sec-3 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .products-featured .sec-3-img {
        max-width: 100%;
        margin: 0 auto;
        display: block;
    }

    .products-featured .count {
        font-size: 2.5rem;
    }
}

/* ——— News ——— */
@media (max-width: 991px) {
    .section-4 {
        padding-top: 44px;
        padding-bottom: 48px;
    }

    .home-news-section .h2.on-section-4 {
        font-size: clamp(1.6rem, 5vw, 2rem);
    }

    .home-news-card .aqueduct-card img,
    .home-news-card .news-card-img img {
        height: 200px;
        object-fit: cover;
    }
}

/* ——— Feedback + map ——— */
@media (max-width: 991px) {
    .section-5 {
        display: flex;
        flex-direction: column-reverse;
        padding-bottom: 40px;
    }

    .section-5 .sec-5-row {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        min-height: 0 !important;
    }

    .section-5 .sec-5-content {
        width: 100% !important;
        max-width: none !important;
        margin-bottom: 0 !important;
        padding: 32px 0 24px !important;
        padding-left: 0 !important;
    }

    .section-5 > .map-box,
    .section-5 .map-box {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 280px;
        margin: 0 !important;
    }

    .section-5 .map-box iframe,
    .section-5 .map-box .ntbvt-map-iframe {
        width: 100% !important;
        min-height: 280px;
        height: 280px !important;
        display: block;
        position: relative !important;
    }

    .section-5 .form-row {
        flex-direction: column;
        gap: 0;
    }

    .section-5 .form-item,
    .section-5 .form-item._3 {
        width: 100% !important;
    }

    .section-5 .h2 {
        font-size: clamp(1.6rem, 5vw, 2rem);
    }
}

/* ——— Inner pages ——— */
@media (max-width: 991px) {
    .first-screen,
    .news-page .first-screen.on-news,
    .products-page-hero {
        min-height: auto !important;
        padding: 88px 0 40px !important;
    }

    .first-screen-row {
        flex-direction: column;
        gap: 20px;
        min-height: 0 !important;
    }

    .first-screen-intro .h1 {
        font-size: clamp(1.6rem, 6vw, 2.4rem) !important;
    }

    .ntbvt-inner-page .page-hero-legacy {
        padding: 32px 0;
    }

    .catalog-hub {
        padding-top: 32px;
        padding-bottom: 40px;
    }

    .catalog-hub .products-item {
        margin-bottom: 20px;
    }

    .products-item .products-row {
        flex-direction: column;
        gap: 16px;
    }

    .aqueduct-tabs {
        display: none;
    }

    .aqueduct-tabs-mobile {
        display: block;
    }
}

/* ——— Footer ——— */
@media (max-width: 991px) {
    .footer {
        padding-top: 40px;
        padding-bottom: 32px;
    }

    .footer-brand-logo {
        width: min(260px, 85vw) !important;
    }

    .footer-item.last .footer-callback {
        max-width: 100%;
    }

    .footer .sec-5-input {
        width: 100%;
    }

    .footer .btn.on-footer {
        width: 100%;
    }
}

/* ——— Touch & misc ——— */
@media (max-width: 991px) {
    .btn,
    .w-button {
        min-height: 44px;
    }

    .section-1 .section-item.div-block-2:hover::before {
        transform: scale(1);
    }

    .aqueduct-card:active {
        transform: scale(0.98);
    }
}
