/* Shared mobile navigation & site-wide responsive fixes */

:root {
    --margin-mobile: 20px;
}

html {
    overflow-x: clip;
}

body {
    overflow-x: clip;
    max-width: 100%;
}

main {
    max-width: 100%;
    overflow-x: clip;
}

img {
    max-width: 100%;
    height: auto;
}

.footer-logo-link {
    display: inline-block;
    line-height: 0;
    margin-bottom: 24px;
}

.footer-logo-img {
    width: 140px;
    height: auto;
    display: block;
    filter: brightness(0) invert(1);
}

header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

main {
    padding-top: 100px !important;
    margin-top: 0 !important;
}

.menu-toggle {
    display: none;
    position: absolute;
    right: var(--margin-mobile, 20px);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary, #000);
    z-index: 2000;
    padding: 8px;
    line-height: 0;
}

.menu-toggle .material-symbols-outlined {
    font-size: 28px;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: var(--surface, #faf9f9);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    padding: 100px 32px 40px;
    gap: 24px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav a {
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    color: var(--on-surface, #1a1c1c);
    transition: color 0.3s;
    padding: 4px 0;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--secondary, #ae2756);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    z-index: 1400;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1024px) {
    :root {
        --section-gap: 100px;
    }

    header {
        padding-left: var(--margin-mobile, var(--margin-site, 20px)) !important;
        padding-right: var(--margin-mobile, var(--margin-site, 20px)) !important;
        height: 80px;
    }

    .logo-link {
        left: var(--margin-mobile, var(--margin-site, 20px)) !important;
    }

    .logo {
        width: 120px;
    }

    nav {
        display: none !important;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        right: var(--margin-mobile, var(--margin-site, 20px));
    }

    main {
        padding-top: 80px !important;
    }

    .container {
        padding-left: var(--margin-mobile, var(--margin-site, 20px));
        padding-right: var(--margin-mobile, var(--margin-site, 20px));
    }

    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 32px;
    }

    .grid-12 {
        grid-template-columns: 1fr !important;
    }

    .grid-12 > [style*="grid-column"] {
        grid-column: span 1 !important;
    }

    .bento-large {
        height: auto !important;
        min-height: 320px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 16px !important;
        margin-bottom: 32px;
    }

    .bento-header,
    .services-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 40px;
    }

    .bento-header > div:last-child,
    .services-header > div:last-child {
        max-width: 100% !important;
        text-align: left !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    footer {
        padding: var(--margin-mobile, 20px) !important;
    }

    .hero-img,
    .hero-img-responsive {
        height: 360px;
    }

    .row-card {
        flex-direction: column;
        height: auto;
    }

    .flex-grid .row-card {
        height: auto;
    }
}

@media (max-width: 768px) {
    :root {
        --section-gap: 80px;
    }

    .display-lg,
    h1.font-display-lg,
    .font-display-lg {
        font-size: 32px !important;
        line-height: 40px !important;
    }

    .headline-xl,
    .font-headline-xl {
        font-size: 26px !important;
        line-height: 34px !important;
    }

    h1 {
        font-size: 32px !important;
        line-height: 40px !important;
    }

    h2 {
        font-size: 26px !important;
        line-height: 34px !important;
    }

    .headline-lg {
        font-size: 20px !important;
        line-height: 28px !important;
    }

    .body-lg {
        font-size: 15px !important;
        line-height: 24px !important;
    }

    .bento-title {
        font-size: 22px !important;
        line-height: 28px !important;
    }

    .product-card-body h3 {
        font-size: 17px !important;
    }

    .product-card-body p,
    .bento-text,
    .why-us-tile p,
    .why-us-subtitle,
    .section-sub {
        font-size: 13px !important;
        line-height: 20px !important;
    }

    .why-us-tile h3 {
        font-size: 16px !important;
    }

    body,
    p {
        font-size: 14px;
        line-height: 22px;
    }

    nav a,
    .mobile-nav a {
        font-size: 16px;
    }

    .hero-img,
    .hero-img-responsive {
        height: 320px;
    }

    /* All carousels: full-width track, overlay arrows */
    .product-carousel-wrap,
    .why-us-carousel-wrap {
        position: relative;
        display: block;
    }

    .product-carousel,
    .why-us-carousel {
        width: 100%;
        gap: 16px;
    }

    .product-carousel-wrap .carousel-arrow,
    .why-us-carousel-wrap .carousel-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        min-width: 36px;
        max-width: 36px;
        margin: 0;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
        z-index: 3;
        border: 1px solid rgba(197, 198, 204, 0.5);
    }

    .product-carousel-wrap .carousel-arrow {
        top: 100px;
    }

    .product-carousel-wrap .carousel-arrow .material-symbols-outlined,
    .why-us-carousel-wrap .carousel-arrow .material-symbols-outlined {
        font-size: 22px;
    }

    .product-carousel-wrap .carousel-arrow-left,
    .why-us-carousel-wrap .carousel-arrow-left,
    .why-us-carousel-wrap .why-us-arrow-left {
        left: 8px;
        margin-right: 0;
    }

    .product-carousel-wrap .carousel-arrow-right,
    .why-us-carousel-wrap .carousel-arrow-right,
    .why-us-carousel-wrap .why-us-arrow-right {
        right: 8px;
        margin-left: 0;
    }

    /* Product page cards — full width like services */
    .product-carousel .product-card {
        flex: 0 0 100%;
    }

    .product-carousel .product-card img {
        height: 200px;
    }

    .product-card-body {
        padding: 14px 16px;
    }

    /* Services — one full card; arrows sit over image */
    .services-section .product-carousel .product-card {
        flex: 0 0 100%;
    }

    .services-section .product-card img {
        height: 260px;
    }

    .services-section .product-carousel-wrap .carousel-arrow {
        top: 130px;
        transform: translateY(-50%);
    }

    .services-section .product-card-body {
        padding: 16px;
    }

    .services-section .product-card-body h3 {
        font-size: 17px !important;
    }

    .services-section .product-card-body p {
        font-size: 13px !important;
        line-height: 20px !important;
    }

    /* Why Us — full-width tile */
    .why-us-carousel .why-us-tile {
        flex: 0 0 100% !important;
        padding: 24px !important;
        gap: 12px !important;
    }

    .why-us-tile h3 {
        font-size: 16px !important;
    }

    .why-us-tile p {
        font-size: 13px !important;
        line-height: 20px !important;
    }

    .table-wrap {
        -webkit-overflow-scrolling: touch;
        margin-left: calc(-1 * var(--margin-mobile, 20px));
        margin-right: calc(-1 * var(--margin-mobile, 20px));
        padding-left: var(--margin-mobile, 20px);
        padding-right: var(--margin-mobile, 20px);
    }

    section {
        margin-bottom: 80px;
    }
}

@media (max-width: 480px) {
    .display-lg,
    h1.font-display-lg,
    .font-display-lg,
    h1 {
        font-size: 26px !important;
        line-height: 34px !important;
    }

    .headline-xl,
    .font-headline-xl,
    h2 {
        font-size: 22px !important;
        line-height: 30px !important;
    }

    .headline-lg {
        font-size: 18px !important;
        line-height: 26px !important;
    }

    .body-lg {
        font-size: 14px !important;
        line-height: 22px !important;
    }

    .bento-title {
        font-size: 20px !important;
        line-height: 26px !important;
    }

    .product-card-body h3 {
        font-size: 16px !important;
    }

    .logo {
        width: 110px;
    }

    .product-carousel-wrap .carousel-arrow,
    .why-us-carousel-wrap .carousel-arrow {
        width: 32px;
        height: 32px;
        min-width: 32px;
        max-width: 32px;
    }

    .product-carousel-wrap .carousel-arrow .material-symbols-outlined,
    .why-us-carousel-wrap .carousel-arrow .material-symbols-outlined {
        font-size: 20px;
    }

    .product-carousel-wrap .carousel-arrow-left,
    .why-us-carousel-wrap .carousel-arrow-left,
    .why-us-carousel-wrap .why-us-arrow-left {
        left: 6px;
    }

    .product-carousel-wrap .carousel-arrow-right,
    .why-us-carousel-wrap .carousel-arrow-right,
    .why-us-carousel-wrap .why-us-arrow-right {
        right: 6px;
    }

    .product-carousel .product-card {
        flex: 0 0 100%;
    }

    .product-carousel .product-card img {
        height: 180px;
    }

    .product-carousel-wrap .carousel-arrow {
        top: 90px;
    }

    .product-card-body {
        padding: 12px 14px;
    }

    .services-section .product-carousel .product-card {
        flex: 0 0 100%;
    }

    .services-section .product-card img {
        height: 220px;
    }

    .services-section .product-carousel-wrap .carousel-arrow {
        top: 110px;
    }

    .services-section .product-card-body {
        padding: 14px;
    }

    .services-section .product-card-body h3 {
        font-size: 16px !important;
    }

    .services-section .product-card-body p {
        font-size: 12px !important;
        line-height: 18px !important;
    }

    .why-us-carousel .why-us-tile {
        flex: 0 0 100% !important;
        padding: 20px !important;
    }

    .bento-large {
        min-height: 280px;
    }

    .bento-main {
        min-height: 0;
    }
}
