/*
 * Global Metal — shared responsive layer
 * Keeps the desktop design intact and cleans up every public page on phones/tablets.
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: clip;
    scroll-padding-top: 86px;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    max-width: 100%;
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
}

.gm-mobile-menu-toggle {
    display: none;
}

@media (max-width: 900px) {
    html {
        scroll-padding-top: 76px;
    }

    header {
        min-height: 72px;
    }

    header .header-container {
        width: 100% !important;
        max-width: none !important;
        height: 72px !important;
        min-height: 72px !important;
        margin: 0 !important;
        padding: 0 14px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
    }

    header .logo-link {
        height: 100% !important;
        min-width: 0;
        flex: 0 1 auto;
    }

    header .logo-img {
        width: auto !important;
        max-width: min(48vw, 190px) !important;
        max-height: 58px !important;
        margin: 0 !important;
    }

    .gm-mobile-menu-toggle {
        position: relative;
        z-index: 2;
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0;
        border: 1px solid rgba(18, 18, 18, 0.14);
        border-radius: 10px;
        background: #f7f7f7;
        color: #121212;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .gm-mobile-menu-toggle span {
        width: 23px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .gm-mobile-menu-toggle:focus-visible {
        outline: 3px solid #c99b45;
        outline-offset: 2px;
    }

    header.gm-nav-open .gm-mobile-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    header.gm-nav-open .gm-mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    header.gm-nav-open .gm-mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    header .main-nav {
        position: fixed !important;
        top: 75px;
        inset-inline: 12px;
        width: auto !important;
        max-height: calc(100dvh - 91px);
        margin: 0 !important;
        padding: 8px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        border: 1px solid rgba(201, 155, 69, 0.35);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.985);
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(0.985);
        transform-origin: top center;
        transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
        pointer-events: none;
    }

    header.gm-nav-open .main-nav {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    header .main-nav ul {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        list-style: none !important;
    }

    header .main-nav li {
        width: 100%;
        margin: 0 !important;
    }

    header .main-nav li + li {
        border-top: 1px solid #ececec;
    }

    header .main-nav a {
        width: 100%;
        min-height: 48px;
        padding: 11px 14px !important;
        display: flex !important;
        align-items: center;
        border-radius: 8px;
        color: #121212 !important;
        font-size: 15px !important;
        line-height: 1.35;
        text-align: start;
        white-space: normal;
    }

    header .main-nav a::after {
        display: none !important;
    }

    header .main-nav a.active,
    header .main-nav a:hover,
    header .main-nav a:focus-visible {
        color: #8b641f !important;
        background: rgba(201, 155, 69, 0.13);
    }

    body.gm-menu-open {
        touch-action: none;
    }

    .hero-section {
        width: 100%;
        height: auto !important;
        min-height: 100svh !important;
        padding: 106px 18px 56px !important;
        background-attachment: scroll !important;
    }

    .hero-section h1 {
        max-width: 720px;
        margin: 0 0 18px !important;
        font-size: clamp(34px, 9vw, 50px) !important;
        line-height: 1.12;
        text-wrap: balance;
    }

    .hero-section p {
        max-width: 650px;
        margin: 0 auto 28px !important;
        font-size: clamp(16px, 4.4vw, 20px) !important;
        line-height: 1.65;
    }

    .cta-button {
        min-height: 50px;
        margin-top: 6px !important;
        padding: 13px 28px !important;
        font-size: 17px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .page-hero,
    .project-hero {
        width: 100%;
        height: auto !important;
        min-height: 44svh !important;
        margin-top: 72px !important;
        padding: 56px 18px !important;
        background-attachment: scroll !important;
    }

    .page-hero h1,
    .project-hero h1 {
        margin: 0 0 12px !important;
        font-size: clamp(32px, 9vw, 44px) !important;
        line-height: 1.15;
        text-wrap: balance;
    }

    .page-hero p,
    .project-hero p {
        max-width: 680px;
        margin: 0 !important;
        font-size: clamp(16px, 4.6vw, 19px) !important;
        line-height: 1.6;
    }

    .about-section,
    .services-section,
    .clients-section,
    .projects-section,
    .about-section-page,
    .service-details,
    .project-details,
    .gallery-section {
        padding-inline: 16px !important;
    }

    .about-section,
    .services-section,
    .clients-section,
    .projects-section,
    .about-section-page {
        padding-top: 64px !important;
        padding-bottom: 64px !important;
    }

    .service-details,
    .project-details,
    .gallery-section {
        padding-top: 48px !important;
        padding-bottom: 56px !important;
    }

    .section-title {
        margin: 0 0 36px !important;
        font-size: clamp(28px, 8vw, 34px) !important;
        line-height: 1.2;
        text-wrap: balance;
    }

    .about-content,
    .service-content,
    .project-details,
    .about-content-wrapper {
        max-width: 100% !important;
    }

    .about-content,
    .service-content p,
    .project-details p,
    .about-content-wrapper p,
    .about-content-wrapper li {
        font-size: 16px !important;
        line-height: 1.75 !important;
    }

    .service-content h2,
    .project-details h2,
    .about-content-wrapper h2 {
        font-size: clamp(25px, 7vw, 30px) !important;
        line-height: 1.25;
    }

    .about-content-wrapper {
        padding: 28px 22px !important;
        border-radius: 12px !important;
        border-inline-start-width: 4px !important;
        border-inline-end-width: 0 !important;
    }

    .services-grid,
    .projects-grid,
    .gallery-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 22px !important;
    }

    .service-card {
        padding: 28px 22px !important;
    }

    .service-card h3 {
        margin-top: 0;
        font-size: 22px !important;
    }

    .project-card,
    .project-img-box,
    .gallery-item,
    .gallery-img {
        min-width: 0;
    }

    .project-card {
        height: 260px !important;
        padding: 20px !important;
    }

    .project-img-box {
        height: 240px !important;
        border-radius: 9px !important;
    }

    .gallery-item,
    .gallery-img {
        height: 230px !important;
        border-radius: 9px;
    }

    .project-info h3 {
        font-size: 20px !important;
    }

    .clients-intro {
        margin-bottom: 30px !important;
        font-size: 16px !important;
    }

    .clients-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .client-logo-card {
        min-height: 104px !important;
        padding: 15px 12px !important;
    }

    .client-logo-card:last-child:nth-child(odd) {
        width: calc(50% - 6px) !important;
    }

    footer {
        padding: 54px 18px 90px !important;
    }

    .footer-content {
        width: 100%;
        margin-bottom: 30px !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 30px !important;
        text-align: start !important;
    }

    .footer-col {
        min-width: 0;
    }

    .footer-col h4 {
        margin: 0 0 14px !important;
        font-size: 20px !important;
    }

    .footer-col p {
        overflow-wrap: anywhere;
        font-size: 15px !important;
    }

    .page-status {
        min-height: calc(100svh - 72px) !important;
        margin-top: 72px !important;
        padding: 38px 18px !important;
    }

    .modal,
    .lightbox {
        padding: 70px 12px 82px !important;
    }

    .modal-content,
    .lightbox img {
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100svh - 164px) !important;
    }

    .close-modal,
    .lightbox-close {
        top: 14px !important;
        inset-inline-end: 14px !important;
        inset-inline-start: auto !important;
    }

    .nav-arrow,
    .lightbox-nav {
        top: auto !important;
        bottom: 14px !important;
        width: 50px !important;
        height: 50px !important;
        padding: 0 !important;
        display: grid;
        place-items: center;
        border-radius: 50%;
        font-size: 32px !important;
        transform: none !important;
        background: rgba(0, 0, 0, 0.58);
    }

    .nav-arrow.prev-arrow,
    .lightbox-prev {
        inset-inline-start: 16px !important;
        inset-inline-end: auto !important;
    }

    .nav-arrow.next-arrow,
    .lightbox-next {
        inset-inline-end: 16px !important;
        inset-inline-start: auto !important;
    }
}

@media (max-width: 480px) {
    html {
        scroll-padding-top: 72px;
    }

    header,
    header .header-container {
        min-height: 68px !important;
        height: 68px !important;
    }

    header .logo-img {
        max-width: 165px !important;
        max-height: 54px !important;
    }

    .gm-mobile-menu-toggle {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    header .main-nav {
        top: 71px;
        inset-inline: 8px;
        max-height: calc(100dvh - 81px);
    }

    .hero-section {
        padding: 96px 15px 46px !important;
    }

    .hero-section h1 {
        font-size: clamp(31px, 9.5vw, 40px) !important;
    }

    .page-hero,
    .project-hero {
        min-height: 42svh !important;
        margin-top: 68px !important;
        padding: 46px 15px !important;
    }

    .about-section,
    .services-section,
    .clients-section,
    .projects-section,
    .about-section-page {
        padding: 54px 14px !important;
    }

    .service-details,
    .project-details,
    .gallery-section {
        padding: 42px 14px 50px !important;
    }

    .about-content-wrapper {
        padding: 24px 18px !important;
    }

    .project-img-box,
    .gallery-item,
    .gallery-img {
        height: 215px !important;
    }

    .client-logo-card {
        min-height: 96px !important;
        padding: 13px 10px !important;
    }

    .page-status {
        min-height: calc(100svh - 68px) !important;
        margin-top: 68px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gm-mobile-menu-toggle span,
    header .main-nav {
        transition: none !important;
    }
}

