/* ─────────────────────────────────────────
   CHILD PAGES GRID  (home — sottopagine figlie)
   Aggiungere a superheroschool.css o al <style> inline della home
───────────────────────────────────────── */

/* sezione */
.child-pages {
  padding: 64px 32px;
  background: var(--white);
}
.child-pages--light {
  background: var(--light);
  border-top: 4px solid var(--green);
  border-bottom: 4px solid var(--cyan);
}
.child-pages-header { text-align: center; margin-bottom: 44px; }

/* griglia */
.child-pages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 1040px;
  margin: 0 auto;
}
.child-pages--4col .child-pages-grid { grid-template-columns: repeat(4, 1fr); }

/* ── VARIANTE 1: card con icona/emoji ── */
.cp-card {
  background: white;
  border: 1.5px solid #d4edaa;
  border-radius: 18px;
  padding: 32px 22px 24px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 40px rgba(136,191,54,.18);
  border-color: var(--green);
}

.cp-card-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(136,191,54,.15), rgba(26,182,217,.12));
  border: 2px solid #c8e88a;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; flex-shrink: 0; overflow: hidden;
  transition: border-color .2s, background .2s, transform .2s;
}
.cp-card:hover .cp-card-icon {
  border-color: var(--green);
  background: linear-gradient(135deg, rgba(136,191,54,.25), rgba(26,182,217,.18));
  transform: scale(1.08);
}
.cp-card-icon img        { width: 100%; height: 100%; object-fit:  cover; border-radius: 50%; }
.cp-card-icon .icon-emoji { font-size: 32px; line-height: 1; }
.cp-card-icon i          { font-size: 28px; color: var(--cyan); }

.cp-card-title {
  font-family: 'Fredoka One', cursive;
  font-size: 17px; color: var(--darkblue);
  letter-spacing: .3px; line-height: 1.25; margin-bottom: 12px;
  font-weight: bold;
  margin-top: 10px;
}
.cp-card-divider {
  width: 36px; height: 3px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  border-radius: 2px; margin: 0 auto 14px;
  transition: width .25s;
}
.cp-card:hover .cp-card-divider { width: 60px; }

.cp-card-desc {
  font-size: 13px; color: #556; line-height: 1.75;
  font-weight: 600; flex: 1; margin-bottom: 24px;
}

/* pulsanti */
.cp-card-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 10px;
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800;
  letter-spacing: .3px; text-decoration: none; border: none; cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}
.cp-card-btn .btn-icon { font-size: 15px; flex-shrink: 0; }

.cp-card-btn--link {
  background: var(--green); color: white;
  box-shadow: 0 4px 14px rgba(136,191,54,.3);
}
.cp-card-btn--link:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(136,191,54,.45);
}
.cp-card-btn--download {
  background: var(--cyan); color: white;
  box-shadow: 0 4px 14px rgba(26,182,217,.3);
}
.cp-card-btn--download:hover {
  background: var(--cyan-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,182,217,.45);
}

/* ── VARIANTE 2: card con foto ── */
.cp-card--photo {
  padding: 0;
  align-items: stretch;
  text-align: left;
  overflow: hidden;
}
.cp-card--photo .cp-card-photo-wrap {
  overflow: hidden;
  flex-shrink: 0;
  aspect-ratio: 16/9;
  background: #f8f8f8;
  position: relative;
}
.cp-card--photo .cp-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
  transition: transform .35s ease;
}
.cp-card--photo:hover .cp-card-photo { transform: scale(1.04); }
.cp-card--photo .cp-card-body {
  padding: 22px 22px 24px;
  display: flex; flex-direction: column; flex: 1;
}
.cp-card--photo .cp-card-title   { font-size: 15px; text-align: left; margin-bottom: 8px;margin-top:12px;margin-left:8px; }
.cp-card--photo .cp-card-divider { margin: 0 0 12px 0; }
.cp-card--photo .cp-card-desc    { text-align: left; font-size: 12.5px; margin-bottom: 20px; }
.cp-card--photo .cp-card-btn     { align-self: flex-start; }

/* responsive */
@media(max-width: 900px) {
  .child-pages-grid,
  .child-pages--4col .child-pages-grid { grid-template-columns: repeat(2, 1fr); }
  .child-pages { padding: 44px 20px; }
}
@media(max-width: 520px) {
  .child-pages-grid,
  .child-pages--4col .child-pages-grid { grid-template-columns: 1fr; }
}
