:root{
  --azul:#0B3C5D;
  --verde:#1DBF73;
  --verde2:#159A5C;
  --fondo:#F5F9FC;
}

body{
  margin:0;
  font-family:Montserrat, Arial, sans-serif;
  background:white;
  color:var(--azul);
}

.container{
  max-width:1100px;
  margin:auto;
  padding:20px;
}

.header{
  background:white;
  border-bottom:1px solid #eee;
  position:sticky;
  top:0;
  z-index:99;
}

.header__inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
}

.brand{display:flex;align-items:center;gap:12px}
.brand__link{display:inline-flex}
.logo{height:55px;}
.brand__name{font-weight:800;font-size:18px;line-height:1}
.brand__tag{font-weight:700;color:#4B6475;font-size:12px;margin-top:6px}

.nav a{
  margin:0 10px;
  font-weight:700;
  text-decoration:none;
  color:var(--azul);
}

.btn{
  background:var(--verde);
  color:white;
  padding:10px 20px;
  border-radius:30px;
  text-decoration:none;
  cursor:pointer;
  display:inline-block;
  border:none;
  font-weight:800;
}

.btn:hover{background:var(--verde2);}

.outline{
  background:transparent;
  border:2px solid var(--verde);
  color:var(--verde);
}
.outline:hover{
  background:rgba(29,191,115,.10);
}

.grande{font-size:18px;}
.small{font-size:14px;padding:8px 16px;}

.hero{
  padding:60px 0;
  background:var(--fondo);
}

.hero-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:40px;
  align-items:center;
}

.hero-buttons{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}

.hero-img{
  width:100%;
  border-radius:15px;
  height:360px;
  object-fit:cover;
  box-shadow:0 10px 30px rgba(0,0,0,.10);
}

.section{
  padding:60px 0;
}

.alt{
  background:var(--fondo);
}

h2{
  margin:0 0 30px;
}

.grid-3{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
}

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

.card{
  background:white;
  padding:15px;
  border-radius:15px;
  box-shadow:0 5px 20px rgba(0,0,0,.05);
  text-align:center;
}

.card img{
  width:100%;
  height:180px;
  object-fit:cover;
  border-radius:12px;
}

.card h3{margin:14px 0 8px}
.card p{margin:0 0 14px;color:#4B6475;font-weight:600;line-height:1.6}

.card-est{
  background:white;
  padding:10px;
  border-radius:15px;
  box-shadow:0 5px 20px rgba(0,0,0,.05);
  text-align:center;
}

.card-est img{
  width:100%;
  height:140px;
  object-fit:cover;
  border-radius:10px;
  margin-bottom:10px;
}

.card-est b{display:block;margin:0 0 6px}
.card-est span{display:block;color:#4B6475;font-weight:700}

.center{text-align:center;margin-top:18px}

.perfil{
  display:block;
  margin-top:10px;
  font-weight:800;
  color:var(--verde2);
  text-decoration:underline;
}

.contacto{
  background:var(--azul);
  color:white;
  padding:50px 0;
  text-align:center;
}

#phoneText{opacity:.9;font-weight:700;margin-top:12px}

.float{
  position:fixed;
  bottom:20px;
  right:20px;
  background:var(--verde);
  color:white;
  padding:15px 16px;
  border-radius:50%;
  cursor:pointer;
  box-shadow:0 12px 26px rgba(29,191,115,.35);
  text-decoration:none;
}

footer{
  text-align:center;
  padding:20px;
  background:white;
  border-top:1px solid #eee;
}

@media(max-width:900px){
  .hero-grid{grid-template-columns:1fr;}
  .grid-3{grid-template-columns:1fr;}
  .grid-4{grid-template-columns:1fr 1fr;}
  .nav a{margin:0 6px}
}

@media(max-width:600px){
  .grid-4{grid-template-columns:1fr;}
}

/* ===== PERFIL DOCENTE ===== */
.profile-wrap{
  padding:60px 0;
  background:var(--fondo);
}

.profile-grid{
  display:grid;
  grid-template-columns:420px 1fr;
  gap:22px;
  align-items:start;
}

.profile-card{
  background:white;
  border-radius:15px;
  box-shadow:0 5px 20px rgba(0,0,0,.05);
  padding:16px;
  text-align:center;
}

.profile-photo{
  width:100%;
  height:360px;
  object-fit:cover;
  border-radius:12px;
}

.profile-name{
  margin:14px 0 6px;
  font-size:26px;
}

.profile-role{
  margin:0 0 14px;
  color:#4B6475;
  font-weight:700;
}

.profile-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}

.profile-info h2{
  margin:0 0 10px;
}

.profile-text{
  margin:0 0 18px;
  line-height:1.7;
  color:#4B6475;
  font-weight:600;
}

.profile-list{
  margin:0 0 18px 18px;
  color:var(--azul);
  font-weight:700;
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:18px;
}
.chip{
  background:rgba(29,191,115,.12);
  color:var(--azul);
  border:1px solid rgba(11,60,93,.14);
  padding:8px 12px;
  border-radius:999px;
  font-weight:800;
}

.profile-cta-box{
  background:var(--azul);
  color:white;
  border-radius:15px;
  padding:16px;
}
.profile-cta-box p{
  color:rgba(255,255,255,.82);
  font-weight:600;
  line-height:1.6;
}

@media(max-width:900px){
  .profile-grid{grid-template-columns:1fr}
  .profile-photo{height:320px}
}
/* ====== LEGALES ====== */
.legal-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  margin-top:18px;
}

