/* ============================================
   ES BENTO EDU — regole context-aware
   Da incollare in WPCB come nuovo snippet CSS
   Frontend + Editor (loaded everywhere)
   ============================================ */

/* ---------- HERO Teen — first-child sky-900 scura ---------- */
.es-bento-edu .es-pcard:first-child {
  background-color: var(--color-sky-900);
  color: var(--color-white, #ffffff);
  grid-column: 2;
  grid-row: 1 / 3;
}
.es-bento-edu .es-pcard:first-child .es-pcard__media { height: 280px; }
.es-bento-edu .es-pcard:first-child .es-pcard__body { padding: 1.75rem 2rem 2rem; }
.es-bento-edu .es-pcard:first-child .es-pcard__meta,
.es-bento-edu .es-pcard:first-child .es-pcard__meta p { color: rgba(255,255,255,0.85); }
.es-bento-edu .es-pcard:first-child .es-pcard__title { color: var(--color-white, #ffffff); font-size: 2.2rem; margin-bottom: 0.875rem; }
.es-bento-edu .es-pcard:first-child .es-pcard__title a { color: var(--color-white, #ffffff); }
.es-bento-edu .es-pcard:first-child .es-pcard__excerpt { color: rgba(255,255,255,0.85); font-size: 14.5px; max-width: 380px; margin-bottom: 1rem; }
.es-bento-edu .es-pcard:first-child .es-pcard__foot { border-top-color: rgba(255,255,255,0.18); }
.es-bento-edu .es-pcard:first-child .es-pcard__price { color: var(--color-white, #ffffff); font-size: 1.7rem; }
.es-bento-edu .es-pcard:first-child .es-pcard__arrow {
  background-color: var(--color-white, #ffffff);
  color: var(--color-sky-900);
}

/* Blob decorativo Teen — sky-950 */
.es-bento-edu .es-pcard:first-child::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--color-sky-950, #082f49);
  opacity: 0.7;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}
.es-bento-edu .es-pcard:first-child:hover::after {
  transform: scale(1.4);
  opacity: 0.85;
}

/* ---------- Excerpt nascosto sulle satellite ---------- */
.es-bento-edu .es-pcard:not(:first-child) .es-pcard__excerpt { display: none; }

/* ---------- SAT 2 — Certificazione (stone, col 1 row 1) ---------- */
.es-bento-edu .es-pcard:nth-child(2) {
  background-color: var(--color-stone-100);
  background-image: linear-gradient(160deg, var(--color-stone-100), var(--color-stone-200));
  grid-column: 1;
  grid-row: 1;
}
.es-bento-edu .es-pcard:nth-child(2)::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--color-stone-500);
  opacity: 0.35;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}
.es-bento-edu .es-pcard:nth-child(2):hover::after { transform: scale(1.4); opacity: 0.45; }
.es-bento-edu .es-pcard:nth-child(2) .es-pcard__tag { color: var(--color-stone-700); }

/* ---------- SAT 3 — Half Term (sky, col 1 row 2) ---------- */
.es-bento-edu .es-pcard:nth-child(3) {
  background-color: var(--color-sky-100);
  background-image: linear-gradient(160deg, var(--color-sky-100), var(--color-sky-200));
  grid-column: 1;
  grid-row: 2;
}
.es-bento-edu .es-pcard:nth-child(3)::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--color-sky-500);
  opacity: 0.35;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}
.es-bento-edu .es-pcard:nth-child(3):hover::after { transform: scale(1.4); opacity: 0.45; }
.es-bento-edu .es-pcard:nth-child(3) .es-pcard__tag { color: var(--color-sky-700); }

/* ---------- SAT 4 — Volontariato (emerald, col 3 row 1) ---------- */
.es-bento-edu .es-pcard:nth-child(4) {
  background-color: var(--color-emerald-100);
  background-image: linear-gradient(160deg, var(--color-emerald-100), var(--color-emerald-300));
  grid-column: 3;
  grid-row: 1;
}
.es-bento-edu .es-pcard:nth-child(4)::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--color-emerald-500);
  opacity: 0.35;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}
.es-bento-edu .es-pcard:nth-child(4):hover::after { transform: scale(1.4); opacity: 0.45; }
.es-bento-edu .es-pcard:nth-child(4) .es-pcard__tag { color: var(--color-emerald-700); }

/* ---------- SAT 5 — Leadership (rose, col 3 row 2) ---------- */
.es-bento-edu .es-pcard:nth-child(5) {
  background-color: var(--color-rose-100);
  background-image: linear-gradient(160deg, var(--color-rose-100), var(--color-rose-300));
  grid-column: 3;
  grid-row: 2;
}
.es-bento-edu .es-pcard:nth-child(5)::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--color-rose-500);
  opacity: 0.35;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}
.es-bento-edu .es-pcard:nth-child(5):hover::after { transform: scale(1.4); opacity: 0.45; }
.es-bento-edu .es-pcard:nth-child(5) .es-pcard__tag { color: var(--color-rose-700); }

/* ---------- RESPONSIVE — tablet 1024px ---------- */
@media (max-width: 1024px) {
  .es-bento-edu .es-pcard:first-child { grid-column: 1 / 3; grid-row: auto; }
  .es-bento-edu .es-pcard:first-child .es-pcard__media { height: 220px; }
  .es-bento-edu .es-pcard:nth-child(2),
  .es-bento-edu .es-pcard:nth-child(3),
  .es-bento-edu .es-pcard:nth-child(4),
  .es-bento-edu .es-pcard:nth-child(5) { grid-column: auto; grid-row: auto; }
}

/* ---------- RESPONSIVE — mobile 640px (pareggio foto) ---------- */
@media (max-width: 640px) {
  .es-bento-edu .es-pcard:first-child { grid-column: 1; }
  .es-bento-edu .es-pcard:first-child .es-pcard__media { height: 180px; }
  .es-bento-edu .es-pcard:nth-child(n+2) .es-pcard__media { height: 180px; }
}

/* ---------- Fix mobile anche per sport bento ---------- */
@media (max-width: 640px) {
  .es-bento-sport-rich .es-pcard:first-child .es-pcard__media { height: 180px; }
  .es-bento-sport-rich .es-pcard:nth-child(n+2) .es-pcard__media { height: 180px; }
}
