/* =================================================================
   STYLES.CSS - DISEÑO MODERNO Y SOFISTICADO
   ================================================================= */

/* ========= VARIABLES Y CONFIGURACIÓN GLOBAL ========= */
:root {
  --primary-color: #0d47a1; /* Azul más profundo y corporativo */
  --secondary-color: #ffab00; /* Ámbar vibrante como acento */
  --text-color: #333;
  --text-color-light: #666;
  --background-light: #f8f9fa; /* Un gris muy suave para fondos */
  --white: #ffffff;

  /* Tipografías importadas de Google Fonts */
  --font-heading: "Poppins", sans-serif;
  --font-body: "Lato", sans-serif;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
  --border-radius: 8px; /* Bordes redondeados para un look moderno */
}

/* =================================================================
   CLASE DE ACCESIBILIDAD PARA OCULTAR TEXTO VISUALMENTE
   ================================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased; /* Mejora el renderizado de fuentes */
  overflow-x: hidden;
}

.container {
  max-width: 1200px; /* Un poco más de ancho para pantallas modernas */
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary-color);
}

/* ========= HEADER Y NAVEGACIÓN MEJORADOS ========= */
.main-header {
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.9);
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  text-decoration: none;
  color: var(--primary-color);
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
}

.logo img {
  max-height: 50px; /* Ajusta este valor según el tamaño de tu logo */
  width: auto; /* Mantiene la proporción */
  display: block; /* Elimina espacios extra debajo de la imagen */
}

.main-nav > ul {
  list-style: none;
  display: flex;
}

.main-nav ul li a {
  font-family: var(--font-heading);
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  padding: 10px 15px;
  margin: 0 5px;
  border-radius: var(--border-radius);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.main-nav ul li a:hover {
  background-color: var(--background-light);
  color: var(--primary-color);
}

/* ========= MENÚ DESPLEGABLE SOFISTICADO ========= */
.main-nav .dropdown {
  position: relative;
}

.main-nav .submenu {
  list-style: none;
  position: absolute;
  top: 120%;
  left: 0;
  min-width: 220px;
  background-color: var(--white);
  box-shadow: var(--shadow-md);
  border-radius: var(--border-radius);
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.main-nav .dropdown:hover .submenu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.main-nav .submenu li a {
  display: block;
  width: 100%;
  padding: 12px 20px;
  font-weight: 500;
  color: var(--text-color);
  border-radius: 0;
}

.main-nav .submenu li a:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.main-nav .dropdown > a::after {
  content: " ▼";
  font-size: 0.6em;
  vertical-align: middle;
}

/* ========= SECCIÓN HERO ELEGANTE ========= */
/* ========= NUEVA SECCIÓN HERO CON SLIDER ========= */
.hero-slider-section {
  width: 100%;
  height: 80vh; /* Ocupa el 80% de la altura de la pantalla */
  position: relative;
  color: var(--white);
}

.hero-swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Overlay oscuro para que el texto sea legible */
.swiper-slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.slide-content {
  position: relative; /* Para que esté por encima del overlay */
  z-index: 10;
  max-width: 800px;
  padding: 20px;
}

.slide-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--white);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.slide-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Estilos para los controles de Swiper */
.swiper-button-next,
.swiper-button-prev {
  color: var(--white);
}

.swiper-pagination-bullet-active {
  background: var(--white);
}

/* Media query para hacer el texto más pequeño en móviles */
@media (max-width: 768px) {
  .hero-slider-section {
    height: 70vh; /* Un poco menos alto en móviles */
  }
  .slide-content h1 {
    font-size: 2.5rem;
  }
  .slide-content p {
    font-size: 1.1rem;
  }
}

/* ========= DISEÑO DE SECCIONES DE CONTENIDO ========= */
.main-content-section {
  padding: 80px 0;
}

.content-wrapper {
  display: flex;
  gap: 40px;
}

.feed-column {
  flex: 2; /* Ocupa 2/3 del espacio */
}

.sidebar-column {
  flex: 1; /* Ocupa 1/3 del espacio */
  position: sticky;
  top: 120px; /* Distancia desde arriba para que se quede fijo al hacer scroll */
  align-self: flex-start;
}

.sidebar-card {
  background-color: var(--background-light);
  padding: 25px;
  border-radius: var(--border-radius);
  margin-bottom: 30px;
}

.sidebar-card h3 {
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
}

.event-list,
.quick-links {
  list-style: none;
  padding: 0;
}

.event-list li {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
.event-list li:last-child {
  margin-bottom: 0;
}

.event-date {
  background: var(--primary-color);
  color: var(--white);
  border-radius: var(--border-radius);
  padding: 10px;
  text-align: center;
  font-weight: bold;
  margin-right: 15px;
  font-size: 0.9rem;
  line-height: 1.2;
}

.event-info span {
  font-weight: bold;
}

.quick-links li {
  margin-bottom: 10px;
}
.quick-links a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
}

/* ========= FOOTER MEJORADO ========= */
.main-footer {
  background: #212529;
  color: var(--white);
  text-align: center;
  padding: 40px 0;
}

/* ========= MENÚ DE HAMBURGUESA Y RESPONSIVIDAD ========= */
.menu-toggle {
  display: none; /* Oculto por defecto en escritorio */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.menu-toggle .hamburger {
  width: 25px;
  height: 2px;
  background: var(--primary-color);
  display: block;
  position: relative;
  transition: background 0.3s ease;
}

.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
  content: "";
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  display: block;
  position: absolute;
  transition: transform 0.3s ease;
}

.menu-toggle .hamburger::before {
  top: -8px;
}

.menu-toggle .hamburger::after {
  bottom: -8px;
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding-top: 80px;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s ease-in-out, visibility 0.4s;
  }

  body.menu-open .main-nav {
    transform: translateX(0);
    visibility: visible;
  }

  .main-nav > ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0; /* CORRECCIÓN: Quitamos el padding para que los bordes ocupen todo el ancho */
  }

  /* ===== INICIO DE LA CORRECCIÓN DE ESPACIADO ===== */
  .main-nav ul li {
    width: 100%;
    margin: 0; /* Eliminamos el margen */
    border-bottom: 1px solid #eee; /* Añadimos un separador */
  }

  .main-nav ul li a {
    display: block;
    width: 100%;
    padding: 18px 25px; /* Aumentamos el padding para un área táctil más grande */
  }
  /* ===== FIN DE LA CORRECCIÓN DE ESPACIADO ===== */

  .menu-toggle {
    display: block; /* Visible en móvil */
  }

  body.menu-open .menu-toggle .hamburger {
    background: transparent; /* La línea del medio desaparece */
  }

  body.menu-open .menu-toggle .hamburger::before {
    transform: rotate(45deg) translate(5px, 6px);
  }

  body.menu-open .menu-toggle .hamburger::after {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .main-nav .submenu {
    display: none; /* Oculto por defecto en móvil */
    position: static;
    box-shadow: none;
    border-radius: 0;
    background: #f9f9f9;
    min-width: 100%;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
  }

  .main-nav .dropdown.open > .submenu {
    display: block;
    max-height: 500px; /* Un valor alto para permitir el despliegue */
  }

  .main-nav .dropdown > a::after {
    float: right;
    transition: transform 0.3s ease;
  }

  .main-nav .dropdown.open > a::after {
    transform: rotate(180deg);
  }

  .content-wrapper {
    flex-direction: column;
  }
  .sidebar-column {
    position: static;
    width: 100%;
  }
}

