/* MEDIA DESIGN V2 - Mamá Margarita */

:root{
  --mm-green:#006b45;
  --mm-dark:#073b28;
  --mm-mint:#e4f8ef;
  --mm-gold:#f6b21a;
  --mm-yellow:#fff0a8;
  --mm-blue:#dff4ff;
  --mm-pink:#ffe1ed;
  --mm-purple:#eee6ff;
  --mm-orange:#ffd8ad;
  --mm-cream:#fffaf0;
  --mm-text:#173428;
}

body{
  background:
    radial-gradient(circle at 5% 10%, rgba(246,178,26,.18), transparent 210px),
    radial-gradient(circle at 95% 15%, rgba(0,107,69,.12), transparent 250px),
    linear-gradient(180deg,#fffaf0,#ffffff 38%,#f5fff9);
}

/* Header más limpio */
.site-header{
  position:sticky !important;
  top:0 !important;
  z-index:99999 !important;
  background:rgba(255,250,240,.97) !important;
  backdrop-filter:blur(16px);
  box-shadow:0 8px 28px rgba(0,60,40,.08);
}

.nav{
  min-height:76px !important;
  gap:12px !important;
}

.brand{
  min-width:220px !important;
  flex-shrink:0 !important;
}

.menu{
  gap:3px !important;
}

.menu a,
.menu button{
  font-size:.86rem !important;
  padding:10px 8px !important;
  white-space:nowrap !important;
}

.header-actions{
  gap:6px !important;
  flex-shrink:0 !important;
}

.header-actions .btn,
.header-actions .lang{
  padding:10px 12px !important;
  font-size:.78rem !important;
  min-height:42px !important;
}

/* Mega menú */
.mega{
  z-index:100000 !important;
  top:calc(100% + 10px) !important;
  border-radius:26px !important;
  box-shadow:0 28px 80px rgba(0,60,40,.22) !important;
}

/* Hero con foto real remota */
.hero-card{
  padding:0 !important;
  overflow:hidden !important;
  background:#006b45 !important;
}

.hero-card .photo{
  min-height:500px !important;
  border-radius:42px !important;
  background:
    linear-gradient(180deg,rgba(0,0,0,.02),rgba(0,70,45,.45)),
    url("https://images.pexels.com/photos/8422137/pexels-photo-8422137.jpeg?auto=compress&cs=tinysrgb&w=1600") center/cover no-repeat !important;
  display:flex !important;
  align-items:flex-end !important;
  padding:28px !important;
}

.hero-card .caption{
  background:rgba(255,255,255,.95) !important;
  color:var(--mm-green) !important;
  box-shadow:0 16px 36px rgba(0,0,0,.18);
}

/* Visual boxes internos */
.visual-box{
  background:
    linear-gradient(180deg,rgba(0,80,52,.08),rgba(0,80,52,.38)),
    var(--page-photo, url("https://images.pexels.com/photos/8613089/pexels-photo-8613089.jpeg?auto=compress&cs=tinysrgb&w=1600")) center/cover no-repeat !important;
  border-radius:38px !important;
  min-height:430px !important;
  box-shadow:0 24px 70px rgba(0,70,46,.18) !important;
}

.visual-box:before{
  display:none !important;
}

.visual-box span{
  background:rgba(255,255,255,.94) !important;
  color:var(--mm-green) !important;
  box-shadow:0 12px 30px rgba(0,0,0,.16);
}

/* Galerías por página */
.mm-gallery-v2{
  padding:80px 0;
  background:linear-gradient(135deg,#fff8dc,#e8fff4,#e9f7ff,#fff0f7);
}

.mm-gallery-v2 .mm-title{
  text-align:center;
  max-width:850px;
  margin:0 auto 38px;
}

.mm-gallery-v2 h2{
  color:var(--mm-green);
  font-size:clamp(2rem,4vw,3.6rem);
}

.mm-gallery-v2 p{
  color:#38584d;
  font-size:1.12rem;
}

.mm-gallery-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
}

.mm-gallery-card{
  position:relative;
  border-radius:34px;
  overflow:hidden;
  min-height:310px;
  box-shadow:0 20px 55px rgba(0,65,43,.16);
  background:#ddd;
}

.mm-gallery-card img{
  width:100%;
  height:310px;
  object-fit:cover;
  display:block;
  transition:transform .45s ease;
}

.mm-gallery-card:hover img{
  transform:scale(1.07);
}

.mm-gallery-card span{
  position:absolute;
  left:16px;
  right:16px;
  bottom:16px;
  background:rgba(0,107,69,.95);
  color:white;
  padding:12px 16px;
  border-radius:999px;
  font-weight:900;
  text-align:center;
}

/* Teachers: quitar letras feas y poner foto */
.fake-photo{
  position:relative !important;
  height:260px !important;
  overflow:hidden !important;
  border-radius:24px !important;
  background:
    linear-gradient(180deg,rgba(0,0,0,0),rgba(0,80,52,.35)),
    url("https://images.pexels.com/photos/8364026/pexels-photo-8364026.jpeg?auto=compress&cs=tinysrgb&w=900") center/cover no-repeat !important;
  color:transparent !important;
  font-size:0 !important;
}

.fake-photo::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,transparent 50%,rgba(0,70,45,.35));
}

/* Tarjetas más profesionales */
.card{
  border-radius:30px !important;
  box-shadow:0 18px 48px rgba(0,60,40,.10) !important;
  border:1px solid rgba(0,107,69,.10) !important;
}

.card:hover{
  transform:translateY(-5px);
}

