/* =========================================
   1. VARIABLES GLOBALES Y RESET
   ========================================= */
:root {
    --primary: #2563eb; /* Azul moderno */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --text-main: #1e293b;
    --text-light: #64748b;
    --cyan-accent: #22d3ee;
    --footer-bg: #0b1120;
}

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

body { 
    font-family: 'Maven Pro', sans-serif; 
    background-color: #f8fafc; 
    padding-top: 80px; /* Espacio para el header fijo */
    overflow-x: hidden; 
}

/* Utilidades de Sección */
.section-white { background-color: #ffffff; }
.section-gray { background-color: #f8fafc; }

.sub-title {
    color: var(--primary); font-size: 0.85rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 0.5rem;
}
.main-title {
    color: var(--text-main); font-weight: 800; font-size: 2.5rem; margin-bottom: 1rem;
}
.title-line { width: 60px; height: 4px; background: var(--cyan-accent); border-radius: 2px; }

/* =========================================
   2. ESTILOS DEL HEADER
   ========================================= */
.site-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 80px;
    background: white;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 4%; z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.logo img { height: 50px; width: auto; display: block; }

.nav-menu { display: flex; list-style: none; gap: 25px; }
.nav-menu a {
    text-decoration: none; color: var(--text-main); font-size: 15px; font-weight: 500;
    transition: color 0.2s; text-transform: capitalize;
}
.nav-menu a:hover { color: var(--primary); }

.social-area { display: flex; align-items: center; gap: 15px; }
.social-icon { color: var(--text-light); font-size: 18px; transition: all 0.2s; }
.social-icon:hover { transform: translateY(-2px); color: var(--primary); }

.btn-whatsapp {
    background: #25D366; color: white; padding: 8px 16px; border-radius: 20px;
    text-decoration: none; font-size: 14px; font-weight: 600;
    display: flex; align-items: center; gap: 6px; transition: 0.2s;
}
.btn-whatsapp:hover { background: #1ebc57; transform: scale(1.05); }

@media (max-width: 900px) {
    .nav-menu { display: none; }
    .logo img { height: 40px; }
}

/* =========================================
   3. WIDGET IA FLOTANTE
   ========================================= */
.ai-fab {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    background: white; border-radius: 50%;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 9999; border: 1px solid #e2e8f0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ai-fab:hover { transform: scale(1.1); }
.ai-fab i { font-size: 24px; background: linear-gradient(135deg, #3b82f6, #8b5cf6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.ai-window {
    position: fixed; bottom: 100px; right: 30px; width: 350px; height: 500px;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(16px);
    border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255,255,255,0.5);
    display: none; flex-direction: column; overflow: hidden; z-index: 9998;
}

.ai-header { padding: 16px; border-bottom: 1px solid #f1f5f9; font-weight: 600; display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.5); }
.ai-body { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.msg { padding: 10px 14px; border-radius: 12px; max-width: 85%; line-height: 1.5; }
.msg.bot { background: #f1f5f9; align-self: flex-start; border-bottom-left-radius: 2px; color: #334155; }
.msg.user { background: var(--primary); color: white; align-self: flex-end; border-bottom-right-radius: 2px; }
.ai-footer { padding: 12px; border-top: 1px solid #f1f5f9; display: flex; gap: 8px; background: rgba(255,255,255,0.5); }
.ai-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 10px 14px;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    color: black;
}
.ai-send { width: 38px; height: 38px; border: none; background: var(--primary); color: white; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* =========================================
   4. ESTILOS DEL SLIDER PRINCIPAL (HERO)
   ========================================= */
.hero-slider .carousel-item {
    position: relative;
    min-height: 70vh;
    height: 70vh;
    background-color: #000;
}
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    z-index: 1;
}
.hero-content-wrapper {
    position: relative;
    z-index: 10;
    height: 93vh;
    display: flex;
    align-items: center;
}
.hero-title {
    font-size: 3.5rem; 
    line-height: 1.1;
}
.hero-desc {
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}
.hero-img-col img { max-height: 450px; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5)); }
.badge-hero {
    background: #22d3ee; color: #000; padding: 5px 10px; border-radius: 4px; font-weight: bold; font-size: 0.8rem;
}

@media (max-width: 991px) {
    .hero-slider .carousel-item { min-height: 500px; height: auto; }
    .hero-content-wrapper { padding: 80px 0; height: auto; min-height: 500px; }
    .hero-title { font-size: 2.2rem !important; }
    .hero-img-col { display: none !important; }
}

/* =========================================
   5. NUEVO SLIDER DE CURSOS (AGENDA)
   ========================================= */
/* Importante: Permitir que los botones salgan del contenedor */
#agendaCarousel { overflow: visible; position: relative; }

.course-slider-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 600px;
    display: flex;
}

/* Lado Izquierdo: Imagen */
.course-slide-img-container {
    height: 100%;
    min-height: 100%;
    background-color: #f8fafc;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative;
    cursor: pointer;
}

.course-slide-img-container img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    backdrop-filter: blur(10px); 
    transition: transform 0.4s ease;
    position: relative;
    z-index: 2; 
}

.course-slide-img-container:hover .flyer-real,
.course-slide-img-container:hover img { transform: scale(1.05); }

.course-slide-img-container:hover::after {
    content: '\f00e'; font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 3rem; color: rgba(255,255,255,0.9); z-index: 10; 
    text-shadow: 0 5px 15px rgba(0,0,0,0.5); pointer-events: none;
}

.blur-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    filter: blur(20px) opacity(0.5); z-index: 1;
}
.flyer-real { position: relative; z-index: 2; max-width: 100%; height: 100%; box-shadow: 0 0 20px rgba(0,0,0,0.1); }

/* Lado Derecho: Contenido con SCROLL AUTOMÁTICO */
.course-slide-body { 
    padding: 2.5rem; 
    height: 100%; 
    overflow-y: auto; /* SCROLL MAGICO */
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start; /* Cambio de center a flex-start para permitir scroll */
}

/* Diseño elegante para la barra de scroll */
.course-slide-body::-webkit-scrollbar { width: 6px; }
.course-slide-body::-webkit-scrollbar-track { background: #f1f1f1; }
.course-slide-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.course-slide-body::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Botones de navegación del slider */
.custom-nav-btn {
    width: 50px !important; height: 50px;
    background-color: #ffffff !important;
    border-radius: 50%;
    opacity: 1 !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1000 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    display: flex !important; align-items: center; justify-content: center;
    transition: all 0.2s ease; margin: 0;
}

/* Icono Gris */
.custom-nav-btn .carousel-control-prev-icon,
.custom-nav-btn .carousel-control-next-icon {
    width: 18px; height: 18px;
    filter: invert(0.3);
    background-size: 100%;
}

.custom-nav-btn:hover { 
    background-color: #2563eb; /* Azul al hover */
    transform: translateY(-50%) scale(1.1) !important; 
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3); 
}

.custom-nav-btn:hover .carousel-control-prev-icon,
.custom-nav-btn:hover .carousel-control-next-icon {
    filter: invert(1); /* Icono blanco al hover */
}

/* POSICIÓN LATERAL FUERA DE LA TARJETA */
.carousel-control-prev { left: -60px !important; } 
.carousel-control-next { right: -60px !important; }

@media (max-width: 1300px) {
    .carousel-control-prev { left: -25px !important; }
    .carousel-control-next { right: -25px !important; }
}

@media (max-width: 991px) {
    .course-slider-card { flex-direction: column; height: auto; min-height: auto; }
    .course-slide-img-container { height: 350px; min-height: 350px; }
    .course-slide-body { height: auto; padding: 2rem; overflow-y: visible; }
    .custom-nav-btn { display: none; } 
    .carousel-control-prev, .carousel-control-next { position: static; margin: 10px auto; }
}

/* =========================================
   6. CURSOS FIJOS Y CARDS GENERALES
   ========================================= */
.course-card {
    background: #fff; border-radius: 12px; overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); border: 0;
    height: 100%; display: flex; flex-direction: column;
}
.course-img-wrapper { height: 180px; }
.course-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.course-body { padding: 1.5rem; text-align: center; }
.course-title { font-size: 1.25rem; font-weight: bold; margin-bottom: 0.5rem; }
.course-desc { font-size: 0.875rem; color: var(--text-light); margin-bottom: 1rem; }

/* =========================================
   7. MODALES Y EXTRAS
   ========================================= */
.btn-wsp-modal {
    background-color: #25D366; color: white; font-weight: bold;
    border-radius: 50px; padding: 12px 30px; text-decoration: none;
    display: inline-flex; align-items: center; gap: 10px;
    transition: 0.3s; border: none; font-size: 1rem; text-transform: uppercase;
}
.btn-wsp-modal:hover { background-color: #1ebc57; color: white; transform: scale(1.05); }

/* Modal Fullscreen ajustes */
.modal-fullscreen .modal-content { background: #000000e3; border: none; }
.btn-close-white { background-color: white; border-radius: 50%; padding: 10px; opacity: 1; box-shadow: 0 0 10px rgba(255,255,255,0.3); }

/* =========================================
   8. ESTILOS SECCIÓN HISTORIA
   ========================================= */
.history-section { position: relative; overflow: hidden; }
.history-image-col { background-size: cover; background-position: center; min-height: 450px; position: relative; }
.history-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 1.5rem; }
.history-content { padding: 3rem; }

@media(max-width: 768px) {
    .history-title { font-size: 1.8rem; }
    .history-content { padding: 2rem !important; }
}

/* =========================================
   9. FOOTER Y BOTONES FLOTANTES
   ========================================= */
.footer-bestial, .footer-bestial h5, .footer-bestial h6, .footer-bestial p, .footer-bestial span, .footer-bestial a {
    font-family: 'Maven Pro', sans-serif !important;
}

.footer-bestial {
    background: var(--footer-bg); 
    background-image: radial-gradient(at 0% 0%, rgba(34, 211, 238, 0.1) 0px, transparent 40%),
                      radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.1) 0px, transparent 40%);
    position: relative;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #ffffff;
    overflow-x: hidden;
}

.footer-title {
    color: var(--cyan-accent); font-weight: 800; text-transform: uppercase;
    letter-spacing: 1.2px; margin-bottom: 1.5rem; font-size: 0.9rem;
}
.text-cyan { color: var(--cyan-accent) !important; }

.glass-card {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px; backdrop-filter: blur(10px); max-width: 100%;
}

.avatar-circle {
    width: 45px; height: 45px; background: var(--cyan-accent); color: #000; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}
.badge-custom {
    font-size: 10px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
    background: rgba(255, 255, 255, 0.15); color: #fff; padding: 4px 8px; border-radius: 4px; display: inline-block;
}

.contact-link { display: flex; align-items: center; gap: 15px; text-decoration: none; padding: 8px; border-radius: 10px; transition: 0.2s; }
.contact-link:hover { background: rgba(255,255,255,0.08); }

.icon-sq {
    width: 42px; height: 42px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #ffffff; font-size: 1.2rem; transition: 0.2s;
}
.contact-link:hover .icon-sq { background: var(--cyan-accent); color: #000; border-color: var(--cyan-accent); }

.social-pill {
    width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center; color: #ffffff; font-size: 1.3rem; text-decoration: none; transition: 0.3s;
}
.social-pill:hover { transform: translateY(-3px); background: #fff; color: #000; border-color: #fff; }

.separator { height: 1px; background: rgba(255,255,255,0.15); }
.footer-logo { height: 40px; width: auto; max-width: 100%; opacity: 1; }

.wa-floating-container { position: fixed; bottom: 30px; left: 30px; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.wa-btn-pulse {
    width: 60px; height: 60px; background: #25D366; color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 30px; text-decoration: none; position: relative; z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); transition: all 0.3s ease;
}
.wa-pulse-ring { position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 2px solid #25D366; opacity: 0; animation: wa-pulse 2s infinite; z-index: 1; }
.wa-label {
    position: absolute; left: 70px; background: #fff; color: #000; padding: 5px 12px; border-radius: 15px; font-weight: bold; font-size: 13px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2); opacity: 0; transition: 0.3s; pointer-events: none; white-space: nowrap;
}
.wa-floating-container:hover .wa-label { opacity: 1; left: 75px; }
@keyframes wa-pulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }

@media (max-width: 768px) {
    .wa-floating-container { bottom: 20px; left: 20px; }
    .wa-btn-pulse { width: 50px; height: 50px; font-size: 24px; }
    .wa-label { display: none; }
    .footer-logo { height: 35px; }
}

.bg-dark {
    --bs-bg-opacity: 1;
    background-color: rgb(0 30 58) !important;
}

.hero-content-wrapper {
    position: relative;
    z-index: 10;
    height: 70vh;
    display: flex;
    align-items: center;
}


.hero-desc {
    text-shadow: 0 0 BLACK!important;
}

.text-primary {
    --bs-text-opacity: 1;
    color: rgb(0 30 58) !important;
}

.bg-primary {
    --bs-bg-opacity: 1;
    background-color: rgb(0 30 58) !important;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #001e3a;
    --bs-btn-border-color: #001e3a;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #001e3a;
    --bs-btn-hover-border-color: #001e3a;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #001e3a;
    --bs-btn-active-border-color: #001e3a;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #001e3a;
    --bs-btn-disabled-border-color: #001e3a;
}

.text-white-50 {
    --bs-text-opacity: 1;
    color: rgb(255 255 255) !important;
}