/* ==========================================================================
   ElettroNet - foglio di stile
   I colori principali sono qui sotto: adattali a quelli del logo.
   ========================================================================== */

:root {
    /* Colori del logo ElettroNet */
    --c-primary: #2275a5;        /* blu "elettro" */
    --c-primary-dark: #1a5c82;
    --c-primary-soft: #e9f3f9;
    --c-ink: #434343;            /* grigio "net" */
    --c-ink-dark: #2c2f33;
    --c-accent: #2275a5;         /* pulsanti principali e dettagli */
    --c-accent-dark: #1a5c82;
    --c-olive: #8aa35b;
    --c-trunk: #7a5c3e;

    --c-text: #2b2d31;
    --c-muted: #62676f;
    --c-bg: #ffffff;
    --c-bg-alt: #f3f6f9;
    --c-surface: #ffffff;
    --c-border: #dde3ea;
    --c-danger: #c92a2a;
    --c-success-bg: #e6f7ef;
    --c-error-bg: #fdecec;

    --badge-ftth: #2275a5;
    --badge-fttc: #434343;
    --badge-fwa: #1a5c82;

    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 6px 24px rgba(16, 35, 70, .08);
    --shadow-lg: 0 14px 40px rgba(16, 35, 70, .14);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--c-primary); }
