/* ==========================================================================
   1. VARIABLES GLOBALES (Mapeo de Identidad ISTEPSA)
   ========================================================================== */
:root {
    --primary: #FE0000;              /* Rojo Institucional ISTEPSA */
    --secondary: #F2F1F8;            /* Gris de Secciones con Matiz Azulado */
    --dark: #120F2D;                 /* Azul Noche Ultra Oscuro */
    --light: #FFFFFF;
    --color-brand-orange: #FF6600;   /* Naranja para Acentos Visuales */
    
    /* Animaciones y Tipografía */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --font-family-sans-serif: "Poppins", sans-serif;
}

/* ==========================================================================
   2. REGLAS BASE DEL DOCUMENTO
   ========================================================================== */
body {
    font-family: var(--font-family-sans-serif);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #6C6A74; 
    background-color: #F8F9FA; 
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Enlaces y Transiciones Globales */
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--dark);
}

/* Utilidades Semánticas */
.tracking-wider {
    letter-spacing: 2px;
}

.fw-black {
    font-weight: 900 !important; 
}

.divider-line {
    width: 60px;
    height: 4px;
    background-color: var(--color-brand-orange);
    border-radius: 2px;
    margin-top: 15px;
}

.bg-light-custom {
    background-color: var(--secondary); 
}

/* Mapeo de Clases Personalizadas para Reemplazar Bootstrap */
.text-primary-custom {
    color: var(--dark) !important;
}

.text-secondary-custom {
    color: var(--color-brand-orange) !important;
}

.bg-primary-custom {
    background-color: var(--dark) !important; 
}

.text-light-muted {
    color: #E2E8F0 !important;
}

/* ==========================================================================
   3. COMPONENTES: BOTONES (UI/UX)
   ========================================================================== */
/* Botón Principal (Landing / Héroe) */
.btn-primary-custom {
    background-color: var(--primary); 
    color: var(--light);
    font-weight: 600;
    padding: 14px 36px;
    border-radius: 8px; 
    border: none;
    box-shadow: 0 4px 6px rgba(254, 0, 0, 0.15);
    transition: var(--transition-smooth);
}

.btn-primary-custom:hover {
    background-color: #C50000;
    color: var(--light);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(254, 0, 0, 0.3);
}

