/* =============================================================
   prenotic.css — Sito vetrina Prenotic
   Palette: blu notte + arancio acceso + bianchi puliti
   ============================================================= */

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

:root {
    /* Blu notte — sfondo, testi principali, elementi dark */
    --navy:          #0F1F3D;
    --navy-light:    #1A3260;
    --navy-muted:    #2D4A7A;

    /* Arancio acceso — accento principale, CTA, highlights */
    --orange:        #F05A22;
    --orange-light:  #FF7A45;
    --orange-pale:   #FEE8DF;

    /* Neutri puliti */
    --white:         #FFFFFF;
    --off-white:     #F8F9FC;
    --gray-light:    #EEF1F7;
    --gray:          #CBD1DD;
    --gray-dark:     #8892A4;

    /* Testi */
    --text:          #0F1F3D;
    --text-muted:    #4A5568;
    --text-light:    #8892A4;

    /* Feedback */
    --success:       #16A34A;
    --error:         #DC2626;

    /* Layout */
    --radius:        8px;
    --radius-lg:     16px;
    --shadow:        0 1px 4px rgba(15,31,61,0.08);
    --shadow-md:     0 4px 20px rgba(15,31,61,0.10);
    --shadow-lg:     0 8px 40px rgba(15,31,61,0.14);
    --transition:    0.2s ease;
    --font:          system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-serif:    'Georgia', 'Times New Roman', serif;
    --max-w:         1120px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--white);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
}

h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { color: var(--text-muted); line-height: 1.7; }
a { color: var(--orange); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange-light); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- HEADER --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--gray-light);
    box-shadow: var(--shadow);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 1rem;
}
.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.03em;
}
.logo span { color: var(--orange); }
.logo:hover { color: var(--navy); }

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.main-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}
.main-nav a:hover { color: var(--navy); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

/* Nascosti su desktop, visibili solo su mobile via media query */
.nav-close    { display: none; }
.nav-overlay  { display: none; }

/* --- BOTTONI --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
    letter-spacing: -0.01em;
}
.btn-primary {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
}
.btn-primary:hover {
    background: var(--orange-light);
    border-color: var(--orange-light);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(240,90,34,0.35);
}
.btn-outline {
    background: transparent;
    color: var(--navy);
    border-color: var(--gray);
}
.btn-outline:hover {
    background: var(--gray-light);
    border-color: var(--gray-dark);
    color: var(--navy);
}
.btn-navy {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}
.btn-navy:hover {
    background: var(--navy-light);
    border-color: var(--navy-light);
    color: #fff;
    transform: translateY(-1px);
}
.btn-lg { padding: 0.9rem 2.2rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.825rem; }

/* --- HERO --- */
.hero {
    background: var(--navy);
    padding: 7rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(240,90,34,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(45,74,122,0.6) 0%, transparent 70%);
    pointer-events: none;
}
.hero-badge {
    display: inline-block;
    background: rgba(240,90,34,0.15);
    color: var(--orange-light);
    border: 1px solid rgba(240,90,34,0.3);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}
.hero h1 {
    max-width: 720px;
    margin: 0 auto 1.5rem;
    color: var(--white);
    position: relative;
    z-index: 1;
}
.hero h1 em {
    font-style: normal;
    color: var(--orange);
}
.hero p {
    max-width: 500px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.65);
    position: relative;
    z-index: 1;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.hero-actions .btn-outline {
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.05);
}
.hero-actions .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}
.hero-note {
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    position: relative;
    z-index: 1;
}

/* --- SEZIONI --- */
.section { padding: 6rem 0; }
.section--alt { background: var(--off-white); }
.section--dark { background: var(--navy); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: rgba(255,255,255,0.6); }

.section-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 0.75rem;
}
.section-header { max-width: 560px; margin-bottom: 3.5rem; }
.section-header.centered { margin: 0 auto 3.5rem; text-align: center; }
.section-header p { margin-top: 0.75rem; font-size: 1.05rem; }
.divider {
    width: 40px;
    height: 3px;
    background: var(--orange);
    margin: 1.25rem 0;
    border-radius: 2px;
}
.divider.centered { margin: 1.25rem auto; }