/* ========= ESTILOS PARA LA DESCRIPCIÓN DEL EVENTO EN EL SIDEBAR ========= */
.event-list .event-info {
  display: flex;
  flex-direction: column;
}

.event-list .event-desc {
  font-size: 0.9em;
  color: #666;
  margin-top: 4px;
}

/* ========= ESTILOS PARA EL NUEVO FEED DE PUBLICACIONES ========= */
.feed-column h2 {
  text-align: left;
}

.posts-feed {
  display: flex;
  flex-direction: column;
  /* Eliminamos el 'gap' para un control manual del espaciado */
}

.post-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Creamos un separador decorativo después de cada post, excepto el último */
.post-card:not(:last-child) {
  margin-bottom: 60px; /* Este será el nuevo espacio entre posts */
  border-bottom: 1px solid #f0f0f0; /* Una línea de base muy sutil */
  padding-bottom: 60px; /* Espacio después de la línea */
  position: relative;
}

/* Este es el círculo decorativo en el centro de la línea */
.post-card:not(:last-child)::after {
  content: "●"; /* Puedes cambiarlo por '◆', '■', o dejarlo vacío '' para solo una línea */
  position: absolute;
  bottom: -8px; /* Lo posiciona justo sobre la línea imaginaria de separación */
  left: 50%;
  transform: translateX(-50%);
  color: #e0e0e0;
  font-size: 0.8rem;
  background-color: var(--white); /* Para que se vea sobre la línea de borde */
  padding: 0 10px; /* Crea un espacio en la línea de borde */
}

/* La galería ahora va después */
.post-gallery {
  display: grid;
  gap: 5px; /* Espacio entre las imágenes */
  order: 2;
}

.post-gallery a {
  display: block;
  overflow: hidden;
  position: relative;
  border-radius: var(--border-radius);
}

.post-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Las imágenes cubren el espacio sin deformarse */
  display: block;
  transition: transform 0.3s ease;
}

.post-gallery a:hover img {
  transform: scale(1.05);
}

/* --- Diseños Inteligentes para la Galería --- */

/* --- DESPUÉS (EL CÓDIGO CORREGIDO Y MEJORADO) --- */

/* CASO 1: Si solo hay UNA imagen */
.gallery-items-1 {
  grid-template-columns: 1fr;
}
.gallery-items-1 a {
  aspect-ratio: 16 / 9;
}

/* CASO 2 O MÁS: La primera imagen es la protagonista */
/* Usamos un selector de atributo que funciona para CUALQUIER número mayor a 1 */
[class*="gallery-items-"]:not(.gallery-items-1) {
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 150px; /* Altura de las miniaturas */
}

/* Regla clave: La PRIMERA imagen se expande */
[class*="gallery-items-"]:not(.gallery-items-1) a:first-child {
  grid-column: span 2; /* Ocupa el ancho de 2 columnas */
  grid-row: span 2; /* Ocupa el alto de 2 filas */
}

/* Opcional: Si hay 5 o más fotos, se activa el contador */
/* Ocultamos la 5ta foto y las siguientes de la cuadrícula */
[class*="gallery-items-"]:not(.gallery-items-1):not(.gallery-items-2):not(
    .gallery-items-3
  ):not(.gallery-items-4)
  a:nth-child(n + 5) {
  display: none;
}

/* Mostramos el contador en la 4ta foto si hay 5 o más */
[class*="gallery-items-"]:not(.gallery-items-1):not(.gallery-items-2):not(
    .gallery-items-3
  ):not(.gallery-items-4)
  a:nth-child(4)::after {
  content: attr(data-more-count);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: var(--border-radius);
}

/* ================================================= */
/* Estilo de Títulos con Colores Rotativos          */
/* ================================================= */

/* 1. Estilo base para todos los títulos de publicación */
.post-title {
  /* Mantenemos el tamaño, grosor y sombra que ya teníamos */
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15);

  /* Le damos una transición suave por si en el futuro añades efectos hover */
  transition: color 0.3s ease;
}

/* 2. Asignación de colores rotativos usando :nth-child */
/* Esto le dice al navegador: "busca la tarjeta de publicación número X y aplica este color a su título" */

/* Para la 1ra, 5ta, 9na... publicación (4n+1) */
.post-card:nth-child(4n + 1) .post-title {
  color: #007bff; /* Azul Institucional */
}

