/* Pagina educazione: leggibile, allineata al blu campagna (brand.css) */
:root {
  --edu-text: #1a1a1a;
  --edu-muted: #4a4a4a;
  --edu-line: #e0e0e0;
  --edu-bg: #f8f7f4;
  --edu-accent: var(--brand-blue, #0a3a7a);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--edu-text);
  background: var(--edu-bg);
  line-height: 1.6;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: #fff;
  border: 2px solid var(--edu-accent);
}

.educ-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.educ-top {
  background: #fff;
  border-bottom: 1px solid var(--edu-line);
  padding: 0.75rem 1.25rem;
}

.educ-top-inner {
  max-width: 45rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.back-link {
  color: var(--edu-accent);
  text-decoration: none;
  font-size: 0.95rem;
}
.back-link:hover {
  text-decoration: underline;
}

.educ-fasce {
  font-size: 0.9rem;
}

.educ-main {
  flex: 1;
  max-width: 45rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  width: 100%;
}

.educ-hero {
  margin-bottom: 2rem;
}

.educ-hero h1 {
  font-size: 1.85rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.educ-hero p.lead {
  color: var(--edu-muted);
  font-size: 1.05rem;
  margin: 0;
}

.edu-age {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--edu-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Tre punti: cosa si può insegnare (per fascia d’età) */
.edu-prog {
  margin: 1.75rem 0 2rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--edu-line);
}

.edu-prog__title {
  font-size: 1.2rem;
  margin: 0 0 1rem;
  color: var(--edu-accent);
  font-weight: 700;
  line-height: 1.25;
}

.edu-prog__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 34rem) {
  .edu-prog__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.edu-prog__card {
  min-width: 0; /* in griglia evita l’enorme min-content che spezza a capo il testo */
  background: #fff;
  border: 1px solid var(--edu-line);
  border-radius: 12px;
  padding: 1rem 0.95rem 1.1rem;
  box-shadow: 0 3px 16px rgba(10, 58, 120, 0.07);
}

.edu-prog__card .edu-prog__n {
  display: inline-flex;
  width: 1.85rem;
  height: 1.85rem;
  align-items: center;
  justify-content: center;
  background: var(--brand-blue-soft, #e8f0f9);
  color: var(--edu-accent);
  font-weight: 800;
  font-size: 0.8rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  border-radius: 8px;
  margin-bottom: 0.55rem;
}

.edu-prog__card h3 {
  font-size: 0.98rem;
  margin: 0 0 0.45rem;
  line-height: 1.3;
  color: #0a0a0a;
  font-weight: 700;
}

.edu-prog__card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #3a3a3a;
}

/* Paragrafi corti, respiro visivo */
.educ-section p.p-tight {
  margin: 0 0 0.65rem;
  max-width: 38rem;
}

.edu-illos--first {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.edu-illo-grid--duo {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.melito-strip--after-prog {
  margin-top: 0.5rem;
}

.melito-strip {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
  flex-wrap: wrap;
}

.melito-strip figure {
  margin: 0;
  flex: 1 1 200px;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--edu-line);
  background: #e8e8e4;
  display: flex;
  flex-direction: column;
}

.melito-strip .strip-img-wrap {
  position: relative;
  height: clamp(120px, 22vw, 180px);
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
}

.melito-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.melito-strip .label {
  display: block;
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--edu-muted);
  padding: 0.35rem 0.5rem;
  text-align: center;
  background: #fff;
  border-top: 1px solid var(--edu-line);
}

.educ-section {
  margin-bottom: 2rem;
}

.educ-section h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  color: #0a0a0a;
}

.educ-section p {
  margin: 0 0 0.85rem;
}

.educ-h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: #0a0a0a;
}

.edu-illos {
  margin: 1.5rem 0 2.25rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--edu-line);
}

.edu-illos-title {
  font-size: 1.1rem;
  margin: 0 0 0.9rem;
  color: #0a0a0a;
  font-weight: 600;
}

.edu-illo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem;
}

.edu-illo {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--edu-line);
  background: #fff;
  display: flex;
  flex-direction: column;
}

.edu-illo img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.edu-illo .illo-cap {
  font-size: 0.8rem;
  color: var(--edu-muted);
  padding: 0.45rem 0.55rem 0.55rem;
  line-height: 1.4;
  border-top: 1px solid var(--edu-line);
}

.educ-list {
  margin: 0.5rem 0 0 1.1rem;
  padding: 0;
}

.educ-list li {
  margin-bottom: 0.5rem;
}

.card-tip {
  background: #fff;
  border: 1px solid var(--edu-line);
  border-left: 4px solid var(--edu-accent);
  padding: 1rem 1.1rem;
  border-radius: 0 6px 6px 0;
  margin: 1rem 0;
}

.card-tip__p {
  margin: 0;
  line-height: 1.5;
}

/* Titoletto a capo; il resto dei <strong> resta in linea (non usare block su .card-tip strong) */
.card-tip__label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--edu-accent);
}

.card-tip strong {
  color: var(--edu-accent);
}

footer.educ-foot {
  margin-top: auto;
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--edu-muted);
  border-top: 1px solid var(--edu-line);
  background: #fff;
}