/* --- SOCIAL PROOF BAR --- */
.social-proof-bar {
    padding: 1.5rem 0;
    background: var(--gray-light);
    border-bottom: 1px solid var(--gray);
}
.social-proof-bar p {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 600;
    margin: 0;
    text-align: center;
}

/* --- FEATURES --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    padding: 2rem;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--orange-pale);
}
.feature-icon {
    width: 44px;
    height: 44px;
    background: var(--orange-pale);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.feature-card h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.feature-card p  { font-size: 0.9rem; }

/* --- STEPS --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}
.step { position: relative; }
.step-number {
    width: 44px;
    height: 44px;
    background: var(--orange);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.step h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.step p   { font-size: 0.875rem; }

/* --- PRICING --- */
.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}
.pricing-toggle span {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}
.pricing-toggle span.active { color: var(--navy); }
.toggle-switch-wrap {
    position: relative;
    width: 48px;
    height: 26px;
    cursor: pointer;
}
.toggle-switch-wrap input { opacity: 0; width: 0; height: 0; }
.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--gray);
    border-radius: 26px;
    transition: background var(--transition);
}
.toggle-track::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 4px; left: 4px;
    transition: transform var(--transition);
    box-shadow: var(--shadow);
}
input:checked + .toggle-track { background: var(--orange); }
input:checked + .toggle-track::before { transform: translateX(22px); }
.yearly-badge {
    background: var(--orange-pale);
    color: var(--orange);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    border: 1px solid rgba(240,90,34,0.2);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.plan-card {
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    transition: box-shadow var(--transition), transform var(--transition);
}
.plan-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.plan-card.featured {
    border-color: var(--orange);
    transform: scale(1.03);
}
.plan-card.featured:hover { transform: scale(1.03) translateY(-3px); }
.plan-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--orange);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    white-space: nowrap;
}
.plan-name {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    margin-bottom: 0.25rem;
}
.plan-price .amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    letter-spacing: -0.03em;
}
.plan-price .currency { font-size: 1.3rem; font-weight: 700; color: var(--navy); }
.plan-price .period   { font-size: 0.85rem; color: var(--text-muted); margin-left: 0.1rem; }
.plan-yearly-note { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 1.5rem; min-height: 1.2rem; }
.plan-divider { height: 1px; background: var(--gray-light); margin: 1.5rem 0; }
.plan-features { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 2rem; }
.plan-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--text);
}
.plan-feature.disabled { color: var(--text-light); }
.plan-feature .check {
    width: 18px; height: 18px;
    background: var(--orange);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}
.plan-feature .cross {
    width: 18px; height: 18px;
    background: var(--gray-light);
    color: var(--gray-dark);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.plan-cta { width: 100%; }

/* --- RECENSIONI --- */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}
.review-card {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: box-shadow var(--transition);
}
.review-card:hover { box-shadow: var(--shadow-md); }
.review-stars { color: #F59E0B; font-size: 1rem; margin-bottom: 0.75rem; }
.review-text  { font-size: 0.9rem; color: var(--text); margin-bottom: 1rem; line-height: 1.6; }
.review-author { font-size: 0.85rem; font-weight: 700; color: var(--navy); }
.review-source { font-size: 0.75rem; color: var(--text-light); margin-top: 0.2rem; }
.reviews-avg {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 2rem;
    background: var(--navy);
    border-radius: var(--radius-lg);
    width: fit-content;
    margin: 0 auto 2.5rem;
}
.reviews-avg .big-score {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
    letter-spacing: -0.03em;
}
.reviews-avg .stars-row { color: #F59E0B; font-size: 1.25rem; }
.reviews-avg .count { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 0.2rem; }

/* --- CHECKOUT / FORM --- */
.checkout-wrap { max-width: 560px; margin: 0 auto; }
.form-card {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.form-control {
    width: 100%;
    padding: 0.7rem 0.95rem;
    background: var(--off-white);
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}
.form-control:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-pale);
    background: var(--white);
}
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: 0.775rem; color: var(--text-muted); margin-top: 0.3rem; }