/* Para la 2da, 6ta, 10ma... publicación (4n+2) */
.post-card:nth-child(4n + 2) .post-title {
  color: #28a745; /* Verde Éxito */
}

/* Para la 3ra, 7ma, 11va... publicación (4n+3) */
.post-card:nth-child(4n + 3) .post-title {
  color: #fd7e14; /* Naranja Creativo */
}

/* Para la 4ta, 8va, 12va... publicación (4n+4) */
.post-card:nth-child(4n + 4) .post-title {
  color: #6f42c1; /* Violeta Innovador */
}
.post-content {
  padding: 25px;
}

.post-content p {
  font-size: 1.1rem; /* Ligeramente más grande para mejorar la lectura */
  line-height: 1.8;
  color: #4a4a4a; /* Un gris más oscuro y sofisticado */
  margin: 0;
  padding-left: 20px; /* Creamos un espacio a la izquierda */
  border-left: 3px solid rgba(13, 71, 161, 0.2); /* Borde decorativo con el color primario y transparencia */
}

.post-date {
  font-size: 0.8rem; /* Más pequeño */
  color: #b0b0b0; /* Un gris más claro */
  font-weight: normal; /* Sin negrita */
  text-transform: capitalize;
  margin-top: 5px; /* Pequeño espacio extra arriba */
}

/* ========= ESTILOS PARA LA PÁGINA DE CONTACTO ========= */

.contact-hero {
  padding: 20px 0;
  text-align: center;
}

.contact-section {
  padding: 40px 0;
  background-color: var(--background-light);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* La columna del form es más ancha */
  gap: 50px;
  background: var(--white);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.contact-info h3,
.contact-form-container h3 {
  margin-top: 0;
  font-size: 1.8rem;
  color: var(--primary-color);
}

.contact-info p,
.contact-form-container p {
  color: var(--text-color-light);
  margin-bottom: 30px;
}

.contact-info ul {
  list-style: none;
  padding: 0;
}

.contact-info li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
}

.contact-info .icon {
  font-size: 1.5rem;
  margin-right: 20px;
  color: var(--primary-color);
  margin-top: -5px;
}

.contact-info a,
.contact-info span {
  display: block;
  color: var(--text-color);
  text-decoration: none;
}
.contact-info a {
  color: var(--primary-color);
  font-weight: bold;
}

/* Formulario */
.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--text-color-light);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

.honeypot-field {
  display: none;
  visibility: hidden;
}

/* =================================================================
   ESTILO PARA EL BOTÓN PRINCIPAL DE LLAMADA A LA ACCIÓN (CTA)
   ================================================================= */
.cta-button {
  display: inline-block;
  background-color: var(--primary-color); /* Color de fondo azul */
  color: var(--white); /* Texto blanco */
  padding: 12px 28px; /* Espaciado interno */
  border-radius: var(--border-radius); /* Bordes redondeados */
  font-family: var(--font-heading); /* Misma fuente que los títulos */
  font-weight: 700; /* Texto en negrita */
  text-decoration: none; /* Sin subrayado (para enlaces) */
  border: none; /* Sin borde */
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-button:hover {
  background-color: var(
    --secondary-color
  ); /* Color de acento al pasar el mouse */
  color: var(--text-color); /* Texto oscuro al pasar el mouse */
}

/* Mensajes de estado del formulario */
.status-message {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  text-align: center;
}
.status-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.status-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Responsividad para la página de contacto */
@media (max-width: 900px) {
  .contact-wrapper {
    grid-template-columns: 1fr; /* Una sola columna en pantallas más pequeñas */
  }
}

/* =================================================================
   ESTILO PARA EL BOTÓN DE GOOGLE MAPS EN LA PÁGINA DE CONTACTO
   ================================================================= */
.map-button {
  display: inline-block;
  margin-top: 10px; /* Espacio entre la dirección y el botón */
  padding: 8px 15px;
  background-color: #80acf3; /* Color oficial de Google */
  color: white;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9em;
  transition: background-color 0.3s ease;
}

.map-button:hover {
  background-color: #3367d6; /* Un tono más oscuro para el hover */
}

/* ========= ESTILOS PARA LA PÁGINA DE DESCARGAS (VISOR PDF) ========= */

.pdf-viewer-container {
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  overflow: hidden; /* Asegura que el embed no se salga del contenedor redondeado */
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.pdf-viewer-container embed {
  display: block; /* Elimina espacios extra */
}

.download-button-container {
  text-align: center;
}

.download-button-container .cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ========= ESTILOS PARA PÁGINAS INTERNAS ========= */
.page-header {
  background-color: var(--background-light);
  padding: 20px 0;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.2rem;
  color: var(--text-color-light);
  margin: 0;
}

.page-content {
  /* Esta línea es la que añade el espacio que buscas */
  padding: 20px 0;
}

.page-content p {
  margin-bottom: 1.5rem;
}

/* ========= ESTILOS PARA LA PÁGINA DE REGLAMENTO ========= */

.rules-container {
  display: grid;
  /* Crea 3 columnas en escritorio, que se adaptan a menos en pantallas más pequeñas */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px; /* Espacio entre las tarjetas */
}

.rule-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  text-align: center;
  border-top: 4px solid var(--primary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rule-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.rule-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.rule-title {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.rule-description {
  color: var(--text-color-light);
  margin-bottom: 25px;
  min-height: 100px; /* Altura mínima para alinear botones si el texto varía */
}

.rule-download-button {
  width: 100%;
}

/* ========= ESTILOS PARA EL AVISO DE "EN CONSTRUCCIÓN" ========= */

.construction-notice {
  background-color: #fff3cd; /* Un amarillo suave de advertencia */
  color: #856404;
  padding: 15px 20px;
  border: 1px solid #ffeeba;
  border-radius: var(--border-radius);
  text-align: center;
  margin-bottom: 40px;
  /* Aplicamos la animación */
  animation: fadeInOut 7s ease-in-out forwards;
}

/* Animación para aparecer y desaparecer */
@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
  }
}

/* Estilo para los botones deshabilitados */
.disabled-button {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed; /* Muestra un cursor de "no permitido" */
  pointer-events: none; /* Desactiva los clics */
  opacity: 0.7;
}

.disabled-button:hover {
  background-color: #cccccc; /* Evita que cambie de color al pasar el mouse */
  color: #666666;
}

/* ========= ESTILOS PARA LA PÁGINA DE ORGANIGRAMA ========= */

.organigram-container {
  background: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  /* Centramos el contenedor si la pantalla es muy ancha */
  max-width: 1200px;
  margin: 0 auto;
}

.organigram-container img {
  /* Hacemos la imagen SVG completamente responsiva */
  display: block;
  width: 100%;
  height: auto;
}

/* ========= ESTILOS PARA PÁGINAS DE NIVELES EDUCATIVOS ========= */

.level-layout {
  display: grid;
  grid-template-columns: 2fr 1fr; /* El texto ocupa el doble que la imagen */
  gap: 50px;
  align-items: flex-start;
}

.level-text-content h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.level-text-content h3 {
  font-size: 1.8rem;
  margin-top: 40px;
  margin-bottom: 20px;
}

.features-list {
  list-style: none;
  padding: 0;
}

.features-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.feature-icon {
  font-size: 2rem;
  margin-right: 20px;
  margin-top: -5px;
}

.features-list strong {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-color);
}

.features-list p {
  margin-top: 5px;
  color: var(--text-color-light);
}

.level-image-content figure {
  margin: 0;
  position: sticky;
  top: 120px; /* Se queda fijo al hacer scroll */
}

.level-image-content img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  display: block;
}

