/* =============================================
   EDUCACION PAGE — uses home.css design tokens
============================================= */

/* =============================================
   PAGE HEADER
============================================= */
.edu-header {
  min-height: 70vh;
  background: linear-gradient(150deg, #fff8e6 0%, #fff0d6 50%, #fde8fa 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9rem 0 0;
}

.edu-header::before {
  content: '';
  position: absolute;
  top: -8rem;
  right: -8rem;
  width: 42vw;
  height: 42vw;
  background: radial-gradient(circle, #ffd88a 0%, #ffc842 55%, transparent 72%);
  border-radius: 50%;
  opacity: 0.3;
  pointer-events: none;
}

.edu-header__dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.edu-header__dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  animation: floatDot 6s ease-in-out infinite;
}

.edu-header__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding-bottom: 4rem;
}

.edu-header__title {
  font-size: clamp(2.8rem, 5.5vw, 5.5rem) !important;
}

.edu-header__desc {
  font-family: var(--body-font);
  font-size: 1.35rem;
  color: var(--text-soft);
  line-height: 1.8;
  max-width: 480px;
  margin-top: 1.25rem;
}

/* Feature cards */
.edu-header__right {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.4s;
  opacity: 0;
}

.edu-feat {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  border-left: 5px solid;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
}

.edu-feat:hover {
  transform: translateX(6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.11);
}

.edu-feat--purple { border-color: var(--purple); }
.edu-feat--teal   { border-color: var(--teal); }
.edu-feat--green  { border-color: var(--green); }

.edu-feat__icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.edu-feat__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--text);
  margin: 0 0 0.3rem;
}

.edu-feat__desc {
  font-family: var(--body-font);
  font-size: 1.15rem;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.6;
}

/* =============================================
   GRADES SECTION
============================================= */
.edu-grades {
  background: #f7f9ff;
  padding: 5rem 0 6rem;
}

.edu-grades__header {
  text-align: center;
  margin-bottom: 3rem;
}

.edu-grades__sub {
  font-family: var(--body-font);
  font-size: 1.35rem;
  color: var(--text-soft);
  margin-top: 0.5rem;
}

/* Grade cards container */
.edu-cards-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

/* Individual grade card */
.edu-grade-card {
  position: relative;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  background-size: cover;
  background-position: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}

.edu-grade-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.22);
}

.edu-card-overlay {
  position: absolute;
  inset: 0;
}

/* Age badge */
.edu-age-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  color: #fff;
  font-family: var(--body-font);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 14px;
  border-radius: 50px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Card front */
.edu-front {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  color: #fff;
  transition: opacity 0.35s ease;
}

.edu-front-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0 0 0.4rem;
}

.edu-front-preview {
  font-family: var(--body-font);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  opacity: 0.92;
  line-height: 1.45;
}

.edu-front-hint {
  font-family: var(--body-font);
  font-size: 0.78rem;
  margin: 0;
  opacity: 0.65;
}

/* Card back */
.edu-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.edu-grade-card:hover .edu-front { opacity: 0; }
.edu-grade-card:hover .edu-back  { opacity: 1; }

.edu-back-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  color: #fff;
  margin: 0 0 0.75rem;
  text-align: center;
}

.edu-back-desc {
  font-family: var(--body-font);
  font-size: 1.15rem;
  color: #fff;
  text-align: center;
  margin: 0;
  line-height: 1.65;
}

/* =============================================
   DIRECTOR SECTION
============================================= */
.edu-director {
  background: var(--bg);
  padding: 6rem 0;
}

.edu-director__header {
  margin-bottom: 2.5rem;
}

.edu-director-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
}

.edu-director-card__left {
  flex: 0 0 220px;
  background: linear-gradient(160deg, #fff8e6 0%, #fef0f8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.75rem;
  gap: 1rem;
  text-align: center;
}

.edu-director-card__photo-wrap {
  position: relative;
  display: inline-block;
}

.edu-director-card__photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #fff;
  box-shadow: 0 0 0 4px var(--yellow), 0 16px 40px rgba(255, 200, 66, 0.22);
  display: block;
}

.edu-director-card__ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: floatDot 5s ease-in-out infinite;
}

