/* ============================================
   Getly - Anteprima gratuita
   Stile coerente con getly.it: navy, verde acqua, Work Sans + Inter
   ============================================ */

:root {
    --primary-color: #042C53;      /* navy getly */
    --primary-dark: #021E3A;       /* navy profondo (footer) */
    --secondary-color: #185FA5;    /* blu link/accento testo */
    --accent-color: #5DCAA5;       /* verde acqua CTA */
    --accent-dark: #2E9A78;        /* verde scuro (testo su chiaro) */
    --text-dark: #33475B;
    --text-body: #44566A;
    --text-light: #fff;
    --text-muted: #5A6B7B;
    --bg-light: #F4F8FB;
    --bg-dark: #021E3A;
    --border: #E3EAF1;
    --radius: 16px;
    --font-head: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html, body { overflow-x: hidden; max-width: 100vw; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--primary-color); }
a { color: var(--secondary-color); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 2px; }

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

/* ---------- Bottoni ---------- */
.btn-getly {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    background: var(--accent-color); color: var(--primary-color);
    font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
    border: none; border-radius: 11px; padding: 14px 24px;
    box-shadow: 0 10px 22px -8px rgba(93, 202, 165, .7);
    text-decoration: none; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease;
}
.btn-getly:hover, .btn-getly:focus { color: var(--primary-color); background: var(--accent-color); transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(93, 202, 165, .9); }
.btn-getly-sm { font-size: .95rem; padding: 10px 18px; }
.btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-head); font-weight: 600; color: var(--secondary-color);
    text-decoration: none;
}
.btn-ghost:hover { color: var(--primary-color); }

/* ---------- Navbar ---------- */
.navbar {
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    padding-top: 14px; padding-bottom: 14px;
    transition: padding .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.navbar.scrolled { padding-top: 8px; padding-bottom: 8px; border-bottom-color: var(--border); box-shadow: 0 6px 20px -12px rgba(4, 44, 83, .35); }
.navbar-brand { padding: 0; }
.navbar-logo { height: 50px; width: auto; display: block; }
.navbar .nav-link {
    font-family: var(--font-head); font-weight: 500; font-size: .98rem;
    color: var(--text-dark); padding: .5rem .9rem !important;
}
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--secondary-color); }
.navbar-toggler { border: 1px solid var(--border); padding: 6px 10px; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(93, 202, 165, .4); }
@media (max-width: 991.98px) {
    .navbar-collapse { background: #fff; border-radius: 12px; margin-top: 10px; padding: 10px 6px 16px; box-shadow: 0 16px 30px -18px rgba(4, 44, 83, .4); }
    .navbar .btn-getly { margin: 10px .9rem 0; }
}
@media (max-width: 575.98px) { .navbar-logo { height: 40px; } }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-light) 100%);
    padding: 10.5rem 0 4.5rem;
}
@media (min-width: 992px) { .hero { padding: 10.5rem 0 5.5rem; } }
.eyebrow {
    display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .8rem;
    letter-spacing: .1em; text-transform: uppercase; color: #1F7A5F;
    background: #EAF7F1; padding: 6px 12px; border-radius: 999px;
}
.hero h1 {
    font-weight: 600; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.08;
    letter-spacing: -.02em; margin: 18px 0 0; text-wrap: balance;
}
.hero h1 span { color: var(--secondary-color); }
.hero-lede { font-size: clamp(1.05rem, 1.9vw, 1.25rem); line-height: 1.65; color: var(--text-body); margin: 18px 0 0; max-width: 34em; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; line-height: 1.5; }
.checks li::before {
    content: "\2713"; flex: 0 0 24px; height: 24px; border-radius: 999px;
    background: var(--accent-color); color: var(--primary-color); font-weight: 700; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
}
.hero-note { font-size: .9rem; color: var(--text-muted); margin: 20px 0 0; }
.hero-jump { margin-top: 22px; width: 100%; }

