/* ==========================================================================
   1. VARIABLES GLOBALES Y MODO OSCURO
   ========================================================================== */
:root {
    --primary: #0EA5E9;
    --primary-rgb: 14, 165, 233;
    --secondary: #1E3A5F;
    --secondary-rgb: 30, 58, 95;
    --gold: #DAA520;
    --gold-rgb: 218, 165, 32;
    --bg-light: #ffffff;
    --bg-dark-card: #ffffff;
    --text-color: #111827;
    --text-muted: #6b7280;
    --border-color: rgba(14, 165, 233, 0.12);
}

.dark-mode {
    --bg-light: #111827;
    --bg-dark-card: #1f2937;
    --text-color: #f9fafb;
    --text-muted: #9ca3af;
    --border-color: rgba(14, 165, 233, 0.3);
}

body {
    background-color: var(--bg-light);
    color: var(--text-color);
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- JUSTIFICACIÓN Y CENTRADO DE TEXTOS --- */
p, .lead {
    text-align: justify;
    text-align-last: center;
}

/* ==========================================================================
   2. NAVBAR PREMIUM
   ========================================================================== */
.navbar {
    background-color: var(--bg-light) !important;
    transition: all 0.4s ease;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.08);
}

.nav-link {
    position: relative;
    color: var(--text-color) !important;
    font-weight: 600;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.hero {

    position: relative;

    overflow: hidden;

}

.hero::before {

    content: "";

    position: absolute;

    width: 700px;

    height: 700px;

    border-radius: 50%;

    background: rgba(255, 255, 255, .18);

    filter: blur(150px);

    top: -220px;

    right: -120px;

}

.hero::after {

    content: "";

    position: absolute;

    width: 500px;

    height: 500px;

    border-radius: 50%;

    background: rgba(255, 255, 255, .10);

    filter: blur(120px);

    bottom: -180px;

    left: -120px;

}

/* ==========================================================================
   3. HERO CAROUSEL CELESTE-MARINO
   ========================================================================== */
.hero-carousel {
    clip-path: polygon(0 0, 100% 0, 100% 94%, 0% 100%);
    background-color: #0C2340 !important;
    position: relative;
}

.carousel-item {
    height: 75vh;
    min-height: 520px;
    max-height: 680px;
    background-color: #0C2340 !important;
}

.carousel-item img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

.carousel-overlay {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(12, 35, 64, 0.60) 0%,
        rgba(12, 35, 64, 0.30) 55%,
        rgba(12, 35, 64, 0.08) 100%) !important;
    z-index: 1;
}

.carousel-caption {
    z-index: 2 !important;
}

.carousel-item h1 {
    color: #ffffff !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85), 0 1px 4px rgba(0,0,0,0.7) !important;
}

.carousel-item p {
    color: rgba(255, 255, 255, 0.97) !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85), 0 1px 4px rgba(0,0,0,0.7) !important;
}

/* Ajuste del botón para que resalte en fondos claros */
.carousel-item .btn-warning {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Partículas animadas */
.carousel-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: floatParticle linear infinite;
}

/* Indicadores del carousel */
.carousel-indicators [data-bs-target] {
    background-color: rgba(0, 0, 0, 0.3) !important;
    /* Oscurecidos un poco para que se vean sobre fondo claro */
    border: none;
    width: 12px;
    height: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: var(--primary) !important;
    width: 30px;
}

.hero-badge {
    background: var(--primary) !important;
    /* Color sólido para excelente contraste */
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Animaciones específicas de elementos de texto del carrusel activo */
.carousel-item.active h1 {
    animation: slideText 1s cubic-bezier(0.15, 0.85, 0.45, 1) forwards;
}

.carousel-item.active p {
    animation: slideText 1.3s cubic-bezier(0.15, 0.85, 0.45, 1) forwards;
}

.carousel-item.active .btn {
    animation: slideText 1.5s cubic-bezier(0.15, 0.85, 0.45, 1) forwards;
}

/* ==========================================================================
   4. SECCIÓN CONÓCENOS
   ========================================================================== */
.conocenos-img {
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.conocenos-img::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 27px;
    background: linear-gradient(135deg, var(--primary), var(--gold), var(--primary));
    background-size: 300% 300%;
    animation: gradientShift 4s ease infinite;
    z-index: -1;
}

.quote-box {
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.06), var(--bg-dark-card));
    transition: all 0.3s ease;
}