.alert {
    padding: 0.875rem 1.1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
    font-weight: 500;
}
.alert-success { background: #DCFCE7; border-color: #86EFAC; color: #166534; }
.alert-error   { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }
.alert-info    { background: #DBEAFE; border-color: #93C5FD; color: #1E40AF; }

.plan-summary-box {
    background: var(--navy);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.plan-summary-box .plan-info { font-size: 0.875rem; color: rgba(255,255,255,0.7); }
.plan-summary-box .plan-info strong { display: block; color: #fff; font-size: 1rem; margin-bottom: 0.15rem; }
.plan-summary-box .plan-price-tag {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--orange);
    white-space: nowrap;
}

.checkout-steps {
    background: var(--off-white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.checkout-step { display: flex; gap: 0.75rem; align-items: flex-start; }
.checkout-step-icon {
    width: 22px; height: 22px;
    background: var(--orange);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.checkout-step p { margin: 0; color: var(--text); font-size: 0.875rem; }

/* --- LEGAL --- */
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content h2 {
    font-size: 1.2rem;
    margin: 2.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-light);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p  { margin-bottom: 0.875rem; font-size: 0.925rem; }
.legal-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 0.875rem; }
.legal-content li { font-size: 0.925rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.legal-content strong { color: var(--text); }

/* --- FOOTER --- */
.site-footer { background: var(--navy); padding: 4rem 0 2rem; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-brand .logo { color: var(--white); font-size: 1.4rem; }
.footer-brand .logo span { color: var(--orange); }
.footer-brand p { color: rgba(255,255,255,0.4); font-size: 0.875rem; margin-top: 0.75rem; max-width: 280px; }
.footer-col h4 {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1rem;
}
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { font-size: 0.875rem; color: rgba(255,255,255,0.45); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.25); margin: 0; }
.footer-bottom a { color: rgba(255,255,255,0.3); font-size: 0.8rem; }
.footer-bottom a:hover { color: var(--white); }

/* --- UTILITY --- */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .plans-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .plan-card.featured { transform: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    /* Hamburger visibile su mobile */
    .nav-toggle { display: flex; }

    /* Menu laterale da destra — slide-in */
    .main-nav {
        display: block;          /* sempre nel DOM, animato via right */
        position: fixed;
        top: 0;
        right: -290px;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: -4px 0 24px rgba(15,31,61,0.15);
        padding: 4.5rem 1.5rem 2rem;
        z-index: 200;
        overflow-y: auto;
        transition: right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .main-nav.open { right: 0; }

    /* Overlay e bottone chiudi visibili solo su mobile */
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15,31,61,0.45);
        z-index: 199;
        backdrop-filter: blur(2px);
    }
    .nav-overlay.open { display: block; }

    .nav-close {
        display: block;
        position: absolute;
        top: 1.1rem;
        right: 1.1rem;
        background: var(--gray-light);
        border: none;
        border-radius: 50%;
        width: 32px;
        height: 32px;
        font-size: 1rem;
        cursor: pointer;
        color: var(--text-muted);
        line-height: 1;
    }

    /* Voci di menu verticali */
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-bottom: 1px solid var(--gray-light); }
    .main-nav a  { display: block; padding: 0.9rem 0; font-size: 1rem; color: var(--text); }
    .main-nav li:last-child { border-bottom: none; padding-top: 0.75rem; }

    /* Bottone "Inizia ora" nel menu mobile */
    .main-nav .btn-primary {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.85rem 1rem;
        font-size: 1rem;
    }

    /* Layout generale */
    .section { padding: 4rem 0; }
    .hero { padding: 5rem 0 4rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .features-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; text-align: center; }

    /* Pricing mobile: 2 colonne + terza card centrata sotto */
    .plans-grid {
        grid-template-columns: 1fr 1fr;
        max-width: 100%;
        gap: 1rem;
    }
    .plans-grid .plan-card:nth-child(3) {
        grid-column: 1 / -1;
        max-width: 320px;
        margin: 0 auto;
        width: 100%;
    }
    .plan-card.featured { transform: none; }
    .plan-price .amount { font-size: 2rem; }
    .plan-features { gap: 0.5rem; }
}