/* ============================================================================
   HEADINGS.CSS — Step 2 v1.3.15: UNICA fonte di verità per i titoli pagina.
   ----------------------------------------------------------------------------
   Coperto: front (home, search, detail, comune, contatti) + admin (dashboard,
   settings, users, content form, ecc.).

   Convenzioni:
   - <h1> riceve di default il gradient brand (var(--accent-gradient)).
   - .page-title è alias per casi in cui non c'è un <h1> ma un <div> stilato.
   - .section-title è il titolo medio (era h2).
   - .hero h1 ha override bianco + shadow (titolo dentro l'hero immagine).
   - .event-detail-body h1 ha override plain (no gradient sopra il body).
   ============================================================================ */

/* === Tipografia base === */
h1, h2, h3, h4, h5, h6,
.page-title, .section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem 0;
}

/* === H1 / .page-title — Titolo principale di pagina ===
   Gradient brand-aware: usa var(--accent-gradient) coerente con il tema. */
h1,
.page-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -1px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--accent); /* fallback per browser senza background-clip */
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 2rem 0;
}

/* Permette a <h1> di accogliere icona + testo allineati */
h1 i, .page-title i {
    -webkit-text-fill-color: var(--accent);
    color: var(--accent);
    background: none;
}

/* === H2 / .section-title === */
h2,
.section-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    margin: 0 0 1.5rem 0;
}

/* === H3 === */
h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

/* === H4 === */
h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
}

/* ============================================================================
   MODIFIERS / OVERRIDES contestuali
   ============================================================================ */

/* Hero (sezione con immagine di sfondo): titolo bianco con shadow */
.hero h1,
.hero .page-title {
    background: none;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    max-width: var(--container-width);
    margin-bottom: 1.5rem;
}

/* Event detail body: titolo plain (no gradient) sotto l'hero */
.event-detail-body h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    background: none;
    -webkit-text-fill-color: var(--text-primary);
    color: var(--text-primary);
    display: block;
}

/* Mobile responsive */
@media (max-width: 768px) {
    h1, .page-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
    h2, .section-title {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
    }
    .hero h1,
    .hero .page-title {
        font-size: clamp(2rem, 7vw, 3rem);
    }
}