.level-image-content figcaption {
  text-align: center;
  font-size: 0.9em;
  color: var(--text-color-light);
  margin-top: 15px;
}

/* Responsividad para las páginas de niveles */
@media (max-width: 900px) {
  .level-layout {
    grid-template-columns: 1fr; /* Una sola columna en móvil */
  }
  .level-image-content {
    /* La imagen pasa al principio en móvil */
    grid-row: 1;
    margin-bottom: 40px;
  }
  .level-image-content figure {
    position: static; /* Quitamos el efecto sticky */
  }
}

/* ========= ESTILOS PARA LA PÁGINA DE BIENVENIDA ========= */

.welcome-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr; /* El texto es un poco más ancho que la imagen */
  gap: 50px;
  align-items: center;
}

.welcome-text h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.welcome-text .welcome-intro {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-color-light);
  margin-bottom: 1.5rem;
}

.director-signature {
  margin-top: 40px;
  text-align: right;
  font-size: 1.1rem;
  color: var(--text-color);
}

.director-signature p {
  margin-bottom: 5px;
}

.welcome-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  display: block;
}

/* Responsividad para la página de bienvenida */
@media (max-width: 900px) {
  .welcome-layout {
    grid-template-columns: 1fr; /* Una sola columna en móvil */
  }
  .welcome-image {
    grid-row: 1; /* La imagen pasa al principio en móvil */
    margin-bottom: 40px;
  }
}

/* ========= ESTILOS PARA LA PÁGINA DE HISTORIA (TIMELINE CON IMÁGENES) ========= */

.intro-text {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px auto;
}

.intro-text h2 {
  margin-bottom: 1rem;
}

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

/* La línea vertical central */
.timeline::after {
  content: "";
  position: absolute;
  width: 3px;
  background-color: #e0e0e0;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1.5px;
}

.timeline-item {
  padding: 10px 0;
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 100%;
  clear: both;
}

/* --- Contenedores de texto e imagen --- */
.timeline-content,
.timeline-image-container {
  width: calc(50% - 40px); /* 50% del ancho menos un espacio */
}

/* --- Posicionamiento Alternado --- */
/* Hito Impar: Texto a la izquierda, Imagen a la derecha */
.timeline-item:nth-child(odd) {
  flex-direction: row;
}
/* Hito Par: Imagen a la izquierda, Texto a la derecha */
.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

/* --- Estilos de los elementos --- */
.timeline-content {
  background-color: var(--background-light);
  border-radius: var(--border-radius);
  padding: 25px;
}
.timeline-content h3 {
  margin-top: 0;
}
.timeline-image-container img {
  width: 100%;
  height: 250px; /* Le damos una altura fija a todas las imágenes */
  object-fit: cover; /* La imagen cubre el espacio sin deformarse */
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  display: block;
}

/* --- El punto y la fecha en el centro --- */
.timeline-dot-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  text-align: center;
}
.timeline-dot {
  width: 15px;
  height: 15px;
  background-color: var(--white);
  border: 3px solid var(--primary-color);
  border-radius: 50%;
  margin: 0 auto 10px auto;
}
.timeline-date {
  font-family: var(--font-heading);
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--primary-color);
  background: var(--white);
  padding: 5px 10px;
}

/* --- Responsividad --- */
@media (max-width: 768px) {
  .timeline::after {
    left: 20px; /* Mueve la línea vertical al borde izquierdo */
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    flex-direction: column; /* Apila los elementos verticalmente */
    width: 100%;
    padding-left: 50px; /* Crea el espacio necesario a la izquierda para la línea y el punto */
    padding-right: 15px;
  }

  /* Hacemos que los hijos (texto e imagen) ocupen el 100% del espacio disponible */
  .timeline-content,
  .timeline-image-container {
    width: 100%;
    margin-left: 0; /* Eliminamos el margen que causaba el desbordamiento */
  }

  /* Para una lectura consistente, la imagen siempre irá primero en móvil */
  .timeline-item .timeline-image-container {
    order: 1;
    margin-bottom: 15px; /* Espacio entre la imagen y el texto */
  }

  /* El texto siempre irá después */
  .timeline-item .timeline-content {
    order: 2;
  }

  .timeline-dot-container {
    left: 20px; /* Alineamos el punto y la fecha con la nueva línea vertical */
    top: 0;
    transform: translateX(-50%);
  }
}

