@import url("design-system.css");
@import url("components/combobox.css");

:root {
    --bg: #ffffff;
    --ink: #111111;
    --ink-soft: #2f2f2f;
    --accent: #e10613;
    --accent-dark: #b5050f;
    --line: #e6e6e6;
    --muted: #6c6c6c;
    --shadow: 0 10px 30px rgba(10, 10, 10, 0.07);
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 8px;
    --btn-height: 42px;
    --btn-padding-x: 18px;
    --btn-radius: 8px;
    --btn-font-size: 12px;
    --btn-letter-spacing: 1px;
    --title-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --title-main-color: #c40000;
    --title-sub-color: #111111;
    --title-main-size: clamp(28px, 4vw, 44px);
    --title-sub-size: clamp(18px, 2vw, 26px);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: var(--btn-height);
    padding: 0 var(--btn-padding-x);
    border-radius: var(--btn-radius);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: var(--btn-letter-spacing);
    font-size: var(--btn-font-size);
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

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

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: transparent;
    box-shadow: none;
}

.btn--on-dark {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: none;
}

.field-label {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    color: var(--ink-soft);
    font-weight: 600;
}

.input {
    width: 100%;
    border: 1.5px solid #dcdcdc;
    border-radius: 999px;
    padding: 12px 16px;
    font-size: 16px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    outline: none;
    background: #fff;
    transition: border-color 0.15s ease;
}
.input:focus {
    border-color: var(--accent);
}

.page {
    background: var(--bg);
    overflow-x: hidden;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(12px, 1.6vw, 18px) clamp(16px, 4vw, 48px);
    gap: 16px;
    min-height: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.site-header .nav-dropdown {
    z-index: 1001;
}

.header-search {
    flex: 0 1 36%;
    min-width: 320px;
    max-width: 520px;
    margin-left: auto;
}

.header-construction-notice {
    flex: 0 0 min(420px, 26vw);
    min-width: 300px;
    margin-left: 10px;
    margin-right: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.3;
    padding: 11px 14px;
    border-radius: 10px;
    background: linear-gradient(120deg, #fff8db, #ffe9bf);
    border: 1px solid rgba(250, 163, 20, 0.35);
}

.header-construction-notice strong {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8a3b00;
}

.header-construction-notice span {
    font-size: 13px;
    color: #5e4a18;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.header-search .search-box {
    padding: 6px 10px;
    box-shadow: none;
    border-radius: 999px;
}

.header-search .search-box input {
    font-size: 14px;
    padding: 6px 4px;
}

.header-search .btn {
    height: 32px;
    padding: 0 14px;
}

@media (max-width: 1100px) {
    .header-construction-notice {
        display: none;
    }

    .header-search {
        order: 3;
        width: 100%;
        max-width: none;
        flex: 1 1 100%;
        margin-left: 0;
    }
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    display: block;
    max-width: clamp(110px, 10vw, 150px);
    height: auto;
}

.site-nav {
    display: flex;
    gap: clamp(18px, 2.6vw, 32px);
    font-weight: 500;
    text-transform: uppercase;
    font-size: clamp(11px, 1.1vw, 13px);
    letter-spacing: 1px;
    white-space: nowrap;
}

.site-nav-head {
    display: none;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: stretch;
    padding-bottom: 10px;
}

.nav-parent-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.site-nav a,
.site-nav .nav-parent-link {
    position: relative;
    padding-bottom: 6px;
}

.nav-parent-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    line-height: 1;
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.nav-parent-button {
    justify-content: flex-start;
}

.nav-subtoggle {
    border: none;
    background: none;
    color: inherit;
    padding: 0 0 6px;
    width: auto;
    height: auto;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-caret {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 1.7px solid currentColor;
    border-bottom: 1.7px solid currentColor;
    transform: rotate(45deg);
    transform-origin: 50% 50%;
    transition: transform 0.2s ease;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 0;
    min-width: 200px;
    width: max-content;
    max-width: 280px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: var(--shadow);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
    z-index: 20;
}

.nav-dropdown a {
    display: block;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus {
    background: #fff200;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
    transition-delay: 0s;
}

.nav-item:not(:hover):not(:focus-within) .nav-dropdown {
    transition-delay: 0.2s;
}

.site-nav a::after,
.site-nav .nav-parent-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.site-nav a.is-active::after,
.site-nav .nav-parent-link.is-active::after {
    width: 100%;
}

.site-nav a:hover::after,
.site-nav .nav-parent-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    border: none;
    background: transparent;
}

.nav-toggle span {
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.22s ease, opacity 0.2s ease;
}

.nav-backdrop {
    display: none;
}

.hero {
    padding: clamp(18px, 3vw, 28px) 6vw clamp(12px, 2vw, 18px);
}

.hero--compact {
    padding: clamp(16px, 2.8vw, 26px) 6vw clamp(8px, 1.6vw, 14px);
}

.hero--detail {
    position: relative;
    padding-top: clamp(10px, 2vw, 18px);
}

.detail-actions {
    position: absolute;
    top: clamp(8px, 2vw, 16px);
    right: 6vw;
    display: flex;
    gap: 10px;
    z-index: 2;
}

.chip-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.chip-action.ghost {
    background: #fff6d6;
    color: #1a1a1a;
    border: 1px solid #f3d37a;
}

.impianto-detail-page {
    padding: clamp(12px, 1.6vw, 18px) 6vw 60px;
    display: grid;
    gap: 14px;
}

.impianto-detail-hero {
    max-width: min(1320px, 100%);
    margin: 0 auto;
    width: 100%;
    display: grid;
    gap: 10px;
}

.impianto-detail-head h1 {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(22px, 2.2vw, 32px);
    line-height: 1.12;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #111;
}

.impianto-detail-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(225, 6, 19, 0.35);
    background: rgba(225, 6, 19, 0.08);
    color: var(--accent);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 6px;
}

.impianto-detail-head p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: clamp(13px, 1vw, 15px);
}

.impianto-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.impianto-detail-top {
    max-width: min(1320px, 100%);
    margin: 0 auto;
    width: 100%;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 2.4fr) minmax(320px, 1fr);
    align-items: stretch;
}

