/* ── Extra variables ──────────────────────────────────────────────────────── */

:root {
    --accent-dark:  #2288a8;
    --ink:          #0a0a0a;
    --ink-muted:    #777;
    --border-thin:  1px solid rgba(0, 0, 0, 0.1);
    --section-v:    6rem;
    --container:    1100px;
    --footer-bg:    #141414;
    --footer-line:  rgba(255, 255, 255, 0.07);
}

/* ── Shared utilities ─────────────────────────────────────────────────────── */

.section {
    padding: var(--section-v) 2rem;
    background: var(--text-main-bg);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
}

.section__title {
    font-size: clamp(0.6rem, 1.1vw, 0.72rem);
    font-weight: 400;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0 0 3.5rem;
    position: relative;
    padding-left: 1.6rem;
}

.section__title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0.9rem;
    height: 1px;
    background: var(--main-color);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid rgba(0, 0, 0, 0.3);
    padding: 0.55rem 1.3rem;
    transition: background 0.25s ease, color 0.25s ease,
                border-color 0.25s ease;
    align-self: flex-start;
    background: transparent;
    cursor: pointer;
}

.btn:hover {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.btn--sm {
    font-size: 0.56rem;
    padding: 0.4rem 1rem;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Dark gradient overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.55) 60%,
        rgba(0, 0, 0, 0.3) 100%
    );
    z-index: 1;
}

/* Subtle scanline texture */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.04) 3px,
        rgba(0, 0, 0, 0.04) 4px
    );
    pointer-events: none;
    z-index: 2;
}

.hero__content {
    position: relative;
    z-index: 3;
    padding: 9rem 6rem 5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.4rem;
    max-width: 760px;
}

/* Thin accent line before the title */
.hero__content::before {
    content: '';
    display: block;
    width: 2.5rem;
    height: 1px;
    background: var(--main-color);
    margin-bottom: 0.4rem;
}

.hero__logo {
    height: auto;
    width: 80vw;
    max-width: 1000px;
    display: block;
    filter: drop-shadow(0 2px 12px rgba(0,0,0,0.25));
}

.hero__title {
    font-size: clamp(3rem, 10vw, 7.5rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #fff;
    margin: 0;
    line-height: 0.95;
    text-transform: uppercase;
}

.hero__title--accent {
    color: var(--main-color);
}

.hero__subtitle {
    font-size: clamp(0.6rem, 1.4vw, 0.8rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    text-transform: uppercase;
    max-width: 42ch;
    line-height: 2;
}

.hero__ctas {
    display: flex;
    gap: 1rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
}

.hero__btn {
    display: inline-block;
    padding: 0.8rem 2.2rem;
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease,
                border-color 0.3s ease;
}

.hero__btn--blue {
    border-color: var(--main-color);
    background: var(--main-color);
    color: #fff;
}
.hero__btn--blue:hover {
    background: transparent;
    color: var(--main-color);
}

.hero__btn--white {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.85);
}
.hero__btn--white:hover {
    background: #fff;
    border-color: #fff;
    color: #111;
}

/* ── Hero separator SVG ───────────────────────────────────────────────────── */

.hero-separator {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    width: 100vw;
    line-height: 0;
    margin-top: -4.25vw;
    background: transparent;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.hero-separator img {
    display: block;
    width: 52%;
    height: auto;
    filter: none;
    opacity: 0.9;
}

/* ── Anchor scroll offset (navbar + margine) ──────────────────────────────── */

#sec-prodotti,
#sec-servizi,
#sec-chi-siamo,
#sec-galleria,
#sec-contatti {
    scroll-margin-top: 25vh;
}

/* ── Products preview ─────────────────────────────────────────────────────── */

.products-preview {
    padding-top: 2.5rem !important;
}

.products-preview__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5px;
    background: rgba(57, 165, 201, 0.3);
    border: 1.5px solid rgba(57, 165, 201, 0.3);
}

.product-card {
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-card__img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f4;
}

.product-card__img {
    width: 100%;
    height: 100%;
    display: block;
    filter: grayscale(30%);
    transition: filter 0.45s ease, transform 0.55s ease;
}

.product-card__img--cover {
    object-fit: cover;
}

.product-card__img--contain {
    object-fit: contain;
    padding: 0.5rem;
}

