@media only screen and (max-width: 1120px) {
    h1 {
        font-size: 46px;
    }

    h2 {
        font-size: 30px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 14px;
    }

    .home-page .hero-content {
        min-height: calc(100svh - var(--home-nav-height, 82px));
        align-items: end;
        padding-bottom: 24px;
    }

    .info-grid,
    .quote-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media only screen and (max-width: 1024px) {
    body.nav-open {
        overflow: hidden;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(360px, 88vw);
        height: 100dvh;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
        padding: 84px 18px 22px;
        border-left: 1px solid #4a7562;
        border-radius: 0;
        background:
            linear-gradient(162deg, #07120d 0%, #123126 46%, #104437 74%, #0b2f24 100%);
        box-shadow: -16px 0 36px rgba(4, 8, 6, 0.58);
        opacity: 1;
        visibility: visible;
        pointer-events: none;
        transform: translateX(108%);
        transition: transform 0.24s ease;
        z-index: 1100;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        display: block;
        width: 100%;
        padding: 13px 14px;
        border: 1px solid #375847;
        border-radius: 12px;
        font-size: 14px;
        letter-spacing: 1px;
        background: #10241b;
    }

    .main-nav a:hover,
    .main-nav a:focus {
        background: #1a3e2f;
        border-color: #4a7c67;
        color: #f4fff9;
    }

    body.nav-open .main-nav {
        pointer-events: auto;
        transform: translateX(0);
    }

    body.nav-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(5, 8, 7, 0.62);
        z-index: 900;
    }

    .gallery-grid,
    .services-grid,
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid img {
        height: 200px;
    }
}

@media only screen and (max-width: 680px) {
    body {
        font-size: 15px;
    }

    .section {
        padding: 56px 0;
    }

    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 27px;
    }

    h3 {
        font-size: 19px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .info-grid,
    .gallery-grid,
    .services-grid,
    .process-grid,
    .quote-grid,
    .two-col {
        grid-template-columns: 1fr;
    }

    .gallery-grid img,
    .service-card img {
        height: 190px;
    }

    .site-nav {
        padding: 10px 0;
    }

    .brand {
        width: clamp(92px, 34vw, 116px);
    }

    .subpage-hero {
        padding-top: calc(var(--site-nav-height, 72px) + 16px);
        padding-bottom: 36px;
    }

    .hero-panel h2 {
        font-size: 22px;
    }

    .main-nav {
        width: min(340px, 100vw);
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-copy p {
        text-align: left;
    }

    .gallery-topbar {
        align-items: flex-start;
    }

    .gallery-page-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .gallery-page-card {
        padding: 14px;
        border-radius: 16px;
    }

    .gallery-pager {
        gap: 8px;
    }

    .gallery-pager .btn {
        min-width: 112px;
    }

    .gallery-thumb-meta {
        left: 8px;
        bottom: 8px;
        padding: 5px 8px;
        font-size: 10px;
    }

    .gallery-lightbox {
        padding: 10px;
    }

    .gallery-lightbox-dialog {
        width: 100%;
        max-height: calc(100vh - 20px);
        padding: 42px 12px 16px;
    }

    .gallery-lightbox-close {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .gallery-lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .gallery-lightbox-nav.prev {
        left: 4px;
    }

    .gallery-lightbox-nav.next {
        right: 4px;
    }

    .gallery-lightbox-caption {
        font-size: 13px;
    }
}

@media only screen and (max-width: 520px) {
    .gallery-page-grid {
        grid-template-columns: 1fr;
    }

    .gallery-pager {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-pager .btn {
        width: 100%;
    }
}
