/* ============================================================
   INDEX - esqueda.edu.mx
   Estilos de la página de inicio: slider principal, banners
   separadores, sección de valores, timeline de niveles
   educativos, galería de fotos, modal de mapa y sección de
   mapa dividido con degradado.
   ============================================================ */

   /* ========== VARIABLES DE COLOR ========== */
  :root {
    --color-bg-light: #ffffff;
    --color-bg-dark: #1e1e2f;
    --color-text-dark: #1e3d59;
    --color-text-light: #eaf4f4;
    --color-primary: #144a7e;
    --color-accent: #61dafb;
    --color-text-menu: #34675c;
    --color-menus-des: #31855a;
    --color-button: #198754;
    --color-menu-fondo: #375E97;
  }
  
/* ------------------------------------------------------------
   0. BASE / AJUSTES GLOBALES
   ------------------------------------------------------------ */

/* Evita que cualquier elemento genere scroll horizontal no deseado */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}


/* ============================================================
   1. SLIDER PRINCIPAL
   ============================================================ */

/* Contenedor de todas las diapositivas: se mueven en conjunto
   mediante la animación slideShow */
.slider-wrapper {
  display: flex;
  animation: slideShow 20s infinite;
  max-width: 100%;
  height: auto;
}

/* Cada slide ocupa el 100% del ancho visible */
.slide {
  position: relative;
  flex: 0 0 100%;
  height: auto;
}

/* Imágenes del slider con realce de color */
.slide img {
  max-width: 100%;
  height: auto;
  object-fit: cover; /* Recorte tipo "cover" en escritorio */
  display: block;
  filter: brightness(1.05) contrast(1.08) saturate(1.1);
  transition: filter 0.3s ease;
}

.slide img:hover {
  filter: brightness(1.1) contrast(1.1) saturate(1.2);
}

/* Animación de pase automático entre 4 slides (25% cada uno) */
@keyframes slideShow {
  0%, 20%  { transform: translateX(0); }
  25%, 45% { transform: translateX(-100%); }
  50%, 70% { transform: translateX(-200%); }
  75%, 95% { transform: translateX(-300%); }
  100%     { transform: translateX(0); }
}

/* Pantallas pequeñas: mostrar la imagen completa en vez de recortarla */
@media (max-width: 768px) {
  .slide img {
    object-fit: contain;
    background-color: #000; /* Franjas negras arriba/abajo */
  }
}


/* ============================================================
   2. BANNER SEPARADOR (imagen de fondo con overlay oscuro)
   ============================================================ */
/* NOTA: existen dos bloques ".banner-separador" en el archivo
   original (uno con imagen de "Docentes" y otro con imagen de
   "Aulas"). Se conservan ambos y en el orden original, ya que
   el segundo bloque sobreescribe algunas propiedades del primero. */

/* --- Versión 1: banner con imagen de Docentes --- 
.banner-separador {
  width: 100%;
  max-width: none;
  background-image: url('assets/images/Fotos/Docentes/9.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 300px;
  text-align: center;
  position: relative;
  color: white;
  padding-top: 40%; 
}

.banner-separador::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4); 
}

.contenido-separador {
  position: relative;
  z-index: 2;
}

.banner-separador h2 {
  color: white;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
  margin: 0;
  padding-top: 20px;
}

@media (max-width: 768px) {
  .banner-separador {
    background-attachment: scroll; 
    background-size: cover;
    padding-top: 60%;
    min-height: auto;
  }
}*/

/* --- Versión 2: banner con imagen de Aulas (sobreescribe la anterior) --- 
.banner-separador {
  background-image: url('assets/images/Fotos/Aulas/clase4.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 60px 20px;
  text-align: center;
  position: relative;
  color: white;
}

.banner-separador::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4); /* Capa oscura para contraste 
}

.contenido-separador {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.banner-separador h2,
.banner-separador p {
  color: white;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}

.banner-separador h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.banner-separador p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

/* Botón dentro del banner separador (ej. "Conoce más") 
.btn-separador {
  background: var(--color-primary);
  padding: 10px 20px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background 0.3s ease;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.btn-separador:hover {
  background: #198754;
  color: #ffffff;
}

@media (max-width: 768px) {
  .banner-separador {
    padding: 40px 15px;
    background-attachment: scroll;
  }
  .banner-separador h2 {
    font-size: 1.5rem;
  }
  .banner-separador p {
    font-size: 1rem;
  }
}*/


/* ============================================================
   3. SECCIÓN "VALORES"
   ============================================================ */
.valores {
  background: #f8f9fa;
}