.product-card:hover .product-card__img {
    filter: grayscale(0%);
    transform: scale(1.04);
}

.product-card__body {
    padding: 1.4rem 1.6rem 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1.5px solid rgba(57, 165, 201, 0.3);
}

.product-card__body h3 {
    font-size: clamp(0.58rem, 1.2vw, 0.75rem);
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0;
}

/* ── Features — accent section ────────────────────────────────────────────── */

.features {
    background: var(--main-color);
    padding: calc(var(--section-v) + 3rem) 2rem;
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
    margin: -3rem 0;
    position: relative;
    z-index: 1;
}

/* Servizi — stessa estetica ma margine indipendente */
.services {
    margin: 4rem 0;
    z-index: 0;
}

.features .section__title {
    color: rgba(255, 255, 255, 0.55);
}

.features .section__title::before {
    background: rgba(255, 255, 255, 0.45);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3.5rem 4rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    position: relative;
    padding-top: 1.2rem;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.35);
}

.feature-item__num {
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.15);
    display: block;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.feature-item__title {
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
}

.feature-item__desc {
    font-size: clamp(0.56rem, 1vw, 0.68rem);
    line-height: 2.1;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.06em;
    margin: 0;
    font-weight: 300;
}

/* ── Collaboratori ────────────────────────────────────────────────────────── */

.collaboratori {
    background: #fff;
    clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
    margin: -3rem 0;
    padding: calc(var(--section-v) + 3rem) 2rem;
    position: relative;
    z-index: 2;
}

.collaboratori__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.collab-card {
    border: var(--border-thin);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.collab-card__img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collab-card__img {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.45s ease;
}

.collab-card__img--cover   { object-fit: cover; }
.collab-card__img--contain { object-fit: contain; padding: 1rem; }

.collab-card:hover .collab-card__img {
    transform: scale(1.03);
}

.collab-card__name {
    padding: 1rem 1.4rem;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0;
    border-top: var(--border-thin);
}

/* ── Contact main ─────────────────────────────────────────────────────────── */

.contact-main {
    background: #fff;
    padding-top: calc(var(--section-v) + 4rem);
    text-align: center;
}

.contact-main__question {
    font-size: clamp(1.4rem, 3.5vw, 2.4rem);
    letter-spacing: 0.06em;
    color: var(--ink);
    margin: 0 0 0.6rem;
}

.contact-main__sub {
    font-size: clamp(0.6rem, 1.4vw, 0.8rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0 0 3.5rem;
}

.contact-main__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2.5rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--ink);
    padding: 1.6rem 2rem;
    border: var(--border-thin);
    border-radius: 4px;
    min-width: 160px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.contact-item:hover {
    border-color: var(--main-color);
    color: var(--main-color);
    background: rgba(57, 165, 201, 0.05);
}

.contact-item__icon {
    font-size: 1.6rem;
    line-height: 1;
}

.contact-item__label {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-align: center;
}

/* ── Contact map ──────────────────────────────────────────────────────────── */

.contact-map {
    margin-top: 3.5rem;
}

.contact-map__title {
    font-size: clamp(0.6rem, 1.1vw, 0.72rem);
    font-weight: 400;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0 0 1.5rem;
    position: relative;
    padding-left: 1.6rem;
    text-align: left;
}

.contact-map__title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0.9rem;
    height: 1px;
    background: var(--main-color);
}

#contact-leaflet-map {
    width: 100%;
    height: 380px;
    border-radius: 4px;
    border: var(--border-thin);
}

/* ── Contact strip (legacy, mantenuto per compatibilità) ──────────────────── */

.contact-strip {
    background: var(--text-main-bg);
    border-top: var(--border-thin);
    padding: calc(var(--section-v) * 0.7) 4rem calc(var(--section-v) * 0.35);
}

.contact-strip__inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.contact-strip__inner > p {
    font-size: 0.56rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0;
}

