/* ============================================================
   Associazione per la Storia — Tema principale
   Stile calcistico: verde #1f7a3d / oro #c9a227 / bianco
   ============================================================ */

:root {
    --green-deep: #0a2e18;
    --green: #1f7a3d;
    --green-light: #2c9b4f;
    --gold: #c9a227;
    --gold-light: #e6c45c;
    --white: #ffffff;
    --paper: #f5f7f5;
    --ink: #14241a;
    --muted: #5d6b62;
    --line: #e3e8e4;
    --shadow: 0 10px 30px rgba(10, 46, 24, 0.12);
    --radius: 14px;
    --maxw: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Oswald', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 300;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-light); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3, h4 {
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
    line-height: 1.05;
    color: var(--green-deep);
}

/* ---------------- Header / Nav ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--green-deep);
    border-bottom: 3px solid var(--gold);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--white); }
.brand-logo { width: 52px; height: 52px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.35rem;
    letter-spacing: 2px;
    color: var(--white);
}
.brand-text em {
    font-style: italic;
    font-size: 0.8rem;
    color: var(--gold-light);
    letter-spacing: 1px;
}

.site-nav ul { list-style: none; display: flex; gap: 0.4rem; }
.site-nav a {
    display: block;
    padding: 0.55rem 1rem;
    color: var(--white);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 999px;
    transition: background 0.2s, color 0.2s;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.1); color: var(--gold-light); }
.site-nav a.is-active { background: var(--gold); color: var(--green-deep); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 26px; height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.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); }

/* ---------------- Hero ---------------- */
.hero {
    position: relative;
    color: var(--white);
    text-align: center;
    padding: 5rem 1.25rem 5.5rem;
    background:
        radial-gradient(circle at 50% 30%, rgba(44, 155, 79, 0.5), rgba(10, 46, 24, 0.96) 65%, #061c0f),
        var(--green-deep);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute; inset: -20%;
    background: repeating-linear-gradient(125deg,
        rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 2px, transparent 2px, transparent 48px);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
    color: var(--gold-light);
    font-size: clamp(2.6rem, 7vw, 5rem);
    text-shadow: 0 4px 0 rgba(0,0,0,0.25), 0 12px 28px rgba(0,0,0,0.45);
}
.hero p {
    max-width: 640px;
    margin: 1rem auto 0;
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    color: rgba(255,255,255,0.88);
}
.hero .hero-logo { width: clamp(110px, 18vw, 160px); margin: 0 auto 1.25rem; filter: drop-shadow(0 12px 26px rgba(0,0,0,0.5)); }

/* ---------------- Bottoni ---------------- */
.btn {
    display: inline-block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 2px;
    padding: 0.7rem 1.8rem;
    border-radius: 999px;
    text-transform: uppercase;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn-gold { background: var(--gold); color: var(--green-deep); box-shadow: var(--shadow); }
.btn-gold:hover { background: var(--gold-light); color: var(--green-deep); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--green-deep); }
.hero .btn { margin-top: 1.8rem; }

/* ---------------- Sezioni ---------------- */
.section { padding: 4rem 0; }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(2rem, 5vw, 3rem); }
.section-head .kicker {
    display: inline-block;
    font-size: 0.8rem; letter-spacing: 3px; text-transform: uppercase;
    color: var(--gold); font-weight: 600; margin-bottom: 0.4rem;
}
.section-head .underline { width: 70px; height: 4px; margin: 0.8rem auto 0; background: var(--gold); border-radius: 2px; }
.section-alt { background: var(--white); }

