/*
Theme Name: Altre Sponde Sportello
Theme URI: https://www.altresponde.it
Author: CAD Altre Sponde
Description: Tema WordPress su misura per il sito di CAD Altre Sponde — Centro Antidiscriminazione LGBTQIA+ di Firenze. Direzione grafica "Sportello": chiara, istituzionale, accogliente, con palette verde/senape tenue, barra contatti e striscia multicolore ispirata al logo.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: altresponde-sportello
*/

/* =========================================================
   CAD Altre Sponde — Design System
   Direzione "Sportello": istituzionale, chiara, accogliente.
   Palette tenue verde/senape, ispirata a centrenous.it
   ========================================================= */

:root {
  /* Colori primari — palette tenue, verde/senape */
  --purple-900: #33503F; /* verde scuro tenue (header di pagina, footer) */
  --purple-800: #5C7A64; /* verde medio tenue (hero) */
  --purple-700: #4F7058; /* verde bosco tenue (accento primario, link) */
  --purple-600: #7C9C86; /* verde chiaro */
  --purple-100: #EAF1EC; /* tinta verde chiarissima */

  --mustard-700: #7A6B2E; /* senape scuro (testo su chiaro) */
  --mustard-600: #B9A24A; /* senape tenue (bottoni primari, accenti) */
  --mustard-500: #C9B06A; /* senape hover */
  --mustard-300: #DDCB94; /* senape chiaro (accenti su fondo scuro) */
  --mustard-100: #F6F1E1; /* tinta senape chiarissima */

  --ink: #212B24;
  --ink-soft: #4F5B52;
  --cream: #FBF9F5;
  --paper: #FFFFFF;
  --line: #E3EAE5;
  --paper-tint: #E3EEE6; /* testo chiaro su fondo verde scuro */

  /* Striscia multicolore (arcobaleno del logo, tono tenue) */
  --rb-1: #C58868; /* rosso-arancio tenue */
  --rb-2: #D3B26B; /* arancio-oro tenue */
  --rb-3: #D6CA84; /* giallo tenue */
  --rb-4: #8FAE96; /* verde tenue */
  --rb-5: #7C97AD; /* blu tenue */
  --rb-6: #8B7BA8; /* viola tenue */

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-soft: 0 4px 14px rgba(18, 59, 79, 0.16);
  --shadow-card: 0 2px 10px rgba(18, 59, 79, 0.08);

  --font-display: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 17px;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.4rem; font-weight: 700; }

p { margin: 0 0 1em; }

