/* =========================================
   VARIABLES Y GLOBALES
   ========================================= */
:root {
    --azul-marino: #0E234C;
    --azul-brillante: #1A53FF;
    --gris-fondo: #F8F9FA;
    --blanco: #FFFFFF;
}

body {
    background-color: var(--gris-fondo);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Clase general para justificar textos en cualquier parte del proyecto */
.text-justify {
    text-align: justify !important;
}

/* =========================================
   LOGIN
   ========================================= */
.btn-login {
    background-color: var(--azul-marino);
    color: white;
    border: none;
    padding: 12px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-login:hover {
    background-color: var(--azul-brillante);
    color: white;
    transform: translateY(-2px);
}

.card-login {
    border: none;
    border-radius: 15px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.1);
}

/* =========================================
   EFECTOS Y DINÁMICAS (Figma Prompts)
   ========================================= */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(14, 35, 76, 0.15) !important;
}

.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--azul-marino); 
    padding: 120px 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(14,35,76,0.9) 0%, rgba(14,35,76,0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.btn-leer-mas {
    background-color: var(--azul-brillante);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-leer-mas:hover {
    background-color: var(--azul-marino);
    color: white;
    transform: translateX(5px);
}

/* =========================================
   ANIMACIONES DEL CARRUSEL Y BOTONES
   ========================================= */
.carousel-inner {
    overflow: hidden;
}

.carousel-item img {
    transition: transform 0.8s ease-in-out;
}

.carousel:hover .carousel-item img {
    transform: scale(1.03); 
}

.carousel-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(14,35,76,0.9) 0%, rgba(14,35,76,0.2) 100%);
    z-index: 1;
}

.carousel-caption-custom {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 8%; 
    right: 15%;
    z-index: 2;
    text-align: left;
}

.btn-hero {
    transition: all 0.3s ease;
}

.btn-hero:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.3) !important;
}

.flecha-carrusel {
    background-color: rgba(14, 35, 76, 0.6);
    padding: 1.5rem;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.flecha-carrusel:hover {
    background-color: rgba(26, 83, 255, 0.9);
}

/* =========================================
   HEADER / NAVBAR 
   ========================================= */
.navbar-nav .nav-item {
    margin: 0 1rem; 
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
    padding-top: 0.5rem !important;
    padding-bottom: 0.3rem !important; 
    padding-left: 0 !important;
    padding-right: 0 !important;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
}

.navbar-nav .nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0; 
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
}

/* =========================================
   FOOTER 
   ========================================= */
footer a, 
.footer-link,
footer .bi {
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none !important;
    transition: color 0.3s;
}

footer a:hover, 
.footer-link:hover {
    color: #ffffff !important;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.social-icon:hover {
    border-color: #ffffff;
    color: var(--azul-marino) !important;
    background-color: #ffffff;
}

/* =========================================
   ESTILOS: HISTORIA (TIMELINE)
   ========================================= */
.bg-historia {
    background-color: var(--azul-marino);
    padding: 4rem 0;
    color: white;
}

.timeline-container {
    position: relative;
    padding: 3rem 0;
    max-width: 1100px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--azul-marino);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 5rem;
}

