/* ================================================================
   AULA 9 · V9
   Diseño responsive basado en la composición artística aprobada.
   ================================================================ */

:root{
  --v9-green:#98f000;
  --v9-navy:#061c3b;
  --v9-max:1200px;
}

/* ---------- CABECERA / MENÚ ---------- */
.site-header{
  background:var(--v9-navy);
}
.nav-row{
  position:relative;
  min-height:82px;
  display:grid;
  grid-template-columns:180px minmax(0,1fr) 180px;
  align-items:center;
  gap:14px;
}
.brand{
  grid-column:1;
  justify-self:start;
  margin:0;
}
.brand img{
  width:170px;
  max-height:62px;
}
.site-nav{
  position:static;
  grid-column:2;
  justify-self:center;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:2px;
  padding:0;
  background:transparent;
  box-shadow:none;
}
.site-nav>a{
  padding:28px 9px 24px;
  font-size:.83rem;
}
.site-nav .nav-cta{
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
  margin:0;
  padding:11px 15px;
}
.site-nav .nav-cta:hover{
  transform:translateY(calc(-50% - 1px));
}
.nav-toggle{
  display:none;
  grid-column:3;
  justify-self:end;
}

/* ---------- HERO DESKTOP ---------- */
.photo-hero{
  margin:0;
  padding:18px 0 0;
  overflow:visible;
  background:transparent!important;
}
.photo-hero-inner{
  position:relative;
  width:min(calc(100% - 0px),var(--v9-max));
  min-height:440px;
  padding:34px 46px 32px;
  display:flex;
  align-items:center;
  overflow:hidden;
  border:1px solid rgba(6,28,59,.08);
  border-radius:28px;
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  box-shadow:0 16px 42px rgba(6,28,59,.09);
}
.photo-hero-copy{
  width:47%;
  max-width:545px;
  padding:0;
}
.photo-hero .pill{
  padding:7px 13px;
  background:var(--v9-navy);
  color:#fff;
  border-radius:8px;
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.035em;
}
.photo-hero h1{
  max-width:545px;
  margin:18px 0 15px;
  color:var(--v9-navy);
  font-size:clamp(2.65rem,4.15vw,3.85rem);
  line-height:1.01;
  letter-spacing:-.052em;
}
.photo-hero h1 span{
  color:#fff;
}
.photo-hero p{
  max-width:520px;
  margin:0;
  color:#0b2241;
  font-size:1rem;
  font-weight:600;
  line-height:1.5;
}
.photo-hero .hero-actions{
  margin-top:22px;
}
.photo-hero .btn{
  min-height:46px;
}
.photo-hero .hero-features{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:13px;
  max-width:545px;
  margin-top:24px;
  padding:0;
  border:0;
}
.photo-hero .hero-features>div{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
}
.photo-hero .hero-features strong,
.photo-hero .hero-features small{
  display:block;
}
.photo-hero .hero-features strong{
  font-size:.72rem;
  line-height:1.15;
}
.photo-hero .hero-features small{
  margin-top:3px;
  font-size:.63rem;
  line-height:1.2;
}
.hero-feature-icon{
  display:grid!important;
  place-items:center;
  flex:0 0 34px;
  width:34px;
  height:34px;
  border:2px solid var(--v9-navy);
  border-radius:50%;
  background:rgba(255,255,255,.12);
  color:var(--v9-navy);
  font-size:.67rem!important;
}

/* Reseñas ligeramente solapadas con el hero, como en la referencia */
.reviews-wrap{
  position:relative;
  z-index:5;
  margin-top:-24px;
}
.reviews-panel{
  border-radius:22px;
}

/* ---------- QUIÉNES SOMOS ---------- */
.about-classroom{
  overflow:hidden;
  border-radius:26px;
}
.about-classroom img{
  display:block;
  width:100%;
  min-height:350px;
  object-fit:cover;
}
.about-classroom figcaption{
  margin:0;
  padding:10px 16px;
}