/* Cuadrícula de tarjetas: 2 columnas por defecto */
.valores-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.valor-card {
  background-color: var(--color-primary);
  color: #ffffff;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* En celulares: 1 sola columna */
@media (max-width: 768px) {
  .valores-cards {
    grid-template-columns: 1fr;
  }
}

.valores-iconos {
  margin-bottom: 15px;
}

/* ============================================================
   4. TIMELINE "NIVELES EDUCATIVOS"
   ============================================================ */
.timeline-section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.timeline {
  position: relative;
  padding: 0px;
  list-style: none;
  margin-top: 48px;
}

/* Ocultamos la línea vertical global antigua */
.timeline:before {
  display: none;
}

.timeline > li {
  position: relative;
  min-height: 50px;
  margin-bottom: 50px;
}

.timeline > li:after,
.timeline > li:before {
  display: table;
  content: " ";
}

.timeline > li:after {
  clear: both;
}

/* --- LÍNEA VERTICAL CORREGIDA (Segmentada por elemento) --- */
/* Dibujamos la línea solo en los <li> que NO sean el último */
.timeline > li:not(:last-child):before {
  content: "";
  display: block; /* <--- ¡ESTO CORRIGE LA VISIBILIDAD! */
  position: absolute;
  top: 0;
  bottom: -50px; /* Conecta con el margin-bottom del siguiente <li> */
  left: 40px;
  width: 2px;
  margin-left: -1.5px;
  background-color: #e9ecef;
}

/* Panel de texto de cada evento de la timeline */
.timeline > li .timeline-panel {
  position: relative;
  float: right;
  width: 100%;
  padding: 0 20px 0 100px;
  text-align: left;
}

.timeline > li .timeline-panel:before {
  right: auto;
  left: -15px;
  border-right-width: 15px;
  border-left-width: 0;
}

.timeline > li .timeline-panel:after {
  right: auto;
  left: -14px;
  border-right-width: 14px;
  border-left-width: 0;
}

/* Círculo con ícono de cada nivel educativo */
.timeline > li .timeline-image {
  position: absolute;
  z-index: 100;
  left: 0;
  width: 80px;
  height: 80px;
  margin-left: 0;
  text-align: center;
  color: white;
  border: 7px solid #e9ecef;
  border-radius: 100%;
  background-color: var(--color-primary);

  /* Centrado del ícono dentro del círculo */
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline > li .timeline-image i {
  font-size: 22px; /* Tamaño del ícono en móvil */
}

.timeline > li .timeline-image h4,
.timeline > li .timeline-image .h4 {
  font-size: 10px;
  line-height: 14px;
  margin-top: 12px;
}

/* Variante "invertida": el panel queda del lado contrario */
.timeline > li.timeline-inverted > .timeline-panel {
  float: right;
  padding: 0 20px 0 100px;
  text-align: left;
}

.timeline > li.timeline-inverted > .timeline-panel:before {
  right: auto;
  left: -15px;
  border-right-width: 15px;
  border-left-width: 0;
}

.timeline > li.timeline-inverted > .timeline-panel:after {
  right: auto;
  left: -14px;
  border-right-width: 14px;
  border-left-width: 0;
}

.timeline > li:last-child {
  margin-bottom: 0;
}

.timeline .timeline-heading h4,
.timeline .timeline-heading .h4 {
  margin-top: 0;
  color: inherit;
}

.timeline .timeline-heading h4.subheading,
.timeline .timeline-heading .subheading.h4 {
  text-transform: none;
}

.timeline .timeline-body > ul,
.timeline .timeline-body > p {
  margin-bottom: 0;
}

/* --- Tablet (≥768px): línea centrada, paneles alternan izq/der --- */
@media (min-width: 768px) {
  /* Movemos la línea segmentada al centro en pantallas medianas y grandes */
  .timeline > li:not(:last-child):before {
    left: 50%;
    bottom: -100px; /* Ajustado al margin-bottom de 100px */
  }

  .timeline > li {
    min-height: 100px;
    margin-bottom: 100px;
  }
  .timeline > li .timeline-panel {
    float: left;
    width: 41%;
    padding: 0 20px 20px 30px;
    text-align: right;
  }
  .timeline > li .timeline-image {
    left: 50%;
    width: 100px;
    height: 100px;
    margin-left: -50px;
  }
  .timeline > li .timeline-image i {
    font-size: 28px;
  }
  .timeline > li .timeline-image h4,
  .timeline > li .timeline-image .h4 {
    font-size: 13px;
    line-height: 18px;
    margin-top: 16px;
  }
  .timeline > li.timeline-inverted > .timeline-panel {
    float: right;
    padding: 0 30px 20px 20px;
  }
}

/* --- Escritorio pequeño (≥992px): círculos e íconos más grandes --- */
@media (min-width: 992px) {
  .timeline > li {
    min-height: 150px;
  }
  .timeline > li .timeline-panel {
    padding: 0 20px 20px;
  }
  .timeline > li .timeline-image {
    width: 150px;
    height: 150px;
    margin-left: -75px;
  }
  .timeline > li .timeline-image i {
    font-size: 42px;
  }
  .timeline > li .timeline-image h4,
  .timeline > li .timeline-image .h4 {
    font-size: 18px;
    line-height: 26px;
    margin-top: 30px;
  }
  .timeline > li.timeline-inverted > .timeline-panel {
    padding: 0 20px 20px;
  }
}

/* --- Escritorio grande (≥1200px): tamaño máximo de la timeline --- */
@media (min-width: 1200px) {
  .timeline > li {
    min-height: 170px;
  }
  .timeline > li .timeline-panel {
    padding: 0 20px 20px 100px;
  }
  .timeline > li .timeline-image {
    width: 170px;
    height: 170px;
    margin-left: -85px;
  }
  .timeline > li .timeline-image i {
    font-size: 65px;
  }
  .timeline > li .timeline-image h4,
  .timeline > li .timeline-image .h4 {
    margin-top: 40px;
  }
  .timeline > li.timeline-inverted > .timeline-panel {
    padding: 0 100px 20px 20px;
  }
}


/* ============================================================
   5. GALERÍA DE FOTOS
   ============================================================ */
.galeria {
  max-width: 1000px;
  margin: 40px auto;
  padding: 10px;
  text-align: center;
}

.galeria h2 {
  margin-bottom: 48px; /* Espacio entre el título y las imágenes */
}

/* Grid responsivo: columnas automáticas de mínimo 220px */
.galeria-contenedor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

.imagen {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.imagen img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

/* Efecto zoom en la imagen + elevación de la tarjeta al hacer hover */
.imagen:hover img {
  transform: scale(1.1);
}

.imagen:hover {
  transform: translateY(-5px);
}


/* ============================================================
   6. QUICK FACTS (datos rápidos / iconos destacados)
   ============================================================ */
.quick-fact-icon {
  color: var(--color-primary);
  margin-bottom: 10px;
}


/* ============================================================
   7. MODAL DE MAPA (vista ampliada de Street View / mapa normal)
   ============================================================ */

/* Fondo oscuro semitransparente que cubre toda la pantalla */
.modal-mapa {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: none; /* Oculto por defecto */
  justify-content: center;
  align-items: center;
  z-index: 1050;
}

/* Se muestra al agregar la clase "show" vía JS */
.modal-mapa.show {
  display: flex;
}

/* Caja blanca centrada con el contenido del modal */
.modal-contenido {
  background: white;
  max-width: 700px;
  width: 90%;
  padding: 20px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.modal-contenido iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Título superpuesto sobre el iframe del mapa */
.modal-titulo {
  position: absolute;
  top: 10px;
  left: 20px;
  color: white;
  font-size: 20px;
  font-weight: 700;
  z-index: 10;
}

/* Botón para cerrar el modal (círculo rojo con "x") */
.modal-contenido button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: red;
  color: white;
  border: none;
  font-size: 28px;
  line-height: 28px;
  padding: 5px 14px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}

.modal-contenido button:hover {
  background: darkred;
}

/* Variante de botón cerrar usando clase de Bootstrap (btn-danger) */
.modal-contenido .btn-danger {
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #cc0000;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 15px;
}


/* ============================================================
   8. NIVELES EDUCATIVOS (tarjetas informativas)
   ============================================================ */
.niveles-educativos {
  background-color: #f9f9f9;
}

.nivel-card {
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nivel-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.nivel-icon {
  font-size: 3rem;
  color: #0d6efd;
}

.nivel-title {
  color: #0d6efd;
  font-weight: 700;
}

.nivel-desc {
  text-align: justify;
  color: #555;
  font-size: 1rem;
  line-height: 1.5;
}


/* ============================================================
   9. SECCIÓN "MAPA DIVIDIDO" (fondo con degradado)
   ============================================================ */

/* Fondo degradado azul institucional en diagonal */
.mapa-dividido-container {
  position: relative;
  overflow: hidden;
  padding: 60px 20px;
  background: linear-gradient(to top, #0A294A 0%, #173B61 50%, #27507B 100%);
  color: #fff; /* Texto blanco para contraste sobre el azul */
}

/* El contenido (título, texto, mapas) queda por encima del degradado */
.mapa-dividido-container .container {
  position: relative;
  z-index: 2;
}

.mapa-dividido-container h4 {
  color: #e9ecef;
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  padding: 60px;
}

/* Contenedor flex con los dos mapas (normal + street view) */
.mapa-dividido {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.mapa-item {
  flex: 1 1 300px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
  position: relative;
  z-index: 2;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.mapa-item iframe {
  width: 100%;
  height: 300px;
  border: 0;
  pointer-events: none; /* Evita interacción en la vista previa (Street View) */
}

/* En el mapa normal sí se permite interactuar (zoom, arrastrar, etc.) */
.mapa-normal iframe {
  pointer-events: auto;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .mapa-dividido {
    flex-direction: column;
    gap: 15px;
  }

  .mapa-dividido-container h4 {
    font-size: 30px;
    padding: 30px;
  }

  .mapa-item iframe {
    height: 250px;
  }

  .modal-contenido {
    width: 95%;
    height: 350px;
  }
}