.timeline-circle {
    position: absolute;
    left: 50%;
    top: 50%; 
    width: 26px;
    height: 26px;
    background-color: var(--azul-marino);
    border: 5px solid #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.timeline-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

/* Aseguramos la justificación en todos los párrafos dentro de las tarjetas */
.timeline-card p {
    color: #6c757d; 
    line-height: 1.7;
    margin-bottom: 0;
    text-align: justify; 
}

.date-badge {
    background-color: var(--azul-brillante);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(26, 83, 255, 0.3);
}

.img-wrapper {
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    cursor: pointer;
}

.timeline-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.img-wrapper:hover .timeline-img {
    transform: scale(1.08);
}

@media (max-width: 767px) {
    .timeline-line { left: 30px; }
    .timeline-circle { left: 30px; top: 30%; }
    .timeline-col { width: 100%; padding-left: 60px !important; padding-right: 15px !important; margin-bottom: 1.5rem; }
}
/* =========================================
   TARJETAS CLICABLES Y ETIQUETAS (AVISOS)
   ========================================= */
.card-clickable-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.card-clickable-link:hover .card-title {
    color: var(--azul-brillante) !important;
}

/* Colores de etiquetas (Badges) idénticos al Mockup */
.badge-academico {
    background-color: #eff6ff !important;
    color: #3b82f6 !important;
    border: 1px solid #bfdbfe;
}

.badge-importante {
    background-color: #fef2f2 !important;
    color: #ef4444 !important;
    border: 1px solid #fecaca;
}

.badge-deportes {
    background-color: #f5f3ff !important;
    color: #a855f7 !important;
    border: 1px solid #e9d5ff;
}

.badge-default {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    border: 1px solid #dee2e6;
}

/* Efecto para que el botón de volver atrás se vea bonito al pasar el ratón */
.btn-volver {
    color: var(--azul-marino);
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-volver:hover {
    color: var(--azul-brillante);
    transform: translateX(-5px); /* Se mueve un poquito a la izquierda */
}
/* =========================================
   AJUSTES PIXEL PERFECT (AVISOS)
   ========================================= */
/* Quita el borde redondeado inferior para que la imagen se fusione perfecto con la tarjeta blanca */
.img-top-rounded {
    border-radius: 16px 16px 0 0 !important;
}

/* Efecto para que la etiqueta se sienta como un botón clicable */
.badge-clickable {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.badge-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}
/* =========================================
   ESTILOS: TRÁMITES ESCOLARES
   ========================================= */

/* Recuadros principales blancos */
.tramite-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
    margin-bottom: 2rem;
}

/* Lista de requisitos interactiva */
.req-item {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #495057;
}
.req-item:hover {
    background-color: #f8f9fa;
    color: var(--azul-brillante) !important;
    transform: translateX(5px); /* Pequeño salto a la derecha */
}
.req-icon {
    color: #10b981; /* Verde del check */
    font-size: 1.2rem;
    margin-right: 1rem;
}

/* Cuadritos de los Pasos (Proceso) */
.paso-box {
    background-color: #94adc6;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
}
.paso-box:hover {
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    transform: translateY(-5px);
}
.paso-num {
    background-color: var(--azul-marino);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 0.8rem;
}

/* Caja de Nota Importante (Naranja) */
.nota-box {
    background-color: #fffbf1;
    border-left: 5px solid #f59e0b;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}
.nota-titulo {
    color: #b45309;
    font-weight: bold;
    transition: color 0.3s ease;
}
/* Caja de Nota Importante (Naranja) */
.nota-box {
    background-color: #fffbf1;
    border-left: 5px solid #f59e0b;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02); /* Sombra base sutil */
}
.nota-titulo {
    color: #b45309;
    font-weight: bold;
    transition: color 0.3s ease;
}
/* Animación y elevación al pasar el ratón */
.nota-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(245, 158, 11, 0.15);
}
.nota-box:hover .nota-titulo {
    color: #dc3545 !important; 
}

/* Efecto especial para el Doble Clic en las fotos de ejemplos */
.img-zoom-interactivo {
    transition: transform 0.15s ease-out; /* Transición súper rápida para que siga al ratón */
    cursor: zoom-in;
}
.img-zoom-interactivo.is-zoomed {
    cursor: zoom-out;
}

/* Caja de Calificaciones (Azul oscura) */
.calificaciones-box {
    background-color: var(--azul-marino);
    color: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 3rem;
}
.calificaciones-box:hover {
    box-shadow: 0 15px 35px rgba(14, 35, 76, 0.3);
    transform: translateY(-5px);
}
.btn-calificaciones {
    background-color: white;
    color: var(--azul-marino);
    font-weight: bold;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}
.btn-calificaciones:hover {
    background-color: #f1f5f9;
    color: var(--azul-brillante);
    transform: scale(1.05);
}
/* =========================================
   ESTILOS: NOSOTROS (FILOSOFÍA E INSTALACIONES)
   ========================================= */
.hero-nosotros {
    background: linear-gradient(rgba(14, 35, 76, 0.85), rgba(14, 35, 76, 0.85)), url('../img/aula.jpg') center/cover no-repeat;
    padding: 100px 0; 
    color: white; 
    text-align: center;
}

/* Cajas de Filosofía con Sombras y Animaciones */
.card-filosofia {
    border: none; 
    border-radius: 16px; 
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    height: 100%;
}
.card-filosofia:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.08); 
}

/* Iconos de Misión, Visión, etc. */
.box-icon {
    width: 48px; 
    height: 48px; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    border-radius: 12px; 
    font-size: 1.5rem; 
    margin-bottom: 1.2rem;
    transition: transform 0.3s ease;
}
.card-filosofia:hover .box-icon {
    transform: scale(1.1); /* El icono crece al pasar el ratón */
}