.impianto-detail-cover-card {
    display: grid;
    gap: 12px;
}

.impianto-detail-cover {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #0b0b0b;
    min-height: 0;
    height: clamp(320px, 56vh, 560px);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow);
    position: relative;
}

.impianto-detail-cover img {
    /* Ancoraggio assoluto al box (il box e' position:relative): cosi' l'altezza
       e' DEFINITA (= box) anche dentro la flip-card 3D, dove height:100% non si
       risolveva e l'immagine sforava venendo tagliata. object-fit:contain ->
       l'intera foto e' sempre visibile, scalata dentro la card. */
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;          /* center-view manuale via inline style */
    display: block;
    cursor: zoom-in;
}
/* La galleria piccola usa lo stesso principio (box con aspect-ratio definito). */
.impianto-detail-photo img { object-fit: contain; }

.impianto-map-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    padding: 0;
    cursor: pointer;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}
.impianto-map-overlay svg { width: 28px; height: 28px; display: block; }
.impianto-map-overlay:hover { transform: scale(1.06); }
.impianto-map-overlay::after {
    content: attr(data-tip);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.impianto-map-overlay:hover::after { opacity: 1; transform: translateY(0); }

/* Flip 3D della cover: foto <-> mappa */
.impianto-flip { perspective: 1600px; }
.impianto-flip-inner {
    position: relative;
    transition: transform 0.7s cubic-bezier(0.45, 0.05, 0.25, 1);
    transform-style: preserve-3d;
}
.impianto-flip.is-flipped .impianto-flip-inner { transform: rotateY(180deg); }
.impianto-flip-front { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.impianto-flip-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: rotateY(180deg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
}
.impianto-map-frame { width: 100%; height: 100%; border: 0; display: block; }
.impianto-flip-back-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #111;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.impianto-flip-back-btn:hover { background: #f3f3f3; }

.impianto-cta-btn { width: 100%; justify-content: center; }

.impianto-detail-cover.is-placeholder {
    color: #d0d0d0;
    font-size: 15px;
}

.impianto-detail-section {
    max-width: min(1320px, 100%);
    margin: 0 auto;
    width: 100%;
    display: grid;
    gap: 14px;
}

.impianto-detail-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.07);
    padding: clamp(14px, 1.4vw, 18px);
}

.impianto-detail-card h2 {
    margin: 0 0 12px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(18px, 1.6vw, 24px);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #111;
}

.impianto-detail-info-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.impianto-detail-info-grid {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}

.impianto-detail-info-grid div {
    display: grid;
    gap: 2px;
    padding-bottom: 7px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.14);
}

.impianto-detail-info-grid .info-wide { grid-column: 1 / -1; }

.impianto-detail-info-grid dt {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

.impianto-detail-info-grid dd {
    margin: 0;
    color: #141414;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.impianto-detail-map-block {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    display: grid;
    gap: 6px;
}

.impianto-detail-map-block h3 {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.impianto-detail-address {
    margin: 0;
    font-size: 15px;
    color: #171717;
}

.impianto-detail-coords {
    margin: 0 0 4px;
    font-size: 12.5px;
    color: #4d4d4d;
}

.impianto-detail-empty {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.impianto-detail-description {
    margin: 0;
    color: #1f1f1f;
    font-size: 17px;
    line-height: 1.65;
}

.impianto-detail-section-head h2 {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(22px, 2vw, 30px);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #c40000;
}

.impianto-detail-section-head p {
    margin: 4px 0 0;
    color: #2f2f2f;
    font-size: 15px;
}

.impianto-detail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
}

.impianto-detail-photo {
    position: relative;
    flex: 0 0 auto;
    width: 132px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #111;
    aspect-ratio: 4 / 3;
    display: block;
    padding: 0;
    cursor: zoom-in;
    scroll-snap-align: start;
}

.impianto-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #111;
    transition: transform 0.25s ease;
}

.impianto-detail-photo:hover img {
    transform: scale(1.03);
}

/* Lightbox foto impianto */
.imp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.imp-lightbox[hidden] { display: none; }
.imp-lightbox-img {
    max-width: 95vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}
.imp-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.imp-lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }
.imp-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 72px;
    line-height: 1;
    padding: 0 14px;
    cursor: pointer;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
    transition: color 0.2s ease, transform 0.2s ease;
    user-select: none;
}
.imp-lightbox-nav:hover { color: #fff; }
.imp-lightbox-prev { left: 8px; }
.imp-lightbox-next { right: 8px; }
.imp-lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.imp-lightbox-next:hover { transform: translateY(-50%) translateX(3px); }
.imp-lightbox-nav[hidden] { display: none; }
.imp-lightbox-count {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 12px;
    border-radius: 999px;
}
.imp-lightbox-count[hidden] { display: none; }
@media (max-width: 640px) {
    .imp-lightbox-nav { font-size: 52px; }
}

.impianto-detail-photo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(225, 6, 19, 0.92);
    color: #fff;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
}

