

/* RESET & VARIABLES */

:root {
    --primary: #002147;
    --secondary: #ffcc00;
    --bg: #f4f4f9;
    --bg-dark: #011c34;
    --text: #222;
    --text-light: #fff;
    --radius: 8px;
    --transition: 0.3s ease;
  }
  * { margin:0; padding:0; box-sizing:border-box; }
  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f2f7fc;
    color: #222;
    padding: 0;
    margin: 0;
  }
  
  /* HEADER */
  .site-header {
    background:var(--primary);
    color:var(--text-light);
    padding:1rem 2rem;
    display:flex; flex-wrap:wrap;
    align-items:center; justify-content:space-between;
    position:relative;
  }
  .logo-area { display:flex; align-items:center; }
  .logo { height:60px; margin-right:1rem; animation:logoAppear 1s ease; }
  @keyframes logoAppear { from{opacity:0;transform:scale(0.5);} to{opacity:1;transform:scale(1);} }
  .site-title { font-size:1.8rem; text-shadow:1px 1px 4px #000; }
  .header-info p { font-size:0.9rem; }
  
  /* NAV */
  .main-nav { display:flex; align-items:center; gap:0.10rem; }
  .main-nav a,
  .map-toggle {
    color:var(--text-light);
    background:transparent; border:none;
    padding:0.5rem 1rem; border-radius:var(--radius);
    cursor:pointer; transition:background var(--transition),transform var(--transition);
  }
  .main-nav a:hover,
  .map-toggle:hover {
    background:var(--secondary);
    color:var(--primary);
    transform:scale(1.05);
  }
  
  /* MINIMAPA */
  .mini-map {
    position:absolute; top:100%; right:2rem;
    width:260px; height:180px;
    background:#fff; border:2px solid var(--primary);
    border-radius:var(--radius);
    box-shadow:0 4px 12px rgba(0,0,0,0.2);
    overflow:hidden; z-index:100;
  }
  .mini-map.hidden { display:none; }
  .mini-map iframe { width:100%; height:100%; }
  .close-mini {
    position:absolute; top:5px; right:5px;
    background:rgba(0,0,0,0.5); color:#fff;
    border:none; border-radius:50%; width:24px; height:24px;
    cursor:pointer; font-size:0.9rem;
  }
  
  /* HERO */
  .hero {
    background:linear-gradient(rgba(0,0,0,0.4),rgba(0,0,0,0.4)),url("portada.jpg") center/cover no-repeat;
    text-align:center; padding:6rem 2rem; color:var(--text-light);
    height: 60vh; /* Altura que deseas */
    overflow: hidden; /* Para evitar que el carrusel salga del contenedor */
  }
  .spinner-large {
    width:80px; height:80px;
    border:8px solid rgba(255,255,255,0.4);
    border-top:8px solid var(--secondary);
    border-radius:50%; animation:spin 1.5s linear infinite;
    margin:0 auto 1.5rem;
  }
  @keyframes spin { to{transform:rotate(360deg);} }
  .hero-title { font-size:2.5rem; margin-bottom:1rem; animation:fadeIn 2s; }
  .hero-subtitle { font-size:1.2rem; animation:fadeIn 3s; }
  @keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
  
  /* SECCIONES */
  section { position:relative; padding:4rem 2rem; }
  .section-nosotros h2,
  .section-oferta h2,
  .section-formulario h2,
  .section-frase h2,
  #contacto h3 {
    font-size:2rem; color:var(--primary); margin-bottom:1rem;
    transition:color var(--transition);
  }
  section h2:hover { color:var(--secondary); }
  
  /* NOSOTROS */
  .valores-list {
    display:flex; flex-wrap:wrap; justify-content:center; gap:1rem;
  }
  .valores-list li {
    background:#fff; padding:1rem 2rem; border-radius:var(--radius);
    box-shadow:0 4px 6px rgba(0,0,0,0.1);
    transition:transform var(--transition),box-shadow var(--transition);
  }
  .valores-list li:hover {
    transform:translateY(-5px); box-shadow:0 8px 16px rgba(0,0,0,0.2);
  }
  .img-nosotros img {
    width:160px; margin:0.5rem; border-radius:var(--radius);
    transition:transform var(--transition),box-shadow var(--transition);
  }
  .img-nosotros img:hover {
    transform:rotate(-5deg) scale(1.1);
    box-shadow:0 8px 16px rgba(0,0,0,0.3);
  }
  
  /* OFERTA ACADÉMICA */
  .cards-container {
    display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:2rem;
  }
  .card {
    background:#fff; border-radius:var(--radius); overflow:hidden;
    box-shadow:0 4px 8px rgba(0,0,0,0.1);
    transition:transform var(--transition),box-shadow var(--transition);
  }
  .card:hover {
    transform:translateY(-8px); box-shadow:0 12px 24px rgba(0,0,0,0.2);
  }
  .card img { width:100%; display:block; }
  .card h3 {
    background:var(--primary); color:var(--text-light);
    padding:0.8rem; transition:background var(--transition);
  }
  .card h3:hover {
    background:var(--secondary); color:var(--primary);
  }
  .card p { padding:1rem; font-size:0.95rem; }
  
 
  
  /* PROMO */
  .section-frase {
    text-align:center; background:var(--primary); color:var(--text-light);
  }
  .spinner-small {
    width:40px; height:40px;
    border:5px solid rgba(255,255,255,0.4);
    border-top:5px solid var(--secondary);
    border-radius:50%; animation:spin 1s linear infinite;
    margin:0 auto 1rem;
  }
  .section-frase p { font-size:1rem; }
  
  
  /* --- ANIMACIÓN DE INICIO --- */
.intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeOut 1s ease-in-out 1s forwards;
}

.intro-logo {
  width: 180px;
  height: auto;
  margin-bottom: 20px;
  animation: zoomIn 1.5s ease;
}

.intro-title {
  font-size: 2em;
  font-weight: bold;
  color: #1a1a1a;
  animation: fadeInUp 2s ease;
}

/* Animaciones */
@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes zoomIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  0% {
    transform: translateY(40px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
/* Sección principal del hero */
.hero {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  color: white;
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Carrusel que contiene las imágenes */
.carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

/* Contenedor de las diapositivas */
.slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
  height: 100%;
}

/* Cada imagen individual del carrusel */
.slides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Fondo oscuro con difuminado detrás del texto */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2;
}

/* Texto encima del carrusel */
.hero-content {
  position: relative;
  z-index: 3;
  margin-bottom: 60px;
}

/* Títulos del carrusel */
.hero-content h1 {
  font-size: 3.5rem;
  margin: 0;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
}

/* Subtítulo u otro texto */
.hero-content p {
  font-size: 1.5rem;
  margin: 10px 0 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* RESPONSIVE: Para celulares */
@media (max-width: 768px) {
  .hero {
    height: 400px;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .hero {
    height: 300px;
  }

  .hero-content {
    margin-bottom: 30px;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 1rem;
  }
}

.map-toggle {
  background: var(--secondary);
  color: var(--primary);
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  font-weight: bold;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.map-toggle:hover {
  background: var(--primary);
  color: var(--text-light);
  transform: scale(1.05);
}
#contacto {
  background-color: #fff;
  padding: 3rem 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 2rem auto;
}

#contacto h3 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

#contacto form {
  display: grid;
  gap: 1rem;
}

#contacto input,
#contacto textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#contacto input:focus,
#contacto textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 6px rgba(255, 204, 0, 0.5);
  outline: none;
}

#contacto button {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 0.8rem;
  border: none;
  border-radius: var(--radius);
  font-weight: bold;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

#contacto button:hover {
  background-color: var(--secondary);
  color: var(--primary);
  transform: scale(1.05);
}
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icons a {
  color: var(--primary);
  font-size: 1.5rem;
  transition: color var(--transition), transform var(--transition);
}

.social-icons a:hover {
  color: var(--secondary);
  transform: scale(1.2);
}
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInSection 1s ease forwards;
}