.contact-strip__item {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-strip__item:hover {
    color: var(--main-color);
    border-bottom-color: var(--main-color);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.site-footer {
    background: var(--footer-bg);
    color: rgba(255, 255, 255, 0.45);
    padding-bottom: 5rem; /* clearance for fixed control-nav */
}

.footer__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 5rem 2rem 3.5rem;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 4rem;
    border-bottom: 1px solid var(--footer-line);
}

.footer__col--brand {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.footer__slogan {
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
    line-height: 2.1;
    max-width: 28ch;
}

.footer__heading {
    font-size: 0.56rem;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.28);
    margin: 0 0 1.6rem;
    font-weight: 400;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer__heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 1.5rem;
    height: 1px;
    background: var(--main-color);
    opacity: 0.7;
}

.footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.footer__list li {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.8;
}

.footer__list a {
    color: var(--main-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    transition: color 0.2s ease;
}

.footer__list a:hover {
    color: #fff;
}

.footer__social {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.footer__social a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--main-color);
    font-weight: 700;
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer__social a:hover {
    color: #fff;
}

.footer__social i {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.footer__social a:hover i {
    opacity: 1;
}

.footer__bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding: 1.8rem 2rem;
}

.footer__bottom p {
    font-size: 0.52rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.2);
    margin: 0;
}

/* ── Cookie banner ────────────────────────────────────────────────────────── */

.cookie-banner {
    position: fixed;
    bottom: 4.5rem;   /* above control-nav */
    right: 1.5rem;
    z-index: 998;
    background: var(--footer-bg, #141414);
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem 0.9rem 1.4rem;
    max-width: 280px;
    border-left: 2px solid var(--main-color);
    /* hidden by default — JS adds .cookie-banner--visible */
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.cookie-banner--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-banner__text {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    line-height: 1.9;
    margin: 0;
    flex: 1;
}

.cookie-banner__actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cookie-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cookie-btn--accept {
    color: var(--main-color);
    border-color: var(--main-color);
}

.cookie-btn--accept:hover {
    background: var(--main-color);
    color: #fff;
}

.cookie-btn--decline {
    color: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
}

.cookie-btn--decline:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Trigger per riaprire il banner */
.cookie-trigger {
    position: fixed;
    bottom: 4.5rem;
    left: 1.2rem;
    z-index: 997;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(16, 16, 16, 0.9);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, color 0.2s ease, border-color 0.2s ease;
}

.cookie-trigger--visible {
    opacity: 1;
    pointer-events: auto;
}

.cookie-trigger:hover {
    color: var(--main-color);
    border-color: var(--main-color);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .footer__col--brand {
        grid-column: 1 / -1;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   PRODUCT CARDS — stato active
   ══════════════════════════════════════════════════════════════════════════ */

.product-card {
    cursor: pointer;
    transition: box-shadow 0.25s;
}

.product-card--active {
    background: var(--main-color);
}

.product-card--active .product-card__img {
    filter: grayscale(0%);
}

.product-card--active .product-card__body {
    border-top-color: var(--main-color);
    background: var(--main-color);
}

.product-card--active .product-card__body h3 {
    color: #fff;
}

/* ══════════════════════════════════════════════════════════════════════════
   CATEGORY PANELS  (sotto la griglia di card)
   ══════════════════════════════════════════════════════════════════════════ */

.cat-panels {
    margin-top: 10vh;
    border-top: 2px solid var(--main-color);
    display: none; /* nascosto finché nessuna card è attiva */
    scroll-margin-top: 30vh;
}

.cat-panels--visible {
    display: block;
}

/* Singolo pannello (uno per prodotto) */
.cat-panel {
    display: none;
    flex-direction: column;
}

.cat-panel--active {
    display: flex;
}

/* Singola riga categoria */
.cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0.6rem;
    text-decoration: none;
    color: var(--ink);
    border-bottom: 1px solid rgba(128, 128, 128, 0.18);
    transition: background 0.18s, color 0.18s;
}

.cat-row:last-child {
    border-bottom: none;
}

.cat-row:hover {
    background: rgba(57, 165, 201, 0.1);
    color: var(--main-color);
}

.cat-row--disabled {
    cursor: default;
    opacity: 0.45;
    pointer-events: none;
}

.cat-row__plus {
    color: var(--ink-muted);
    font-size: 1.1rem;
    min-width: 1.2rem;
    flex-shrink: 0;
    transition: color 0.18s;
}

.cat-row:hover .cat-row__plus {
    color: var(--main-color);
}

.cat-row:hover .cat-row__name {
    text-decoration: underline;
}

.cat-row__name {
    flex: 1;
    text-align: left;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════════════════════
   PRODOTTI VIEWER  (pagina con iframe)
   ══════════════════════════════════════════════════════════════════════════ */

.prodotti-viewer {
    min-height: 70vh;
}

.prodotti-viewer__frame-wrap {
    position: relative;
    width: 100%;
    min-height: 78vh;
    border: var(--border-thin);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 2rem;
}

.prodotti-viewer__iframe--direct {
    height: 100vh;
    min-height: 100vh;
}

.prodotti-viewer__click-blocker {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: default;
}

.prodotti-viewer__iframe {
    width: 100%;
    min-height: 78vh;
    height: 78vh; /* JS sovrascrive con l'altezza reale del contenuto */
    border: none;
    display: block;
}

.prodotti-viewer__empty {
    color: var(--ink-muted);
    margin-bottom: 2rem;
}

.prodotti-viewer__spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    z-index: 2;
}

.prodotti-viewer__spinner-ring {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(57, 165, 201, 0.2);
    border-top-color: var(--main-color);
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════════════════════════════════
   GALLERY REALIZZAZIONI
   ══════════════════════════════════════════════════════════════════════════ */

.gallery-section {
    padding-bottom: calc(var(--section-v) + 2rem);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 220px);
    gap: 6px;
    margin-top: 2.5rem;
}

/* Posizionamento esplicito delle celle */
.gallery-item--a { grid-column: 1 / 3; grid-row: 1 / 3; } /* 2×2 quadruplo */
.gallery-item--b { grid-column: 3 / 4; grid-row: 1 / 2; }
.gallery-item--c { grid-column: 4 / 5; grid-row: 1 / 2; }
.gallery-item--d { grid-column: 3 / 5; grid-row: 2 / 3; } /* 2×1 doppio */
.gallery-item--e { grid-column: 1 / 2; grid-row: 3 / 4; }
.gallery-item--f { grid-column: 2 / 4; grid-row: 3 / 4; } /* 2×1 doppio */
.gallery-item--g { grid-column: 4 / 5; grid-row: 3 / 4; }
.gallery-item--h { grid-column: 1 / 3; grid-row: 4 / 5; } /* 2×1 doppio */
.gallery-item--i { grid-column: 3 / 4; grid-row: 4 / 5; }
.gallery-item--j { grid-column: 4 / 5; grid-row: 4 / 5; }

.gallery-item {
    margin: 0;
    overflow: hidden;
    background: #e8e8e8;
    position: relative;
}

.gallery-item__img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #d8d8d8;
    transition: transform 0.5s ease;
}

/* Placeholder quando l'url è vuota — sfumatura grigia */
.gallery-item__img[style*="url('')"],
.gallery-item__img[style*='url("")'] {
    background-image: none !important;
    background: linear-gradient(135deg, #e2e2e2 0%, #cacaca 100%);
}

.gallery-item:hover .gallery-item__img {
    transform: scale(1.04);
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: none;
        gap: 5px;
    }

    /* Su tablet reset posizionamento e lascia auto-flow */
    .gallery-item--a,
    .gallery-item--b,
    .gallery-item--c,
    .gallery-item--d,
    .gallery-item--e,
    .gallery-item--f,
    .gallery-item--g,
    .gallery-item--h,
    .gallery-item--i,
    .gallery-item--j {
        grid-column: unset;
        grid-row: unset;
    }

    /* Riapplica solo i doppi */
    .gallery-item--a,
    .gallery-item--d,
    .gallery-item--f,
    .gallery-item--h { grid-column: span 2; }

    .gallery-item { min-height: 180px; }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item--a,
    .gallery-item--d,
    .gallery-item--f,
    .gallery-item--h { grid-column: unset; }

    .gallery-item { min-height: 220px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .hero__content {
        padding: 7rem 2rem 3rem;
    }

    .products-preview__grid {
        grid-template-columns: 1fr;
    }

    .features__grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .features {
        clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%);
    }

    .contact-strip__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem;
    }

    .footer__inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 3.5rem 2rem 2.5rem;
    }

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

    .collaboratori {
        clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%);
    }

    .contact-main__grid {
        gap: 1rem;
    }

    .contact-item {
        min-width: 130px;
        padding: 1.2rem 1.4rem;
    }
}