/* ---------------- Card notizie ---------------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.6rem;
}
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(10,46,24,0.18); }
.card-media {
    aspect-ratio: 16 / 9;
    background: var(--green-deep);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .placeholder { width: 46%; opacity: 0.9; }
.card-body { padding: 1.3rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.card-meta { display: flex; gap: 0.6rem; align-items: center; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.card-tag { background: var(--green); color: var(--white); padding: 0.15rem 0.6rem; border-radius: 999px; font-weight: 500; }
.card h3 { font-size: 1.5rem; color: var(--green-deep); }
.card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.card .read-more { font-family: 'Bebas Neue', sans-serif; letter-spacing: 1.5px; color: var(--green); }

/* ---------------- Chi siamo ---------------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.about-text p { margin-bottom: 1rem; color: var(--ink); }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.4rem; margin-top: 1rem; }
.value { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; text-align: center; box-shadow: var(--shadow); }
.value h3 { color: var(--green); font-size: 1.5rem; margin-bottom: 0.4rem; }
.value p { color: var(--muted); font-size: 0.95rem; }

/* ---------------- Direttivo ---------------- */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 1.6rem; }
.member { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-align: center; }
.member-photo { aspect-ratio: 1; background: var(--green-deep); display: flex; align-items: center; justify-content: center; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-photo .placeholder { width: 50%; opacity: 0.85; }
.member-body { padding: 1.2rem; }
.member-body .role { display: block; color: var(--gold); font-size: 0.78rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
.member-body .name { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; color: var(--green-deep); letter-spacing: 1px; }

/* ---------------- Contatti ---------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.contact-info .item { display: flex; gap: 0.8rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-info .item strong { font-family: 'Bebas Neue', sans-serif; letter-spacing: 1px; color: var(--green-deep); font-size: 1.2rem; }
.contact-info .item span { color: var(--muted); }
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; color: var(--green-deep); margin-bottom: 0.35rem; font-weight: 500; }
.form-field input, .form-field textarea {
    width: 100%; padding: 0.8rem 1rem; font-family: inherit; font-size: 1rem;
    border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--green-light); border-color: var(--green-light); }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--green-deep); color: rgba(255,255,255,0.85); margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding: 3rem 1.25rem 2rem; }
.footer-logo { width: 80px; margin-bottom: 1rem; }
.footer-club { font-size: 0.95rem; }
.footer-club span { color: var(--gold-light); font-size: 0.85rem; }
.footer-social { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.footer-social:hover { color: var(--gold-light); }
.footer-social svg { flex-shrink: 0; }
.footer-col h4 { color: var(--gold-light); font-size: 1.3rem; letter-spacing: 2px; margin-bottom: 1rem; }
.footer-links { list-style: none; }
.footer-links a, .footer-contact a { color: rgba(255,255,255,0.85); }
.footer-links a:hover, .footer-contact a:hover { color: var(--gold-light); }
.footer-links li { margin-bottom: 0.5rem; }
.footer-bar { border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.8rem; letter-spacing: 1px; }
.footer-bar .container { padding-top: 1.2rem; padding-bottom: 1.2rem; text-align: center; color: rgba(255,255,255,0.5); }

/* ---------------- Page header (pagine interne) ---------------- */
.page-hero { background: var(--green-deep); color: var(--white); text-align: center; padding: 3.2rem 1.25rem; position: relative; overflow: hidden; }
.page-hero::before { content:""; position:absolute; inset:-20%; background: repeating-linear-gradient(125deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 2px, transparent 2px, transparent 48px); }
.page-hero h1 { position: relative; color: var(--gold-light); font-size: clamp(2.2rem, 6vw, 3.6rem); }
.page-hero p { position: relative; color: rgba(255,255,255,0.8); margin-top: 0.5rem; }

/* ---------------- Corpo articolo / pagina ---------------- */
.article-body { font-size: 1.08rem; color: var(--ink); line-height: 1.8; }
.article-body p { margin-bottom: 1.1rem; }
.article-body h2, .article-body h3 { margin: 1.6rem 0 0.6rem; }
.article-body img { border-radius: var(--radius); margin: 1rem 0; }
.article-body ul, .article-body ol { margin: 0 0 1.1rem 1.4rem; }
.article-body a { text-decoration: underline; }

/* ---------------- Widget ---------------- */
.widget { margin-bottom: 1.4rem; }
.widget h4 { color: var(--gold-light); font-size: 1.3rem; letter-spacing: 2px; margin-bottom: 0.8rem; }
.widget-list { list-style: none; }
.widget-list li { margin-bottom: 0.5rem; }
.widget-list a { color: rgba(255,255,255,0.85); }
.widget-list a:hover { color: var(--gold-light); }

/* ---------------- CTA band (soci) ---------------- */
.cta-band {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
    color: #fff; text-align: center; padding: 3.2rem 1.25rem;
    border-top: 3px solid var(--gold); border-bottom: 3px solid var(--gold);
}
.cta-band .kicker { display: inline-block; color: var(--gold-light); font-size: 0.8rem; letter-spacing: 3px; text-transform: uppercase; font-weight: 600; }
.cta-band h2 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin: 0.3rem 0 0.6rem; }
.cta-band p { max-width: 620px; margin: 0 auto; color: rgba(255,255,255,0.9); }
.cta-band .cta-actions { margin-top: 1.6rem; display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ---------------- Campi select (stile coerente con input) ---------------- */
.form-field select {
    width: 100%; padding: 0.8rem 1rem; font-family: inherit; font-size: 1rem;
    border: 1px solid var(--line); border-radius: 10px; background-color: var(--white); color: var(--ink);
    appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f7a3d' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.6rem;
}
.form-field select:focus { outline: 2px solid var(--green-light); border-color: var(--green-light); }

/* Bottone secondario su sfondo chiaro */
.btn-ghost { background: transparent; border: 2px solid var(--green); color: var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }

/* ---------------- Registrazione ---------------- */
.reg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.reg-form .form-field { margin-bottom: 1rem; }
.club-suggest { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.3rem; }
.club-suggest-title { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.club-suggest-item { text-align: left; background: #eef4ef; border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.8rem; cursor: pointer; font-family: inherit; font-size: 0.95rem; color: var(--green-deep); }
.club-suggest-item:hover { background: var(--green); color: #fff; }
.club-suggest-item span { opacity: 0.7; }
@media (max-width: 560px) { .reg-row { grid-template-columns: 1fr; } }

/* ---------------- Cookie banner ---------------- */
.cookie-banner {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 100;
    max-width: 720px; margin: 0 auto;
    background: var(--green-deep); color: #fff;
    border: 1px solid var(--gold); border-radius: var(--radius);
    box-shadow: 0 14px 40px rgba(0,0,0,0.4);
    padding: 1rem 1.2rem;
    display: none; flex-direction: column; gap: 0.8rem;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { font-size: 0.9rem; margin: 0; color: rgba(255,255,255,0.9); }
.cookie-banner a { color: var(--gold-light); text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.6rem; justify-content: flex-end; }
.cookie-btn { font-family: 'Bebas Neue', sans-serif; letter-spacing: 1.5px; font-size: 0.95rem;
    padding: 0.5rem 1.3rem; border-radius: 999px; border: 0; cursor: pointer; }
.cookie-btn-gold { background: var(--gold); color: var(--green-deep); }
.cookie-btn-gold:hover { background: var(--gold-light); }
.cookie-btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.5); }
.cookie-btn-ghost:hover { background: rgba(255,255,255,0.12); }
@media (min-width: 560px) { .cookie-banner { flex-direction: row; align-items: center; } .cookie-actions { flex-shrink: 0; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--green-deep);
        max-height: 0; overflow: hidden;
        transition: max-height 0.3s ease;
        border-bottom: 3px solid var(--gold);
    }
    .site-nav.is-open { max-height: 360px; }
    .site-nav ul { flex-direction: column; padding: 0.5rem 1.25rem 1rem; }
    .site-nav a { border-radius: 8px; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-logo { margin-left: auto; margin-right: auto; }
}

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