/* ========= ESTILOS PARA LA PÁGINA DE COMPROMISO ========= */

.commitment-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.commitment-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 35px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-bottom: 4px solid var(--secondary-color); /* Acento de color */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.commitment-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.commitment-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 20px;
}

.commitment-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.commitment-card p {
  color: var(--text-color-light);
  font-size: 1rem;
  line-height: 1.7;
}

/* ========= ESTILOS PARA LA PÁGINA DE UBICACIÓN ========= */

.map-container {
  border-radius: var(--border-radius);
  overflow: hidden; /* Importante para que el iframe respete el borde redondeado */
  box-shadow: var(--shadow-md);
  line-height: 0; /* Elimina un espacio fantasma debajo del iframe */
}

.address-details {
  padding: 40px;
  margin-top: -50px; /* Sube la tarjeta para que se solape un poco con el mapa */
  position: relative;
  z-index: 10;
  background: var(--white);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.address-details h3 {
  margin-top: 0;
}

.address-text {
  font-size: 1.1rem;
  color: var(--text-color-light);
  margin-top: 15px;
  margin-bottom: 30px;
}

.address-text .icon {
  margin-right: 5px;
}

.map-open-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ========= ESTILOS PARA LA PÁGINA DE MISIÓN Y VISIÓN ========= */

.mission-vision-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 80px;
}

.mission-block,
.vision-block {
  padding: 30px;
  border-radius: var(--border-radius);
}

.mission-block {
  background-color: rgba(13, 71, 161, 0.05); /* Color primario muy suave */
  border-left: 5px solid var(--primary-color);
}

.vision-block {
  background-color: rgba(255, 171, 0, 0.05); /* Color secundario muy suave */
  border-left: 5px solid var(--secondary-color);
}

.mv-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.mission-block h2,
.vision-block h2 {
  font-size: 1.8rem;
}

.values-section {
  text-align: center;
  margin-bottom: 80px;
}

.values-section h2 {
  margin-bottom: 40px;
}

.values-grid {
  display: grid;
  /* FORZAMOS 5 COLUMNAS de igual ancho (1fr) */
  grid-template-columns: repeat(5, 1fr);
  gap: 25px;
  text-align: left;
}

.value-card {
  background: var(--white);
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.value-card h3 {
  font-size: 1.3rem;
  margin-top: 0;
  margin-bottom: 10px;
}

.value-card p {
  color: var(--text-color-light);
  margin-bottom: 0;
}

.closing-statement {
  background-color: var(--background-light);
  border-radius: var(--border-radius);
  padding: 40px;
  text-align: center;
}

.closing-statement h3 {
  margin-top: 0;
}

/* Responsividad */
@media (max-width: 768px) {
  .mission-vision-container {
    grid-template-columns: 1fr; /* Una columna en móvil */
  }
}

/* ========= ESTILOS PARA LA PÁGINA DE LOGOTIPO ========= */

.logo-main-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
  align-items: center;
  margin-bottom: 80px;
}

.logo-image-main img {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  display: block;
}

.logo-explanation h2 {
  margin-top: 0;
}

