/* Stylesheet condiviso PAF — palette e layout coerenti con index.html */

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

:root {
    --primary: #2c5e66;
    --primary-dark: #1f474d;
    --accent: #3f7f35;
    --accent-dark: #2f6b2b;
    --text: #1a2e32;
    --text-light: #5a6b6e;
    --bg: #f5f8f7;
    --white: #ffffff;
    --border: rgba(44, 94, 102, 0.12);
}

html, body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 78px; /* compensa la topbar sticky sugli anchor (#iscriviti ecc.) */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Top bar (logo + nav) — sticky, coerente con la home refactoring 2026-07 */
.topbar {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 14px rgba(44, 94, 102, 0.05);
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-weight: 800;
    font-size: 15.5px;
    letter-spacing: -0.3px;
}
.brand img { height: 34px; width: auto; display: block; }
.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav a {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}
.nav a:hover { color: var(--accent-dark); text-decoration: none; }
.nav .nav-cta {
    background: var(--accent);
    color: #fff;
    padding: 9px 18px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 13.5px;
    transition: background 0.2s;
}
.nav .nav-cta:hover { background: var(--accent-dark); color: #fff; }
@media (max-width: 640px) {
    .topbar { position: static; } /* su mobile la barra non resta fissa: lo spazio verticale è prezioso */
}

/* Hero / page header */
.page-header {
    padding: 56px 0 24px;
    text-align: center;
}
h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--primary);
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 18px;
}
.page-header .subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-light);
    max-width: 720px;
    margin: 0 auto;
}

main { flex: 1; padding: 24px 0 56px; }

/* Bottoni */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px rgba(111, 184, 96, 0.32);
}
.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}
.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); color: var(--primary); text-decoration: none; }
.btn-block { width: 100%; }

/* Card guide */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 32px 0;
}
.guide-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.guide-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(44, 94, 102, 0.10);
}
.guide-label {
    display: inline-block;
    background: rgba(44, 94, 102, 0.08);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 4px 10px;
    border-radius: 100px;
    margin-bottom: 14px;
    align-self: flex-start;
}
.guide-card h3 {
    font-size: 1.15rem;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 10px;
}
.guide-card p { color: var(--text-light); font-size: 15px; margin-bottom: 16px; flex-grow: 1; }
.guide-features {
    list-style: none;
    margin-bottom: 22px;
    padding: 0;
}
.guide-features li {
    font-size: 13px;
    color: var(--text);
    padding-left: 22px;
    position: relative;
    margin-bottom: 6px;
}
.guide-features li::before {
    content: "✓";
    color: var(--accent-dark);
    font-weight: 700;
    position: absolute;
    left: 0;
}

/* Box "cosa riceverai" */
.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 32px 0 48px;
}
.benefit-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
}
.benefit-item .num {
    display: inline-flex;
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
}
.benefit-item h3 {
    color: var(--primary);
    font-size: 15px;
    margin-bottom: 6px;
}
.benefit-item p { font-size: 14px; color: var(--text-light); }

/* Sezione testuale */
.text-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px;
    margin: 24px 0;
}
.text-block h2 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 14px;
}
.text-block p { color: var(--text); margin-bottom: 12px; }
.text-block p:last-child { margin-bottom: 0; }

/* Riga MePA */
.mepa-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--white);
    padding: 18px 28px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 14px;
    margin: 32px auto 0;
    max-width: 720px;
    text-align: center;
    flex-wrap: wrap;
}
.mepa-row strong { color: var(--primary); }
.mepa-icon {
    width: 26px;
    height: 26px;
    background: var(--accent);
    color: white;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Pagina di servizio centrata */
.service-page {
    max-width: 580px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 0;
}
.service-page .icon-circle {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    background: rgba(111, 184, 96, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}
.service-page h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 14px; }
.service-page .subtitle { color: var(--text-light); margin-bottom: 24px; font-size: 1.05rem; }
.service-page .info-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    text-align: left;
    margin: 24px 0;
}
.service-page .info-box strong { color: var(--primary); }
.service-page .actions { margin-top: 28px; }

/* Privacy / contenuti lunghi */
.long-content {
    max-width: 760px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px 36px;
    border-radius: 14px;
    border: 1px solid var(--border);
}
.long-content h1 { text-align: left; font-size: 1.8rem; margin-bottom: 8px; }
.long-content .meta { color: var(--text-light); font-size: 14px; margin-bottom: 28px; }
.long-content h2 { color: var(--primary); font-size: 1.15rem; margin: 26px 0 10px; }
.long-content h3 { color: var(--primary); font-size: 1rem; margin: 18px 0 8px; }
.long-content p { margin-bottom: 12px; }
.long-content ul, .long-content ol { margin: 0 0 16px 22px; }
.long-content li { margin-bottom: 6px; }
.long-content em { color: var(--text-light); }
.long-content hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }

/* Footer — scuro istituzionale (refactoring 2026-07) */
footer {
    padding: 36px 0 28px;
    border-top: none;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.75);
    background: var(--primary-dark);
    margin-top: 32px;
}
footer strong { color: #ffffff; }
footer a { color: rgba(255, 255, 255, 0.85); text-decoration: underline; }
footer a:hover { color: #ffffff; }
footer .footer-links { margin-top: 6px; }
footer .footer-links a { margin: 0 8px; }

/* Responsive */
@media (max-width: 640px) {
    .topbar-inner { justify-content: center; }
    .nav { gap: 14px; }
    .page-header { padding: 36px 0 16px; }
    .guide-grid, .benefit-grid { grid-template-columns: 1fr; }
    .long-content { padding: 28px 22px; }
}