.quote-box:hover {
    border-left-color: var(--gold);
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.1);
}

.dark-mode .quote-box span {
    color: #e5e7eb !important;
}

/* ==========================================================================
   5. TARJETAS DE CARRERAS
   ========================================================================== */
.card-carrera-home {
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-dark-card);
    transition: all 0.4s cubic-bezier(0.15, 0.85, 0.45, 1);
}

.card-carrera-home .text-dark {
    color: var(--text-color) !important;
}

.card-carrera-home:hover {
    transform: translateY(-14px);
    box-shadow: 0 30px 60px rgba(14, 165, 233, 0.18) !important;
    border-color: rgba(14, 165, 233, 0.35);
}

.card-carrera-home img {
    height: 240px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.15, 0.85, 0.45, 1);
}

.card-carrera-home:hover img {
    transform: scale(1.1);
}

.card-img-overlay-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(12, 35, 64, 0.7), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card-carrera-home:hover .card-img-overlay-effect {
    opacity: 1;
}

/* ==========================================================================
   6. SECCIÓN LEMA & ESTADÍSTICAS
   ========================================================================== */
.lema-section {
    background: linear-gradient(135deg, #0C2340 0%, #1E3A5F 50%, #0C2340 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    position: relative;
    overflow: hidden;
}

.lema-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    bottom: -50%;
    left: -20%;
    background: radial-gradient(circle at 70% 30%, rgba(14, 165, 233, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 20% 70%, rgba(218, 165, 32, 0.12) 0%, transparent 40%);
    pointer-events: none;
}

.lema-section::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.05);
    animation: floatBounce 6s ease-in-out infinite;
}

.stat-item {
    text-align: center;
    padding: 20px;
    position: relative;
}

.stat-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    transition: width 0.6s ease;
}

.stat-item:hover::after {
    width: 80%;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.stat-label {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 8px;
}

/* ==========================================================================
   7. BENEFICIOS
   ========================================================================== */
#beneficios .bg-light {
    background-color: var(--bg-dark-card) !important;
    border: 1px solid var(--border-color) !important;
    transition: 0.4s ease;
}

#beneficios .bg-light:hover {
    transform: translateY(-10px);
    background-color: var(--bg-light) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

#beneficios .bg-light h5 {
    color: var(--text-color) !important;
}

#beneficios i {
    transition: 0.4s ease;
}

#beneficios .bg-light:hover i {
    transform: scale(1.2) rotate(5deg);
}

/* ==========================================================================
   8. BOTONES PREMIUM
   ========================================================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    border: none !important;
    transition: .4s ease;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(14, 165, 233, .35);
}

.btn-warning {
    background: linear-gradient(135deg, var(--gold), #FACC15) !important;
    border: none !important;
    color: #111 !important;
    transition: .4s ease;
}

.btn-warning:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(218, 165, 32, .35);
}

.btn-cta-hero {
    animation: pulseGoldBtn 2.5s ease-in-out infinite;
}

/* ==========================================================================
   9. WHATSAPP & CONTADORES
   ========================================================================== */
.floating-socials {
    position: fixed;
    bottom: 20px;
    /* Separación prudente del borde inferior */
    right: 25px;
    display: flex;
    flex-direction: row;
    /* Alineación horizontal */
    gap: 10px;
    /* Espacio compacto entre botones */
    z-index: 2000;
}

.social-btn {
    width: 42px;
    /* Tamaño reducido (antes 55px) */
    height: 42px;
    /* Tamaño reducido (antes 55px) */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    /* Icono proporcional al nuevo tamaño (antes 26px) */
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none !important;
}

.social-btn:hover {
    transform: scale(1.1) translateY(-2px);
    /* Efecto sutil acorde al tamaño */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.whatsapp-float {
    background-color: #25D366;
    animation: whatsappPulse 2s infinite;
}

.facebook-float {
    background-color: #1877F2;
    animation: facebookPulse 2s infinite;
    animation-delay: 0.5s;
}

@keyframes facebookPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(24, 119, 242, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(24, 119, 242, 0);
        /* Pulso más corto */
    }

    100% {
        box-shadow: 0 0 0 0 rgba(24, 119, 242, 0);
    }
}

