@media (max-width: 1180px) {
    .site-nav {
        gap: 20px;
    }

    .hero-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .icon-tile-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px 0;
    }

    .feature-card {
        padding: 22px 14px;
    }

    .feature-card:nth-child(3n) {
        border-right: 0;
    }
}

@media (max-width: 980px) {
    .container {
        width: min(100% - 32px, var(--max));
    }

    /* Cap a CMS-forced dealer column count on tablets. */
    .dealer-grid--fixed {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: fixed;
        inset: 80px 16px auto;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 18px;
        border: 1px solid rgba(255, 255, 255, .18);
        border-radius: 8px;
        background: rgba(6, 28, 49, .98);
        box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 14px 8px;
    }

    .btn--nav {
        margin-top: 10px;
    }

    .home-hero {
        min-height: auto;
        padding-bottom: 46px;
    }

    .home-hero h1 {
        font-size: clamp(42px, 12vw, 70px);
    }

    .page-hero {
        padding-top: 128px;
    }

    /* Top bar present: taller header → push the mobile nav dropdown + heroes down. */
    .has-topbar .site-nav {
        top: 138px;
    }

    /* On mobile the menu collapses to a dropdown — keep the hamburger on the right. */
    .has-topbar .nav-shell {
        justify-content: flex-end;
    }

    .has-topbar .home-hero {
        padding-top: 150px;
    }

    .has-topbar .page-hero {
        padding-top: 190px;
    }

    /* Mobile sizes & colours from the CMS (CSS vars set on .top-bar). */
    .has-topbar .top-bar__logo,
    .has-topbar .top-bar__qr {
        height: var(--tb-logo-m, 44px);
    }

    .has-topbar .top-bar__name {
        font-size: var(--tb-name-m, 18px);
        color: var(--tb-name-color-m);
    }

    .has-topbar .top-bar__tagline {
        font-size: var(--tb-tagline-m, 13px);
        color: var(--tb-tagline-color-m);
    }

    .hero-features,
    .page-hero--stats .hero-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .split-grid,
    .contact-grid,
    .quality-grid,
    .why-top,
    .dealer-top {
        grid-template-columns: 1fr;
        gap: 34px;
    }

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

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

    .segment-grid,
    .seg-grid,
    .value-grid,
    .project-grid,
    .gallery-grid,
    .impact-grid,
    .impact-stats,
    .strengths-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .seg-card--wide .seg-checks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .investment-strip {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .partner-panel {
        grid-template-columns: 1fr;
    }

    .tri-grid article + article {
        border-left: 1px solid var(--line);
        padding-left: 32px;
    }

    .contact-feature {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px !important;
    }

    .contact-map {
        min-height: 220px;
    }

    .timeline {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px 26px;
    }

    .timeline::before {
        display: none;
    }

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

    .partner-strip,
    .commitment-strip,
    .cta-strip,
    .newsletter,
    .table-toolbar,
    .list-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .partner-logos {
        justify-content: flex-start;
    }

    .announcement-card {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .announcement-card > div {
        padding: 24px;
    }

    .newsletter form {
        width: 100%;
        min-width: 0;
    }

    .footer-grid,
    .page-projects-table .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 34px;
    }
}

@media (max-width: 680px) {
    .brand {
        min-width: 0;
        font-size: 15px;
    }

    .brand img {
        width: 38px;
        height: 38px;
    }

    .nav-shell {
        min-height: 70px;
    }

    .site-nav {
        top: 72px;
    }

    .home-hero {
        padding-top: 118px;
    }

    /* Mobile hero image (falls back to the desktop image when none is set). */
    .home-hero::before,
    .page-hero::before {
        background-image: linear-gradient(90deg, rgba(4, 20, 37, .86), rgba(4, 20, 37, .42), rgba(4, 20, 37, .76)), var(--hero-image-mobile, var(--hero-image));
    }

    /* Justify body/description text on mobile for cleaner reading. */
    .section-heading p,
    .investment-strip p,
    .dealer-copy p,
    .why-strength p,
    .feature-card p,
    .card-body p,
    .impact-card__body p,
    .info-card p,
    .value-card p,
    .ann-body,
    .ann-body p {
        text-align: justify;
    }

    /* Top bar present (phones): compact the bar and re-clear the nav/heroes. */
    .has-topbar .site-nav {
        top: 124px;
    }

    .has-topbar .top-bar__inner {
        padding: 9px 0;
    }

    .has-topbar .home-hero {
        padding-top: 132px;
    }

    .has-topbar .page-hero {
        padding-top: 168px;
    }

    .home-hero__inner {
        gap: 34px;
    }

    .home-hero p {
        font-size: 15px;
    }

    .hero-card-grid,
    .hero-features,
    .page-hero--stats .hero-features,
    .icon-tile-grid,
    .about-home-details,
    .segment-grid,
    .seg-grid,
    .partner-list,
    .product-grid,
    .project-grid,
    .tri-grid,
    .value-grid,
    .gallery-grid,
    .impact-grid,
    .impact-stats,
    .strengths-grid,
    .footer-grid,
    .page-projects-table .footer-grid {
        grid-template-columns: 1fr;
    }

    .investment-strip__stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px 0;
    }

    .info-card--wide {
        grid-column: span 1;
    }

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

    .feature-card {
        border-right: 0;
    }

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

    .seg-card--wide {
        grid-column: auto;
    }

    .seg-checks,
    .seg-card--wide .seg-checks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dealer-grid-2 {
        grid-template-columns: 1fr;
    }

    /* Cap a CMS-forced column count so phones never get cramped. */
    .dealer-grid--fixed {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dealer-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 0;
    }

    .dealer-stat:nth-child(even) {
        border-right: 0;
    }

    .hero-card {
        min-height: 130px;
    }

    .page-hero {
        min-height: 410px;
        padding: 118px 0 54px;
    }

    .page-hero h1 {
        font-size: 38px;
    }

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

    .section {
        padding: 54px 0;
    }

    .image-panel img {
        height: 280px;
    }

    .experience-card {
        flex-direction: column;
        gap: 18px;
        text-align: center;
    }

    .experience-card p {
        margin: 0;
        text-align: center;
    }

    .table-controls,
    .form-row {
        width: 100%;
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .search-box input,
    .select-box select {
        width: 100%;
    }

    .newsletter form {
        flex-direction: column;
    }

    .filter-bar {
        margin-top: 0;
    }

    .filter-bar button {
        width: 100%;
        justify-content: center;
    }

    .contact-card {
        padding: 24px;
    }

    .footer-bottom {
        flex-wrap: wrap;
        gap: 12px 20px;
        text-align: center;
    }
}
