/* =========================
   VARIABLES DE COLOR
========================= */
:root {
  --color-primario: #C00022;      /* Rojo institucional */
  --color-secundario: #001B3D;    /* Azul marino institucional */
  --color-texto: #001B3D;
  --color-texto-suave: #555;
  --color-bg-claro: #ffffff;
  --color-bg-alt: #f5f5f5;
  --color-borde: #e2e2e2;
  --radius-xl: 1.25rem;
  --radius-lg: 1rem;
  --radius-md: .75rem;
  --radius-sm: .5rem;
  --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
img {
  max-width: 100%;
  display: block;
}
body {
  font-family: var(--font-main);
  color: var(--color-texto);
  background-color: var(--color-bg-claro);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

/* HEADER */
.site-header {
  background-color: var(--color-bg-claro);
  border-bottom: 1px solid var(--color-borde);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 0;
  gap: 1rem;
  flex-wrap: nowrap;
}

/* BRAND */
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  line-height: 1.2;
  flex-shrink: 0;
}
.brand-left {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.brand-right {
  display: flex;
  flex-direction: column;
}
.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}
.logo-text {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-primario);
}
.tagline {
  font-size: .75rem;
  color: var(--color-texto);
  opacity: .7;
}

/* NAV */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: nowrap;
}
.nav-links a {
  text-decoration: none;
  color: var(--color-texto);
  font-size: .9rem;
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--color-primario);
}

/* BOTÓN PLATAFORMA EDUCATIVA EN HEADER */
.btn-header {
  background-color: var(--color-primario);
  color: var(--color-bg-claro);
  font-weight: 600;
  text-decoration: none;
  padding: .55rem 1rem;
  border-radius: var(--radius-md);
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
  display: inline-block;
  box-shadow: 0 8px 16px rgba(0,0,0,.15);
}
.btn-header:hover {
  background-color: var(--color-secundario);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: var(--color-primario);
  color: var(--color-bg-claro);
  border: none;
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

/* HERO / CARRUSEL */
.hero {
  background-color: var(--color-bg-claro);
}

/* Carrusel: la imagen se ve completa sin superposición */
.hero-carousel {
  width: 100%;
  background-color: #000;
  position: relative;
  overflow: hidden;
}
.hero-slide {
  display: none;
}
.hero-slide.active {
  display: block;
}
.hero-slide img {
  width: 100%;
  height: auto;
}

/* Puntos del carrusel */
.hero-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #fff;
  background: transparent;
  cursor: pointer;
}
.hero-dot.active {
  background: #fff;
}

/* CONTENIDO INICIO */
.inicio-content {
  padding: 2.5rem 0 3.5rem;
}
.inicio-title {
  font-size: clamp(1.5rem, 1vw + 1rem, 2rem);
  font-weight: 700;
  margin-bottom: .75rem;
  color: var(--color-texto);
}
.inicio-text {
  color: var(--color-texto-suave);
  max-width: 700px;
  font-size: .95rem;
  text-align: justify;       /* ✅ Justificación del párrafo de bienvenida */
}
.inicio-mision-vision {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.inicio-card {
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--color-borde);
  box-shadow: 0 12px 24px rgba(0,0,0,.03);
}
.inicio-card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .5rem;
}
.inicio-card p {
  font-size: .9rem;
  color: var(--color-texto-suave);
}

.inicio-accesos {
  margin-top: 2.5rem;
}
.inicio-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-texto);
}
.inicio-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.link-pill {
  display: inline-block;
  padding: .5rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--color-borde);
  background-color: #fff;
  font-size: .85rem;
  text-decoration: none;
  color: var(--color-texto-suave);
}
.link-pill:hover {
  border-color: var(--color-primario);
  color: var(--color-primario);
}

.inicio-noticias-resumen {
  margin-top: 3rem;
}
.noticias-resumen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.noticia-mini {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-borde);
  padding: 1rem 1.25rem;
  background-color: #fff;
  box-shadow: 0 12px 24px rgba(0,0,0,.03);
}
.noticia-mini h3 {
  font-size: .98rem;
  margin-bottom: .5rem;
}
.noticia-mini p {
  font-size: .9rem;
  color: var(--color-texto-suave);
}
.noticia-mini-link {
  display: inline-block;
  margin-top: .75rem;
  font-size: .85rem;
  color: var(--color-primario);
  text-decoration: none;
  font-weight: 600;
}
.noticia-mini-link:hover {
  text-decoration: underline;
}