/* ---------- BREAKPOINT: menú hamburguesa antes de que llegue a romper ---------- */
@media (max-width:1180px){
  html{scroll-padding-top:76px}
  .nav-row{
    min-height:74px;
    grid-template-columns:1fr auto;
  }
  .brand{
    grid-column:1;
  }
  .brand img{
    width:155px;
  }
  .nav-toggle{
    display:block!important;
    grid-column:2;
    justify-self:end;
  }
  .site-nav{
    position:absolute!important;
    z-index:110;
    top:74px;
    left:20px;
    right:20px;
    display:none!important;
    grid-template-columns:1fr;
    justify-self:stretch;
    padding:10px 16px 16px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:0 0 18px 18px;
    background:var(--v9-navy)!important;
    box-shadow:0 18px 40px rgba(0,0,0,.24);
  }
  .site-nav.open{
    display:grid!important;
  }
  .site-nav>a{
    width:100%;
    padding:11px 8px!important;
    border-bottom:1px solid rgba(255,255,255,.08);
    font-size:.9rem;
  }
  .site-nav>a:not(.nav-cta)::after{
    display:none!important;
  }
  .site-nav .nav-cta{
    position:static!important;
    transform:none!important;
    justify-content:center;
    margin:10px 0 0!important;
    border-bottom:0;
  }
  .site-nav .nav-cta:hover{
    transform:none!important;
  }

  /* Portátil/ventana mediana: aún composición lateral, pero contenida */
  .photo-hero-inner{
    min-height:425px;
    padding:30px 34px;
    background-position:center!important;
  }
  .photo-hero-copy{
    width:48%;
    max-width:480px;
  }
  .photo-hero h1{
    max-width:470px;
    font-size:clamp(2.35rem,4.6vw,3.3rem);
  }
  .photo-hero p{
    max-width:450px;
    font-size:.92rem;
  }
  .photo-hero .hero-features{
    max-width:470px;
    gap:8px;
  }
  .photo-hero .hero-features strong{font-size:.66rem}
  .photo-hero .hero-features small{font-size:.58rem}
}

/* ---------- TABLET / MÓVIL: composición vertical real ---------- */
@media (max-width:940px){
  .photo-hero{
    padding-top:14px;
  }
  .photo-hero-inner{
    min-height:820px;
    padding:32px 28px 26px;
    align-items:flex-start;
    background-size:cover!important;
    background-position:center!important;
  }
  .photo-hero-home .photo-hero-inner{
    background-image:url('../img/fondo-portada-movil.webp')!important;
  }
  .photo-hero-primaria .photo-hero-inner{
    background-image:url('../img/fondo-primaria-eso-movil.webp')!important;
  }
  .photo-hero-bachillerato .photo-hero-inner{
    background-image:url('../img/fondo-bachillerato-movil.webp')!important;
  }
  .photo-hero-universidad .photo-hero-inner{
    background-image:url('../img/fondo-universidad-movil.webp')!important;
  }
  .photo-hero-copy{
    width:100%;
    max-width:620px;
    padding:0;
  }
  .photo-hero h1{
    max-width:600px;
    margin-top:16px;
    font-size:clamp(2.55rem,7vw,3.5rem);
  }
  .photo-hero p{
    max-width:580px;
    font-size:1rem;
  }
  .photo-hero .hero-actions{
    max-width:520px;
  }
  .photo-hero .hero-features{
    max-width:570px;
    grid-template-columns:repeat(3,minmax(0,1fr));
    margin-top:22px;
  }
  .photo-hero .hero-features strong{font-size:.72rem}
  .photo-hero .hero-features small{font-size:.63rem}
  .reviews-wrap{
    margin-top:-18px;
  }
}

/* ---------- MÓVIL PEQUEÑO ---------- */
@media (max-width:560px){
  .container{
    width:min(calc(100% - 24px),var(--max));
  }
  .site-nav{
    left:12px;
    right:12px;
  }
  .photo-hero{
    padding-top:10px;
  }
  .photo-hero-inner{
    min-height:785px;
    padding:24px 18px 22px;
    border-radius:22px;
  }
  .photo-hero .pill{
    font-size:.61rem;
    padding:6px 9px;
  }
  .photo-hero h1{
    max-width:360px;
    margin:15px 0 13px;
    font-size:2.35rem;
    line-height:1.01;
  }
  .photo-hero p{
    max-width:350px;
    font-size:.91rem;
    line-height:1.45;
  }
  .photo-hero .hero-actions{
    gap:9px;
    margin-top:18px;
  }
  .photo-hero .hero-actions .btn{
    width:auto!important;
    min-height:43px;
    padding:9px 12px;
    font-size:.83rem;
  }
  .photo-hero .hero-features{
    grid-template-columns:1fr;
    max-width:280px;
    gap:6px;
    margin-top:18px;
  }
  .photo-hero .hero-features>div{
    min-height:35px;
  }
  .hero-feature-icon{
    flex-basis:31px;
    width:31px;
    height:31px;
  }
  .photo-hero .hero-features strong{
    font-size:.7rem;
  }
  .photo-hero .hero-features small{
    font-size:.61rem;
  }

  .reviews-wrap{
    margin-top:-12px;
  }
  .reviews-panel{
    border-radius:19px;
  }
}

/* Very narrow devices */
@media(max-width:380px){
  .photo-hero-inner{
    min-height:800px;
    padding-inline:15px;
  }
  .photo-hero h1{
    font-size:2.08rem;
  }
  .photo-hero .hero-actions{
    display:grid;
    grid-template-columns:1fr;
    max-width:240px;
  }
  .photo-hero .hero-actions .btn{
    width:100%!important;
  }
}