.impianto-detail-files {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.impianto-detail-file {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: #fff;
    padding: 16px;
    display: grid;
    gap: 10px;
}

.impianto-detail-file h3 {
    margin: 0;
    font-size: 17px;
    color: #121212;
}

.impianto-detail-file p {
    margin: 0;
    color: #4a4a4a;
    font-size: 14px;
}

.hero-search {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid var(--accent);
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 8px 6px;
    font-size: 16px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    outline: none;
}

.search-btn {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

/* Splash modal */
.splash-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: clamp(16px, 3vw, 32px);
}
.splash-overlay.is-visible {
    display: flex;
}
.splash-modal {
    width: min(1300px, 98vw);
    border-radius: var(--radius-lg);
    background: #111;
    color: #fff;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}
.splash-close {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: 10px;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 34px;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 10;
    touch-action: manipulation;
}
.splash-hero {
    position: relative;
    min-height: clamp(520px, 60vw, 760px);
    display: grid;
    align-items: center;
    padding: clamp(20px, 4vw, 48px);
}
.splash-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.75));
    z-index: 1;
}
.splash-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.splash-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}
.splash-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffe95b;
    color: #111;
    border-radius: 999px;
    padding: 8px 22px;
    font-size: 36px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 900;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}
.splash-title {
    margin: 10px 0 8px;
    font-size: clamp(32px, 6vw, 78px);
    line-height: 0.95;
    text-transform: uppercase;
    font-weight: 800;
}
.splash-title span {
    color: var(--accent);
}
.splash-copy {
    font-size: clamp(16px, 2.1vw, 22px);
    font-weight: 500;
    margin: 0 0 18px;
}
.splash-cta {
    display: inline-flex;
}

@media (max-width: 640px) {
    .splash-modal {
        width: 100%;
        border-radius: 0;
    }
    .splash-hero {
        min-height: auto;
        padding: 18px 16px 26px;
    }
    .splash-tag {
        font-size: clamp(14px, 5.2vw, 20px);
        padding: 6px 14px;
        letter-spacing: 0.14em;
    }
    .splash-title {
        font-size: clamp(26px, 9vw, 42px);
    }
    .splash-cta {
        width: 100%;
    }
    .splash-cta .btn {
        width: 100%;
        justify-content: center;
    }
}

.slider {
    position: relative;
    margin-top: 28px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.slides {
    display: flex;
    transition: transform 0.6s ease;
}

.slide {
    min-width: 100%;
    position: relative;
    display: none;
}

.slide.is-active {
    display: block;
}

.slide-media {
    height: 60vh;
    background-size: cover;
    background-position: center;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f3f3f3;
}

.slide-media.is-placeholder {
    background: linear-gradient(120deg, #1a1a1a, #3c3c3c);
}

.slide-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 60%);
}

.slide-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.slide-overlay {
    z-index: 2;
}

.slide-overlay h2 {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(28px, 4vw, 48px);
    margin: 10px 0;
}

.slide-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}

.cta.ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(255, 255, 255, 0.9);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

.gallery {
    padding: 12px 6vw 50px;
}

.gallery-head {
    max-width: 960px;
    margin: 0 auto 10px;
    text-align: center;
}

.gallery-head h3 {
    margin: 0 0 4px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(20px, 2.6vw, 30px);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero .gallery-head h3 {
    color: var(--title-main-color);
}

.gallery-head p {
    margin: 0;
    color: var(--ink-soft);
}

.gallery-slideshow {
    border-radius: var(--radius-lg);
    border: 1px solid var(--accent);
    background: #fff;
    color: #111;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow);
    max-width: var(--gallery-width, none);
    margin-left: auto;
    margin-right: auto;
}

.gallery-frame {
    position: relative;
    display: block;
    border-bottom: 1px solid var(--accent);
    margin: 0;
    padding: 0;
}

.gallery-stage {
    position: relative;
    aspect-ratio: var(--gallery-aspect-ratio, 2 / 1);
    height: auto;
    max-height: min(520px, 52vh);
    overflow: hidden;
    display: flex;
    height: var(--gallery-height, auto);
    touch-action: pan-y;
    margin: 0;
    padding: 0;
}

.gallery-stage.is-fixed-height {
    aspect-ratio: auto;
}

.gallery-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    margin: 0;
    padding: 0;
}

.gallery-slide-link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.gallery-swipe-hint {
    position: absolute;
    left: 50%;
    top: 50%;
    bottom: auto;
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    pointer-events: none;
    z-index: 12;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.gallery-swipe-hint.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.gallery-swipe-hint__track {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(1px);
}

.gallery-swipe-hint__hand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    color: #fff;
    animation: swipeHintHand 1.25s ease-in-out infinite;
}

.gallery-swipe-hint__hand svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(4px 6px 0 rgba(0, 0, 0, 0.28));
}