.legal-card{
  background:#fff;
  border:1px solid #e8eef5;
  border-radius:15px;
  box-shadow:0 8px 22px rgba(0,0,0,.06);
  overflow:hidden;
}

.legal-head{
  padding:14px 14px 6px;
}

.legal-head h3{
  margin:0 0 6px;
}

.legal-head p{
  margin:0;
  color:#4B6475;
  font-weight:600;
  line-height:1.5;
}

.legal-photos{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  padding:14px;
}

.legal-photos:has(img:only-child){
  grid-template-columns:1fr;
}

.legal-img{
  width:100%;
  height:200px;
  object-fit:cover;
  border-radius:12px;
  cursor:pointer;
  border:1px solid #e8eef5;
}

.legal-actions{
  padding:0 14px 14px;
}

@media(max-width:900px){
  .legal-grid{grid-template-columns:1fr;}
  .legal-img{height:240px;}
}

/* ===== MODAL IMÁGENES ===== */
.img-modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:999;
}
.img-modal.open{display:block;}

.img-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.6);
}

.img-modal__content{
  position:relative;
  max-width:900px;
  margin:4vh auto;
  background:#fff;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
}

.img-modal__content img{
  width:100%;
  height:auto;
  display:block;
}

.img-modal__close{
  position:absolute;
  right:12px;
  top:12px;
  width:42px;
  height:42px;
  border-radius:999px;
  border:none;
  cursor:pointer;
  font-size:18px;
  font-weight:900;
  background:#fff;
  box-shadow:0 10px 20px rgba(0,0,0,.15);
}


/* ============================= */
/* DOCUMENTOS LEGALES */
/* ============================= */

.legal-desc{
  color:#4B6475;
  font-weight:600;
  margin-top:-8px;
  margin-bottom:30px;
}

.legal-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
}

.legal-card{
  background:#fff;
  border-radius:16px;
  box-shadow:0 10px 25px rgba(0,0,0,.06);
  padding:18px;
}

.legal-head h3{
  margin:0 0 6px;
}

.legal-head p{
  margin:0 0 16px;
  color:#4B6475;
  font-weight:600;
  line-height:1.5;
}

.legal-photos{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.legal-photos:has(img:only-child){
  grid-template-columns:1fr;
}

.legal-img{
  width:100%;
  height:260px;
  object-fit:contain;   /* 🔥 NO recorta */
  background:#fff;
  padding:8px;
  border-radius:14px;
  border:1px solid #e8eef5;
  cursor:pointer;
  transition:.2s;
}

.legal-img:hover{
  transform:scale(1.02);
}

.legal-hint{
  margin-top:14px;
  font-size:13px;
  font-weight:800;
  color:#4B6475;
}

@media(max-width:1000px){
  .legal-grid{grid-template-columns:1fr 1fr;}
}

@media(max-width:700px){
  .legal-grid{grid-template-columns:1fr;}
}

/* ============================= */
/* MODAL */
/* ============================= */

.img-modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:999;
}

.img-modal.open{
  display:block;
}

.img-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.6);
}

.img-modal__content{
  position:relative;
  width:min(900px, 92vw);
  max-height:92vh;
  margin:4vh auto;
  background:#fff;
  border-radius:18px;
  overflow:auto;
  box-shadow:0 30px 60px rgba(0,0,0,.35);
}

.img-modal__content img{
  width:100%;
  height:auto;
  display:block;
}

.img-modal__close{
  position:absolute;
  right:12px;
  top:12px;
  width:42px;
  height:42px;
  border-radius:999px;
  border:none;
  background:#fff;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 10px 20px rgba(0,0,0,.2);
}