/* Colores de los Mockups */
.box-mision { background-color: #2563eb; color: #ffffff; }
.box-vision { background-color: #7c3aed; color: #ffffff; }
.box-valores { background-color: #f472b6; color: #ffffff; } /* Rosa */
.box-compromiso { background-color: #4f46e5; color: #ffffff; } /* Índigo */

/* Texto justificado para las tarjetas */
.filosofia-desc {
    color: #6c757d; 
    line-height: 1.7;
    margin-bottom: 0;
    text-align: justify;
}

/* Contenedor de Instalaciones */
.card-instalacion { 
    border: none; 
    background: transparent; 
    cursor: pointer; 
    transition: transform 0.3s ease;
}
.img-zoom-container { 
    overflow: hidden; 
    border-radius: 16px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}
.img-zoom-container img { 
    transition: transform 0.5s ease; 
    height: 220px; 
    width: 100%; 
    object-fit: cover; 
}
.card-instalacion:hover .img-zoom-container {
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}
.card-instalacion:hover .img-zoom-container img { 
    transform: scale(1.08); 
}
/* =========================================
   ESTILOS: INDEX (INICIO) - PIXEL PERFECT
   ========================================= */

/* Burbuja "Haz clic para leer más" (Oculta por defecto) */
.burbuja-leer {
    position: absolute;
    top: 30px;
    right: 40px;
    background-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* La burbuja aparece al pasar el ratón por todo el banner */
.carousel-item-link:hover .burbuja-leer {
    opacity: 1;
    transform: translateY(0);
}

/* Botón "Llenar Ficha Médica" - Cambio de color */
.btn-hero {
    transition: all 0.4s ease;
    background-color: white !important;
    color: var(--azul-marino) !important;
}
.btn-hero:hover {
    background-color: var(--azul-brillante) !important;
    color: white !important;
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 15px 30px rgba(26, 83, 255, 0.4) !important;
}

/* Botón "Leer Artículo Completo" con difuminado (Solo Index) */
.btn-leer-index {
    display: block;
    background-image: linear-gradient(45deg, var(--azul-brillante) 0%, var(--azul-marino) 100%);
    background-size: 200% auto;
    color: white !important;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.4s ease;
    box-shadow: 0 4px 10px rgba(26, 83, 255, 0.2);
}
.card-clickable-link:hover .btn-leer-index {
    background-position: right center; /* Anima el difuminado hacia el otro color */
    box-shadow: 0 8px 20px rgba(14, 35, 76, 0.4);
    transform: translateY(-2px);
}

/* Flechas elegantes del carrusel */
.flecha-carrusel {
    background-color: white !important;
    color: var(--azul-marino) !important;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    opacity: 0.9;
}
.carousel-control-prev-icon, .carousel-control-next-icon {
    background-image: none !important; /* Quitamos el icono feo por defecto */
}
.flecha-carrusel::before {
    content: "\F284"; /* Icono de Bootstrap (chevron-left) */
    font-family: "bootstrap-icons";
    font-size: 1.5rem;
    font-weight: bold;
}
.carousel-control-next .flecha-carrusel::before {
    content: "\F285"; /* chevron-right */
}
.carousel-control-prev:hover .flecha-carrusel,
.carousel-control-next:hover .flecha-carrusel {
    background-color: var(--azul-brillante) !important;
    color: white !important;
    transform: scale(1.15);
}
/* =========================================
   ESTILOS: FICHA MÉDICA
   ========================================= */
.upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 2.5rem;
    text-align: center;
    background-color: #ffffff;
    color: #64748b;
    transition: all 0.3s ease;
    cursor: pointer;
}
.upload-box:hover {
    border-color: var(--azul-brillante);
    background-color: #f8fafc;
}

.info-box-medica {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    margin-top: 1rem;
}
.info-box-medica i {
    font-size: 1.2rem;
    margin-right: 0.8rem;
    color: #3b82f6;
}
/* =========================================
   ESTILOS: VISTA PREVIA FOTOGRAFÍA (FICHA MÉDICA)
   ========================================= */
.preview-container {
    display: none; /* Oculto hasta que suban una foto */
    border: 1px solid #0E234C; /* Borde azul marino */
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    background-color: #f8fafc;
    position: relative;
}

.preview-img {
    width: 130px;
    height: 150px;
    object-fit: cover; /* Para que la foto no se aplaste, se recorta bonito */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.btn-remove-foto {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ef4444; /* Rojo brillante */
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
    transition: all 0.2s ease;
}

.btn-remove-foto:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}