.edu-director-card__ring--1 {
  width: 36px;
  height: 36px;
  border: 3px solid var(--teal);
  top: -8px;
  right: -10px;
}

.edu-director-card__ring--2 {
  width: 20px;
  height: 20px;
  background: var(--pink);
  border: none;
  opacity: 0.7;
  bottom: 4px;
  left: -8px;
  animation-delay: 1s;
  animation-direction: reverse;
}

.edu-director-card__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--purple);
  margin: 0;
  line-height: 1.3;
}

.edu-director-card__role {
  background: #f3e8ff;
  color: var(--purple);
  font-family: var(--body-font);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 1rem;
  border-radius: 50px;
}

.edu-director-card__right {
  flex: 1 1 300px;
  padding: 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
}

.edu-director-card__credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.edu-credential {
  background: var(--soft-yel);
  color: var(--text);
  font-family: var(--body-font);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.35rem 1rem;
  border-radius: 50px;
}

.edu-director-card__bio {
  font-family: var(--body-font);
  font-size: 1.35rem;
  line-height: 1.85;
  color: var(--text-soft);
  margin: 0;
}

/* =============================================
   PERFIL ESCOLAR
============================================= */
.edu-perfiles {
  background: var(--soft-tel);
  padding: 6rem 0;
}

.edu-perfiles__header {
  margin-bottom: 2.5rem;
}

.perfil-spotlight-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  min-height: 320px;
}

.perfil-sidebar {
  background: linear-gradient(160deg, #fff0d6 0%, #fde8fa 100%);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.perfil-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.perfil-sidebar-item:hover {
  background: rgba(255, 102, 52, 0.1);
  transform: translateX(3px);
}

.perfil-sidebar-item.active {
  background: var(--orange);
}

.perfil-sidebar-item.active .perfil-sidebar-name {
  color: #fff;
}

.perfil-sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  flex-shrink: 0;
}

.perfil-sidebar-name {
  font-family: var(--body-font);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.3;
}

.perfil-spotlight {
  padding: 2.5rem;
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
}

.perfil-spotlight-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--yellow);
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.perfil-spotlight-info {
  flex: 1;
}

.perfil-spotlight-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.perfil-spotlight-role {
  font-family: var(--body-font);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--orange);
  background: var(--soft-org);
  display: inline-block;
  padding: 0.2rem 0.8rem;
  border-radius: 50px;
  margin: 0 0 0.35rem;
}

.perfil-spotlight-desc {
  font-family: var(--body-font);
  font-size: 1.35rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-top: 0.75rem;
}

/* =============================================
   GRADE MODAL
============================================= */
#grade-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#grade-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

#grade-modal-box {
  position: relative;
  width: 90%;
  max-width: 460px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: scale(0.85) translateY(30px);
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
}

#grade-modal-overlay.active #grade-modal-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

#grade-modal-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

#grade-modal-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
}

#grade-modal-body {
  padding: 1.75rem 2rem 2.25rem;
  background: #fff;
}

#grade-modal-age {
  display: inline-block;
  font-family: var(--body-font);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.9rem;
  border-radius: 50px;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

#grade-modal-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.9rem;
  color: var(--text);
  margin: 0 0 0.5rem;
}

#grade-modal-divider {
  width: 50px;
  height: 5px;
  border-radius: 10px;
  margin: 0 0 1rem;
}

#grade-modal-desc {
  font-family: var(--body-font);
  font-size: 1.15rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin: 0;
}

#grade-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(0, 0, 0, 0.38);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 1;
}

#grade-modal-close:hover {
  background: rgba(0, 0, 0, 0.62);
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 900px) {
  .edu-header__layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .edu-header__desc {
    margin: 1rem auto 0;
  }
  .edu-feat {
    text-align: left;
  }
  .edu-director-card {
    flex-direction: column;
  }
  .edu-director-card__left {
    flex: none;
    width: 100%;
  }
  .perfil-spotlight-layout {
    grid-template-columns: 1fr;
  }
  .perfil-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

@media (max-width: 700px) {
  .edu-cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .edu-grade-card {
    height: 340px;
  }
  .perfil-spotlight {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