.whatsapp-btn {
    display: none;
    /* backward compatibility fallback */
}

.count-up {
    display: inline-block;
    transition: transform 0.3s ease;
}

.count-up:hover {
    transform: scale(1.1);
}

/* ==========================================================================
   10. ANIMACIONES & RESPONSIVE
   ========================================================================== */
@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.15;
    }

    90% {
        opacity: 0.15;
    }

    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes floatBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes slideText {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes pulseGoldBtn {

    0%,
    100% {
        box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
    }

    50% {
        box-shadow: 0 8px 30px rgba(218, 165, 32, 0.5), 0 0 0 6px rgba(218, 165, 32, 0.1);
    }
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 768px) {
    .carousel-item {
        height: 580px;
    }

    .carousel-item h1 {
        font-size: 2.2rem !important;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* ================= INSTALACIONES ================= */

.instalaciones-section {
    background: #f8fafc;
}

.ambiente-card {
    height: 380px;
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    cursor: pointer;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, .12);

}

.ambiente-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .6s ease;
}

.ambiente-card:hover img {
    transform: scale(1.12);
}

.ambiente-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: end;
    padding: 30px;
    background:

        linear-gradient(to top,
            rgba(12, 35, 64, .95),
            rgba(12, 35, 64, .1));

    color: white;
    transition: .4s ease;
}

.ambiente-overlay i {

    color: #DAA520;

    margin-bottom: 10px;

}

.ambiente-overlay h4 {

    font-weight: 800;

}

.ambiente-overlay p {

    opacity: .85;

    margin-bottom: 0;

}

.ambiente-card:hover .ambiente-overlay {


    background:

        linear-gradient(to top,
            rgba(14, 165, 233, .9),
            rgba(12, 35, 64, .2));


}

/* ================= TESTIMONIOS ================= */


.testimonios-section {

    background: white;

}

.testimonio-card {

    height: 100%;

    background: white;

    border-radius: 25px;

    padding: 30px;

    text-align: center;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, .08);

    transition: .4s ease;

    border: 1px solid rgba(14, 165, 233, .08);

}

.testimonio-card:hover {

    transform: translateY(-12px);

    box-shadow:
        0 25px 50px rgba(14, 165, 233, .18);

}

.testimonio-img {

    width: 90px;

    height: 90px;

    margin: -70px auto 20px;

    border-radius: 50%;

    overflow: hidden;

    border: 5px solid white;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, .15);

}

.testimonio-img img {

    width: 100%;

    height: 100%;

    object-fit: cover;

}

.stars {

    color: #DAA520;

    margin-bottom: 15px;

}

.testimonio-content p {

    font-style: italic;

    color: #64748b;

    line-height: 1.7;

}

.testimonio-content h5 {

    color: #1E3A5F;

    font-weight: 800;

    margin-bottom: 5px;

}

.testimonio-content small {

    color: #0EA5E9;

    font-weight: 600;

}

/* ================= CONTADORES ================= */
.count-number {

    background:
        linear-gradient(135deg,
            #ffffff,
            #DAA520);

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;

    font-weight: 900;

}

.bg-primary {

    background:
        linear-gradient(135deg,
            #0C2340,
            #0EA5E9) !important;

}

/*--------Carreras------*/
.programa-card {
    background: white;
    padding: 35px;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .08);
    transition: .4s;
}

.programa-card:hover {

    transform: translateY(-8px);

    box-shadow: 0 25px 60px rgba(14, 165, 233, .2);

}

.programa-card img {

    height: 280px;
    width: 100%;
    object-fit: cover;

}

/* ==========================================================================
   NUEVO: ESTILOS PARA DROPDOWN DEL BOTÓN DE INSCRIPCIÓN (MODO CLARO Y OSCURO)
   ========================================================================== */
.btn-group .dropdown-menu {
    background-color: var(--bg-dark-card) !important;
    border: 1px solid var(--border-color) !important;
    transition: all 0.3s ease;
}

.btn-group .dropdown-item {
    color: var(--text-color) !important;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-group .dropdown-item:hover {
    background-color: var(--primary) !important;
    color: #ffffff !important;
}

.btn-group .dropdown-divider {
    border-top: 1px solid var(--border-color) !important;
}