a { color: var(--purple-700); text-decoration-thickness: 2px; }
a:hover { color: var(--purple-900); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.screen-reader-text, .visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link { position: absolute; left: -999px; top: 0; background: var(--purple-900); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0; z-index: 999; }
.skip-link:focus { left: 0; }

/* ---------- Buttons (usate anche nei template PHP) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  padding: 14px 28px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--mustard-600); color: var(--ink); box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--mustard-500); color: var(--ink); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--paper); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: var(--paper); }
.btn-dark { background: var(--purple-900); color: #fff; }
.btn-dark:hover { background: var(--purple-700); color: #fff; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 48px; width: auto; }
.brand-word { font-family: var(--font-display); font-weight: 800; color: var(--ink); line-height: 1; font-size: 1.25rem; letter-spacing: 0.5px; }
.brand-tag { display: block; font-family: var(--font-body); font-weight: 600; font-size: 0.62rem; letter-spacing: 1px; color: var(--ink-soft); text-transform: uppercase; margin-top: 2px; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.98rem; padding: 6px 2px; border-bottom: 3px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"], .main-nav li.current-menu-item > a { border-color: var(--purple-700); color: var(--ink); }

/* ---------- Topbar (contatti + social) & accent stripe ---------- */
.topbar { background: var(--purple-900); color: #D9E4EA; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 9px 24px; font-size: 0.82rem; flex-wrap: wrap; }
.topbar-info { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-info a, .topbar-social a { color: #D9E4EA; text-decoration: none; }
.topbar-info a:hover, .topbar-social a:hover { color: #fff; text-decoration: underline; }
.topbar-social { display: flex; gap: 16px; }
.accent-stripe { display: flex; height: 4px; }
.accent-stripe span { flex: 1; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch { position: relative; }
.lang-switch button { background: var(--purple-100); border: none; color: var(--purple-900); font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; padding: 8px 12px; border-radius: 999px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.lang-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-card); min-width: 170px; padding: 6px; z-index: 50; }
.lang-switch.open .lang-menu { display: block; }
.lang-menu a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.lang-menu a:hover { background: var(--purple-100); }
.lang-menu a[aria-current="true"] { color: var(--purple-700); background: var(--purple-100); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--ink); margin: 5px 0; border-radius: 3px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--purple-800); color: var(--paper); padding: 70px 0 60px; }
.hero .container { position: relative; z-index: 2; }
.hero-eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; color: var(--mustard-300); margin-bottom: 14px; display: inline-block; }
.hero h1 { color: var(--paper); max-width: 14ch; }
.hero h1 .accent { color: var(--mustard-300); }
.hero-lead { max-width: 46ch; font-size: 1.15rem; color: var(--paper-tint); margin-top: 18px; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; }

.hero-visit { margin-top: 0; padding-top: 0; border-top: none; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.hero-visit h2 { color: var(--ink); font-size: 1.6rem; }
.hero-visit .visit-block { color: rgba(22,18,31,0.85); }
.hero-visit .visit-block strong { display: block; color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--paper); }
.section-purple { background: var(--purple-900); color: var(--paper); }
.section-purple h2, .section-purple h3 { color: var(--paper); }
.section-mustard { background: var(--mustard-100); }

.section-head { max-width: 62ch; margin-bottom: 44px; }
.eyebrow { display: inline-block; font-weight: 700; text-transform: uppercase; letter-spacing: 1.6px; font-size: 0.78rem; color: var(--purple-700); background: var(--purple-100); padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }

/* ---------- Cards / grids (per i template PHP) ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--paper); border-radius: var(--radius-md); padding: 30px; border: 1px solid var(--line); }
.card .icon-badge { margin-bottom: 16px; }

.icon-badge { width: 54px; height: 54px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; background: var(--purple-100); color: var(--purple-700); }
.icon-badge.mustard { background: var(--mustard-100); color: var(--mustard-700); }

/* Loghi partner (Chi siamo) */
.partner-logos { display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; align-items: stretch; }
.partner-logo-card {
  background: var(--paper); border-radius: var(--radius-md); border: 1px solid var(--line);
  padding: 28px; display: flex; align-items: center; justify-content: center;
  flex: 1 1 220px; min-height: 140px; transition: box-shadow .2s ease, transform .2s ease;
}
.partner-logo-card:hover, .partner-logo-card:focus-visible { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.partner-logo-card img { max-height: 90px; max-width: 100%; object-fit: contain; }

/* Quote / callout */
.callout { background: var(--paper); border: 1.5px solid var(--mustard-600); padding: 28px 32px; border-radius: var(--radius-md); font-size: 1.15rem; color: var(--purple-900); font-weight: 600; }

/* Placeholder note box per contenuti da completare */
.todo-note { background: #FFF4E5; border: 1px dashed #C98A2C; color: #6B4B12; padding: 16px 20px; border-radius: var(--radius-sm); font-size: 0.92rem; margin: 18px 0; }
.todo-note strong { display: block; margin-bottom: 4px; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon-badge { flex: none; }

.map-frame { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; }
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* CTA banner */
.cta-banner { background: var(--purple-900); color: var(--paper); border-radius: var(--radius-lg); padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta-banner h2 { color: var(--paper); margin-bottom: 6px; }

/* Footer */
.site-footer { background: var(--ink); color: #D8D2E6; padding: 60px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: #D8D2E6; text-decoration: none; font-size: 0.95rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { height: 40px; width: auto; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: #9E93B8; }
.social-row { display: flex; gap: 12px; margin-top: 16px; }
.social-row a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }

/* Decorative illustrations */
.dot-strip { display: block; width: 100%; height: auto; }
.dot-strip-wrap { overflow: hidden; line-height: 0; }
.illustration-band { background: var(--purple-100); padding: 30px 0; overflow: hidden; }

/* Emergency / safety strip */
.safety-strip { background: #8F4A3B; color: #fff; text-align: center; font-weight: 700; font-size: 0.92rem; padding: 10px 16px; }
.safety-strip a { color: #fff; text-decoration: underline; }

/* Utility */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.flow > * + * { margin-top: 1em; }

/* =========================================================
   Compatibilità con i blocchi nativi di WordPress
   (così le pagine costruite nell'editor a blocchi rispettano
   automaticamente lo stesso stile del resto del sito)
   ========================================================= */

/* Colori della palette del tema applicati dall'editor a blocchi
   (Aspetto > Personalizza li mostra come "Verde scuro", "Senape", ecc.
   — queste classi li traducono davvero nel colore giusto). */
.has-verde-scuro-color { color: var(--purple-900) !important; }
.has-verde-scuro-background-color { background-color: var(--purple-900) !important; }
.has-verde-color { color: var(--purple-800) !important; }
.has-verde-background-color { background-color: var(--purple-800) !important; }
.has-verde-chiaro-color { color: var(--purple-100) !important; }
.has-verde-chiaro-background-color { background-color: var(--purple-100) !important; }
.has-senape-color { color: var(--mustard-600) !important; }
.has-senape-background-color { background-color: var(--mustard-600) !important; }
.has-senape-chiaro-color { color: var(--mustard-100) !important; }
.has-senape-chiaro-background-color { background-color: var(--mustard-100) !important; }
.has-panna-color { color: var(--cream) !important; }
.has-panna-background-color { background-color: var(--cream) !important; }
.has-bianco-color { color: #FFFFFF !important; }
.has-bianco-background-color { background-color: #FFFFFF !important; }
.has-inchiostro-color { color: var(--ink) !important; }
.has-inchiostro-background-color { background-color: var(--ink) !important; }

/* Un Gruppo con un colore testo esplicito (es. i banner verdi) deve
   "vincere" sul colore predefinito di titoli e paragrafi. */
.wp-block-group.has-text-color h1,
.wp-block-group.has-text-color h2,
.wp-block-group.has-text-color h3,
.wp-block-group.has-text-color h4,
.wp-block-group.has-text-color p { color: inherit; }

/* Bottoni: Fill = pieno (senape), Outline = contorno */
.wp-block-button__link {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  border-radius: 999px !important; padding: 14px 28px !important;
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background-color: var(--mustard-600); color: var(--ink);
}
.wp-block-button.is-style-outline .wp-block-button__link {
  border: 2px solid currentColor;
}

/* Citazione / Pullquote → stesso stile del "callout" */
.entry-content .wp-block-quote,
.entry-content .wp-block-pullquote blockquote {
  background: var(--paper); border: 1.5px solid var(--mustard-600); border-left: 1.5px solid var(--mustard-600);
  padding: 28px 32px; border-radius: var(--radius-md); font-size: 1.15rem; color: var(--purple-900); font-weight: 600;
}
.entry-content .wp-block-quote p, .entry-content .wp-block-pullquote p { margin: 0; }
.entry-content .wp-block-quote cite, .entry-content .wp-block-pullquote cite { color: var(--ink-soft); }

/* Blocco "Dettagli" nativo → stile fisarmonica (FAQ) */
.entry-content .wp-block-details {
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 14px;
  background: var(--paper); overflow: hidden; padding: 0;
}
.entry-content .wp-block-details summary {
  cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700;
  font-family: var(--font-display);
}
.entry-content .wp-block-details summary::-webkit-details-marker { display: none; }
.entry-content .wp-block-details > :not(summary) { padding: 0 22px 20px; margin: 0; color: var(--ink-soft); }

/* Paragrafo con classe aggiuntiva "eyebrow" → etichetta colorata */
.entry-content p.eyebrow {
  display: inline-block; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.6px; font-size: 0.78rem; color: var(--purple-700);
  background: var(--purple-100); padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}

/* Gruppo con classe aggiuntiva "card" → riquadro in stile scheda */
.entry-content .card {
  background: var(--paper); border-radius: var(--radius-md); padding: 30px; border: 1px solid var(--line);
}

/* Gruppo con classe aggiuntiva "todo-note" → riquadro promemoria */
.entry-content .todo-note { background: #FFF4E5; border: 1px dashed #C98A2C; color: #6B4B12; padding: 16px 20px; border-radius: var(--radius-sm); }
.entry-content .todo-note p { margin: 0; color: inherit; }

/* Contenuto delle pagine: leggibilità di base per blocchi standard */
.entry-content { font-size: 1.05rem; }
.entry-content > * { margin-bottom: 1.3em; }
.entry-content h2, .entry-content h3 { margin-top: 0.4em; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .topbar { display: none; }
  .main-nav ul, .header-actions .lang-switch { display: none; }
  .nav-toggle { display: block; }
  .brand, .header-actions { position: relative; z-index: 110; }
  body.nav-open .main-nav {
    display: flex; position: fixed; inset: 0; top: var(--header-h, 128px); background: var(--paper);
    flex-direction: column; padding: 30px 24px; z-index: 90;
  }
  body.nav-open .main-nav ul { display: flex; flex-direction: column; gap: 6px; }
  body.nav-open .main-nav a { display: block; padding: 14px 4px; font-size: 1.1rem; }
  body.nav-open .lang-switch { display: block; margin-top: 20px; }
  .main-nav { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-visit { flex-direction: column; gap: 24px; }
  .cta-banner { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
}