/* Secciones más coloridas */
.section.alt{
  background:linear-gradient(135deg,#f0fff7,#fff8dc) !important;
}

.section.sky{
  background:linear-gradient(135deg,#eaf8ff,#ffffff) !important;
}

.section.gold{
  background:linear-gradient(135deg,#fff1bd,#fff9e8,#ffffff) !important;
}

.section.rose{
  background:linear-gradient(135deg,#fff0f6,#ffffff,#f3fff9) !important;
}

/* CTA */
.contact-panel{
  background:
    radial-gradient(circle at 15% 20%,rgba(246,178,26,.95),transparent 18%),
    radial-gradient(circle at 86% 20%,rgba(255,154,196,.9),transparent 18%),
    linear-gradient(135deg,#006b45,#00986c) !important;
}

/* Footer más sólido */
.footer{
  background:linear-gradient(135deg,#062d20,#083b28,#006b45) !important;
}

.footer .social-label{
  display:block;
  color:#ccefe0;
  margin:8px 0;
}

/* Ocultar scripts/secciones viejas si algún JS las dejó */
.force-photo-section,
.photo-grid:not(.mm-gallery-grid){
  display:none !important;
}

/* Responsive */
@media(max-width:1180px){
  .brand{
    min-width:180px !important;
  }

  .menu a,
  .menu button{
    font-size:.78rem !important;
    padding:9px 6px !important;
  }

  .header-actions .btn{
    padding:10px 10px !important;
  }
}

@media(max-width:980px){
  .nav{
    flex-wrap:wrap !important;
    padding:12px 0 !important;
  }

  .hamb{
    display:inline-flex !important;
  }

  .menu{
    display:none !important;
    width:100% !important;
    flex-direction:column !important;
    align-items:stretch !important;
    background:white !important;
    border-radius:22px !important;
    padding:12px !important;
    box-shadow:0 16px 40px rgba(0,60,40,.12);
  }

  body.menu-open .menu{
    display:flex !important;
  }

  .menu a,
  .menu button{
    width:100% !important;
    text-align:left !important;
  }

  .mega{
    position:static !important;
    width:100% !important;
    transform:none !important;
    display:none !important;
    grid-template-columns:1fr !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
    box-shadow:none !important;
    margin-top:8px;
  }

  .has-mega.open .mega{
    display:grid !important;
  }

  .header-actions{
    display:none !important;
    width:100% !important;
    flex-wrap:wrap !important;
    justify-content:center !important;
  }

  body.menu-open .header-actions{
    display:flex !important;
  }

  .hero-grid,
  .split,
  .grid-2,
  .grid-3,
  .grid-4,
  .footer-grid,
  .mm-gallery-grid{
    grid-template-columns:1fr !important;
  }

  .hero-card .photo,
  .visual-box{
    min-height:320px !important;
  }
}

@media(max-width:560px){
  .hero-card .photo,
  .visual-box{
    min-height:270px !important;
    border-radius:28px !important;
  }

  .btn{
    width:100%;
  }
}

/* ================================
   VISUAL V3 - SECCIONES GRANDES
================================ */

.mm-section{
  padding:90px 0;
  position:relative;
  overflow:hidden;
}

.mm-section::before{
  content:"";
  position:absolute;
  width:160px;
  height:160px;
  border-radius:50%;
  left:-55px;
  top:40px;
  background:rgba(246,178,26,.18);
  pointer-events:none;
}

.mm-section::after{
  content:"";
  position:absolute;
  width:190px;
  height:190px;
  border-radius:55px;
  right:-80px;
  bottom:30px;
  background:rgba(0,107,69,.10);
  transform:rotate(18deg);
  pointer-events:none;
}

.mm-soft{
  background:linear-gradient(135deg,#fffaf0,#e9fff5,#fff3d2);
}

.mm-blue{
  background:linear-gradient(135deg,#eaf8ff,#ffffff,#eafff5);
}

.mm-pink{
  background:linear-gradient(135deg,#fff0f6,#fffaf0,#f3fff9);
}

.mm-wave-title{
  text-align:center;
  max-width:900px;
  margin:0 auto 42px;
  position:relative;
  z-index:2;
}

.mm-wave-title h2{
  color:var(--mm-green);
  font-size:clamp(2.1rem,4vw,3.8rem);
}

.mm-wave-title p{
  font-size:1.14rem;
  color:#38584d;
}

.mm-photo-grid{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:26px;
}

.mm-photo-card{
  position:relative;
  overflow:hidden;
  min-height:320px;
  border-radius:36px;
  background:#dcefe7;
  box-shadow:0 22px 58px rgba(0,65,43,.16);
}

.mm-photo-card img{
  width:100%;
  height:320px;
  object-fit:cover;
  display:block;
  transition:transform .45s ease;
}

.mm-photo-card:hover img{
  transform:scale(1.07);
}

.mm-photo-card span{
  position:absolute;
  left:18px;
  right:18px;
  bottom:18px;
  padding:13px 18px;
  border-radius:999px;
  background:rgba(0,107,69,.95);
  color:white;
  font-weight:900;
  text-align:center;
}

.mm-program-strip{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:20px;
  margin-top:34px;
}

.mm-mini{
  min-height:185px;
  border-radius:30px;
  padding:26px 20px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  box-shadow:0 18px 46px rgba(0,65,43,.12);
  border:1px solid rgba(0,107,69,.08);
  transition:transform .25s ease, box-shadow .25s ease;
}

.mm-mini:hover{
  transform:translateY(-7px);
  box-shadow:0 26px 70px rgba(0,65,43,.18);
}

.mm-mini:nth-child(1){background:#fff0a8;}
.mm-mini:nth-child(2){background:#ffe1ed;}
.mm-mini:nth-child(3){background:#dff4ff;}
.mm-mini:nth-child(4){background:#eee6ff;}
.mm-mini:nth-child(5){background:#ffd8ad;}
.mm-mini:nth-child(6){background:#e4f8ef;}
.mm-mini:nth-child(7){background:#e9ffd8;}
.mm-mini:nth-child(8){background:#fff3cb;}

.mm-mini .emoji{
  font-size:2.5rem;
  margin-bottom:12px;
}

.mm-mini h3{
  color:#073b28;
  font-size:1.22rem;
  margin:0;
}

.mm-split-photo{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:44px;
  align-items:center;
}

.mm-split-photo img{
  width:100%;
  height:430px;
  object-fit:cover;
  display:block;
  border-radius:40px;
  box-shadow:0 26px 75px rgba(0,65,43,.18);
}

.mm-badges{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:22px;
}

.mm-badge{
  display:inline-flex;
  background:white;
  color:#006b45;
  border:1px solid rgba(0,107,69,.15);
  border-radius:999px;
  padding:10px 15px;
  font-weight:900;
  box-shadow:0 10px 24px rgba(0,65,43,.08);
}

.mm-cta-kids{
  position:relative;
  z-index:2;
  background:
    radial-gradient(circle at 12% 24%,rgba(246,178,26,.95),transparent 15%),
    radial-gradient(circle at 88% 22%,rgba(255,138,184,.85),transparent 16%),
    radial-gradient(circle at 78% 86%,rgba(140,211,255,.85),transparent 17%),
    linear-gradient(135deg,#006b45,#00966b);
  color:white;
  border-radius:46px;
  padding:58px 38px;
  text-align:center;
  box-shadow:0 30px 85px rgba(0,65,43,.26);
}

.mm-cta-kids h2{
  color:white;
}

.mm-cta-kids p{
  max-width:780px;
  margin:0 auto 24px;
  font-size:1.16rem;
}

.mm-stats{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:20px;
  margin-top:36px;
}

.mm-stat{
  background:white;
  border-radius:28px;
  padding:26px 18px;
  text-align:center;
  box-shadow:0 18px 46px rgba(0,65,43,.10);
}

.mm-stat strong{
  display:block;
  color:#006b45;
  font-size:2.4rem;
  line-height:1;
}

.mm-stat span{
  display:block;
  margin-top:9px;
  color:#36584c;
  font-weight:900;
}

/* Corrige el bloque de galería duplicado para que no quede plano */
#mm-home-upgrade-v1{
  margin-top:0;
}

/* Más color en tarjetas existentes */
.grid .card:nth-child(6n+1){background:linear-gradient(180deg,#ffffff,#eafff5) !important;}
.grid .card:nth-child(6n+2){background:linear-gradient(180deg,#ffffff,#eaf8ff) !important;}
.grid .card:nth-child(6n+3){background:linear-gradient(180deg,#ffffff,#fff5cf) !important;}
.grid .card:nth-child(6n+4){background:linear-gradient(180deg,#ffffff,#fff0f7) !important;}
.grid .card:nth-child(6n+5){background:linear-gradient(180deg,#ffffff,#f1edff) !important;}
.grid .card:nth-child(6n+6){background:linear-gradient(180deg,#ffffff,#fff0df) !important;}

/* Mejorar teachers: que no sean solo letras */
.bio-card .fake-photo{
  height:280px !important;
  margin-bottom:20px;
  border-radius:26px !important;
  background-size:cover !important;
  background-position:center top !important;
}

/* Hero interno más elegante */
main > .hero:first-child{
  background:
    radial-gradient(circle at 12% 22%,rgba(246,178,26,.18),transparent 18%),
    radial-gradient(circle at 88% 22%,rgba(0,107,69,.12),transparent 22%),
    linear-gradient(135deg,#fffaf0,#f2fff8);
}

main > .hero:first-child h1{
  color:#006b45;
}

/* Responsive V3 */
@media(max-width:980px){
  .mm-photo-grid,
  .mm-program-strip,
  .mm-split-photo,
  .mm-stats{
    grid-template-columns:1fr !important;
  }

  .mm-section{
    padding:64px 0;
  }

  .mm-split-photo img,
  .mm-photo-card,
  .mm-photo-card img{
    min-height:260px;
    height:300px;
  }

  .mm-cta-kids{
    border-radius:32px;
    padding:42px 24px;
  }
}

@media(max-width:560px){
  .mm-photo-card,
  .mm-photo-card img,
  .mm-split-photo img{
    height:250px;
    min-height:250px;
  }
}

/* ================================
   HOME V4 - LIMPIEZA Y MÁS CONTENIDO
================================ */

.mm-topbar-v4{
  background:linear-gradient(90deg,#006b45,#008f61,#f6b21a) !important;
  color:white !important;
  padding:9px 0 !important;
  font-size:.88rem !important;
  letter-spacing:0 !important;
}

.mm-topbar-v4 .mm-topbar-inner{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:22px;
  flex-wrap:wrap;
  font-weight:800;
}

.mm-topbar-v4 a{
  color:white !important;
  text-decoration:none !important;
}

.mm-v4-section{
  padding:92px 0;
  position:relative;
  overflow:hidden;
}

.mm-v4-section h2{
  color:#006b45;
}

.mm-v4-soft{
  background:linear-gradient(135deg,#fffaf0,#eafff5,#fff3d4);
}

.mm-v4-blue{
  background:linear-gradient(135deg,#eaf8ff,#ffffff,#f0fff8);
}

.mm-v4-rose{
  background:linear-gradient(135deg,#fff0f7,#fffaf0,#f2fff8);
}

.mm-v4-title{
  text-align:center;
  max-width:880px;
  margin:0 auto 42px;
}

.mm-v4-title h2{
  font-size:clamp(2.2rem,4vw,3.8rem);
  margin-bottom:16px;
}

.mm-v4-title p{
  color:#38594d;
  font-size:1.14rem;
}

.mm-age-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:22px;
}

.mm-age-card{
  border-radius:34px;
  padding:30px 24px;
  min-height:230px;
  box-shadow:0 20px 55px rgba(0,65,43,.12);
  text-align:center;
  border:1px solid rgba(0,107,69,.10);
  transition:.25s ease;
}

.mm-age-card:hover{
  transform:translateY(-7px);
  box-shadow:0 28px 75px rgba(0,65,43,.18);
}

.mm-age-card:nth-child(1){background:#fff0a8;}
.mm-age-card:nth-child(2){background:#ffe1ed;}
.mm-age-card:nth-child(3){background:#dff4ff;}
.mm-age-card:nth-child(4){background:#eee6ff;}

.mm-age-card .icon{
  font-size:3rem;
  margin-bottom:12px;
}

.mm-age-card h3{
  color:#073b28;
  margin-bottom:10px;
}

.mm-feature-wall{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:42px;
  align-items:center;
}

.mm-feature-photo{
  min-height:520px;
  border-radius:44px;
  overflow:hidden;
  box-shadow:0 30px 90px rgba(0,65,43,.22);
  background:
    linear-gradient(180deg,rgba(0,0,0,.04),rgba(0,80,52,.32)),
    url("https://images.pexels.com/photos/8422137/pexels-photo-8422137.jpeg?auto=compress&cs=tinysrgb&w=1600") center/cover no-repeat;
}

.mm-feature-list{
  display:grid;
  gap:18px;
}

.mm-feature-item{
  background:white;
  border-radius:28px;
  padding:22px 24px;
  box-shadow:0 16px 42px rgba(0,65,43,.10);
  border:1px solid rgba(0,107,69,.10);
}

.mm-feature-item strong{
  display:block;
  color:#006b45;
  font-size:1.15rem;
  margin-bottom:6px;
}

.mm-admission-band{
  background:
    radial-gradient(circle at 12% 18%,rgba(246,178,26,.92),transparent 15%),
    radial-gradient(circle at 90% 28%,rgba(255,145,190,.78),transparent 16%),
    linear-gradient(135deg,#006b45,#008f61);
  color:white;
  border-radius:46px;
  padding:58px 42px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:30px;
  align-items:center;
  box-shadow:0 30px 90px rgba(0,65,43,.25);
}

.mm-admission-band h2{
  color:white;
  margin-bottom:12px;
}

.mm-admission-band p{
  font-size:1.13rem;
  max-width:780px;
}

.mm-service-mosaic{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:18px;
}

.mm-mosaic-card{
  border-radius:30px;
  padding:26px 20px;
  min-height:210px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  box-shadow:0 18px 50px rgba(0,65,43,.12);
  background:white;
  border:1px solid rgba(0,107,69,.10);
  position:relative;
  overflow:hidden;
}

.mm-mosaic-card::before{
  content:"";
  position:absolute;
  width:110px;
  height:110px;
  border-radius:50%;
  right:-35px;
  top:-35px;
  background:rgba(255,255,255,.45);
}

.mm-mosaic-card:nth-child(1){grid-column:span 2;background:#fff0a8;}
.mm-mosaic-card:nth-child(2){grid-column:span 2;background:#dff4ff;}
.mm-mosaic-card:nth-child(3){grid-column:span 2;background:#ffe1ed;}
.mm-mosaic-card:nth-child(4){grid-column:span 3;background:#e4f8ef;}
.mm-mosaic-card:nth-child(5){grid-column:span 3;background:#eee6ff;}

.mm-mosaic-card .emoji{
  font-size:2.7rem;
  margin-bottom:12px;
}

.mm-mosaic-card h3{
  color:#073b28;
  margin-bottom:8px;
}

.mm-mosaic-card p{
  color:#315247;
  margin:0;
}

.mm-v4-gallery{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:20px;
}

.mm-v4-photo{
  min-height:260px;
  border-radius:32px;
  overflow:hidden;
  box-shadow:0 20px 55px rgba(0,65,43,.15);
  position:relative;
}

.mm-v4-photo img{
  width:100%;
  height:260px;
  object-fit:cover;
  display:block;
}

.mm-v4-photo span{
  position:absolute;
  left:14px;
  right:14px;
  bottom:14px;
  background:rgba(0,107,69,.95);
  color:white;
  border-radius:999px;
  padding:10px 14px;
  text-align:center;
  font-weight:900;
}

/* Ocultar cualquier residuo visual de construction */
body:has(.mm-topbar-v4) .topbar:not(.mm-topbar-v4){
  display:none !important;
}

@media(max-width:980px){
  .mm-age-grid,
  .mm-feature-wall,
  .mm-v4-gallery{
    grid-template-columns:1fr !important;
  }

  .mm-service-mosaic{
    grid-template-columns:1fr !important;
  }

  .mm-mosaic-card{
    grid-column:span 1 !important;
  }

  .mm-admission-band{
    grid-template-columns:1fr !important;
    text-align:center;
  }

  .mm-feature-photo{
    min-height:340px;
  }
}

/* =====================================================
   PATCH 01 — MOBILE MENU + TOPBAR HIDE + HOME PHOTOS
===================================================== */

/* Evitar overflow horizontal general */
html,
body {
  max-width: 100%;
  overflow-x: hidden !important;
}

/* Desktop: header estable */
.site-header {
  z-index: 99999 !important;
}

.site-header .nav,
.nav {
  width: min(1180px, 92%) !important;
  margin: 0 auto !important;
}

/* Hamburguesa oculta en desktop */
.hamb {
  display: none !important;
}

/* Corrección de galería/fotos gigantes en Home */
.mm-photo-grid,
.mm-gallery-grid,
.mm-v4-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 22px !important;
  align-items: stretch !important;
}

.mm-photo-card,
.mm-gallery-card,
.mm-v4-photo,
.real-photo-card {
  min-height: 0 !important;
  height: auto !important;
  border-radius: 28px !important;
  overflow: hidden !important;
}

.mm-photo-card img,
.mm-gallery-card img,
.mm-v4-photo img,
.real-photo-card img {
  width: 100% !important;
  height: 260px !important;
  min-height: 0 !important;
  max-height: 280px !important;
  object-fit: cover !important;
  display: block !important;
}

.mm-photo-card span,
.mm-gallery-card span,
.mm-v4-photo span,
.real-photo-card span {
  font-size: 0.86rem !important;
  padding: 9px 13px !important;
}

/* Si alguna sección dejó fotos sueltas, controlar tamaño */
#mm-home-upgrade-v1 img,
#gallery-v4 img,
.mm-v4-section img {
  max-height: 300px !important;
  object-fit: cover !important;
}

/* Tablet */
@media (max-width: 1100px) {
  .mm-photo-grid,
  .mm-gallery-grid,
  .mm-v4-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Móvil: ocultar topbar y dejar solo logo + hamburguesa */
@media (max-width: 980px) {
  .topbar,
  .mm-topbar-v4 {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .site-header {
    position: sticky !important;
    top: 0 !important;
    background: rgba(255, 250, 240, 0.98) !important;
    box-shadow: 0 8px 28px rgba(0, 60, 40, 0.12) !important;
  }

  .site-header .nav,
  .nav {
    width: min(1180px, 94%) !important;
    min-height: 72px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 10px 0 !important;
  }

  .brand {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 72px) !important;
  }

  .brand span {
    font-size: 0.9rem !important;
    line-height: 1.08 !important;
  }

  .brand span small {
    font-size: 0.62rem !important;
  }

  .brand-mark {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    border-radius: 15px !important;
  }

  .hamb {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    margin-left: auto !important;
    border: 0 !important;
    border-radius: 16px !important;
    background: #006b45 !important;
    color: #fff !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    box-shadow: 0 10px 24px rgba(0, 80, 55, 0.22) !important;
  }

  /* Ocultar menú y botones hasta abrir */
  .menu {
    display: none !important;
    order: 20 !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    background: #ffffff !important;
    border-radius: 24px !important;
    padding: 14px !important;
    margin: 4px 0 0 !important;
    box-shadow: 0 18px 45px rgba(0, 60, 40, 0.14) !important;
    border: 1px solid rgba(0, 107, 69, 0.12) !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
  }

  body.menu-open .menu {
    display: flex !important;
  }

  .menu > li {
    width: 100% !important;
    display: block !important;
  }

  .menu a,
  .menu button {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: left !important;
    padding: 14px 15px !important;
    font-size: 1rem !important;
    border-radius: 16px !important;
  }

  /* Mega menú como acordeón */
  .mega {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: none !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 14px !important;
    margin: 6px 0 0 !important;
    background: #f4fbf7 !important;
    border-radius: 18px !important;
    box-shadow: none !important;
    border: 1px solid rgba(0, 107, 69, 0.10) !important;
  }

  .has-mega.open .mega {
    display: grid !important;
  }

  .mega h4 {
    margin: 8px 0 5px !important;
  }

  .mega a {
    padding: 9px 10px !important;
    font-size: 0.92rem !important;
    white-space: normal !important;
  }

  .header-actions {
    display: none !important;
    order: 21 !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    background: #ffffff !important;
    border-radius: 22px !important;
    padding: 12px !important;
    margin-top: 8px !important;
    box-shadow: 0 18px 45px rgba(0, 60, 40, 0.12) !important;
    border: 1px solid rgba(0, 107, 69, 0.10) !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body.menu-open .header-actions {
    display: grid !important;
  }

  .header-actions .btn,
  .header-actions .lang {
    width: 100% !important;
    justify-content: center !important;
    min-height: 46px !important;
    font-size: 0.95rem !important;
  }

  /* No mostrar hamburguesa duplicada dentro de header-actions cuando se abre */
  .header-actions .hamb {
    display: none !important;
  }

  /* Galerías en móvil */
  .mm-photo-grid,
  .mm-gallery-grid,
  .mm-v4-gallery {
    grid-template-columns: 1fr !important;
  }

  .mm-photo-card img,
  .mm-gallery-card img,
  .mm-v4-photo img,
  .real-photo-card img {
    height: 240px !important;
    max-height: 260px !important;
  }
}

/* =====================================================
   MANUAL PATCH 01
   Mobile hamburger + hide mobile topbar + STEAM tabs + photo sizing
===================================================== */

html,
body{
  overflow-x:hidden !important;
}

/* Fotos del Home controladas */
.mm-photo-grid,
.mm-gallery-grid,
.mm-v4-gallery,
.real-photo-row{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:22px !important;
  align-items:stretch !important;
}

.mm-photo-card,
.mm-gallery-card,
.mm-v4-photo,
.real-photo-card{
  height:auto !important;
  min-height:0 !important;
  border-radius:28px !important;
  overflow:hidden !important;
}

.mm-photo-card img,
.mm-gallery-card img,
.mm-v4-photo img,
.real-photo-card img{
  width:100% !important;
  height:260px !important;
  max-height:280px !important;
  min-height:0 !important;
  object-fit:cover !important;
  display:block !important;
}

#mm-home-upgrade-v1 img,
#gallery-v4 img,
.mm-v4-section img{
  max-height:300px !important;
  object-fit:cover !important;
}

/* STEAM tabs actuales de la página */
.tabs[data-tabs="steam"]{
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
  gap:12px !important;
  margin:28px 0 34px !important;
}

.tabs[data-tabs="steam"] .tab-btn{
  border:0 !important;
  border-radius:999px !important;
  padding:13px 19px !important;
  background:#fff !important;
  color:#006b45 !important;
  font-weight:900 !important;
  cursor:pointer !important;
  box-shadow:0 10px 26px rgba(0,65,43,.10) !important;
}

.tabs[data-tabs="steam"] .tab-btn.active{
  background:#006b45 !important;
  color:#fff !important;
}

.tab-panel[data-panel-group="steam"]{
  display:none !important;
}

.tab-panel[data-panel-group="steam"].active{
  display:block !important;
}

/* Tablet */
@media(max-width:1100px){
  .mm-photo-grid,
  .mm-gallery-grid,
  .mm-v4-gallery,
  .real-photo-row{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

/* Móvil */
@media(max-width:980px){

  /* Quitar barra superior de información en móvil */
  .topbar,
  .mm-topbar-v4{
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    max-height:0 !important;
    padding:0 !important;
    margin:0 !important;
    overflow:hidden !important;
  }

  .site-header{
    position:sticky !important;
    top:0 !important;
    z-index:99999 !important;
    background:rgba(255,250,240,.98) !important;
    box-shadow:0 8px 28px rgba(0,60,40,.12) !important;
  }

  .nav,
  .site-header .nav{
    width:min(1180px,94%) !important;
    min-height:72px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    flex-wrap:wrap !important;
    gap:10px !important;
    padding:10px 0 !important;
  }

  .brand{
    flex:1 1 auto !important;
    min-width:0 !important;
    max-width:calc(100% - 72px) !important;
  }

  .brand-mark{
    width:46px !important;
    height:46px !important;
    min-width:46px !important;
    border-radius:15px !important;
  }

  .brand span{
    font-size:.9rem !important;
    line-height:1.08 !important;
  }

  .brand span small{
    font-size:.62rem !important;
  }

  .hamb{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:52px !important;
    height:52px !important;
    min-width:52px !important;
    margin-left:auto !important;
    border:0 !important;
    border-radius:16px !important;
    background:#006b45 !important;
    color:#fff !important;
    font-size:28px !important;
    font-weight:900 !important;
    cursor:pointer !important;
    box-shadow:0 10px 24px rgba(0,80,55,.22) !important;
  }

  .menu{
    display:none !important;
    order:20 !important;
    width:100% !important;
    flex:0 0 100% !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:4px !important;
    background:#fff !important;
    border-radius:24px !important;
    padding:14px !important;
    margin:4px 0 0 !important;
    box-shadow:0 18px 45px rgba(0,60,40,.14) !important;
    border:1px solid rgba(0,107,69,.12) !important;
  }

  body.menu-open .menu{
    display:flex !important;
  }

  .menu > li{
    width:100% !important;
    display:block !important;
  }

  .menu a,
  .menu button{
    width:100% !important;
    display:flex !important;
    justify-content:space-between !important;
    align-items:center !important;
    text-align:left !important;
    padding:14px 15px !important;
    font-size:1rem !important;
    border-radius:16px !important;
  }

  .mega{
    position:static !important;
    width:100% !important;
    max-width:none !important;
    transform:none !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
    display:none !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
    padding:14px !important;
    margin:6px 0 0 !important;
    background:#f4fbf7 !important;
    border-radius:18px !important;
    box-shadow:none !important;
    border:1px solid rgba(0,107,69,.10) !important;
  }

  .has-mega.open .mega{
    display:grid !important;
  }

  .header-actions{
    display:none !important;
    order:21 !important;
    width:100% !important;
    flex:0 0 100% !important;
    background:#fff !important;
    border-radius:22px !important;
    padding:12px !important;
    margin-top:8px !important;
    box-shadow:0 18px 45px rgba(0,60,40,.12) !important;
    border:1px solid rgba(0,107,69,.10) !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  body.menu-open .header-actions{
    display:grid !important;
  }

  .header-actions .btn,
  .header-actions .lang{
    width:100% !important;
    justify-content:center !important;
    min-height:46px !important;
    font-size:.95rem !important;
  }

  .header-actions .hamb{
    display:none !important;
  }

  .mm-photo-grid,
  .mm-gallery-grid,
  .mm-v4-gallery,
  .real-photo-row{
    grid-template-columns:1fr !important;
  }

  .mm-photo-card img,
  .mm-gallery-card img,
  .mm-v4-photo img,
  .real-photo-card img{
    height:240px !important;
    max-height:260px !important;
  }

  .tabs[data-tabs="steam"] .tab-btn{
    width:100% !important;
  }
}

/* =====================================================
   MANUAL PATCH 02 — TEACHERS BIOGRAPHIES
===================================================== */

.teachers-hero{
  background:
    radial-gradient(circle at 12% 22%, rgba(246,178,26,.18), transparent 220px),
    radial-gradient(circle at 88% 20%, rgba(0,107,69,.12), transparent 250px),
    linear-gradient(135deg,#fffaf0,#f3fff9,#eaf8ff) !important;
}

.teachers-intro-section{
  background:linear-gradient(135deg,#fffaf0,#eafff5,#fff3d4);
}

.teachers-intro-card{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:42px;
  align-items:center;
  background:white;
  border-radius:42px;
  padding:42px;
  box-shadow:0 24px 75px rgba(0,65,43,.14);
  border:1px solid rgba(0,107,69,.10);
}

.teachers-intro-card h2{
  color:#006b45;
}

.teachers-intro-card p{
  color:#38584d;
  font-size:1.12rem;
  line-height:1.75;
}

.teachers-intro-photo{
  min-height:360px;
  border-radius:34px;
  background:
    linear-gradient(180deg,rgba(0,0,0,.03),rgba(0,80,52,.30)),
    url("https://images.pexels.com/photos/8364026/pexels-photo-8364026.jpeg?auto=compress&cs=tinysrgb&w=1500") center/cover no-repeat;
  box-shadow:0 22px 60px rgba(0,65,43,.18);
}

.teachers-directory-section{
  background:
    radial-gradient(circle at 8% 12%, rgba(246,178,26,.16), transparent 220px),
    radial-gradient(circle at 95% 18%, rgba(255,140,190,.15), transparent 240px),
    linear-gradient(135deg,#f4fff9,#fffaf0) !important;
}

.teachers-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
  margin-top:42px;
}

.teacher-profile-card{
  background:white;
  border-radius:34px;
  overflow:hidden;
  box-shadow:0 20px 58px rgba(0,65,43,.12);
  border:1px solid rgba(0,107,69,.10);
  transition:transform .25s ease, box-shadow .25s ease;
}

.teacher-profile-card:hover{
  transform:translateY(-6px);
  box-shadow:0 28px 80px rgba(0,65,43,.18);
}

.teacher-avatar{
  height:230px;
  position:relative;
  display:flex;
  align-items:flex-end;
  padding:18px;
  background-size:cover !important;
  background-position:center top !important;
  overflow:hidden;
}

.teacher-avatar::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.02),rgba(0,70,45,.58));
}

.teacher-avatar span{
  position:relative;
  z-index:1;
  display:inline-flex;
  background:rgba(255,255,255,.94);
  color:#006b45;
  border-radius:999px;
  padding:10px 16px;
  font-weight:900;
  box-shadow:0 10px 26px rgba(0,0,0,.18);
}

.avatar-1{background:linear-gradient(135deg,#dff8ee,#fff1b8),url("https://images.pexels.com/photos/8364026/pexels-photo-8364026.jpeg?auto=compress&cs=tinysrgb&w=900");}
.avatar-2{background:linear-gradient(135deg,#dff4ff,#fff1b8),url("https://images.pexels.com/photos/8612967/pexels-photo-8612967.jpeg?auto=compress&cs=tinysrgb&w=900");}
.avatar-3{background:linear-gradient(135deg,#ffe1ed,#fff1b8),url("https://images.pexels.com/photos/8613089/pexels-photo-8613089.jpeg?auto=compress&cs=tinysrgb&w=900");}
.avatar-4{background:linear-gradient(135deg,#eee6ff,#e4f8ef),url("https://images.pexels.com/photos/8422137/pexels-photo-8422137.jpeg?auto=compress&cs=tinysrgb&w=900");}
.avatar-5{background:linear-gradient(135deg,#e4f8ef,#dff4ff),url("https://images.pexels.com/photos/8613329/pexels-photo-8613329.jpeg?auto=compress&cs=tinysrgb&w=900");}
.avatar-6{background:linear-gradient(135deg,#fff0a8,#e4f8ef),url("https://images.pexels.com/photos/8364026/pexels-photo-8364026.jpeg?auto=compress&cs=tinysrgb&w=900");}
.avatar-7{background:linear-gradient(135deg,#dff4ff,#ffe1ed),url("https://images.pexels.com/photos/8612967/pexels-photo-8612967.jpeg?auto=compress&cs=tinysrgb&w=900");}
.avatar-8{background:linear-gradient(135deg,#fff3d4,#eee6ff),url("https://images.pexels.com/photos/8613089/pexels-photo-8613089.jpeg?auto=compress&cs=tinysrgb&w=900");}
.avatar-9{background:linear-gradient(135deg,#ffe1ed,#e4f8ef),url("https://images.pexels.com/photos/8422137/pexels-photo-8422137.jpeg?auto=compress&cs=tinysrgb&w=900");}
.avatar-10{background:linear-gradient(135deg,#eee6ff,#dff4ff),url("https://images.pexels.com/photos/8613329/pexels-photo-8613329.jpeg?auto=compress&cs=tinysrgb&w=900");}
.avatar-11{background:linear-gradient(135deg,#e4f8ef,#fff0a8),url("https://images.pexels.com/photos/8364026/pexels-photo-8364026.jpeg?auto=compress&cs=tinysrgb&w=900");}

.teacher-info{
  padding:24px;
}

.teacher-info h3{
  color:#006b45;
  margin-bottom:6px;
}

.teacher-role{
  color:#073b28;
  font-weight:900;
  margin-bottom:12px;
}

.teacher-toggle{
  margin-top:14px;
  border:0;
  border-radius:999px;
  padding:12px 18px;
  background:#006b45;
  color:white;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 12px 28px rgba(0,107,69,.22);
}

.teacher-toggle:hover{
  background:#084b34;
}

.teacher-bio{
  display:none;
  padding:0 24px 26px;
  color:#38584d;
  line-height:1.7;
}

.teacher-profile-card.open .teacher-bio{
  display:block;
}

.teacher-bio ul{
  margin:16px 0 0;
  padding-left:20px;
}

.teacher-bio li{
  margin:7px 0;
}

.teachers-cta-section{
  background:linear-gradient(135deg,#fff0f7,#fffaf0,#eafff5);
}

.teachers-cta{
  background:
    radial-gradient(circle at 12% 25%,rgba(246,178,26,.92),transparent 15%),
    radial-gradient(circle at 88% 25%,rgba(255,138,184,.86),transparent 16%),
    linear-gradient(135deg,#006b45,#00966b);
  color:white;
  text-align:center;
  border-radius:46px;
  padding:58px 38px;
  box-shadow:0 30px 85px rgba(0,65,43,.25);
}

.teachers-cta h2{
  color:white;
}

.teachers-cta p{
  max-width:760px;
  margin:0 auto 24px;
  font-size:1.15rem;
}

@media(max-width:1100px){
  .teachers-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:900px){
  .teachers-intro-card,
  .teachers-grid{
    grid-template-columns:1fr;
  }

  .teachers-intro-card{
    padding:28px;
    border-radius:32px;
  }

  .teachers-intro-photo{
    min-height:270px;
  }

  .teacher-avatar{
    height:220px;
  }
}

@media(max-width:560px){
  .teachers-grid{
    gap:18px;
  }

  .teacher-info{
    padding:20px;
  }

  .teacher-bio{
    padding:0 20px 22px;
  }

  .teachers-cta{
    border-radius:32px;
    padding:42px 24px;
  }
}

/* =====================================================
   MANUAL PATCH 03 — TEACHERS BIOGRAPHIES MODAL
   Biografía encima, ancha, sin empujar tarjetas
===================================================== */

.teacher-profile-card .teacher-bio{
  display:none !important;
}

.teacher-modal{
  position:fixed;
  inset:0;
  z-index:999999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.teacher-modal.is-open{
  display:flex;
}

.teacher-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,35,24,.72);
  backdrop-filter:blur(7px);
}

.teacher-modal-panel{
  position:relative;
  width:min(1040px, calc(100vw - 36px));
  max-height:min(82vh, 860px);
  overflow:hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(246,178,26,.22), transparent 260px),
    radial-gradient(circle at 100% 15%, rgba(255,138,184,.16), transparent 240px),
    linear-gradient(135deg,#ffffff,#f3fff9);
  border-radius:34px;
  box-shadow:0 34px 120px rgba(0,0,0,.42);
  border:1px solid rgba(255,255,255,.75);
  animation:teacherModalIn .22s ease-out;
}

@keyframes teacherModalIn{
  from{
    transform:translateY(18px) scale(.98);
    opacity:0;
  }
  to{
    transform:translateY(0) scale(1);
    opacity:1;
  }
}

.teacher-modal-close{
  position:absolute;
  top:18px;
  right:18px;
  z-index:3;
  width:46px;
  height:46px;
  border:0;
  border-radius:999px;
  background:#006b45;
  color:white;
  font-size:30px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 12px 30px rgba(0,107,69,.24);
}

.teacher-modal-close:hover{
  background:#f6b21a;
  color:#073b28;
}

.teacher-modal-header{
  padding:34px 42px 18px;
  border-bottom:1px solid rgba(0,107,69,.12);
}

.teacher-modal-header h2{
  margin:8px 60px 6px 0;
  color:#006b45;
  font-size:clamp(2rem,4vw,3.35rem);
}

.teacher-modal-header p{
  color:#073b28;
  font-weight:900;
  margin:0;
  font-size:1.08rem;
}

.teacher-modal-body{
  padding:30px 42px 42px;
  max-height:calc(82vh - 170px);
  overflow:auto;
  color:#294b41;
  font-size:1.08rem;
  line-height:1.82;
}

.teacher-modal-body p{
  margin:0 0 18px;
}

.teacher-modal-body ul{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 22px;
  margin:24px 0 0;
  padding:0;
  list-style:none;
}

.teacher-modal-body li{
  background:rgba(255,255,255,.82);
  border:1px solid rgba(0,107,69,.10);
  border-radius:18px;
  padding:14px 16px;
  box-shadow:0 10px 28px rgba(0,65,43,.07);
}

.teacher-modal-body li::before{
  content:"✓";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  margin-right:8px;
  border-radius:999px;
  background:#006b45;
  color:white;
  font-size:.75rem;
  font-weight:900;
}

.teacher-modal-body strong{
  color:#006b45;
}

body.teacher-modal-open{
  overflow:hidden;
}

.teacher-toggle{
  position:relative;
  z-index:2;
}

.teacher-profile-card.open .teacher-bio{
  display:none !important;
}

.teacher-profile-card.open{
  transform:none !important;
}

@media(max-width:760px){
  .teacher-modal{
    padding:12px;
    align-items:flex-end;
  }

  .teacher-modal-panel{
    width:100%;
    max-height:88vh;
    border-radius:26px 26px 0 0;
  }

  .teacher-modal-header{
    padding:28px 24px 14px;
  }

  .teacher-modal-header h2{
    margin-right:52px;
    font-size:2rem;
  }

  .teacher-modal-body{
    padding:22px 24px 34px;
    max-height:calc(88vh - 150px);
    font-size:1rem;
  }

  .teacher-modal-body ul{
    grid-template-columns:1fr;
  }
}

/* =====================================================
   MANUAL PATCH 04 — MESSAGE FORM FOR EACH TEACHER
===================================================== */

.teacher-message-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:12px;
  margin-left:8px;
  padding:12px 18px;
  border:0;
  border-radius:999px;
  background:#f6b21a;
  color:#073b28;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 12px 26px rgba(246,178,26,.24);
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.teacher-message-toggle:hover{
  transform:translateY(-2px);
  background:#ffcb4d;
  box-shadow:0 18px 36px rgba(246,178,26,.34);
}

.teacher-message-modal{
  position:fixed;
  inset:0;
  z-index:1000000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.teacher-message-modal.is-open{
  display:flex;
}

.teacher-message-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,35,24,.74);
  backdrop-filter:blur(7px);
}

.teacher-message-panel{
  position:relative;
  width:min(860px, calc(100vw - 36px));
  max-height:min(88vh, 860px);
  overflow:hidden;
  background:
    radial-gradient(circle at 0% 0%, rgba(246,178,26,.22), transparent 260px),
    radial-gradient(circle at 100% 18%, rgba(40,214,154,.18), transparent 260px),
    linear-gradient(135deg,#ffffff,#f4fff9);
  border-radius:34px;
  box-shadow:0 34px 120px rgba(0,0,0,.42);
  border:1px solid rgba(255,255,255,.75);
  animation:teacherMessageIn .22s ease-out;
}

@keyframes teacherMessageIn{
  from{
    transform:translateY(18px) scale(.98);
    opacity:0;
  }
  to{
    transform:translateY(0) scale(1);
    opacity:1;
  }
}

.teacher-message-close{
  position:absolute;
  top:18px;
  right:18px;
  z-index:3;
  width:46px;
  height:46px;
  border:0;
  border-radius:999px;
  background:#006b45;
  color:white;
  font-size:30px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 12px 30px rgba(0,107,69,.24);
}

.teacher-message-close:hover{
  background:#f6b21a;
  color:#073b28;
}

.teacher-message-header{
  padding:34px 42px 18px;
  border-bottom:1px solid rgba(0,107,69,.12);
}

.teacher-message-header h2{
  margin:8px 60px 6px 0;
  color:#006b45;
  font-size:clamp(2rem,4vw,3.1rem);
}

.teacher-message-header p{
  color:#073b28;
  font-weight:900;
  margin:0;
  font-size:1.08rem;
}

.teacher-message-form{
  padding:28px 42px 38px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  max-height:calc(88vh - 165px);
  overflow:auto;
}

.teacher-message-form label{
  display:flex;
  flex-direction:column;
  gap:8px;
  color:#073b28;
  font-weight:900;
}

.teacher-message-form input,
.teacher-message-form textarea{
  width:100%;
  border:1px solid rgba(0,107,69,.18);
  border-radius:18px;
  padding:15px 16px;
  font:inherit;
  background:white;
  color:#173b31;
  outline:none;
  box-shadow:0 10px 24px rgba(0,65,43,.06);
}

.teacher-message-form input:focus,
.teacher-message-form textarea:focus{
  border-color:#006b45;
  box-shadow:0 0 0 4px rgba(0,107,69,.13);
}

.teacher-message-full,
.teacher-message-note{
  grid-column:1 / -1;
}

.teacher-message-form button[type="submit"]{
  grid-column:1 / -1;
  justify-self:start;
  border:0;
  border-radius:999px;
  padding:15px 28px;
  background:#006b45;
  color:white;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 16px 34px rgba(0,107,69,.24);
}

.teacher-message-form button[type="submit"]:hover{
  background:#f6b21a;
  color:#073b28;
}

.teacher-message-note{
  margin:0;
  color:#526b62;
  font-size:.95rem;
}

body.teacher-message-open{
  overflow:hidden;
}

@media(max-width:760px){
  .teacher-message-modal{
    padding:12px;
    align-items:flex-end;
  }

  .teacher-message-panel{
    width:100%;
    border-radius:26px 26px 0 0;
    max-height:90vh;
  }

  .teacher-message-header{
    padding:28px 24px 14px;
  }

  .teacher-message-header h2{
    margin-right:52px;
    font-size:2rem;
  }

  .teacher-message-form{
    grid-template-columns:1fr;
    padding:22px 24px 34px;
    max-height:calc(90vh - 150px);
  }

  .teacher-message-toggle{
    width:100%;
    margin-left:0;
  }
}
