/* ==========================================================================
   SISTEMA DE ADMISIONES - COLEGIO JUAN BERNARDONE
   Hoja de Estilos Unificada (styles.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES DE DISEÑO & CONFIGURACIÓN GLOBAL
   -------------------------------------------------------------------------- */
:root {
  /* Paleta de Colores Corporativa */
  --primary-color: #0d47a1;       /* Azul Marino Principal */
  --primary-hover: #0a3c8a;       
  --secondary-color: #1565c0;     /* Azul de Acento */
  --secondary-hover: #0f4c92;
  --accent-color: #ffb300;        /* Dorado/Amarillo Escolar */
  --accent-hover: #e09d00;
  --text-dark: #1e293b;           /* Slate 800 - Texto Principal */
  --text-light: #64748b;          /* Slate 500 - Texto Secundario/Subtítulos */
  --bg-light: #f8fafc;            /* Fondo de página grisáceo fresco */
  --bg-white: #ffffff;            /* Fondos de contenedores/tarjetas */
  --border-color: #e2e8f0;        /* Slate 200 - Bordes sutiles */
  --success-color: #10b981;       /* Verde para confirmaciones/éxito */
  
  /* Gradientes */
  --bg-gradient: linear-gradient(135deg, #0d47a1, #1e88e5);
  --text-gradient: linear-gradient(135deg, #0d47a1, #1565c0);
  
  /* Sombras y Bordes */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 25px -5px rgba(13, 71, 161, 0.08), 0 8px 10px -6px rgba(13, 71, 161, 0.05);
  --shadow-lg: 0 20px 35px -10px rgba(13, 71, 161, 0.12), 0 12px 15px -8px rgba(13, 71, 161, 0.08);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 30px;
}

/* Reset Estándar */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.25;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* --------------------------------------------------------------------------
   2. BOTONES & COMPONENTES REUTILIZABLES
   -------------------------------------------------------------------------- */
.btn-primary {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--text-dark);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(255, 179, 0, 0.2);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(255, 179, 0, 0.3);
}

.btn-secondary {
  display: inline-block;
  background-color: var(--primary-color);
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(13, 71, 161, 0.2);
}

.btn-secondary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(13, 71, 161, 0.3);
}

.badge {
  display: inline-block;
  background-color: rgba(255, 179, 0, 0.15);
  color: #b7791f;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.text-gradient {
  background: var(--bg-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem auto;
  padding: 0 1rem;
}

.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   3. ENCABEZADO (HEADER) & PIE DE PÁGINA (FOOTER) UNIFICADOS
   -------------------------------------------------------------------------- */
.header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 1rem 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 55px;
  width: auto;
  object-fit: contain;
}

.footer {
  background-color: #0f172a; /* Slate 900 */
  color: #94a3b8;            /* Slate 400 */
  padding: 4rem 0 3rem 0;
  margin-top: 5rem;
  border-top: 5px solid var(--accent-color);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
}

.logo-footer {
  height: 60px;
  width: auto;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1); /* Pone el logo blanco si tiene fondo oscuro */
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-contact h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-family: 'Poppins', sans-serif;
}

.footer-contact p {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .footer-contact p {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   4. MODAL DE BIENVENIDA (ANUNCIO DE ENTRADA)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.75); /* Fondo oscuro semitransparente */
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background-color: var(--bg-white);
  width: 90%;
  max-width: 780px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(15, 23, 42, 0.1);
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background-color: rgba(15, 23, 42, 0.2);
}

.modal-content {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
}

.modal-img {
  background: var(--bg-gradient);
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.modal-img img {
  width: 105%;
  height: 105%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.3s;
}

.modal-text {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-badge {
  align-self: flex-start;
  background-color: rgba(13, 71, 161, 0.1);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.modal-text h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.modal-text p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1.8rem;
}

@media (max-width: 680px) {
  .modal-content {
    grid-template-columns: 1fr;
  }
  .modal-img {
    display: none; /* Se oculta la imagen en móviles para evitar colapso visual */
  }
  .modal-text {
    padding: 2rem;
  }
}

/* --------------------------------------------------------------------------
   5. LANDING PAGE - HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
  padding: 5rem 0;
  background-color: var(--bg-white);
  position: relative;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.hero-img {
  position: relative;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: visible; /* Permite el desborde sutil del decorador */
}

.hero-img img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
  z-index: 2;
  position: relative;
}

.img-backdrop {
  position: absolute;
  top: 15px;
  left: -15px;
  width: 100%;
  height: 100%;
  background-color: var(--accent-color);
  border-radius: var(--radius-md);
  z-index: 1;
}

.hero-text {
  padding-left: 1rem;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 1.25rem;
}

.hero-text p {
  color: var(--text-light);
  font-size: 1.15rem;
  margin-bottom: 2rem;
  max-width: 550px;
}

@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    text-align: center;
  }
  .hero-text {
    padding-left: 0;
    order: 1;
  }
  .hero-img {
    max-width: 500px;
    margin: 0 auto;
    order: 2;
  }
  .hero-text p {
    margin: 0 auto 2rem auto;
  }
}