/* SECCIONES GENERALES */
.section {
  padding: 4rem 0;
}
.section-title {
  font-size: clamp(1.3rem, 0.5vw + 1rem, 1.6rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-texto);
}
.section-intro {
  font-size: .95rem;
  color: var(--color-texto-suave);
  max-width: 650px;
  margin-bottom: 2rem;
}
.alt-bg {
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-borde);
  border-bottom: 1px solid var(--color-borde);
}
.subsection-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 .5rem;
}

/* SOBRE NOSOTROS */
.sobre-inner {
  display: grid;
  gap: 2rem;
}
@media(min-width:768px){
  .sobre-inner {
    grid-template-columns: 2fr 1.2fr;
    align-items: flex-start;
  }
}
.sobre-text p {
  font-size: .95rem;
  color: var(--color-texto-suave);
  margin-bottom: .75rem;
}
.sobre-galeria {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.sobre-img-box {
  height: 180px;
  background-color: #d9d9d9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(0,0,0,.08);
}
.sobre-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ACADÉMICO */
.academico-inner {
  max-width: 800px;
}
.academico-text p {
  font-size: .95rem;
  color: var(--color-texto-suave);
  margin-bottom: .75rem;
}
.bullet-list {
  list-style: disc;
  padding-left: 1.25rem;
  font-size: .95rem;
  color: var(--color-texto-suave);
}
.bullet-list li {
  margin-bottom: .25rem;
}
.academico-nota {
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--color-texto);
}

/* NIVELES EDUCATIVOS */
/* Contenedor de todos los niveles */
.niveles-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Tarjeta de cada nivel: imagen + texto */
.nivel-card {
  background-color: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-borde);
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
}

/* En pantallas más grandes: imagen y texto a la par */
@media (min-width: 768px) {
  .nivel-card {
    flex-direction: row;
  }
}

/* Contenedor para la imagen del nivel */
.nivel-img {
  background-color: #d9d9d9;
  flex: 0 0 260px;          /* ancho fijo aprox. para la imagen en escritorio */
  height: 200px;            /* altura inicial razonable */
  overflow: hidden;
}
.nivel-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* la imagen se ajusta sin deformarse */
}

/* En móviles, que la imagen ocupe todo el ancho arriba */
@media (max-width: 767px) {
  .nivel-img {
    width: 100%;
    flex: none;
  }
}

/* Texto del nivel */
.nivel-body {
  padding: 1rem 1rem 1.25rem;
}
.nivel-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .5rem;
}
.nivel-body p {
  font-size: .9rem;
  color: var(--color-texto-suave);
}

/* CARRERAS */
.carreras-grid {
  display: grid;
  gap: 1.5rem;
}
@media(min-width:768px){
  .carreras-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.carrera-card {
  background-color: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-borde);
  padding: 1.25rem 1.5rem 1.5rem;
  box-shadow: 0 16px 32px rgba(0,0,0,.04);
}
.carrera-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .75rem;
}
.carrera-nombre {
  font-size: 1rem;
  font-weight: 600;
}
.carrera-etiqueta {
  background-color: var(--color-primario);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: .25rem .6rem;
  border-radius: 999px;
}
.carrera-desc {
  font-size: .9rem;
  color: var(--color-texto-suave);
}

/* NOTICIAS Y EVENTOS */
.noticias-inner {
  max-width: 1000px;
}

/* ✅ Video institucional: tamaño moderado y centrado */
.noticias-video {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
@media (min-width: 768px) {
  .noticias-video {
    align-items: center;
  }
}
.noticias-video-frame {
  width: 100%;
  max-width: 720px;              /* ancho máximo del video */
  background-color: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,.25);
}
.video-player {
  width: 100%;
  height: auto;
  display: block;
  background-color: #000;
}

