:root {
    --light: #ffffff;
    --dark: #0B254B;
    --grey: #efefef;
    --primary: #007bff;
}

html, body {
    height: 100%;
    font-family: 'Roboto', sans-serif; /* Cambiado de Muli a Roboto */
    font-weight: 400; /* Normal por defecto */
    /* font-weight: 300 !important;  <- Comenta o borra esto si existe */
}

.bg-dark { background-color: var(--dark) !important; }
.bg-light { background-color: var(--light) !important; }
.bg-grey { background-color: var(--grey) !important; }

.btn-light { color: var(--primary) !important; }

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

.font-weight-thin { font-weight: 200; }

.navbar {
    min-height: 5rem;
}

.avatar {
    width: 25px;
    height: 25px;
}

/* --- ESTILOS GENERALES DE NAVEGACIÓN --- */
.navbar {
    min-height: 5rem;
    padding-top: 0;
    padding-bottom: 0;
    background-color: #fff !important;
}

/* Enlaces del menú superior */
.navbar .nav-link {
    font-size: 0.95rem;
    color: var(--dark) !important;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

/* Efecto al pasar el mouse en PC */
@media (min-width: 992px) {
    .navbar .nav-link:hover, .navbar .nav-link.active {
        color: var(--primary) !important;
        border-bottom: 3px solid var(--primary);
        background-color: transparent !important;
    }
    
    /* Mostrar menú al hacer hover en PC (Opcional, si prefieres click, elimina esto) */
    /* .navbar .nav-item:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
    } */
}

/* --- MEGA MENU (PC) --- */
.mega-menu {
    /* Posicionamiento para salir del contenedor */
    position: fixed; 
    top: 5rem; /* Altura de tu navbar definida en CSS */
    left: 0;
    width: 100vw; /* Ocupa el 100% del ancho de la ventana (viewport) */
    
    /* Estilos Visuales */
    background-color: var(--grey); /* Fondo gris claro (#efefef) */
    border-top: 5px solid transparent !important;
    margin-top: -5px !important; /* Sube el menú 5px para tapar el hueco */
    
    /* Animación y Estados */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease-in-out;
    z-index: 999; /* Asegura que esté por encima del contenido */
    height: auto; /* Se ajusta al contenido */
}


/* El contenedor interno sigue centrando el contenido del menú legiblemente */
.mega-menu .container {
    background-color: var(--grey); /* Mantiene el gris también en el contenedor interno */
}

/* Mostrar al hacer hover o activar */
@media (min-width: 992px) {
    .mega-dropdown {
        position: static !important; 
    }
    
    /* Mostrar menú */
    .mega-dropdown:hover .mega-menu,
    .mega-dropdown.show .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .intro-col {
        padding-right: 2rem;
    }
    
    .ls-1 {
        letter-spacing: 1px;
    }
}
/* Estilos de enlaces dentro del dropdown */
.dropdown-item {
    border-radius: 0 !important;
}
.dropdown-item:hover {
    background-color: rgba(0, 123, 255, 0.05);
    color: var(--primary) !important;
}

/* --- AJUSTES MÓVILES (ACORDEÓN) --- */
@media (max-width: 991.98px) {
    /* ... otros estilos ... */

    /* Asegurar que en móvil el mega menú tenga el fondo gris */
    .mega-menu {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        background-color: var(--grey) !important; 
        padding: 1rem 0;
    }
    
    /* La columna intro sigue oculta en móvil para limpieza */
    .intro-col {
        display: none !important; 
    }
}

/* Ajuste para que el contenido no quede tapado por el navbar fijo */
body {
    padding-top: 5rem; /* Igual a la altura del navbar */
}

.nav-tabs .nav-link {
    background-color: rgba(0, 123, 255, .1);
    border: 2px solid var(--primary);
    border-color: var(--primary) !important;
    border-radius: 0;
}

.nav-tabs .nav-link.active {
    background-color: var(--primary);
    color: var(--light);
}

.img-text {
    bottom: 1rem;
    left: 2rem;
}

.category {
    bottom: 1rem;
    left: 1rem;
}

.category {
    font-size: 100%;
}

.tab-image {
    background-image: url('../img/img-04.jpg'); /* Modificar imagen por la de su preferencia */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    width: 140px;
    height: 140px;
}

.course-img {
    background-image: url('../img/img-01.png'); /* Modificar imagen por la de su preferencia */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    height: 150px;
}

.call-to-action {
    background-image: url('../img/img-05.jpg'); /* Modificar imagen por la de su preferencia */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}
.cta-left {
    background-image: url('../img/img-06.jpg'); /* Modificar imagen por la de su preferencia */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    padding: 8rem 5rem;
}

.cta-right {
    background-image: url('../img/img-02.jpg'); /* Modificar imagen por la de su preferencia */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    padding: 8rem 5rem;
}

.badge-primary {
    background-color: rgba(0, 123, 255, .1);
    color: var(--primary);
}


@media (max-width: 1200px) {
    .tab-image {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    #copyright {
        text-align: center;
    }
    .text-right {
        text-align: unset !important;
    }
}

@media (max-width: 575.98px) { 
    .cta-left, .cta-right {
        padding: 8rem 2rem;
    }
    footer {
        padding: 3rem 2rem;
    }
}

/* Borde gris muy sutil para las tarjetas */
.border-light-custom {
    border-color: #e0e0e0 !important; /* Un gris muy claro */
}

/* Opcional: Redondear ligeramente las esquinas de la tarjeta */
.card {
    border-radius: 5px; 
    overflow: hidden; /* Asegura que la imagen respete el borde redondeado superior */
}

/* ----------------------------------------------------
   ACTIVACIÓN POR HOVER (MOUSE) SOLO EN PC
   ---------------------------------------------------- */

@media (min-width: 992px) {
    
    /* 1. Ocultar la flechita del dropdown en PC para que el hover sea más limpio */
    .dropdown-toggle::after {
        display: none;
    }

    /* 2. Hacer que el item padre tenga posición relativa */
    .nav-item.dropdown {
        position: relative;
    }

    /* 3. El menú dropdown empieza invisible */
    .nav-item.dropdown > .dropdown-menu {
        display: none;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease-in-out;
        z-index: 999;
    }

    /* 4. AL PASAR EL MOUSE: Mostrar el menú */
    .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Ajuste específico para el Mega Menú (porque usabamos position: fixed antes) */
    .nav-item.dropdown.mega-dropdown:hover > .mega-menu {
        display: block; /* Asegura que el mega menú aparezca */
        /* Mantenemos el estilo del mega menu (fondo gris, etc) definido anteriormente */
    }
}

/* ----------------------------------------------------
   MANTENER COMPATIBILIDAD CON MÓVIL (CLICK)
   ---------------------------------------------------- */
/* Aseguramos que en móviles (menos de 992px) el hover no interfiera
   y que el click de Bootstrap siga funcionando normalmente */
@media (max-width: 991.98px) {
    .nav-item.dropdown > .dropdown-menu {
        display: none; /* Oculto por defecto */
        opacity: 1;
        visibility: visible;
        transform: none;
        position: static; /* Acordeón normal */
        width: 100%;
        float: none;
        background-color: var(--grey);
        border: none;
        padding: 1rem;
        box-shadow: none !important;
    }

    /* Cuando Bootstrap añade la clase 'show' por click en móvil */
    .nav-item.dropdown.show > .dropdown-menu {
        display: block;
    }
    
    /* En móvil SI mostramos la flechita para saber que se puede tocar */
    .dropdown-toggle::after {
        display: inline-block !important;
    }
}