/* --------------------------------------------------------------------------
   6. LANDING PAGE - PASOS DEL PROCESO (GRID / TIMELINE)
   -------------------------------------------------------------------------- */
.steps-section {
  padding: 6rem 0;
}

.steps-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step-card {
  background-color: var(--bg-white);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  position: relative;
  transition: all 0.3s ease;
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.step-number {
  font-family: 'Poppins', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: rgba(13, 71, 161, 0.1);
  position: absolute;
  top: 15px;
  right: 25px;
  line-height: 1;
}

.step-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 10px;
}

.step-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.step-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

@media (max-width: 992px) {
  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
  }
}

/* --------------------------------------------------------------------------
   7. LANDING PAGE - VIDEO INSTITUCIONAL
   -------------------------------------------------------------------------- */
.video-section {
  padding: 6rem 0;
  background-color: var(--bg-white);
}

.video-container-wrapper {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.video-responsive {
  position: relative;
  padding-bottom: 56.25%; /* Relación 16:9 */
  height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid #ffffff;
}

.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --------------------------------------------------------------------------
   8. PREGUNTAS FRECUENTES (FAQ - ACORDEÓN NATIVO)
   -------------------------------------------------------------------------- */
.faq-section {
  padding: 6rem 0;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.faq-item {
  background-color: var(--bg-white);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item[open] {
  box-shadow: var(--shadow-md);
  border-color: rgba(13, 71, 161, 0.2);
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  color: var(--primary-color);
  cursor: pointer;
  list-style: none; /* Oculta flecha por defecto */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none; /* Oculta flecha Safari */
}

/* Icono personalizado de acordeón */
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent-color);
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-item p, 
.faq-item .faq-schedule {
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--text-light);
  font-size: 0.95rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
}

.faq-schedule p {
  padding: 0.25rem 0;
  border-top: none;
}

/* --------------------------------------------------------------------------
   9. FORMULARIO DE INSCRIPCIÓN (INSCRIPCION.HTML)
   -------------------------------------------------------------------------- */
.header-inscripcion {
  background: var(--bg-gradient);
  color: #ffffff;
  text-align: center;
  padding: 4rem 1rem;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.header-inscripcion h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.4rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.header-inscripcion p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
}

.contenedor-form {
  max-width: 850px;
  margin: -3rem auto 5rem auto;
  padding: 0 1.5rem;
}

.bienvenida-box {
  background: var(--bg-white);
  padding: 2.2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 2.5rem;
  border-left: 6px solid var(--accent-color);
}

.bienvenida-box h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.bienvenida-box p {
  color: var(--text-light);
  font-size: 1rem;
}

.formulario-card {
  background: var(--bg-white);
  padding: 3rem 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.form-seccion {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.form-seccion-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 2px solid #cbd5e1; /* Gris de foco limpio */
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-dark);
  background-color: var(--bg-white);
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.12);
}

/* Diseño de Grid Multicolumna para formularios */
.row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .row-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Campos Condicionales de Apertura */
.condicional-container {
  display: none; /* Controlado dinámicamente por JS */
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--secondary-color);
  margin: 1.25rem 0;
  animation: slideInDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Caja de carga de Archivos y Cuentas */
.file-box {
  background: #f8fafc;
  border: 2px dashed #94a3b8;
  padding: 1.5rem;
  text-align: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s;
}

.file-box:hover {
  background-color: #f1f5f9;
}

.cuenta-info {
  background: #fffbeb; /* Fondo ámbar sutil */
  border: 1px solid #fde68a;
  color: #78350f;
  padding: 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.6;
}

.btn-enviar {
  background: var(--bg-gradient);
  color: #ffffff;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 1.1rem 2.5rem;
  width: 100%;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(13, 71, 161, 0.2);
}

.btn-enviar:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(13, 71, 161, 0.35);
}

/* Doble Trampa Anti-Spam de Alta Seguridad */
.honey-wrapper {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   10. PANTALLA DE ACCESO / LOGIN (PORTAL DE FAMILIAS)
   -------------------------------------------------------------------------- */
.login-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-light);
}

.login-contenedor {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 1.5rem;
  flex: 1;
}

.login-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 450px;
  padding: 3rem 2.5rem;
  border-top: 6px solid var(--primary-color);
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-header h2 {
  font-size: 1.8rem;
  margin-top: 1rem;
}

.login-header p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.login-card .form-group {
  margin-bottom: 1.5rem;
}

.login-card label {
  font-weight: 600;
}
/* Ocultar por defecto los contenedores condicionales */
.condicional-container {
  display: none;
  margin-top: 1rem;
}

/* Clase para mostrar los contenedores condicionales */
.condicional-container.visible {
  display: block;
}

/* Efecto visual de exención para Jardín */
#seccion_academicos.exento {
  opacity: 0.4;
  pointer-events: none;
}