.noticias-grid {
  display: grid;
  gap: 1.5rem;
}
@media(min-width:768px){
  .noticias-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.noticia-card {
  background-color: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-borde);
  padding: 1.1rem 1.25rem 1.4rem;
  box-shadow: 0 16px 32px rgba(0,0,0,.03);
}
.noticia-card h3 {
  font-size: .98rem;
  margin-bottom: .5rem;
}
.noticia-meta {
  font-size: .8rem;
  color: #999;
  margin-bottom: .5rem;
}
.noticia-card p {
  font-size: .9rem;
  color: var(--color-texto-suave);
}

.eventos-galeria {
  margin-top: 3rem;
}
.galeria-intro {
  font-size: .9rem;
  color: var(--color-texto-suave);
  margin-bottom: 1rem;
}
.eventos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.evento-foto {
  height: 160px;
  background-color: #d9d9d9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(0,0,0,.06);
}
.evento-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* INSCRIPCIONES */
.inscripciones-inner {
  max-width: 800px;
}
.inscripciones-info p,
.inscripciones-info li {
  font-size: .95rem;
  color: var(--color-texto-suave);
}
.inscripciones-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 1rem 0 1.5rem;
}
.inscripciones-note {
  font-size: .9rem;
  color: var(--color-texto);
  margin-bottom: 1.5rem;
}
.cta-btn {
  display: inline-block;
  background-color: var(--color-primario);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: .75rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: .9rem;
  box-shadow: 0 12px 24px rgba(0,0,0,.15);
}
.cta-btn:hover {
  filter: brightness(1.05);
}
.cta-alt {
  background-color: var(--color-secundario);
}

/* ✅ BOTÓN ESPECÍFICO WHATSAPP (VERDE) */
.btn-whatsapp {
  background-color: #25D366;
}
.btn-whatsapp:hover {
  background-color: #1ebe5d;
}

/* CONTACTO */
.contacto-inner {
  display: grid;
  gap: 2rem;
}
@media(min-width:768px){
  .contacto-inner {
    grid-template-columns: 1.3fr 1fr;
    align-items: flex-start;
  }
}
.contact-card {
  background-color: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-borde);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 16px 32px rgba(0,0,0,.04);
  font-size: .9rem;
}
.contact-card p {
  margin-bottom: .5rem;
}
.red-text {
  color: var(--color-primario);
  text-decoration: none;
  font-weight: 600;
}
.red-text:hover {
  text-decoration: underline;
}
.contacto-redes {
  margin-top: 1.5rem;
}

/* Redes (también reutilizadas aquí) */
.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: .75rem;
}
.footer-social a img {
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1);
}
.contacto-inner .footer-social a img {
  filter: none;
}

/* MAPA */
.mapa-box {
  width: 100%;
  height: 260px;
  background-color: #d9d9d9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(0,0,0,.06);
}
.mapa-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* FOOTER */
.site-footer {
  background-color: var(--color-secundario);
  color: var(--color-bg-claro);
  padding: 2rem 0;
  margin-top: 3rem;
}
.footer-inner {
  text-align: center;
}
.footer-brand {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .5rem;
}
.footer-copy {
  font-size: .8rem;
  color: #bbb;
}

/* RESPONSIVE NAV */
@media(max-width:768px){
  .main-nav {
    position: absolute;
    top: 100%;
    right: 1rem;
    background-color: var(--color-bg-claro);
    border: 1px solid var(--color-borde);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 48px rgba(0,0,0,.08);
    padding: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    min-width: 220px;
  }
  .main-nav.open {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
  }
  .nav-toggle {
    display: block;
  }
}

/* HEADER extra pequeño */
@media (max-width:480px) {
  .tagline {
    display: none;
  }
  .logo-text {
    font-size: .9rem;
  }
  .logo-img {
    height: 44px;
  }
}
/* ========== MODAL PARA AMPLIAR IMÁGENES ========== */

.modal {
  display: none;
  position: fixed;
  z-index: 5000;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  overflow: auto;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

#modalCaption {
  margin: 15px auto;
  text-align: center;
  color: #ccc;
  font-size: 1rem;
  max-width: 80%;
}