.logo-explanation ul {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.logo-explanation li {
  padding-left: 25px;
  position: relative;
  margin-bottom: 15px;
}

.logo-explanation li::before {
  content: "✔";
  color: var(--primary-color);
  position: absolute;
  left: 0;
}

.logo-variations-section {
  text-align: center;
}

.logo-variations-section h2 {
  margin-bottom: 1rem;
}

.logo-variations-section > p {
  max-width: 700px;
  margin: 0 auto 40px auto;
  color: var(--text-color-light);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.logo-card {
  background: var(--background-light);
  border-radius: var(--border-radius);
  padding: 30px 20px;
}

.logo-card img {
  max-height: 80px;
  width: auto;
  margin-bottom: 20px;
}

.logo-card h3 {
  margin-bottom: 10px;
}

.logo-card p {
  color: var(--text-color-light);
  font-size: 0.95rem;
  margin: 0;
}

/* Responsividad */
@media (max-width: 768px) {
  .logo-main-section {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .logo-explanation ul {
    text-align: left;
  }
}

/* ========= PULIDO DE ESTILOS PARA LA PÁGINA DE LOGOTIPO ========= */

/* Hacer los logos clickables más evidentes */
.logo-image-main a,
.logo-card a {
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.logo-image-main a:hover,
.logo-card a:hover {
  transform: scale(1.05);
}

/* Colores específicos para los títulos de cada nivel */
.logo-card .preescolar-color {
  color: #de2283; /* Rosa de Preescolar */
}

.logo-card .primaria-color {
  color: #98c34e; /* Verde de Primaria */
}

.logo-card .secundaria-color {
  color: #e77e34; /* Naranja de Secundaria */
}

/* =================================================================
   FIX UNIVERSAL Y REFORZADO PARA FANCYBOX EN MÓVILES
   ================================================================= */

/* --- REGLAS PARA FANCYBOX v4 y v5 (Moderno) --- */
/* Estas reglas aseguran que la imagen nunca se desborde de la pantalla */
.fancybox__slide .fancybox__image {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important; /* Muestra la imagen completa sin cortar */
}

/* --- REGLAS PARA FANCYBOX v3 (Antiguo) --- */
/* Hacen exactamente lo mismo, pero para las clases de la versión anterior */
.fancybox-slide .fancybox-image {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
/* ========= ESTILOS PARA EL PORTAL DE APLICACIONES ========= */

.apps-grid-container {
  display: grid;
  /* Crea columnas flexibles que se adaptan al espacio disponible */
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.app-card {
  display: block; /* Para que toda la tarjeta sea un enlace */
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  border-left: 4px solid var(--primary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.app-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 20px;
}

.app-title {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.app-description {
  color: var(--text-color-light);
  font-size: 1rem;
  line-height: 1.6;
}

.app-card-placeholder {
  background: var(--background-light);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  border: 2px dashed #e0e0e0;
  color: #b0b0b0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .fancybox__container,
  .fancybox__slide,
  .fancybox-slide {
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: block !important;
    text-align: center !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    overflow: hidden !important;
  }

  .fancybox__slide img,
  .fancybox-slide img {
    display: inline-block !important;
    margin: auto !important;
  }

  .fancybox__image,
  .fancybox-image {
    max-width: 100vw !important;
    max-height: 100vh !important;
    min-height: 50vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .fancybox__content {
    margin: 0 !important;
    padding: 0 !important;
  }

  .fancybox__nav {
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .fancybox__button--arrow_prev,
  .fancybox__button--arrow_next {
    width: 48px !important;
    height: 48px !important;
  }

  .fancybox__caption {
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
    padding: 8px 12px !important;
  }
}

/* ========= ESTILOS PARA EL BOTÓN DE ME GUSTA ========= */

.post-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  border-top: 1px solid #eee; /* Separador sutil */
  background-color: var(--background-light);
}

.likes-count {
  font-weight: bold;
  color: var(--text-color-light);
  font-size: 0.9rem;
}

.like-button {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 8px 15px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.like-button:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.like-button.liked,
.like-button:disabled {
  background-color: #e0e0e0;
  color: #666;
  border-color: #e0e0e0;
  cursor: not-allowed;
  /* Animación sutil de pulso al dar like */
  animation: pulse 0.5s ease-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* =================================================================
   ESTILOS PARA EL WIDGET DE REDES SOCIALES (sidebar-card)
   ================================================================= */

.social-media-card h3 {
  /* Usamos el color de acento para darle un toque vibrante */
  border-bottom-color: var(--secondary-color);
}

.social-media-card p {
  color: var(--text-color-light);
  margin-bottom: 25px;
}

.social-links-grid {
  display: grid;
  /* Crea tres columnas iguales */
  grid-template-columns: repeat(3, 1fr);
  gap: 15px; /* Espacio entre los botones */
}

/* Estilo base para cada enlace social */
.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 5px;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.2;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.social-link:hover {
  transform: translateY(-3px); /* Efecto de elevación */
  box-shadow: var(--shadow-md);
}

.social-link i {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

/* Colores de Marca */
.facebook-color {
  background-color: #3b5998; /* Azul de Facebook */
}

.instagram-color {
  /* Gradiente para Instagram */
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%,
    #fdf497 5%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
}

.tiktok-color {
  /* Negro o un gris oscuro para TikTok, para que el ícono (si es blanco) resalte */
  background-color: #333;
}

/* Manejo de responsividad para el grid de enlaces */
@media (max-width: 900px) {
  /* En móviles, la columna lateral se expande. Hacemos los botones más grandes */
  .social-links-grid {
    gap: 20px;
  }
}

@media (max-width: 480px) {
  /* Si la pantalla es muy pequeña, los apilamos para que se vean mejor */
  .social-links-grid {
    grid-template-columns: 1fr;
  }
}

/* =======================================================
   ESTILOS ESPECÍFICOS PARA EL MÓDULO DE BOLETAS (Personalizado)
   ======================================================= */

/* Colores de referencia */
:root {
  --color-principal: #173f6f; /* Color oscuro/azul institucional */
  --color-alumnos: #007bff;
  --color-materias: #28a745;
  --color-calificaciones: #ffc107;
  --color-boletas: #dc3545;
}

.contenedor-apps {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.titulo-apps {
  color: var(--color-principal);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.subtitulo-apps {
  font-size: 1.1rem;
  color: #6c757d;
  margin-bottom: 3rem;
}

/* Estructura de Grid para las Tarjetas */
.grid-apps {
  display: grid;
  /* 4 columnas en desktop, se ajustará automáticamente por el media query */
  grid-template-columns: repeat(4, 1fr);
  gap: 30px; /* Espacio entre las tarjetas */
}

/* Estilo de la Tarjeta (Link) */
.card-app {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  border: 3px solid #ccc;
  border-radius: 12px;
  background-color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.card-app:hover {
  transform: translateY(-8px); /* Efecto de levantamiento */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); /* Sombra más fuerte */
}

/* Iconos */
.icono-app {
  margin-bottom: 20px;
}

/* Títulos y Contenido */
.card-titulo {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-principal);
}

.card-descripcion {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Colores para cada módulo */
.card-alumnos {
  border-color: var(--color-alumnos);
}
.card-alumnos .icono-app {
  color: var(--color-alumnos);
}

.card-materias {
  border-color: var(--color-materias);
}
.card-materias .icono-app {
  color: var(--color-materias);
}

.card-calificaciones {
  border-color: var(--color-calificaciones);
}
.card-calificaciones .icono-app {
  color: var(--color-calificaciones);
}

.card-boletas {
  border-color: var(--color-boletas);
}
.card-boletas .icono-app {
  color: var(--color-boletas);
}

/* MEDIA QUERIES para responsividad */
@media (max-width: 992px) {
  .grid-apps {
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
  }
}

@media (max-width: 576px) {
  .grid-apps {
    grid-template-columns: 1fr; /* 1 columna en móviles */
  }
  .titulo-apps {
    font-size: 2rem;
  }
}

/* Estilos para el Bloque de Botones de Acción (alumnos.php) */
.actions-block {
  display: flex;
  gap: 10px; /* Espacio entre los botones */
  padding: 15px 0;
  border-bottom: 1px solid #ddd;
}

.actions-block .btn {
  text-transform: uppercase;
  font-weight: 600;
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.actions-block .btn i {
  margin-right: 5px;
}

/* Estilos para el Formulario de Filtros */
.filter-form .row {
  align-items: flex-end; /* Asegura que todos los elementos se alineen al final */
}

.filter-form .form-label {
  font-weight: 600;
  color: #343a40;
}

.filter-form .form-select,
.filter-form .btn {
  border-radius: 6px;
}

/* Estilos de la Tabla (Mejora visual) */
.table-responsive {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden; /* Para que el borde redondeado se vea bien */
  margin-top: 20px;
}

.table thead th {
  background-color: #173f6f; /* Usa tu color principal */
  color: white;
  font-weight: 700;
  border-bottom: none;
}

.table tbody tr:hover {
  background-color: #f0f8ff;
}

/* =======================================================
   ESTILOS ESPECÍFICOS PARA GESTIÓN DE ALUMNOS (alumnos.php)
   ======================================================= */

/* Estilo para el botón principal de Agregar Alumno */
.btn-principal-add {
  display: inline-block;
  background-color: #28a745; /* Verde */
  color: white;
  padding: 10px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-principal-add:hover {
  background-color: #218838;
  transform: translateY(-2px);
  color: white; /* Asegurar que el color del texto no cambie en hover */
}

/* Estilos para el formulario de filtro (botones de acción) */
.btn-accion-filtro {
  background-color: #007bff;
  color: white;
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn-accion-filtro:hover {
  background-color: #0056b3;
  color: white;
}

.btn-accion-descarga {
  background-color: #6c757d;
  color: white;
  padding: 8px 15px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn-accion-descarga:hover {
  background-color: #5a6268;
  color: white;
}

/* =======================================================
   FORMATO DE TABLA (Centrada y Presentable)
   ======================================================= */

.table-responsive {
  /* Asegura que el contenedor se centre en la página */
  margin: 0 auto;
  max-width: 100%;
}

.tabla-gestion-alumnos {
  width: 100%;
  border-collapse: separate; /* Permite border-radius en las celdas */
  border-spacing: 0;
  margin-top: 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Sombra ligera para el borde */
  border-radius: 8px;
  overflow: hidden; /* Oculta el overflow para mantener el border-radius */
}

.tabla-gestion-alumnos thead th {
  background-color: #173f6f; /* Color principal de CEPI */
  color: white;
  padding: 12px 15px;
  text-align: left;
  font-weight: 700;
  border: none;
}

.tabla-gestion-alumnos tbody td {
  padding: 10px 15px;
  border-bottom: 1px solid #f1f1f1;
  text-align: left;
}

/* Rayado de la tabla para legibilidad */
.tabla-gestion-alumnos tbody tr:nth-child(even) {
  background-color: #f8f9fa; /* Color más claro para filas pares */
}

.tabla-gestion-alumnos tbody tr:hover {
  background-color: #e9ecef; /* Resaltar fila al pasar el mouse */
}

/* Centrar contenido de ciertas columnas */
.tabla-gestion-alumnos td:nth-child(1), /* ID */
.tabla-gestion-alumnos td:nth-child(3), /* Grado */
.tabla-gestion-alumnos td:nth-child(4) {
  /* Grupo */
  text-align: center;
}

/* Columna de Acciones y centrado */
.acciones-columna {
  text-align: center !important;
  width: 120px; /* Ancho fijo para las acciones */
}

/* Estilos para los botones de la tabla */
.btn-tabla-editar,
.btn-tabla-eliminar {
  display: inline-block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  border-radius: 5px;
  text-align: center;
  margin: 0 3px;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.btn-tabla-editar {
  background-color: #007bff; /* Azul/Info */
  color: white;
}

.btn-tabla-editar:hover {
  background-color: #0056b3;
  opacity: 0.9;
}

.btn-tabla-eliminar {
  background-color: #dc3545; /* Rojo/Peligro */
  color: white;
}

.btn-tabla-eliminar:hover {
  background-color: #c82333;
  opacity: 0.9;
}
/* =======================================================
   ESTILOS DE FORMULARIO
   ======================================================= */

/* Contenedor del Formulario */
.form-container-custom {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border-top: 5px solid #173f6f; /* Color institucional */
}

/* Estilo para etiquetas y campos */
.form-label {
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}

.form-control,
.form-select {
  border-radius: 5px;
  border: 1px solid #ced4da;
  padding: 8px 12px;
  transition: border-color 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  outline: none;
}

/* Estilos de los mensajes (Alertas) */
.alert {
  padding: 15px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid transparent;
}

.alert-success-custom {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.alert-danger-custom {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

/* Reutilizar botones ya definidos */
.btn-principal-add i,
.btn-accion-descarga i {
  margin-right: 5px;
}

.btn-secundario-descarga {
  background-color: #ffc107; /* Amarillo/Naranja */
  color: #343a40; /* Texto oscuro */
  padding: 8px 15px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn-secundario-descarga:hover {
  background-color: #e0a800;
  color: #343a40;
}

/* =======================================================
   ESTILOS DE INDICADORES (Badges para Tipo de Materia)
   ======================================================= */

.badge-custom {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.5rem;
}

.badge-oficial {
  color: #fff;
  background-color: #007bff; /* Azul primario para oficial */
}

.badge-complementaria {
  color: #212529;
  background-color: #ffc107; /* Amarillo/Naranja para complementaria */
}
/* Estilos para la lista de checkboxes de asignación masiva */
.asignacion-masiva-scroll {
  max-height: 400px; /* Altura máxima fija */
  overflow-y: auto; /* Permite scroll vertical */
  border: 1px solid #dee2e6;
  padding: 15px;
  border-radius: 8px;
  background-color: #f8f9fa;
}

.form-check-label {
  font-weight: normal; /* No negrita para las etiquetas */
}

/* Estilos para el Widget de Cumpleaños */
.birthday-card {
  background: linear-gradient(to bottom right, #ffffff, #fff0f3);
  border-top: 5px solid #ff4757; /* Rojo festivo */
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 30px;
}

.birthday-card h3 {
  color: #ff4757;
  font-size: 1.2rem;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 700;
}

.birthday-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px; /* Si hay muchos, hacemos scroll */
  overflow-y: auto;
}

/* Barra de scroll bonita y delgada */
.birthday-list::-webkit-scrollbar {
  width: 6px;
}
.birthday-list::-webkit-scrollbar-thumb {
  background-color: #ffcccb;
  border-radius: 10px;
}

.birthday-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed #ffcccb;
  transition: transform 0.2s ease;
}

.birthday-item:hover {
  transform: translateX(5px);
  background-color: rgba(255, 255, 255, 0.5);
}

.birthday-item:last-child {
  border-bottom: none;
}

.bday-date {
  background-color: #ff4757;
  color: white;
  font-weight: bold;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  margin-right: 12px;
  flex-shrink: 0; /* Evita que el círculo se aplaste */
  box-shadow: 0 2px 4px rgba(255, 71, 87, 0.3);
}

.bday-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.student-name {
  font-weight: 700;
  color: #2f3542;
  font-size: 0.95rem;
}

.student-grade {
  font-size: 0.75rem;
  color: #747d8c;
  text-transform: uppercase;
}

.bday-icon {
  font-size: 1.2rem;
  animation: floatBalloon 3s ease-in-out infinite;
}

.no-birthdays {
  text-align: center;
  color: #747d8c;
  font-style: italic;
  padding: 10px;
}

@keyframes floatBalloon {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Estilos para el Widget Moderno de Cumpleaños */

/* La tarjeta principal con efecto Glassmorphism */
.sidebar-card.birthday-card.modern-glass {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.sidebar-card.birthday-card.modern-glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* Cabecera con gradiente */
.card-header-animated {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); /* Gradiente azul-morado moderno */
    padding: 15px;
    color: white;
    text-align: center;
}

.card-header-animated h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Lista con scroll suave personalizado */
.birthday-list.modern-scroll {
    max-height: 350px; /* Altura máxima */
    overflow-y: auto;
    padding: 10px;
    margin: 0;
    list-style: none;
}

/* Scrollbar bonita (Webkit) */
.birthday-list.modern-scroll::-webkit-scrollbar {
    width: 6px;
}
.birthday-list.modern-scroll::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
.birthday-list.modern-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 10px;
}

/* Ítems de la lista */
.bday-item-modern {
    display: flex;
    align-items: center;
    background: #fff;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.bday-item-modern:hover {
    background: #f8f9fa;
    border-color: #d1e7dd;
    transform: scale(1.02);
}

/* Distinción visual para profes */
.bday-item-modern.item-profe {
    background: #eef2ff; /* Fondo azul muy claro */
    border-left: 4px solid #2575fc;
}

.bday-item-modern.item-alumno {
    border-left: 4px solid #ff9a9e; /* Borde rosa/naranja suave */
}

/* La fecha (Badge circular) */
.date-badge {
    background: #f0f0f0;
    min-width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    color: #555;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.item-profe .date-badge {
    background: #2575fc;
    color: white;
}

/* Textos */
.details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.details .name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
}

.item-profe .details .name {
    color: #1a237e; /* Azul oscuro para profes */
}

.details .grade {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Icono flotante a la derecha */
.icon-float {
    font-size: 1.2rem;
    opacity: 0.7;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bday-item-modern:hover .icon-float {
    transform: rotate(20deg) scale(1.2);
    opacity: 1;
}

.no-birthdays-modern {
    text-align: center;
    padding: 20px;
    color: #777;
    font-style: italic;
}

/* Contenedor Principal: Blanco, Sombra Suave, Muy Redondo */
.sidebar-card.birthday-card-clean {
    background: #ffffff;
    border-radius: 24px; /* Esquinas muy redondeadas estilo iOS */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08); /* Sombra difusa y elegante */
    border: none; /* Sin bordes duros */
    overflow: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin-bottom: 30px;
}

/* Encabezado: Limpio, sin colores fuertes */
.card-header-clean {
    padding: 25px 20px 15px 20px;
    text-align: center;
    background: #fff;
    border-bottom: 1px solid #f0f0f0; /* Separador sutil */
}

.card-header-clean h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.card-header-clean .subtitle {
    margin: 5px 0 0 0;
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Lista Scrollable */
.birthday-list-clean {
    max-height: 380px; /* Altura fija */
    overflow-y: auto;  /* Scroll vertical */
    padding: 10px 15px;
    margin: 0;
    list-style: none;
    background: #fafafa; /* Fondo muy gris claro para diferenciar */
}

/* Estilización del Scrollbar (Fino y discreto) */
.birthday-list-clean::-webkit-scrollbar {
    width: 5px;
}
.birthday-list-clean::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 10px;
}

/* Ítems de la lista */
.bday-item-clean {
    display: flex;
    align-items: center;
    background: #fff;
    margin-bottom: 12px;
    padding: 12px 15px;
    border-radius: 16px; /* Redondeado individual */
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

/* Efecto Hover */
.bday-item-clean:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.06);
}

/* Círculo de Fecha */
.date-circle {
    background: #f3f4f6;
    color: #555;
    width: 40px;
    height: 40px;
    border-radius: 12px; /* Cuadrado redondeado (Squircle) */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    margin-right: 15px;
    flex-shrink: 0;
}

/* Info Textos */
.info-block {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.info-block .name {
    color: #2d3748;
    font-weight: 700;
    font-size: 0.95rem;
}

.info-block .meta {
    color: #a0aec0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Icono flotante */
.floating-icon {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* --- ESTILOS ESPECIALES --- */

/* 1. Profesores (Sutil toque azul) */
.bday-item-clean.item-profe {
    background: #f0f7ff; /* Azul muy pálido */
}
.bday-item-clean.item-profe .date-circle {
    background: #007bff;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,123,255,0.3);
}
.bday-item-clean.item-profe .name {
    color: #0056b3;
}

/* 2. CUMPLEAÑERO DE HOY (Resaltado especial) */
.bday-item-clean.item-today {
    border: 2px solid #ffcc00; /* Borde dorado */
    background: #fffbeb;
}
.bday-item-clean.item-today .date-circle {
    background: #ffcc00;
    color: #fff;
    animation: pulse 2s infinite;
}

/* Animación sutil para el día actual */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.empty-state {
    padding: 20px;
    text-align: center;
    color: #aaa;
    font-style: italic;
}