@media screen and (max-width: 1279px) {
    .menutop ul { gap: 20px; }
    .menutop a { font-size: .66rem; }
    .top__cta { display: none; }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (max-width: 1050px) {
    .top { height: 76px; }
    .top__inner { width: calc(100% - 36px); }
    .logo { width: 180px; }
    .menutop { display: none; }
    .menu-toggle {
        display: flex !important;
        position: relative;
        z-index: 1100;
        width: 44px;
        height: 44px;
        margin-left: auto;
        padding: 10px 7px;
        border: 0;
        background: transparent;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        cursor: pointer;
    }
    .menu-toggle span { display: block; width: 100%; height: 2px; background: #252523; border-radius: 2px; }

    .home-hero { margin-top: 76px; height: calc(100vh - 76px); min-height: 620px; }
    .sli-slide-page { margin-top: 76px; }
    .section-space { padding: 90px 0; }
    .section-heading--split { grid-template-columns: 1fr 1fr; gap: 45px; }
    .about-grid { gap: 50px; }
    .about-image, .about-image img { min-height: 460px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .service-card { min-height: 300px; }
    .footer-grid { grid-template-columns: 1.3fr .7fr .7fr; gap: 45px; }
    .footer-contact { grid-column: 1 / -1; }
    .menubox { width: calc(33.333% - 20px); }
    .contentgall { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (max-width: 767px) {
    .content { width: calc(100% - 32px); }
    .section-space { padding: 72px 0; }
    .section-heading { margin-bottom: 38px; }
    .section-heading--split { grid-template-columns: 1fr; gap: 22px; }
    .section-heading h2 { font-size: clamp(3.25rem, 14vw, 4.6rem); }
    .eyebrow { margin-bottom: 14px; }

    .top__inner { width: calc(100% - 28px); }
    .logo { width: 165px; }

    .home-hero { min-height: 610px; }
    .hero-slide__overlay { background: rgba(18,18,17,.62); }
    .hero-slide__content { align-items: flex-end; padding-bottom: 150px; }
    .hero-slide__copy { padding-top: 0; }
    .hero-slide h1 { font-size: clamp(4.5rem, 21vw, 6.7rem); }
    .hero-slide p { margin-top: 24px; font-size: .93rem; line-height: 1.65; }
    .hero-actions { margin-top: 28px; flex-direction: column; align-items: stretch; }
    .btn { width: 100%; }
    .hero-slide__index { display: none; }
    .home-hero .slick-dots { display: none !important; }

    .about-grid { grid-template-columns: 1fr; gap: 38px; }
    .about-image, .about-image img { min-height: 350px; }
    .about-copy { padding: 0; }
    .about-facts { grid-template-columns: 1fr; }
    .about-facts > div,
    .about-facts > div:nth-child(2),
    .about-facts > div:last-child { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 0; }
    .about-facts > div:last-child { border-bottom: 0; }

    .services-grid { grid-template-columns: 1fr; }
    .service-card { min-height: 270px; padding: 24px; }
    .service-card__icon { margin-top: 38px; }
    .division-grid { grid-template-columns: 1fr; }
    .division-card { min-height: 400px; padding: 34px 28px; }

    .projects-grid { grid-template-columns: 1fr; grid-auto-rows: 270px; }
    .project-card,
    .project-card--1,
    .project-card--2,
    .project-card--3,
    .project-card--4,
    .project-card--5,
    .project-card--6,
    .project-card--7,
    .project-card--8 { grid-column: auto; grid-row: auto; }
    .project-card--7, .project-card--8 { display: none; }

    .prefooter-cta { padding: 58px 0; }
    .prefooter-cta__inner { flex-direction: column; align-items: stretch; }
    .prefooter-cta .btn { width: 100%; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 45px 28px; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-contact { grid-column: 1 / -1; }
    .copyright__inner { flex-direction: column; }

    .sli-slide-page { height: 330px; }
    .captionslide { width: calc(100% - 32px); }
    .titcaptionpage { font-size: clamp(3.4rem, 18vw, 5rem); }
    .submenu { width: calc(100% - 32px); justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 14px; }
    .submenu a { white-space: nowrap; }
    .padding70 { padding: 65px 0 80px; }
    .principaleleft, .descrizioneleft { width: 100%; float: none; margin: 28px 0 0; padding-top: 0; }
    .menubox { width: calc(50% - 12px); margin: 6px; min-height: 245px; }
    .menubox_img { height: 200px; }
    .contentgall { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .contentgall a { height: 180px; }
}

@media screen and (max-width: 479px) {
    .logo { width: 150px; }
    .mobile-menu { width: 100vw; }
    .hero-slide h1 { font-size: 4.7rem; }
    .services-grid { border-left: 0; }
    .service-card { border-left: 1px solid rgba(255,255,255,.13); }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-brand, .footer-contact { grid-column: auto; }
    .menubox { width: 100%; margin: 0 0 20px; }
    .menubox_img { height: 240px; }
    .contentgall { grid-template-columns: 1fr; }
    .contentgall a { height: 250px; }
}

/* Pagine interne 2026 */
@media screen and (max-width: 1050px) {
    .page-hero { margin-top: 76px; min-height: 460px; height: 56vh; }
    .section-cards { grid-template-columns: repeat(2, 1fr); }
    .section-cards--company { grid-template-columns: repeat(2, 1fr); }
    .page-detail { grid-template-columns: 1fr 1fr; gap: 45px; }
    .page-detail__media img { min-height: 430px; }
    .quote-form-wrap { grid-template-columns: 1fr; }
}

@media screen and (max-width: 767px) {
    .page-hero { min-height: 400px; height: 52vh; }
    .page-hero__inner { padding-bottom: 42px; }
    .page-hero h1 { font-size: clamp(4rem, 19vw, 6rem); }
    .page-hero__copy p { font-size: .9rem; }
    .page-hero__mark { display: none; }
    .submenu__inner { width: calc(100% - 32px); justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; }
    .submenu a { white-space: nowrap; padding: 17px 0 15px; }
    .section-cards { grid-template-columns: 1fr; margin-top: 40px; }
    .section-card { min-height: 350px; }
    .section-cards--company { grid-template-columns: 1fr; }
    .page-content__head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 38px; padding-bottom: 28px; }
    .page-content__head .eyebrow { grid-column: auto; margin-bottom: 0; }
    .page-content__head h2 { font-size: clamp(3.4rem, 16vw, 4.8rem); }
    .page-content__head > p { padding-bottom: 0; }
    .page-detail { grid-template-columns: 1fr; gap: 32px; }
    .page-detail__media { position: relative; top: auto; }
    .page-detail__media img { min-height: 330px; max-height: 520px; }
    .page-detail__copy { font-size: .94rem; }
    .company-links { margin-top: 65px; }
    .page-gallery__grid { grid-template-columns: 1fr; grid-auto-rows: 280px; gap: 9px; }
    .gallery-card, .gallery-card:nth-child(n) { grid-column: auto; grid-row: auto; }
    .gallery-card__zoom { opacity: 1; transform: none; width: 38px; height: 38px; }
    .quote-form-wrap { margin-top: 65px; padding-top: 45px; gap: 35px; }
    .quote-form-panel { padding: 24px 18px; }
    .quote-form { grid-template-columns: 1fr; }
    .form-field--wide { grid-column: auto; }
}

@media screen and (max-width: 1050px) {
    .communication-intro { gap: 50px; }
    .communication-intro__heading { position: relative; top: auto; }
}

@media screen and (max-width: 767px) {
    .category-intro--communication { padding-top: 62px; }
    .communication-intro { grid-template-columns: 1fr; gap: 34px; padding-bottom: 50px; }
    .communication-intro__heading h2 { font-size: clamp(3.8rem, 17vw, 5.3rem); }
    .communication-intro__heading > p { margin-top: 22px; }
    .communication-intro__text { font-size: .96rem; line-height: 1.82; }
    .section-cards--communication { margin-top: 48px; }
}

/* Refinement 2026-08 */
@media screen and (max-width: 1050px) {
    .page-hero__inner { padding-bottom: 125px; }
    .page-intro-grid { gap: 50px; }
}

@media screen and (max-width: 767px) {
    body, html { font-size: 16px; }
    .page-hero__inner { padding-bottom: 92px; }
    .page-intro-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin: 0 0 48px;
        padding: 38px 0 40px;
    }
    .page-intro-grid__text { padding-top: 0; }
    .page-intro-grid__text p { font-size: 1.05rem; }
    .page-detail--clean { font-size: 1rem; }
}


@media screen and (max-width: 767px) {
    .page-intro-generic {
        margin: 0 0 48px;
        padding: 36px 0 40px;
    }
    .page-intro-generic p {
        font-size: 1.05rem;
        line-height: 1.72;
    }
}
@media screen and (max-width: 767px) {
    .page-hero__inner {
        align-items: center;
        padding-top: 34px;
        padding-bottom: 0;
    }
    .page-hero__copy { transform: none; }
}

@media screen and (max-width: 767px) and (max-height: 720px) {
    .hero-slide__content { padding-bottom: 115px; }
}


/* Sottomenu nel menu mobile */
@media screen and (max-width: 767px) {
    /* Il sottomenu orizzontale delle pagine resta nascosto solo su mobile. */
    main > .submenu {
        display: none !important;
    }

    .mobile-menu {
        overflow-y: auto;
    }

    .mobile-menu__nav > a,
    .mobile-menu__row {
        border-bottom: 1px solid rgba(255,255,255,.14);
    }

    .mobile-menu__row {
        display: grid;
        grid-template-columns: 1fr 48px;
        align-items: stretch;
    }

    .mobile-menu__row > a {
        display: flex;
        align-items: center;
        padding: 14px 0;
        font-family: 'Barlow Condensed', sans-serif;
        font-size: 1.7rem;
        line-height: 1;
        text-transform: uppercase;
    }

    .mobile-menu__row > a.active {
        color: #5bc4ef;
    }

    .mobile-submenu-toggle {
        position: relative;
        width: 48px;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .mobile-submenu-toggle::before,
    .mobile-submenu-toggle::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        width: 15px;
        height: 2px;
        background: #fff;
        transform: translate(-50%, -50%);
        transition: transform .25s ease;
    }

    .mobile-submenu-toggle::after {
        transform: translate(-50%, -50%) rotate(90deg);
    }

    .mobile-menu__group.is-open .mobile-submenu-toggle::after {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    .mobile-submenu {
        display: none;
        padding: 5px 0 14px 18px;
        border-bottom: 1px solid rgba(255,255,255,.14);
    }

    .mobile-menu__group.is-open .mobile-submenu {
        display: block;
    }

    .mobile-submenu a {
        display: block;
        padding: 9px 0;
        color: rgba(255,255,255,.72);
        font-size: .88rem;
        line-height: 1.35;
    }

    .mobile-submenu a.active {
        color: #5bc4ef;
    }
}