.gallery-swipe-hint__label {
    color: #fff;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}

@keyframes swipeHintHand {
    0% { transform: translateX(-24px); opacity: 0.78; }
    50% { transform: translateX(24px); opacity: 1; }
    100% { transform: translateX(-24px); opacity: 0.78; }
}

.gallery-slide.is-active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

.gallery-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0;
    padding: 0;
}

@media (min-width: 641px) {
    .gallery-slide img {
        object-fit: cover !important;
    }
}

.gallery-caption {
    position: absolute;
    left: 32px;
    bottom: 26px;
    max-width: min(85%, 780px);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 21px 24px;
    display: grid;
    gap: 8px;
    z-index: 3;
    color: #fff;
}

.gallery-caption h4 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.gallery-caption p {
    margin: 0;
    font-size: 17px;
    color: #fff;
    line-height: 1.35;
}

.gallery-caption-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: 1px solid var(--accent);
    width: fit-content;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.gallery-caption-cta:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 80px;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 64px;
    line-height: 1;
    font-weight: 400;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
    transition: color 0.18s ease, transform 0.15s ease;
    z-index: 8;
}

.gallery-nav:hover {
    background: transparent;
    color: #fff;
    transform: translateY(-50%) scale(1.08);
}

.gallery-frame .gallery-nav:first-child {
    left: 12px;
}

.gallery-frame .gallery-nav:last-child {
    right: 12px;
}

.gallery-thumbs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - ((var(--gallery-thumbs-per-view, 5) - 1) * 3px)) / var(--gallery-thumbs-per-view, 5));
    gap: 3px;
    border-top: 1px solid var(--accent);
    background: #fff;
    overflow-x: auto;
}

.gallery-slideshow.is-thumbs-clipped .gallery-thumbs {
    overflow: hidden;
}

.gallery-thumb {
    position: relative;
    height: clamp(70px, 12vh, 110px);
    border: none;
    padding: 0;
    cursor: pointer;
    background: #fff;
    overflow: hidden;
}

.gallery-thumb.is-loading::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 8px;
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 45%, #1a1a1a 65%);
    background-size: 200% 100%;
    animation: galleryThumbShimmer 1.2s ease-in-out infinite;
    z-index: 1;
}

.gallery-thumb.is-loading img {
    opacity: 0;
}

@keyframes galleryThumbShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.gallery-thumb.is-active img {
    opacity: 1;
}

.gallery-thumb.is-hidden {
    display: none;
}

.gallery-slideshow.is-gallery-loading .gallery-thumbs {
    opacity: 0;
    pointer-events: none;
}

.gallery--minimal .gallery-thumbs {
    display: none;
}

.gallery--split .gallery-frame {
    grid-template-columns: 44px 1fr 44px;
}

.gallery--split .gallery-caption {
    left: auto;
    right: 32px;
    text-align: right;
}

.gallery--compact {
    padding: 8px 6vw 36px;
}

.gallery--compact .gallery-stage {
    max-height: 560px;
}

@media (max-width: 980px) {
    .gallery--compact .gallery-stage {
        height: 253px;
    }
}

@media (max-width: 640px) {
    .gallery--compact .gallery-stage {
        height: 213px;
    }
}

@media (max-width: 980px) {
    .gallery-frame {
        display: block;
    }
    .gallery-stage {
        max-height: 480px;
    }
    .gallery-caption {
        left: 16px;
        right: 16px;
        max-width: none;
    }
    .gallery-thumbs {
        grid-auto-columns: calc((100% - ((var(--gallery-thumbs-per-view, 5) - 1) * 3px)) / var(--gallery-thumbs-per-view, 5));
    }
}

@media (max-width: 640px) {
    .hero#home {
        padding: 2px 0;
    }
    .hero#home .gallery--compact {
        padding: 0;
    }
    .hero#home .gallery-head {
        padding: 0 14px;
        margin-bottom: 2px;
    }
    .hero#home .gallery-head h3 {
        margin-bottom: 0;
        line-height: 1.05;
    }
    .hero#home .gallery-head p {
        margin: 0;
        line-height: 1.12;
    }
    .hero#home .gallery-slideshow {
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        max-width: 1600px;
        margin-top: 0;
    }
    .gallery-frame {
        display: block;
        border-bottom: none;
    }
    .gallery-nav {
        width: 48px;
        height: 64px;
        border-radius: 0;
        background: transparent;
        font-size: 48px;
        color: rgba(255, 255, 255, 0.9);
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
        backdrop-filter: none;
    }
    .gallery-frame .gallery-nav:first-child {
        left: 6px;
    }
    .gallery-frame .gallery-nav:last-child {
        right: 6px;
    }
    .gallery-stage {
        max-height: none;
    }
    .gallery--compact .gallery-stage {
        height: clamp(240px, 40vh, 340px);
    }
    .gallery-slide img {
        object-fit: contain;
        object-position: center top;
        background: #fff;
    }
    .gallery-thumbs {
        display: none;
    }
    .gallery-caption-cta {
        display: none;
    }
    .gallery-caption {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
        padding: 8px 10px;
        border-radius: 10px;
        gap: 2px;
        background: rgba(0, 0, 0, 0.62);
    }
    .gallery-caption h4 {
        font-size: 20px;
        line-height: 1.12;
    }
    .gallery-caption p {
        display: none;
    }
    .gallery-thumb {
        height: 105px;
    }
    .gallery-swipe-hint {
        top: 50%;
    }
    .gallery-swipe-hint__track {
        padding: 8px 10px;
        gap: 4px;
        background: rgba(0, 0, 0, 0.24);
    }
    .gallery-swipe-hint__hand {
        width: 66px;
        height: 66px;
    }
}