/* ---------- Card modulo ---------- */
.form-card {
    background: #fff; border: 1px solid var(--border); border-radius: 18px;
    padding: clamp(22px, 3vw, 32px);
    box-shadow: 0 30px 60px -32px rgba(4, 44, 83, .35);
    scroll-margin-top: 110px;
}
.form-card h2 { font-weight: 600; font-size: 1.4rem; margin: 0 0 6px; }
.form-card .form-intro { font-size: .95rem; color: var(--text-muted); margin: 0 0 16px; }
.form-card .form-label { font-family: var(--font-head); font-weight: 500; font-size: .86rem; color: var(--text-dark); margin-bottom: 5px; }
.form-card .form-control, .form-card .form-select {
    font-size: 1rem; color: var(--primary-color); padding: 11px 14px;
    border: 1.5px solid #D5E0EA; border-radius: 10px;
}
.form-card .form-control:focus, .form-card .form-select:focus { border-color: var(--secondary-color); box-shadow: 0 0 0 3px rgba(24, 95, 165, .15); }
.form-card .form-control::placeholder { color: #8796A5; }
.form-card .form-check-label { font-size: .86rem; color: var(--text-muted); line-height: 1.5; }
.form-card .form-check-input { margin-top: .2rem; }
.form-card .form-check-input:checked { background-color: var(--primary-color); border-color: var(--primary-color); }
.form-card .alert { font-size: .95rem; border-radius: 10px; }
#formSuccess { display: flex; gap: 12px; align-items: flex-start; }
#formSuccess .ok-mark { flex: 0 0 34px; height: 34px; border-radius: 999px; background: var(--accent-color); color: #fff; display: inline-flex; align-items: center; justify-content: center; }

.btn-submit {
    width: 100%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-color); color: var(--primary-color);
    font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
    border: none; border-radius: 11px; padding: 14px 20px;
    box-shadow: 0 10px 22px -8px rgba(93, 202, 165, .7);
    transition: transform .2s ease, background .2s ease;
}
.btn-submit:hover, .btn-submit:focus { background: #4DBB96; color: var(--primary-color); transform: translateY(-1px); }
.btn-submit:disabled { opacity: .75; transform: none; }
.form-small { font-size: .82rem; color: var(--text-muted); text-align: center; margin: 10px 0 0; }
.recaptcha-note { font-size: .75rem; color: #5A6B7B; text-align: center; margin: 8px 0 0; line-height: 1.5; }
.recaptcha-note a { color: #3D5266; text-decoration: underline; }
.grecaptcha-badge { visibility: hidden !important; }

/* Toggle canale Messaggio / WhatsApp */
.form-channel-toggle { display: inline-flex; background: rgba(4, 44, 83, .07); border-radius: 999px; padding: 4px; margin-bottom: 1.25rem; gap: 2px; }
.form-channel-toggle .channel-btn { border: none; background: transparent; color: var(--text-muted); padding: 8px 20px; border-radius: 999px; font-weight: 500; font-size: .92rem; cursor: pointer; transition: all .25s ease; display: inline-flex; align-items: center; }
.form-channel-toggle .channel-btn:hover { color: var(--primary-color); }
.form-channel-toggle .channel-btn.active { background: var(--primary-color); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.form-channel-toggle .channel-btn[data-channel="whatsapp"].active { background: #25D366; color: #fff; box-shadow: 0 2px 8px rgba(37, 211, 102, .35); }
form#contactForm[data-channel="whatsapp"] .btn-submit { background: #25D366 !important; border-color: #25D366 !important; color: #fff; box-shadow: 0 10px 22px -8px rgba(37, 211, 102, .6); }
form#contactForm[data-channel="whatsapp"] .btn-submit:hover { background: #1da851 !important; border-color: #1da851 !important; }
@media (max-width: 480px) { .form-channel-toggle .channel-btn { padding: 7px 14px; font-size: .85rem; } }

/* Validazione */
.form-control.is-invalid, .form-check-input.is-invalid { border-color: #dc3545 !important; box-shadow: 0 0 0 0.2rem rgba(220,53,69,0.25) !important; }
.form-check-input.is-invalid ~ .form-check-label { color: #dc3545; }
.form-select.is-invalid { border-color: #dc3545 !important; box-shadow: 0 0 0 0.2rem rgba(220,53,69,0.25) !important; }

/* ---------- Sezioni ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-light); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto; }
.section-kicker { display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #1F7A5F; margin-bottom: 12px; }
.section h2 { font-weight: 600; font-size: clamp(1.65rem, 3.6vw, 2.4rem); line-height: 1.15; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.section-sub { font-size: clamp(1rem, 1.8vw, 1.13rem); line-height: 1.65; color: var(--text-body); margin: 14px auto 0; max-width: 40em; }

/* Come funziona */
.steps { list-style: none; padding: 0; margin: 44px 0 0; counter-reset: passo; }
.step { counter-increment: passo; background: var(--bg-light); border-radius: var(--radius); padding: 26px; height: 100%; position: relative; }
.step::before {
    content: counter(passo); display: inline-flex; width: 42px; height: 42px; border-radius: 12px;
    background: var(--primary-color); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
    align-items: center; justify-content: center;
}
.step h3 { font-weight: 600; font-size: 1.2rem; margin: 16px 0 6px; }
.step p { font-size: .98rem; line-height: 1.6; color: var(--text-body); margin: 0; }

/* Riquadro cambio fornitore */
.switch-box {
    background: linear-gradient(135deg, #EAF2FA 0%, #EAF7F1 100%);
    border: 1px solid #D6E4F0; border-radius: 20px;
    padding: clamp(26px, 4vw, 44px);
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); align-items: center;
}
.switch-icon { width: 72px; height: 72px; border-radius: 18px; background: var(--primary-color); color: var(--accent-color); display: flex; align-items: center; justify-content: center; font-size: 1.9rem; }
.switch-box h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.switch-box p { font-size: 1.05rem; line-height: 1.65; color: var(--text-body); margin: 12px 0 0; max-width: 46em; }
.switch-box .switch-points { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.switch-box .switch-points li { font-family: var(--font-head); font-weight: 500; font-size: .93rem; color: var(--primary-color); display: inline-flex; align-items: center; gap: 7px; }
.switch-box .switch-points i { color: var(--accent-dark); }
.switch-box .switch-price { font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--primary-color); margin: 14px 0 0; }
@media (max-width: 575.98px) { .switch-box { grid-template-columns: minmax(0, 1fr); } }

/* Vantaggi */
.feature { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; height: 100%; transition: transform .25s ease, box-shadow .25s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -24px rgba(4, 44, 83, .45); }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; background: #EAF7F1; color: var(--accent-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.feature h3 { font-weight: 600; font-size: 1.1rem; margin: 16px 0 6px; }
.feature p { font-size: .96rem; line-height: 1.6; color: var(--text-body); margin: 0; }

/* Lavori */
.work-card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; height: 100%; transition: transform .25s ease, box-shadow .25s ease; }
.work-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px rgba(4, 44, 83, .5); color: inherit; }
.work-card img { display: block; width: 100%; height: 200px; object-fit: cover; object-position: top; background: var(--bg-light); }
.work-card .work-body { padding: 18px 22px 20px; }
.work-card h3 { font-weight: 600; font-size: 1.1rem; margin: 0; }
.work-card p { font-size: .9rem; color: var(--text-muted); margin: 5px 0 0; }
.work-card .work-visit { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 600; font-size: .85rem; color: var(--secondary-color); margin-top: 10px; }
.works-more { text-align: center; margin: 28px 0 0; }

/* FAQ */
.faq-list { max-width: 780px; margin: 36px auto 0; display: grid; gap: 12px; }
.faq-list details { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 0 20px; }
.faq-list summary { cursor: pointer; padding: 16px 28px 16px 0; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--primary-color); list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--secondary-color); }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p { margin: 0 0 16px; font-size: .98rem; line-height: 1.65; color: var(--text-body); }

/* Chiusura */
.final { background: linear-gradient(135deg, var(--primary-color) 0%, #0A3A66 100%); text-align: center; }
.final h2 { color: #fff; }
.final .section-sub { color: #C3D4E6; }
.final .btn-getly { margin-top: 28px; }

/* Contatti */
.contact-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.contact-item .ci-icon { flex: 0 0 44px; height: 44px; border-radius: 12px; background: #EAF2FA; color: var(--secondary-color); display: inline-flex; align-items: center; justify-content: center; }
.contact-item h3 { font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 2px; }
.contact-item a, .contact-item p { font-size: 1.02rem; color: var(--primary-color); text-decoration: none; margin: 0; }
.contact-item a:hover { color: var(--secondary-color); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #A9BCD0; font-size: .93rem; padding: 64px 0 0; }
.site-footer h3, .site-footer h2 { font-family: var(--font-head); color: #fff; font-size: .9rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 16px; }
.site-footer a { color: #C3D4E6; text-decoration: none; }
.site-footer a:hover { color: var(--accent-color); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer p { margin: 0 0 10px; line-height: 1.6; }
.footer-brand .footer-logo-wrap { display: inline-block; background: #fff; padding: 10px 16px; border-radius: 10px; margin-bottom: 1rem; }
.footer-brand .footer-logo-wrap img { height: 42px; width: auto; display: block; max-width: 100%; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 44px; padding: 20px 0 26px; font-size: .84rem; color: #8FA6BE; }
.footer-bottom a { color: #C3D4E6; }

/* ---------- WhatsApp FAB ---------- */
.wa-fab { position: fixed; right: 20px; bottom: 20px; width: 60px; height: 60px; border-radius: 50%; background: #25D366; color: #fff !important; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 4px 12px rgba(0,0,0,0.25); z-index: 9998; transition: transform 0.2s; text-decoration: none; animation: waPulse 2s infinite; }
.wa-fab:hover { transform: scale(1.08); color: #fff; }
@keyframes waPulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.45), 0 4px 12px rgba(0,0,0,.25); } 70% { box-shadow: 0 0 0 14px rgba(37,211,102,0), 0 4px 12px rgba(0,0,0,.25); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0), 0 4px 12px rgba(0,0,0,.25); } }
@media (prefers-reduced-motion: reduce) { .wa-fab { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 576px) { .wa-fab { width: 50px; height: 50px; font-size: 24px; right: 15px; bottom: 15px; } }

/* Cookie icon: verde getly scuro, mai rosso */
#cookie-settings-icon { background: var(--accent-dark, #2E9A78) !important; }
#cookie-settings-icon:hover { background: var(--primary-color) !important; }
@media (max-width: 576px) { .cookie-settings-btn { left: 15px; bottom: 15px; width: 50px; height: 50px; } }

/* Modali legali */
.modal-body h6 { font-family: var(--font-head); color: var(--primary-color); font-weight: 600; margin-top: 1.4rem; }
.modal-body h6:first-child { margin-top: 0; }
.modal-body table { font-size: .88rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- 404 ---------- */
.page-404 .navbar { background: #fff; border-bottom-color: var(--border); }
.error-wrap { padding: 11rem 0 5rem; text-align: center; background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-light) 100%); min-height: 70vh; }
.error-icon { width: 88px; height: 88px; border-radius: 24px; background: #EAF2FA; color: var(--secondary-color); display: inline-flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.error-code { font-family: var(--font-head); font-weight: 700; font-size: clamp(3.5rem, 10vw, 6rem); color: var(--primary-color); line-height: 1; margin: 22px 0 0; letter-spacing: -.03em; }
.error-wrap h1 { font-weight: 600; font-size: clamp(1.5rem, 3vw, 2rem); margin: 12px 0 0; }
.error-wrap p { color: var(--text-body); font-size: 1.05rem; max-width: 34em; margin: 12px auto 0; }
