/* ============================================================
   EXTRAS — Ragazzi scope (own visual identity), accessibility
   runtime classes (font scale, high contrast, highlight links,
   grayscale), and print styles.
   ============================================================ */

/* ---------- Ragazzi section palette ---------- */
:root {
  --rag-1: #E8632A; /* arancio */
  --rag-2: #F2A900;
  --rag-3: #2E9E6B; /* verde */
  --rag-4: #5B57C7; /* viola */
  --rag-soft: #FFF1E8;
}
/* Faithful re-implementation of pages-ragazzi.jsx (RagazziPage). */
.rag-scope { font-family: var(--font-sans); }

/* Hero (gradient rag-1 → rag-2, decorative circles, breadcrumb inside) */
.rag-hero-wrap { background: linear-gradient(135deg, var(--rag-1), var(--rag-2)); color: #fff; position: relative; overflow: hidden; }
.rag-hero-wrap__c1 { position: absolute; top: -40px; right: -30px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.12); }
.rag-hero-wrap__c2 { position: absolute; bottom: -60px; left: 30%; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.1); }
.rag-breadcrumb { position: relative; padding-top: 20px; font-size: var(--text-sm); opacity: .96; }
.rag-breadcrumb a, .rag-breadcrumb a:visited { color: #fff; text-decoration: none; }
.rag-breadcrumb a:hover { text-decoration: underline; }
.rag-hero { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; padding: 32px 0 48px; }
.rag-hero__badge { display: inline-block; background: rgba(255,255,255,.22); border-radius: var(--radius-pill); padding: 6px 16px; font-weight: var(--weight-bold); font-size: var(--text-sm); margin-bottom: 18px; }
.rag-hero__title { font-size: var(--text-4xl); color: #fff; margin: 0 0 16px; line-height: 1.02; }
.rag-hero__lead { font-size: var(--text-lg); margin: 0 0 28px; line-height: 1.5; opacity: .96; max-width: 520px; }
.rag-hero__buttons { display: flex; gap: 12px; flex-wrap: wrap; }
/* Testo arancio scuro AA-safe (#B5471A ≈ 5:1 su bianco) invece di --rag-1 (3.36). */
.rag-hero__btn { display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #B5471A; border: 0; border-radius: var(--radius-pill); padding: 13px 24px; font-weight: var(--weight-bold); font-size: var(--text-base); cursor: pointer; text-decoration: none; min-height: 44px; }
.rag-hero__btn:hover, .rag-hero__btn:visited { color: #B5471A; }
.rag-hero__btn:hover { background: #fff5ef; }
.rag-hero__btn--ghost { background: rgba(255,255,255,.18); color: #fff; border: 2px solid rgba(255,255,255,.6); }
.rag-hero__btn--ghost:hover, .rag-hero__btn--ghost:visited { color: #fff; }
.rag-hero__btn--ghost:hover { background: rgba(255,255,255,.28); }
.rag-hero__art { height: 260px; border-radius: var(--radius-xl); background: rgba(255,255,255,.16); border: 2px dashed rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: #fff; }
.rag-hero__art-label { font-family: var(--font-mono); font-size: 12px; opacity: .85; }

/* "Cosa puoi fare" — white cards, centered, round colored icon */
.rag-do { padding: 52px 0 8px; }
.rag-do__title { font-size: var(--text-2xl); text-align: center; margin-bottom: 8px; }
.rag-do__sub { text-align: center; color: var(--text-muted); max-width: 560px; margin: 0 auto 32px; font-size: var(--text-md); }
.rag-do__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.rag-do__card { background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius-xl); padding: var(--space-5); text-align: center; }
.rag-do__icon { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; align-items: center; justify-content: center; margin-bottom: 14px; color: #fff; }
.rag-do__icon--1 { background: var(--rag-1); }
.rag-do__icon--2 { background: var(--rag-2); }
.rag-do__icon--3 { background: var(--rag-3); }
.rag-do__icon--4 { background: var(--rag-4); }
.rag-do__card h3 { font-size: var(--text-lg); margin: 0 0 6px; }
.rag-do__card p { font-size: var(--text-base); color: var(--text-muted); margin: 0; line-height: 1.5; }

/* Labs — colored top strip + date chip */
.rag-section { padding: 52px 0 8px; }
.rag-section__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.rag-section__head h2 { font-size: var(--text-2xl); margin: 0; }
.rag-section__title { font-size: var(--text-2xl); margin: 0 0 24px; }
.rag-labs__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rag-lab { display: block; text-align: left; border: 1px solid var(--border-default); border-radius: var(--radius-xl); overflow: hidden; background: var(--surface-card); text-decoration: none; color: inherit; transition: box-shadow var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard); }
.rag-lab:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.rag-lab__strip { height: 8px; }
.rag-lab__strip--1 { background: var(--rag-1); }
.rag-lab__strip--3 { background: var(--rag-3); }
.rag-lab__strip--4 { background: var(--rag-4); }
.rag-lab__body { padding: var(--space-5); display: flex; gap: 14px; }
.rag-lab__title { font-size: var(--text-lg); margin: 0 0 6px; line-height: 1.2; color: var(--text-strong); }
.rag-lab__meta { font-size: var(--text-sm); color: var(--text-muted); margin: 0 0 8px; }

/* Reading tips — book cards with gradient cover + serif title */
.rag-books__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.rag-book { background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); overflow: hidden; }
.rag-book__cover { height: 200px; display: flex; align-items: center; justify-content: center; padding: 18px; position: relative; }
.rag-book__cover .icon { position: absolute; top: 12px; right: 12px; color: rgba(255,255,255,.5); }
.rag-book__name { color: #fff; font-family: var(--font-serif); font-size: var(--text-lg); font-weight: var(--weight-bold); text-align: center; line-height: 1.2; }
.rag-book__body { padding: 14px 16px; }
.rag-book__author { margin: 0 0 6px; font-size: var(--text-sm); color: var(--text-muted); }

/* Parents band */
.rag-parents { padding: 52px 0 64px; }
.rag-parents__band { background: var(--rag-soft); border-radius: var(--radius-xl); padding: var(--space-7); display: flex; gap: 24px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.rag-parents__left { display: flex; gap: 18px; align-items: center; max-width: 640px; }
.rag-parents__icon { flex: none; display: inline-flex; width: 60px; height: 60px; border-radius: 50%; background: var(--rag-1); align-items: center; justify-content: center; color: #fff; }
.rag-parents__left h2 { font-size: var(--text-xl); margin: 0 0 6px; }
.rag-parents__left p { margin: 0; color: var(--text-body); line-height: 1.5; }
.rag-parents__actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .rag-hero { grid-template-columns: 1fr; }
  .rag-hero__art { display: none; }
  .rag-do__grid, .rag-books__grid { grid-template-columns: repeat(2, 1fr); }
  .rag-labs__grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) { .rag-do__grid, .rag-books__grid { grid-template-columns: 1fr; } }

/* Gli strumenti di leggibilità (dimensione testo, contrasto, scala di grigi,
   evidenzia link) sono forniti dal plugin di accessibilità WP: nessuna toolbar
   né runtime CSS nel tema. */

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack-sm > * + * { margin-top: var(--space-3); }
.stack > * + * { margin-top: var(--space-5); }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.lead { font-size: var(--text-lg); color: var(--text-muted); line-height: 1.5; }
.eyebrow { text-transform: uppercase; letter-spacing: var(--tracking-caps); font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--color-primary); }
.flow > * + * { margin-top: var(--space-4); }
.cluster { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* screen-reader-text (WP core) */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { background: #fff; clip: auto !important; display: block; height: auto; left: 5px; padding: 15px 23px 14px; top: 5px; width: auto; z-index: 100000; }

/* ---------- Print ---------- */
@media print {
  .govbar, .brandband__right, .lib-nav, .site-footer, .share-bar, .booking-aside, .skip-link, .chips, .pagination { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .container { max-width: 100%; padding: 0; }
  .card, .aside-card { box-shadow: none; border: 1px solid #ccc; }
  a { color: #000; text-decoration: underline; }
  .page-intro { border: 0; }
}

/* Contrasto AA: testo "muted" su superfici tinte (spec §12) */
.section--subtle .muted, .callout--subtle .muted, .callout--brand .muted { color: var(--neutral-600); }