.section-head {
    text-align: center;
    max-width: 100%;
    margin: 0 auto 20px;
    padding: 0;
}

.section-head h3 {
    font-family: var(--title-font);
    font-size: var(--title-main-size);
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
    color: var(--title-main-color);
    margin: 0;
    display: block;
    width: 100%;
    text-align: center;
}

.section-head p {
    font-size: clamp(15px, 1.6vw, 20px);
    line-height: 1.5;
    color: #111;
    max-width: none;
    width: 100%;
    margin: 6px auto 0;
    white-space: nowrap;
    text-align: center;
}

@media (max-width: 720px) {
    .section-head h3 {
        white-space: normal;
    }

    .section-head p {
        font-size: clamp(16px, 4.4vw, 22px);
        white-space: normal;
    }
}

.hero--detail .section-head {
    max-width: min(1200px, 88vw);
    margin-bottom: 26px;
}

.hero--detail .section-head h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.services {
    padding: 40px 0 90px;
}

.flow {
    padding: 80px 0 140px;
}

.flow .section-head {
    max-width: 980px;
}

.flow-stack {
    display: grid;
    gap: 0;
    padding: 0;
}

.flow-item {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 64px;
    align-items: center;
    padding: 90px 6vw;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.flow-item:nth-child(odd) {
    background: #f6f6f4;
}

.flow-item:nth-child(even) {
    background: #ffffff;
}

.flow-item.is-reversed .flow-media {
    order: 2;
}

.flow-media img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    border-radius: 28px;
    border: none;
    display: block;
}

.flow-text h4 {
    font-family: var(--title-font);
    font-size: var(--title-sub-size);
    margin-bottom: 22px;
    color: var(--title-sub-color);
}

.flow-text p {
    color: #2b2b2b;
    font-size: 24px;
    line-height: 1.7;
    margin: 0 0 22px;
}

.flow-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 980px) {
    .flow-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .flow-media img {
        height: 320px;
    }
}


.service-grid {
    display: grid;
    gap: 26px;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    padding: 0 6vw;
}

@media (max-width: 1100px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
}

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

.service-card {
    display: block;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid #ececec;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    --tile-accent: #a2b29f;
    --tile-soft: #f5f2ed;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.10);
}

.service-media {
    height: 360px;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    background-size: cover;
    background-position: center;
    transition: background-size 0.5s ease, background-position 0.5s ease;
}

@media (min-width: 1024px) {
    .service-media {
        height: 440px;
    }
}

.service-media.has-image {
    background-size: var(--service-bg-size, 96%);
    background-repeat: no-repeat;
    background-position: center 52%;
}