@keyframes fadeInSection {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* SECCIÓN: Horarios */
.section-horarios {
  background-color: #e9eef6;
  padding: 40px 20px;
  text-align: center;
}

.section-horarios h2 {
  font-size: 2.2rem;
  color: #002147;
  margin-bottom: 25px;
  font-weight: bold;
}

.section-horarios table {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  border-collapse: collapse;
  background-color: #ffffff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.section-horarios th,
.section-horarios td {
  padding: 16px;
  border: 1px solid #ccc;
  font-size: 1rem;
  color: #333;
}


/* --- Carrusel profesional --- */
.admision-carousel {
  flex: 1;
  max-width: 500px;
  height: 320px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,0,0,0.15);
}

.carousel-images {
  display: flex;
  width: 400%;
  height: 100%;
  animation: slideCarousel 16s infinite;
}

.carousel-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Animación suave */
@keyframes slideCarousel {
  0%, 20% { transform: translateX(0%); }
  25%, 45% { transform: translateX(-100%); }
  50%, 70% { transform: translateX(-200%); }
  75%, 95% { transform: translateX(-300%); }
  100% { transform: translateX(0%); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .admision-container {
    flex-direction: column;
    align-items: center;
  }

  .admision-carousel {
    width: 100%;
    max-width: 90vw;
    height: 250px;
  }
}

/* SECCIÓN: Horarios */
.section-horarios {
  background-color: #e9eef6;
  padding: 40px 20px;
  text-align: center;
}

.section-horarios h2 {
  font-size: 2.2rem;
  color: #002147;
  margin-bottom: 25px;
  font-weight: bold;
}

.section-horarios table {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  border-collapse: collapse;
  background-color: #ffffff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s;
}

.section-horarios th,
.section-horarios td {
  padding: 16px;
  border: 1px solid #ccc;
  font-size: 1rem;
  color: #333;
  transition: background-color 0.3s ease;
}

.section-horarios tr:hover {
  background-color: #f0f8ff;
}

/* SECCIÓN: Atención a Padres */
.section-padres {
  background-color: #f4f7fb;
  padding: 40px 20px;
  text-align: center;
}

.section-padres h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: #002147;
  font-weight: bold;
}

.section-padres table {
  width: 90%;
  max-width: 700px;
  margin: 0 auto;
  border-collapse: collapse;
  background-color: #ffffff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.section-padres th,
.section-padres td {
  padding: 16px;
  border: 1px solid #ccc;
  font-size: 1rem;
  color: #333;
  transition: background-color 0.3s ease;
}

.section-padres tr:hover {
  background-color: #f0f8ff;
}

/* SECCIÓN: Noticias */
.section-noticias {
  background-color: #f9fafc;
  padding: 40px 20px;
  text-align: center;
}

.section-noticias h2 {
  font-size: 2.2rem;
  color: #002147;
  font-weight: bold;
}



/* SECCIÓN: Frase promocional */
.section-frase {
  background-color: #002147;
  padding: 40px 20px;
  text-align: center;
  color: #ffffff;
}

.section-frase h2 {
  font-size: 2.2rem;
  color: #ffc107;
}

.section-frase p {
  font-size: 1.1rem;
  color: #ffffff;
  margin-top: 10px;
}



/* Animaciones */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 0.8;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .footer-contacto,
  .mapa-container {
    max-width: 100%;
    flex: unset;
    height: 280px;
  }
}


/* ✨ Estilos Épicos para Tablas ✨ */
.section-horarios table,
.section-padres table {
  width: 90%;
  max-width: 900px;
  margin: 30px auto;
  border-collapse: separate;
  border-spacing: 0;
  background-color: #ffffff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.section-horarios table:hover,
.section-padres table:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.section-horarios th,
.section-padres th {
  background: linear-gradient(to right, #002147, #0056b3);
  color: #fff;
  padding: 16px;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
}

.section-horarios td,
.section-padres td {
  padding: 14px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 1rem;
  color: #333;
  transition: background 0.3s ease, color 0.3s ease;
}

.section-horarios tr:hover td,
.section-padres tr:hover td {
  background: linear-gradient(to right, #f0f8ff, #d1ecff);
  color: #002147;
  font-weight: bold;
  transform: scale(1.01);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

/* Borde superior redondeado */
.section-horarios th:first-child,
.section-padres th:first-child {
  border-top-left-radius: 15px;
}

.section-horarios th:last-child,
.section-padres th:last-child {
  border-top-right-radius: 15px;
}


.footer-contacto h3 {
  color: #000000; /* Título en negro */
  border-left: 4px solid #000000; /* Borde negro */
}

.footer-contacto strong {
  color: #000000; /* Texto fuerte en negro */
}

.footer-contacto p {
  background: rgba(255, 255, 255, 0.15); /* Fondo ligeramente claro para contraste */
  color: #000000; /* Texto negro */
}

.creditos {
  color: #333333; /* Texto gris oscuro para créditos */
}

/* Mantenemos los hover effects con el amarillo institucional */
.footer-contacto p:hover {
  background: var(--secondary);
  color: var(--primary);
}

.mapa-container {
  border: 2px solid #000000; /* Borde negro para el mapa */
}/* ESTILO PARA BOTÓN DE LOGIN */
.login-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.8rem;
    background: var(--primary);
    color: var(--text-light) !important;
    border-radius: var(--radius);
    text-decoration: none !important;
    font-weight: 600;
    transition: all var(--transition);
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.login-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left var(--transition);
}

.login-link:hover {
    background: var(--secondary);
    color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.login-link:hover::before {
    left: 100%;
}

.login-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-link svg { /* Si decides usar icono SVG en lugar del emoji */
    width: 20px;
    height: 20px;
    fill: currentColor;
}


/* Estructura principal con flexbox para asegurar el footer abajo */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

/* Contenedor principal para empujar el footer hacia abajo */
main {
  flex: 1;
}

/* Footer limpio y centrado */
.main-footer {
  background-color: #003366; /* Color azul oscuro */
  color: white;
  text-align: center;
  padding: 1em 0; /* No exageres con el padding */
  width: 100%;
  box-sizing: border-box;
  margin-top: auto; /* Empuja el footer al fondo si el contenido es corto */
  font-size: 0.95rem;
}


  
  /* Botón de ver más (opcional) */
  /* Sección de noticias */
.section-noticias {
  padding: 3rem 1rem;
  background-color: #f5f9ff;
  text-align: center;
}

.section-noticias h2 {
  font-size: 2rem;
  color: #003366;
  margin-bottom: 2rem;
}

/* Carrusel de noticias */
.noticias-container {
  display: flex;
  overflow-x: auto; /* Permite scroll horizontal */
  scroll-behavior: smooth;
  gap: 1rem;
  padding-bottom: 1rem;
  position: relative;
  max-width: 100%; /* Asegura que no desborde */
  width: 100%;
  white-space: nowrap; /* Evita que las tarjetas se rompan */
}

/* Estilo para el scroll horizontal */
.noticias-container::-webkit-scrollbar {
  height: 8px; /* Altura de la barra de scroll */
}
.noticias-container::-webkit-scrollbar-thumb {
  background-color: #ccc; /* Color del thumb del scroll */
  border-radius: 4px;
}
.noticias-container::-webkit-scrollbar-track {
  background-color: transparent; /* Fondo de la pista del scroll */
}

.noticia-item {
  min-width: 280px;
  max-width: 280px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.noticia-item:hover {
  transform: translateY(-5px);
}

.noticia-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.noticia-content {
  padding: 1rem;
}

.noticia-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Título de la noticia - sin subrayado y con hover amarillo */
.noticia-content h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  color: #003366;
  transition: color 0.3s ease;
}

/* Efecto hover: título en amarillo */
.noticia-content h3:hover {
  color: #ffc107; /* Amarillo suave */
}

/* Fecha de la noticia */
.noticia-content small {
  color: #777;
  font-size: 0.9rem;
}

.carousel-controls {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.carousel-controls button {
  background-color: #003366;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  margin: 0 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}

.carousel-controls button:hover {
  background-color: #00509e;
}



/* === PÁGINA INDIVIDUAL DE NOTICIA === */
.noticia-detalle {
  padding: 4rem 2rem;
  max-width: 800px;
  margin: auto;
}

.noticia-content {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  text-align: left;
}

.noticia-content h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.noticia-content small {
  display: block;
  color: #777;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.noticia-img-detalle {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  transition: transform 0.4s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.noticia-img-detalle:hover {
  transform: scale(1.02);
}

.noticia-content p {
  line-height: 1.7;
  color: #333;
}

.btn-volver {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
}

.btn-volver:hover {
  background: var(--secondary);
  color: var(--primary);
  transform: scale(1.02);
}