/* Botón de Acción del Nav (Header) */
.btn-secondary-custom.btn-nav-action {
    background-color: var(--color-brand-orange) !important;
    color: var(--light) !important;
    border: none;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.btn-secondary-custom.btn-nav-action:hover {
    background-color: #E05500 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

/* ==========================================================================
   4. SECCIÓN 1 & 2: SLIDER PRINCIPAL Y VIDEO HERO
   ========================================================================== */
.carousel-img {
    height: 75vh;
    object-fit: cover;
    filter: brightness(0.55);
}

.caption-content {
    z-index: 2;
    max-width: 850px;
}

.carousel-item.active .caption-content h1 {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Video de Fondo */
.video-seccion {
    position: relative;
    width: 100%;
    height: 100vh; /* Cambiado a pantalla completa al entrar */
    overflow: hidden;
    background-color: #000;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(18, 15, 45, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}

/* ==========================================================================
   5. SECCIÓN 3: TARJETAS DE CARRERAS (UI/UX)
   ========================================================================== */
.card-carrera {
    height: 480px; /* Incrementado verticalmente para hacerlas más largas */
    background-color: var(--dark);
    position: relative;
    overflow: hidden;
}

.card-carrera img {
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.card-carrera:hover .image-zoom {
    transform: scale(1.08);
    filter: blur(0px) brightness(0.5);
}

.carrera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 15, 45, 0.65);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Empuja el contenido hacia la base de la tarjeta larga */
    padding: 24px;
}

.card-carrera:hover .carrera-overlay {
    background: rgba(18, 15, 45, 0.85);
}

/* ==========================================================================
   6. SECCIÓN 4: FORMULARIO DE INSCRIPCIÓN Y REGISTRO
   ========================================================================== */
.registration-section {
    background: linear-gradient(135deg, rgba(18, 15, 45, 0.94) 0%, rgba(18, 15, 45, 0.97) 100%), 
                url('../img/carrusel/carousel-1.jpg') no-repeat center center / cover;
    background-attachment: fixed;
}

/* Forzado de contorno limpio para el contenedor del formulario */
.form-card-box {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
}

/* Inputs Personalizados Modernos */
.form-control-custom, .form-select-custom {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--dark);
    background-color: var(--light);
    border: 2px solid transparent;
    border-radius: 8px; 
    transition: var(--transition-smooth);
}

.form-control-custom:focus, .form-select-custom:focus {
    color: var(--dark);
    background-color: var(--light);
    border-color: var(--color-brand-orange); 
    outline: 0;
    box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.15); 
}

/* Botón Interno del Formulario */
.btn-dark-custom {
    background-color: var(--color-brand-orange);
    color: var(--light);
    border: none;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.btn-dark-custom:hover {
    background-color: #E05500;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 102, 0, 0.25);
}

.reconstruction-benefits span {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ==========================================================================
   7. SECCIÓN 5 & 6: CARACTERÍSTICAS Y CONTADORES
   ========================================================================== */
.feature-icon-box {
    background-color: rgba(254, 0, 0, 0.08); 
    padding: 10px 14px;
    border-radius: 6px;
}

/* Arquitectura Limpia para Contadores (Sin Estilos Inline) */
.counter-section {
    position: relative;
    background: url('../img/counters-bg.jpg') no-repeat center center / cover !important;
    overflow: hidden;
}

.counter-overlay-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    opacity: 0.82;
    z-index: 1;
}

.custom-index-z {
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   8. SECCIÓN 7 & INFRAESTRUCTURA: TESTIMONIOS Y INTERACTIVOS
   ========================================================================== */
.avatar-img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border: 3px solid var(--light);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.quote-icon-fix {
    bottom: 10px;
    right: 20px;
    color: var(--color-brand-orange) !important;
    opacity: 0.12 !important;
    font-size: 5rem;
    pointer-events: none;
}

/* Transiciones interactivas para el Footer */
.transition-link {
    color: #A0AEC0 !important;
    transition: var(--transition-smooth);
}

.transition-link:hover {
    color: var(--color-brand-orange) !important;
    padding-left: 4px; /* Sutil efecto UI de desplazamiento */
}

/* Nav Link Activo */
.active-nav-link {
    border-bottom: 2px solid var(--color-brand-orange);
}

/* ==========================================================================
   9. COMPONENTES FIJOS (Flotante de WhatsApp)
   ========================================================================== */
.btn-whatsapp-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: var(--light) !important;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: var(--transition-smooth);
}

.btn-whatsapp-floating:hover {
    background-color: #128C7E;
    transform: scale(1.1) rotate(8deg);
}

/* ==========================================================================
   10. MEDIA QUERIES (Optimización Responsiva)
   ========================================================================== */
@media (max-width: 991px) {
    .carousel-img {
        height: 55vh;
    }
    .active-nav-link {
        border-bottom: none;
        color: var(--color-brand-orange) !important;
    }
}

@media (max-width: 768px) {
    .carousel-item .caption-content h1 {
        font-size: 1.9rem !important;
    }
    .card-carrera {
        height: 230px;
    }
}

@media (max-width: 576px) {
    .btn-whatsapp-floating {
        width: 52px;
        height: 52px;
        font-size: 26px;
        bottom: 20px;
        right: 20px;
    }
}


/* ==========================================================================
   RETOQUES DE PULIDA UI/UX (Mantiene Limpieza Arquitectónica)
   ========================================================================== */

/* 1. Pulida del Texto ">>> ¿POR QUÉ": Más Dinámico (Naranja Oficial) */
.text-secondary-custom {
    color: var(--color-brand-orange) !important;
    letter-spacing: 1px;
    font-weight: 700;
}

/* 2. Rediseño Senior del Formulario Naranja (Captura Original 2) */
.form-card-box {
    border-radius: 8px; /* Bordes suaves modernos */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important; /* Sombras que le dan profundidad */
}

/* Forzamos Inputs Blancos para legibilidad sobre el naranja */
.form-control-custom, .form-select-custom {
    background-color: var(--color-white) !important;
    color: var(--color-dark) !important;
    border: 2px solid #E2E8F0;
    transition: var(--transition-senior);
}

.form-control-custom:focus, .form-select-custom:focus {
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 0 4px rgba(10, 9, 35, 0.1);
}

/* Botón Interno del Formulario: Pulido con Sombra */
.btn-dark-custom {
    background-color: var(--color-primary-dark); /* Botón azul noche */
    color: var(--color-white);
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition-senior);
}

.btn-dark-custom:hover {
    box-shadow: 0 5px 15px rgba(10, 9, 35, 0.3);
    transform: translateY(-1px);
}

/* 3. Modernización de las Tarjetas de Carreras */
.card-carrera {
    transition: var(--transition-senior);
}

/* Efecto de máscara interactiva Senior */
.card-carrera:hover .carrera-overlay {
    background: linear-gradient(180deg, rgba(10, 9, 35, 0) 0%, rgba(10, 9, 35, 0.8) 100%);
}

/* 4. Alineación Mosaico del Bloque "Estudiar en ISTEPSA" (Captura 3) */
/* Este ajuste asegura que las imágenes a la izquierda se alineen en mosaico Moderno con Bootstrap 5 */
.img-stack-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Espaciado juguetón pero ordenado */
}

.img-stack-grid img {
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* 5. Pulida de la Barra de Contadores (Captura 4) */
.counter-section {
    background: linear-gradient(90deg, #3A5199 0%, #4A69BD 100%); /* Degradado exacto */
    position: relative;
    z-index: 2;
}

.text-light-muted {
    color: #E2E8F0;
}