.service-media span {
    position: relative;
    text-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.service-card:hover .service-media.has-image {
    background-size: var(--service-bg-size-hover, 104%);
}

@media (max-width: 980px) {
    .service-card.reveal .service-media.has-image {
        transform: scale(1.08);
        transition: transform 0.8s ease;
    }

    .service-card.reveal.is-visible .service-media.has-image {
        transform: scale(1);
    }
}

.service-media--openings {
    background: linear-gradient(135deg, #111, #e10613);
}

.service-media--sales {
    background: linear-gradient(135deg, #e10613, #ff9b4a);
}

.service-media--clearance {
    background: linear-gradient(135deg, #0d0d0d, #7d1b1b);
}

.service-media--election {
    background: linear-gradient(135deg, #111, #4e4e4e);
}

.service-media--billboard {
    background: linear-gradient(135deg, #202020, #d9d9d9);
    color: #111;
}

.service-media--digital {
    background: linear-gradient(135deg, #101010, #1d7bff);
}

.service-body {
    padding: 28px;
    background: #fff;
}

.service-body h4 {
    font-family: var(--title-font);
    font-size: var(--title-sub-size);
    letter-spacing: 0.4px;
    color: var(--title-sub-color);
    margin-bottom: 10px;
}

.service-body p {
    font-size: 15px;
    color: #111;
}

.service-grid > .service-card:nth-child(1) {
    --tile-accent: #a2b29f;
}

.service-grid > .service-card:nth-child(2) {
    --tile-accent: #c7a9a3;
}

.service-grid > .service-card:nth-child(3) {
    --tile-accent: #b57360;
}

.service-grid > .service-card:nth-child(4) {
    --tile-accent: #a4b9c2;
}

.service-grid > .service-card:nth-child(5) {
    --tile-accent: #d4c2a5;
}

.service-grid > .service-card:nth-child(6) {
    --tile-accent: #a594af;
}

.service-media span {
    font-size: 13px;
    letter-spacing: 1.6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
}

.impianti {
    padding: 40px 0 90px;
}

.impianti-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 6vw 20px;
}

.results {
    font-weight: 600;
}

.chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chip {
    border: 1px solid var(--line);
    padding: 6px 14px;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.impianti-grid {
    display: grid;
    gap: 24px;
    padding: 0 6vw;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.impianti-grid.is-search {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.impianto-card.is-search {
    border: 1px solid rgba(225, 6, 19, 0.3);
    box-shadow: 0 18px 40px rgba(225, 6, 19, 0.08);
}

.impianto-card.is-search .impianto-body h4 {
    font-size: 16px;
}

.impianto-card.is-search .impianto-body p {
    font-size: 13px;
    color: var(--ink-soft);
}

.load-more {
    display: flex;
    justify-content: center;
    margin: 24px 0 0;
}

.load-more-btn {
    border: 1px solid #111;
    background: #fff;
    color: #111;
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
}

.load-more-btn:hover {
    background: #111;
    color: #fff;
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.empty-state {
    margin: 20px 6vw 60px;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--line);
    background: #fff;
    font-size: 14px;
    color: var(--ink-soft);
}

.impianto-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.impianto-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.impianto-media {
    height: 180px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f3f3f3;
}

.impianto-media.is-placeholder {
    background: linear-gradient(140deg, #1b1b1b, #333);
}

.impianto-body {
    padding: 18px;
}

.impianto-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.impianto-body h4 {
    margin: 8px 0 6px;
    font-family: var(--title-font);
    font-size: var(--title-sub-size);
    color: var(--title-sub-color);
}

.impianto-body .link {
    color: var(--accent);
    font-weight: 600;
}

.map-section {
    padding: 40px 6vw 90px;
}

.map {
    height: 420px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.products {
    padding: 40px 0 90px;
}

.products-hero {
    padding: 20px 6vw 10px;
    text-align: center;
}

.products-hero h3 {
    font-family: var(--title-font);
    font-size: var(--title-main-size);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--title-main-color);
}

.products-showcase {
    padding: 20px 6vw 40px;
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.product-tile {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
}

.product-tile-media {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.product-tile-body {
    padding: 16px 18px;
}

.product-tile-body h4 {
    margin: 0 0 8px;
    font-family: var(--title-font);
    font-size: var(--title-sub-size);
    color: var(--title-sub-color);
}

.product-tile-body p {
    margin: 0;
    font-size: 13px;
    color: var(--ink-soft);
}

.products-cta {
    margin: 20px 6vw 60px;
    padding: 30px;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, #111, #2f2f2f);
    color: #fff;
    text-align: center;
    box-shadow: var(--shadow);
}

.products-grid {
    display: grid;
    gap: 20px;
    padding: 0 6vw;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.contact-list a {
    color: var(--accent);
}

.contact-form {
    display: grid;
    gap: 16px;
}

.contact-form label {
    display: grid;
    gap: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-form input,
.contact-form textarea {
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
}

.contact-form textarea {
    resize: vertical;
}

.alert {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin: 14px 0;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert.success {
    background: #f0fff4;
    border-color: #86efac;
    color: #166534;
}

.alert.error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}

.visually-hidden {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.product-card {
    display: block;
    padding: 24px;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.cta-section {
    padding: 40px 6vw 90px;
}

.cta-box {
    border-radius: var(--radius-lg);
    padding: 40px;
    background: linear-gradient(130deg, #0f0f0f, #2b2b2b);
    color: #fff;
    text-align: center;
    box-shadow: var(--shadow);
}

.cta-box h3 {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(24px, 3vw, 34px);
}

.service-hero {
    padding: 30px 6vw 20px;
}

.service-hero-card {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.service-hero-media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #fff;
}

.service-hero-media img {
    display: block;
    width: 100%;
    height: auto;
}

.service-hero-content h3 {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(28px, 4vw, 46px);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 12px;
}

.service-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0 24px;
}

.service-meta span {
    padding: 6px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.service-section {
    padding: 20px 6vw 60px;
}

.feature-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.feature-card h4 {
    margin: 0 0 8px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--accent);
}

.service-cta {
    margin: 30px 6vw 60px;
    padding: 30px;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, #111, #2f2f2f);
    color: #fff;
    text-align: center;
    box-shadow: var(--shadow);
}

.maxi-hero {
    position: relative;
    min-height: 80vh;
    color: #111;
    margin-bottom: 40px;
}

.maxi-hero-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.maxi-hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.maxi-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.82) 62%, #fff 100%);
}

.maxi-hero-content {
    position: relative;
    z-index: 1;
    padding: 140px 6vw 120px;
    max-width: 900px;
}

.maxi-hero-content h1 {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(42px, 6vw, 84px);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

.maxi-hero-content p {
    font-size: clamp(18px, 2.4vw, 26px);
    color: #1f1f1f;
    margin-bottom: 24px;
}

.maxi-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.maxi-section {
    padding: 60px 0 90px;
}

.maxi-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 0 6vw;
}

.maxi-tile {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
}

.maxi-tile h4 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #111;
}

.maxi-tile p {
    color: #2b2b2b;
}

.maxi-story {
    padding-top: 20px;
}

.maxi-night {
    background: #0f0f10;
    color: #fff;
}

.maxi-night .section-head h3,
.maxi-night .section-head p,
.maxi-night .maxi-story-text,
.maxi-night .maxi-story-text p {
    color: #fff;
}

.maxi-story-block {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 32px;
    align-items: center;
    padding: 0 6vw;
}

.maxi-story-text h3 {
    font-size: clamp(28px, 3.2vw, 44px);
    margin-bottom: 12px;
}

.maxi-story-text p {
    font-size: 18px;
    color: #2b2b2b;
}

.maxi-night .maxi-story-text p {
    color: rgba(255, 255, 255, 0.78);
}

.maxi-story-media video {
    width: 100%;
    border-radius: 22px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow);
    display: block;
    background: #fff;
}

.maxi-night .maxi-story-media video {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    background: #111;
}

.maxi-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 0 6vw;
}

.maxi-gallery img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid #e6e6e6;
    display: block;
    height: 260px;
    object-fit: cover;
}

@media (max-width: 980px) {
    .maxi-tiles,
    .maxi-gallery {
        grid-template-columns: 1fr;
    }

    .maxi-story-block {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .maxi-hero-content {
        padding: 120px 6vw 80px;
    }

    .maxi-hero-content h1 {
        font-size: clamp(34px, 10vw, 52px);
    }
}

.service-story {
    padding: 20px 6vw 60px;
}

.service-story-grid {
    display: grid;
    gap: 26px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
}

.service-story-media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
}

.service-story-media img {
    display: block;
    width: 100%;
    height: auto;
}

.service-story-text h3 {
    margin: 0 0 12px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.service-kpis {
    margin-top: 16px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.service-kpis div {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: #f8f8f8;
    border: 1px solid var(--line);
}

.service-kpis strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.site-footer {
    background: #fff;
    color: #111;
    padding: 60px 6vw 30px;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer-grid > div {
    padding-right: 24px;
    border-right: 1px solid var(--line);
}

.footer-grid > div:last-child {
    border-right: none;
    padding-right: 0;
}

.footer-grid h4 {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.footer-grid a {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.footer-grid p {
    color: #666;
    font-size: 14px;
}

.footer-logo .logo-image {
    max-width: 160px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.footer-social span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f1f1;
    font-size: 12px;
    color: #333;
    border: 1px solid var(--line);
}

.footer-bottom {
    margin-top: 30px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.footer-privacy-link {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 12px;
    color: #666;
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.24);
    text-underline-offset: 3px;
    cursor: pointer;
}

.footer-privacy-link:hover {
    color: #111;
    text-decoration-color: #111;
}

.cookie-consent {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: none;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(12, 12, 12, 0.96);
    color: #fff;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
    z-index: 1900;
}

.cookie-consent.is-visible {
    display: grid;
    grid-template-columns: auto 1fr auto;
}

.cookie-consent__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(225, 6, 19, 0.2);
    color: #ffe27a;
    display: grid;
    place-items: center;
}

.cookie-consent__icon svg {
    width: 22px;
    height: 22px;
}

.cookie-consent__content {
    min-width: 0;
}

.cookie-consent__content h4 {
    margin: 0 0 4px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cookie-consent__content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    line-height: 1.45;
}

.cookie-consent__levels {
    margin-top: 4px !important;
    color: rgba(255, 255, 255, 0.75) !important;
}

.cookie-consent__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.cookie-consent__actions .btn {
    box-shadow: none;
}

.cookie-consent__choice {
    min-width: 140px;
}

.cookie-consent__actions .btn--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.26);
}

.cookie-consent__actions .btn--secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.08);
}

.cookie-consent__choice.is-selected {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.2);
}

.privacy-fab {
    position: fixed;
    left: 18px;
    bottom: 18px;
    display: none;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    background: #fff;
    color: #111;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
    z-index: 1880;
}

.privacy-fab.is-visible {
    display: inline-flex;
}

.privacy-fab__icon {
    width: 18px;
    height: 18px;
    color: #b5050f;
    display: grid;
    place-items: center;
}

.privacy-fab__icon svg {
    width: 18px;
    height: 18px;
}

body.has-cookie-banner .back-to-top {
    bottom: 104px;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    color: #111;
    font-size: 18px;
    cursor: pointer;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    z-index: 30;
}

.back-to-top.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

.back-to-top:hover {
    background: #111;
    color: #fff;
}

@media (max-width: 980px) {
    .cookie-consent.is-visible {
        grid-template-columns: auto 1fr;
    }

    .cookie-consent__actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .footer-grid > div {
        border-right: none;
        padding-right: 0;
    }
}

@media (max-width: 640px) {
    .cookie-consent {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 12px;
        border-radius: 14px;
    }

    .cookie-consent.is-visible {
        grid-template-columns: 1fr;
    }

    .cookie-consent__icon {
        width: 38px;
        height: 38px;
    }

    .cookie-consent__choice {
        min-width: 0;
        width: 100%;
    }

    .cookie-consent__actions {
        width: 100%;
    }

    .privacy-fab {
        left: 10px;
        bottom: 10px;
        height: 40px;
        padding: 0 12px;
        letter-spacing: 0.8px;
    }

    body.has-cookie-banner .back-to-top {
        bottom: 122px;
    }

    .back-to-top {
        right: 10px;
        bottom: 10px;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    body.nav-open {
        overflow: hidden;
    }

    .site-header {
        flex-wrap: wrap;
        align-items: center;
    }

    .logo {
        flex: 0 0 auto;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 64px;
        height: 64px;
        padding: 0;
        margin-left: auto;
        order: 2;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 14px 26px rgba(0, 0, 0, 0.16);
    }

    .nav-toggle span {
        width: 30px;
        height: 3px;
    }

    .header-search {
        order: 3;
        width: 100%;
        flex: 1 1 100%;
        max-width: none;
        margin-left: 0;
        margin-top: 10px;
    }

    .header-search .search-box {
        width: 100%;
        border-radius: 14px;
        padding: 8px 10px;
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        border: none;
        padding: 0;
        margin: 0;
        background: rgba(9, 10, 14, 0.64);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
        z-index: 1198;
    }

    .nav-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .site-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100dvh;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: calc(env(safe-area-inset-top, 0px) + 14px) 26px calc(env(safe-area-inset-bottom, 0px) + 22px);
        text-transform: none;
        letter-spacing: 0.02em;
        font-weight: 600;
        white-space: normal;
        border-radius: 0;
        border-left: none;
        box-shadow: none;
        z-index: 1199;
        overflow-y: auto;
        transform: translateY(-3%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.26s ease, opacity 0.22s ease;
    }

    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .site-nav-head {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 0 16px;
        margin-bottom: 10px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        text-transform: none;
        font-size: 17px;
        letter-spacing: 0.04em;
        font-weight: 700;
    }

    .site-nav-close {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        border: 1px solid var(--line);
        background: #fff;
        color: #111;
        font-size: 32px;
        line-height: 1;
        cursor: pointer;
    }

    .nav-item {
        display: block;
        width: 100%;
        padding: 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-parent-row {
        display: flex;
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    .site-nav > a {
        width: 100%;
        min-height: 64px;
        display: inline-flex;
        align-items: center;
        padding: 18px 0;
        font-size: clamp(22px, 5.1vw, 28px);
        letter-spacing: 0.015em;
        text-transform: none;
        line-height: 1.24;
    }

    .nav-parent-link {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        min-height: 64px;
        display: inline-flex;
        align-items: center;
        padding: 18px 0;
        font-size: clamp(22px, 5.1vw, 28px);
        letter-spacing: 0.015em;
        text-transform: none;
        line-height: 1.24;
    }

    .site-nav .nav-parent-link::after,
    .site-nav a::after {
        display: none;
    }

    .nav-parent-link.is-active,
    .site-nav > a.is-active {
        color: var(--accent);
    }

    .nav-subtoggle {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        border: 1px solid var(--line);
        background: #fff;
        flex: 0 0 auto;
        padding: 0;
    }

    .nav-subtoggle .nav-caret {
        width: 12px;
        height: 12px;
        border-width: 2px;
    }

    .nav-subtoggle[aria-expanded="true"] .nav-caret {
        transform: rotate(-135deg);
    }

    .nav-dropdown {
        position: static;
        min-width: 0;
        width: 100%;
        max-width: none;
        border: none;
        box-shadow: none;
        border-left: 3px solid rgba(225, 6, 19, 0.2);
        padding: 0 0 0 18px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.24s ease, padding 0.24s ease;
    }

    .nav-item:hover .nav-dropdown,
    .nav-item:focus-within .nav-dropdown {
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-item:not(:hover):not(:focus-within) .nav-dropdown {
        transition-delay: 0s;
    }

    .nav-item.is-open .nav-dropdown {
        max-height: 960px;
        padding-top: 4px;
        padding-bottom: 16px;
        overflow: visible;
    }

    .nav-dropdown a {
        width: 100%;
        min-height: 54px;
        display: flex;
        align-items: center;
        padding: 14px 0;
        font-size: 18px;
        letter-spacing: 0;
        font-weight: 600;
        text-transform: none;
        white-space: normal;
        overflow-wrap: break-word;
        line-height: 1.45;
    }

    .nav-dropdown a + a {
        border-top: 1px dashed rgba(0, 0, 0, 0.08);
    }

    .nav-dropdown a:hover,
    .nav-dropdown a:focus {
        background: transparent;
        color: var(--accent);
    }

    .nav-toggle.is-open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.is-open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .slider-btn {
        display: none;
    }

    .slide-media {
        height: 50vh;
    }

    .impianto-detail-top {
        grid-template-columns: 1fr;
    }

    .impianto-detail-cover {
        min-height: clamp(280px, 56vw, 520px);
    }
}

@media (max-width: 640px) {
    .site-header {
        padding: 12px 5vw;
    }

    .site-nav {
        width: 100%;
        padding: calc(env(safe-area-inset-top, 0px) + 10px) 20px calc(env(safe-area-inset-bottom, 0px) + 20px);
    }

    .site-nav > a,
    .nav-parent-link {
        min-height: 60px;
        font-size: clamp(20px, 7vw, 24px);
        padding: 16px 0;
    }

    .nav-dropdown a {
        min-height: 50px;
        font-size: 17px;
        padding: 12px 0;
    }

    .hero {
        padding: 24px 5vw;
    }

    .detail-actions {
        position: static;
        margin: 10px 5vw 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .hero--detail .section-head h3 {
        white-space: normal;
        text-overflow: unset;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
        border-radius: var(--radius-md);
    }

    .slide-overlay {
        padding: 24px;
    }

    .intro {
        padding: 60px 5vw;
    }

    .cta-box {
        padding: 30px 20px;
    }

    .impianto-detail-page {
        padding: 18px 5vw 72px;
        gap: 16px;
    }

    .impianto-detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .impianto-detail-actions .btn {
        width: 100%;
    }

    .impianto-detail-section-head h2 {
        font-size: clamp(24px, 8vw, 32px);
    }

    .impianto-detail-card {
        padding: 18px;
    }

    .impianto-detail-gallery {
        grid-template-columns: 1fr;
    }
}