a:hover { color: var(--c-primary-dark); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--c-muted); }
.fine-print { font-size: .85rem; color: var(--c-muted); margin-top: 1.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--c-accent-dark); margin: 0 0 .6rem; }
.lead { font-size: 1.15rem; color: var(--c-muted); max-width: 640px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--c-primary); color: #fff; padding: 8px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* --- Pulsanti --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4em;
    padding: .7em 1.3em; border-radius: 999px; border: 2px solid transparent;
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-dark); color: #fff; }
.btn-outline { border-color: var(--c-primary); color: var(--c-primary); background: transparent; }
.btn-outline:hover { background: var(--c-primary); color: #fff; }
.btn-light { background: #fff; color: var(--c-primary); }
.btn-light:hover { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1ebe5a; color: #fff; }
.btn-danger { background: transparent; color: var(--c-danger); border-color: var(--c-danger); }
.btn-danger:hover { background: var(--c-danger); color: #fff; }
.btn-sm { padding: .35em .9em; font-size: .9rem; }
.btn-lg { padding: .9em 1.7em; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* --- Avvisi --- */
.alert { padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin: 1.2rem 0; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-success { background: var(--c-success-bg); color: #0b5d3d; border-left: 4px solid var(--c-accent); }
.alert-error { background: var(--c-error-bg); color: #8a1c1c; border-left: 4px solid var(--c-danger); }

/* --- Testata --- */
.topbar { background: var(--c-ink); color: #d6d8db; font-size: .85rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 1rem; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #fff; text-decoration: none; margin-left: 1rem; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 44px; width: auto; }
.logo-text { font-size: 1.6rem; font-weight: 700; color: var(--c-primary); text-decoration: none; letter-spacing: -.02em; }
.logo-text strong { color: var(--c-ink); font-weight: 700; }

.main-nav ul { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.main-nav a:not(.btn) { display: block; padding: .5rem .8rem; color: var(--c-text); text-decoration: none; font-weight: 500; border-radius: var(--radius-sm); }
.main-nav a:not(.btn):hover, .main-nav a.active { color: var(--c-primary); background: var(--c-primary-soft); }
.main-nav .btn { margin-left: .4rem; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-text); margin: 5px 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero --- */
.hero { background: linear-gradient(180deg, var(--c-primary-soft) 0%, var(--c-bg) 100%); padding: 64px 0 48px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero h1 .accent { color: var(--c-accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1rem; }
.hero-price { color: var(--c-muted); }
.hero-price strong { color: var(--c-primary); font-size: 1.15em; }
.hero-photo { position: relative; }
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow-lg); }
.hero-badge { position: absolute; background: var(--c-surface); border-radius: var(--radius); padding: 12px 18px; box-shadow: var(--shadow-lg); line-height: 1.3; }
@media (min-width: 821px) { .hero-badge { animation: float-in .6s ease-out both; } }
.hero-badge span { display: block; font-size: .85rem; color: var(--c-muted); }
.hero-badge strong { display: block; color: var(--c-primary); }
.hero-badge-top { top: 24px; left: -24px; animation-delay: .2s; }
.hero-badge-bottom { bottom: 24px; right: -20px; animation-delay: .4s; }
.hero-badge-bottom strong { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; }
.hero-badge-bottom small { font-size: .9rem; font-weight: 500; color: var(--c-muted); }
@keyframes float-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.page-hero { background: linear-gradient(180deg, var(--c-primary-soft) 0%, var(--c-bg) 100%); padding: 56px 0 32px; }
.page-hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
/* evita che immagini e testi lunghi allarghino le colonne oltre lo schermo */
.hero-inner > *, .page-hero-inner > *, .tech-detail > *, .form-layout > * { min-width: 0; }
.page-hero-inner .lead { margin-bottom: 1.6rem; }
.page-hero-img img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow-lg); }

/* --- Punti di forza --- */
.highlights { padding: 0 0 24px; }
.highlights-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.highlight { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.highlight strong { display: block; color: var(--c-primary); font-size: 1.1rem; }
.highlight span { color: var(--c-muted); font-size: .92rem; }

/* --- Sezioni e card --- */
.section { padding: 72px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-head { text-align: center; margin-bottom: 40px; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card-link { display: block; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card-link:hover { color: inherit; transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--c-accent); }
.card-icon { font-size: 2rem; margin-bottom: .6rem; }
.card p { color: var(--c-muted); margin: 0 0 .8rem; }
.card-more { font-weight: 600; color: var(--c-primary); }

/* Card con foto in alto */
.card-photo { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-photo > img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s ease; }
.card-photo:hover > img { transform: scale(1.04); }
.card-body { padding: 22px 24px 24px; position: relative; background: var(--c-surface); flex: 1; }
.tech-card .card-body .badge { margin-bottom: .6rem; }

.badge { display: inline-block; padding: .2em .7em; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; background: var(--c-bg-alt); color: var(--c-text); }
.badge-ftth { background: var(--badge-ftth); color: #fff; }
.badge-fttc { background: var(--badge-fttc); color: #fff; }
.badge-fwa { background: var(--badge-fwa); color: #fff; }
.tech-card .badge { margin-bottom: .8rem; }

/* --- Offerte --- */
.tabs { display: flex; justify-content: center; gap: 6px; margin: 0 auto 36px; padding: 6px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 999px; width: max-content; max-width: 100%; }
.tab { border: 0; background: transparent; font: inherit; font-weight: 600; padding: .6em 1.4em; border-radius: 999px; cursor: pointer; color: var(--c-muted); }
.tab.active { background: var(--c-primary); color: #fff; }

.offers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; align-items: stretch; }
.offer-card { position: relative; display: flex; flex-direction: column; background: var(--c-surface); border: 2px solid var(--c-border); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); }
.offer-card.featured { border-color: var(--c-accent); box-shadow: var(--shadow-lg); }
.offer-ribbon { position: absolute; top: -13px; right: 20px; background: var(--c-accent); color: #fff; font-size: .78rem; font-weight: 700; padding: .25em .8em; border-radius: 999px; }
.offer-card .badge { align-self: flex-start; }
.offer-card h3 { margin-top: .8rem; }
.offer-price { margin: .4rem 0 0; color: var(--c-primary); }
.offer-price strong { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; }
.offer-price small { font-size: 1rem; color: var(--c-muted); margin: 0 .2em; }
.offer-vat { margin: 0; font-size: .9rem; color: var(--c-muted); }
.offer-note { margin: .8rem 0 0; font-weight: 700; color: var(--c-accent-dark); }
.offer-features { list-style: none; padding: 0; margin: 1.2rem 0 1.5rem; flex: 1; }
.offer-features li { padding: .45rem 0 .45rem 1.6rem; border-top: 1px solid var(--c-border); position: relative; font-size: .95rem; }
.offer-features li::before, .check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--c-accent); font-weight: 800; }

/* --- CTA --- */
.cta-band {
    background:
        linear-gradient(100deg, rgba(26, 92, 130, .96) 0%, rgba(34, 117, 165, .88) 50%, rgba(34, 117, 165, .55) 100%),
        var(--cta-bg, none) center / cover no-repeat,
        var(--c-primary);
    color: #fff; padding: 72px 0;
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.cta-inner .btn { flex-shrink: 0; white-space: nowrap; }
.cta-band h2 { margin-bottom: .3rem; }
.cta-band p { color: #d9e9f3; margin: 0; }

/* --- FAQ --- */
.faq details { border: 1px solid var(--c-border); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--c-surface); }
.faq summary { cursor: pointer; padding: 1rem 3rem 1rem 1.2rem; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--c-accent); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0; padding: 0 1.2rem 1.2rem; color: var(--c-muted); }

/* --- Passaggi --- */
.steps-list { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.steps-list li { counter-increment: step; position: relative; padding: 24px 20px 20px 72px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); }
.steps-list li::before { content: counter(step); position: absolute; left: 20px; top: 22px; width: 38px; height: 38px; border-radius: 50%; background: var(--c-primary); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps-list strong { display: block; }
.steps-list span { color: var(--c-muted); font-size: .95rem; }
.steps-vertical { grid-template-columns: 1fr; }

/* --- Tecnologie --- */
.tech-detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.tech-detail h2 small { display: block; font-size: .9rem; font-weight: 500; margin-top: .3rem; }
.tech-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-top: 1.2rem; box-shadow: var(--shadow); }
.check-list { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.check-list li { position: relative; padding: .35rem 0 .35rem 1.6rem; }

.table-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; background: var(--c-surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--c-border); }
.compare thead th { background: var(--c-primary); color: #fff; }
.compare tbody th { color: var(--c-muted); font-weight: 600; white-space: nowrap; }

/* --- Tabelle prezzi (opzioni, telefonia) --- */
.price-table { width: 100%; border-collapse: collapse; background: var(--c-surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.price-table th, .price-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--c-border); }
.price-table thead th { background: var(--c-primary); color: #fff; font-size: .9rem; }
.price-table th:not(:first-child), .price-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.price-table td:not(:first-child) { font-weight: 700; color: var(--c-primary); }
.price-table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 600px) {
    .price-table thead { display: none; }
    .price-table tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--c-border); }
    .price-table td { display: flex; justify-content: space-between; padding: 3px 0; border: 0; }
    .price-table td:first-child { font-weight: 600; margin-bottom: 4px; }
    .price-table td[data-label]::before { content: attr(data-label); font-weight: 400; color: var(--c-muted); }
    .price-table td.is-empty { display: none; }
}

/* --- Chi siamo --- */
.prose.story h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 0; }
.prose .eyebrow { color: var(--c-accent-dark); }
.story p { font-size: 1.08rem; line-height: 1.75; }
.lead-center { margin: 0 auto; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.zone-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0; margin: 28px 0; }
.zone-list li { background: var(--c-surface); border: 1.5px solid var(--c-primary); color: var(--c-primary); font-weight: 600; padding: .45em 1.1em; border-radius: 999px; }
.zone-list li::before { content: "📍 "; }
.stats-band { background: linear-gradient(120deg, var(--c-primary) 0%, var(--c-primary-dark) 100%); color: #fff; padding: 48px 0; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stat-big strong { display: block; font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat-big span { color: #d9e9f3; }
@media (max-width: 600px) { .stats-row { grid-template-columns: 1fr; gap: 20px; } }
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 3px; background: var(--c-primary-soft); border-radius: 2px; }
.timeline li { position: relative; padding: 0 0 28px 20px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 4px; width: 17px; height: 17px; border-radius: 50%; background: var(--c-surface); border: 4px solid var(--c-primary); }
.timeline-date { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-primary); background: var(--c-primary-soft); padding: .15em .7em; border-radius: 999px; margin-bottom: .4rem; }
.timeline h3 { margin: .2rem 0 .2rem; }
.timeline p { margin: 0; color: var(--c-muted); }
.thanks { margin: 0; padding: 36px 40px; background: var(--c-primary-soft); border-left: 5px solid var(--c-primary); border-radius: var(--radius); }
.thanks blockquote { margin: 0; }
.thanks blockquote p { font-size: 1.25rem; line-height: 1.6; color: var(--c-text); margin: 0; }
.thanks figcaption { margin-top: 1rem; font-weight: 700; color: var(--c-primary); }
.thanks figcaption::before { content: "— "; }
.story-teaser { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
.story-teaser img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 820px) {
    .story-teaser { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .thanks { padding: 24px; }
    .thanks blockquote p { font-size: 1.1rem; }
}

/* --- Moduli --- */
.form-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
.form label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 1rem; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form input[type="password"],
.form input[type="number"], .form select, .form textarea {
    display: block; width: 100%; margin-top: .35rem; padding: .7rem .9rem;
    font: inherit; font-weight: 400; color: var(--c-text); background: #fff;
    border: 1.5px solid var(--c-border); border-radius: var(--radius-sm);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-row-address { grid-template-columns: 3fr 1fr; }
.radio-group { border: 0; padding: 0; margin: 0 0 1.2rem; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.radio-group legend { font-weight: 600; margin-bottom: .4rem; font-size: .95rem; }
.radio-group label { display: flex; align-items: center; gap: .4rem; font-weight: 500; margin: 0; }
.checkbox { display: flex !important; gap: .6rem; align-items: flex-start; font-weight: 400 !important; }
.checkbox input { margin-top: .3rem; flex-shrink: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-aside .card { position: sticky; top: 96px; }
.form-aside .btn { margin-bottom: .6rem; }
.contact-info h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); margin: 1.2rem 0 .2rem; }
.contact-info h3:first-child { margin-top: 0; }
.contact-info p { color: var(--c-text); margin: 0; }

/* --- Numeri di telefono con etichetta --- */
.tel-list { margin: 0 0 .8rem; }
.tel-item { display: block; margin-bottom: .5rem; }
.tel-item small { display: block; font-size: .8rem; color: var(--c-muted); line-height: 1.3; }
.tel-item a { font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.site-footer .tel-item small { color: #9aa0a6; }
.site-footer .tel-item a { color: #fff; }
.tel-btn-label { font-size: .85rem; color: var(--c-muted); margin: .8rem 0 .3rem !important; }

/* --- Documenti e testi --- */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list a { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; margin-bottom: 10px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); text-decoration: none; color: var(--c-text); background: var(--c-surface); }
.doc-list a:hover { border-color: var(--c-accent); }
.doc-icon { flex-shrink: 0; background: var(--c-danger); color: #fff; font-size: .7rem; font-weight: 800; padding: .5em .6em; border-radius: 6px; }
.prose h2 { font-size: 1.3rem; margin-top: 2rem; }
.prose p { color: #333d4f; }

/* --- Footer --- */
.site-footer { background: var(--c-ink-dark); color: #c3c7cc; padding: 56px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: #c3c7cc; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-logo { font-size: 1.6rem; font-weight: 700; color: #5aa9d6; letter-spacing: -.02em; margin-bottom: .5rem; }
.footer-logo strong { color: #fff; font-weight: 700; }
.social a { margin-right: 1rem; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 20px; padding-bottom: 24px; font-size: .88rem; }

/* --- Elementi fissi --- */
.sticky-bar { display: none; }
.whatsapp-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.whatsapp-fab:hover { color: #fff; transform: scale(1.06); }

/* --- Responsive --- */
.main-nav a { white-space: nowrap; }

@media (max-width: 1180px) {
    .nav-toggle { display: block; }
    .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--c-border); box-shadow: var(--shadow); display: none; }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; align-items: stretch; padding: 12px 20px 20px; }
    .main-nav .btn { margin: .4rem 0 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
    body { font-size: 16px; padding-bottom: 72px; }
    .topbar-inner > span:first-child { display: none; }
    .topbar-inner { justify-content: flex-end; }
    .hero { padding-top: 40px; }
    .hero-inner, .tech-detail, .form-layout, .page-hero-inner { grid-template-columns: minmax(0, 1fr); }
    .hero-photo { order: -1; margin: 0 8px; }
    .hero-badge-top { display: none; }
    .hero-badge-bottom { right: -8px; bottom: 12px; }
    .hero-badge-bottom strong { font-size: 1.4rem; }
    .page-hero-inner { gap: 28px; }
    .page-hero-img { order: -1; }
    .page-hero-img img { aspect-ratio: 16 / 9; }
    .highlights-grid { grid-template-columns: 1fr 1fr; }
    .section { padding: 52px 0; }
    .cta-inner { flex-direction: column; text-align: center; }
    .form-row, .form-row-address { grid-template-columns: 1fr; }
    .form-aside .card { position: static; }
    .sticky-bar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; padding: 10px 16px; background: #fff; border-top: 1px solid var(--c-border); box-shadow: 0 -4px 16px rgba(16, 35, 70, .08); }
    .sticky-bar .btn { flex: 1; white-space: nowrap; padding: .7em .6em; font-size: .95rem; }
    .whatsapp-fab { bottom: 84px; }
}

@media (max-width: 520px) {
    .logo img { height: 34px; }
    .footer-grid, .highlights-grid { grid-template-columns: 1fr; }
    .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* ==========================================================================
   Pannello amministrazione
   ========================================================================== */
body.admin { background: var(--c-bg-alt); padding-bottom: 0; }
.admin-header { background: var(--c-ink-dark); }
.admin-header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; min-height: 64px; }
.admin-header .logo-text { color: #5aa9d6; font-size: 1.3rem; }
.admin-header .logo-text strong { color: #fff; }
.admin-header .logo-text small { font-size: .7rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: #c3c7cc; }
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem; }
.admin-nav a, .link-button { color: #d6d8db; text-decoration: none; padding: .4rem .7rem; border-radius: var(--radius-sm); font-size: .95rem; }
.admin-nav a:hover, .admin-nav a.active, .link-button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.link-button { background: none; border: 0; font: inherit; cursor: pointer; }
.inline { display: inline; }
.admin-main { padding: 32px 0 64px; }
.admin-main h1 { font-size: 1.8rem; }
.admin-main h2 { font-size: 1.25rem; margin-top: 2rem; }

.login-box { max-width: 420px; margin: 8vh auto 0; }
.login-box h1 { font-size: 1.8rem; margin-bottom: 1rem; }
.login-logo img { display: block; height: auto; }
.login-box h2 { font-size: 1.2rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 1rem; }
.stat { text-decoration: none; color: var(--c-text); }
.stat strong { display: block; font-size: 2.4rem; color: var(--c-primary); line-height: 1.1; }
.stat span { color: var(--c-muted); }

.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); font-size: .95rem; }
.admin-table th, .admin-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.admin-table th { background: var(--c-bg-alt); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); }
.row-actions { white-space: nowrap; text-align: right !important; }

.status { display: inline-block; padding: .15em .6em; border-radius: 999px; font-size: .8rem; font-weight: 600; text-transform: capitalize; }
.status-nuova { background: #fff3bf; color: #7a5b00; }
.status-in_lavorazione { background: var(--c-primary-soft); color: var(--c-primary); }
.status-chiusa { background: var(--c-success-bg); color: #0b5d3d; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.filter-bar a { padding: .35rem .9rem; border-radius: 999px; background: #fff; border: 1px solid var(--c-border); text-decoration: none; color: var(--c-text); font-size: .92rem; }
.filter-bar a.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

.admin-item { margin-bottom: 14px; padding: 20px 22px; }
.admin-item.is-read { opacity: .75; }
.admin-item-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.admin-item-head .badge { margin-left: .3rem; }
.admin-item p { color: var(--c-text); margin: 0 0 .6rem; }
.admin-note { background: var(--c-bg-alt); padding: .8rem 1rem; border-radius: var(--radius-sm); }
.admin-item-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.admin-item-actions select { padding: .35rem .6rem; border-radius: var(--radius-sm); border: 1px solid var(--c-border); font: inherit; font-size: .9rem; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c-accent); margin-right: .4rem; }
.admin-title-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.admin-form { max-width: 820px; }
.narrow-form { max-width: 460px; }
.checkbox-stack .checkbox { margin-bottom: .4rem; }
