:root{
    /* color */
    --color-primario:  #7bb7a2;
    --color-secundario: #4A6C6F;
    --gris-claro: #838383;
    --color-terciario: #c1ccdb
;

    /* fuente */
    --fuente-familia: 'Inter', sans-serif;
    --fuente-xxl: 48px;
    --fuente-l: 32px;
    --fuente-md: 16px;
    --fuente-sm: 14px;


    --dimension-redondeado: 50%;
    --padding: 10px;
    --margin: 20px;


    --alto-footer: 70px;
}

*{box-sizing: border-box;}

/* FORMATOS DE TEXTO */

b   {
    font-weight: bold;
    color: var(--color-primario);
}
/*Titulo 1*/
.titulo-1 {
    font-family: var(--fuente-familia);
    font-size: var(--fuente-xxl);
    font-weight: Bold;
}

/*Titulo 2*/
.titulo-2 {
    font-family: var(--fuente-familia);
    font-size: var(--fuente-l);
    font-weight: Bold;
    
}

/*Miniatura*/
.miniatura {
    font-family: var(--fuente-familia);
    font-size: var(--fuente-sm);
    font-weight: Regular;
}

/* Normal */





/* HEADER GENERAL */
header { 
    height: 127px;
    width: 100%; /* ← CORRECTO */
    background: linear-gradient(to bottom, rgba(0,0,0,0.65), rgba(0,0,0,0.005));
    display: flex;
    justify-content: space-between; /* más natural */
    align-items: center;
    color: white;
    padding: 0 5%; 
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
}

header:hover {
    background: rgba(0,0,0,0.65);
}

/* Navbar ocupa todo el ancho disponible */
nav {
    width: 100%;
    max-width: 100%;
}

.navbar {
    width: 100%;
    padding: 0;
    background: transparent !important;
}

.container-fluid {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.navbar-nav {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}


.contenedor-equipo {
    display: flex;
    justify-content: space-around;
    margin-top: 50px;
}

nav ul {
    display: flex;
    justify-content: space-around;
}

nav ul li {
    list-style: none;
    margin-bottom: 10px;
    margin: 30px;

}

nav ul li a {
    text-decoration: none;
    color: white;
    transition: color 0.3s;
}

nav ul li a:hover {
    text-decoration: none;
    color: var(--gris-claro);
    border-bottom: #7bb7a2 2px solid;
}

.contenedor-equipo div img {
    width: 300px;
    height: 300px;

}


/* --- FOOTER GENERAL --- */
#footer {
    width: 100%;
    background: var(--color-primario); /* azul corporativo */
    color: white;
    font-family: inherit;

}

/* --- PARTE SUPERIOR --- */
#footer .top-footer {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;

}

/* Columnas */
#footer .col {
    flex: 1;
    min-width: 160px;
}

/* Logo */
.logo-col {
    flex: 1.5;
}


.logo-footer {
    border-radius: var(--dimension-redondeado);
}

.contenedor-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    border-radius: 50%;
    background-color: white;
    height: 150px;
    width: 150px;
    background-size: cover;
    background-position: center;
}

.contenedor-logo img {
    height: auto;
    width: 100%;

}

.logo-col{
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
        flex-direction: column;

}



.social {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Redes */
.social i {
    font-size: 24px;
    cursor: pointer;
    margin: 0 10px;
}

/* Títulos de columnas */
#footer h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

/* Líneas divisorias igual que el ejemplo */
#footer .col:not(.logo-col) {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 25px;
}

/* --- PARTE INFERIOR --- */
.bottom-footer {
    background: #2f2f2f;
    color: #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 40px;
    font-size: 14px;
}

.bottom-footer a {
    color: #fff;
    text-decoration: none;
}

/* --- RESPONSIVE --- */
@media (max-width: 950px) {
    #footer .top-footer {
        flex-direction: column;
        text-align: center;
    }

    #footer .col {
        border: none !important;
        padding-left: 0;
    }

    .social i {
        font-size: 28px;
    }

    .bottom-footer {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

nav ul li {
    position: relative;   /* importante */
}

/* ============================================
   RESPONSIVE NAVBAR - DESPLEGABLE DESDE IZQUIERDA
   ============================================ */

/* Botón hamburguesa personalizado */
.navbar-toggler {
    border: none;
    background: transparent;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Media query para modo responsive */
@media (max-width: 991px) {
    
    /* Navbar collapse - sidebar desde izquierda */
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: -100vw;
        width: 80vw;
        height: 100vh;
        background: var(--color-primario);
        padding: 20px;
        transition: left 0.3s ease-in-out;
        z-index: 9999;
        overflow-y: auto;
        display: flex !important;
        flex-direction: column;
    }
    
    /* Cuando está abierto */
    .navbar-collapse.show {
        left: 0;
    }
    
    /* Crear overlay clickeable para cerrar */
    .navbar-overlay {
        position: fixed;
        top: 127px;
        left: 0;
        width: 100%;
        height: calc(100% - 127px);
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        z-index: 1;
        pointer-events: none;
    }
    
    .navbar-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    /* Lista de navegación vertical */
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    /* Items del menú */
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 10px 0;
    }
    
    /* Enlaces */
    .nav-link {
        color: white !important;
        font-size: 18px;
        padding: 10px 15px;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 5px;
    }
    

    /* Mega dropdown en responsive */
    .mega-dropdown {
        position: static !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 8px;
        margin-top: 10px !important;
        display: none;  /* Oculto por defecto */
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Mostrar dropdown cuando tiene clase show */
    .dropdown-menu.show {
        display: block !important;
    }
    
    .mega-dropdown .container {
        padding: 15px !important;
    }
    
    .mega-dropdown .row {
        flex-direction: column;
    }
    
    .mega-dropdown .col-md-4 {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .dropdown-header {
        color: var(--color-secundario) !important;
        font-weight: bold;
        font-size: 16px;
    }
    
    .dropdown-item {
        color: white !important;
        padding: 8px 15px;
    }
    
    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Navbar brand en sidebar */
    .navbar-brand {
        color: white !important;
        font-size: 24px;
        font-weight: bold;
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 2px solid var(--color-secundario);
    }
}


.navbar > div > a, .nav-item > a {
    color: white;
}

.navbar > div > a:hover, .nav-item > a:hover {
    color: var(--gris-claro);
}



/* ===========
   DROPDOWN POR HOVER (solo desktop)
   =========== */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.25s ease-in-out;
    }
}

/* Centrar mega dropdown horizontalmente */
.nav-item.dropdown.position-static .dropdown-menu {
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
}

/* Tamaño completo y centrado */
.mega-dropdown {
    width: 100vw !important;      /* que tome todo el ancho de la pantalla */
    max-width: 100vw;            /* opcional: limita el ancho si quieres */
    margin: 0 auto;               /* centra el contenedor interno */
}


/* ============================================
   RESPONSIVE NAVBAR - AJUSTES MEGA DROPDOWN
   ============================================ */
@media (max-width: 991px) {

    /* --- CONTENEDOR GENERAL DEL NAVBAR --- */
    nav ul {
        padding: 12px 18px !important;  /* Espacio interno */
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    nav ul li {
        padding: 8px 0 !important;      /* Margen vertical entre items */
        width: 100%;
        margin: 8px 0 !important;

    }

    nav ul li a {
        display: block;
        width: 100%;
        padding: 10px 8px !important;   /* Espacio interior del link */
        border-radius: 6px;             /* Suavizado de esquinas */
        box-sizing: border-box;
    }

    /* --- DROPDOWN RESPONSIVE GENERAL --- */
    .nav-item.dropdown.position-static {
        position: relative !important;
    }

    /* Mega menú / dropdown completo */
    .dropdown-menu {
        position: relative !important;
        width: 100% !important;

        background-color: rgba(255, 255, 255, 0.05) !important;
        border-radius: 10px !important;

        margin-top: 8px !important;

        box-sizing: border-box !important;
    }

    /* Items dentro del dropdown */
    .dropdown-menu a {
        display: block;
        border-radius: 6px;
        box-sizing: border-box;
    }

    /* Último elemento del dropdown */
    .dropdown-menu > *:last-child {
        margin-bottom: 4px;
    }

    /* Evitar que algo desborde */
    .dropdown-menu * {
        max-width: 100% !important;
        word-wrap: break-word;
    }


}

.navbar-brand{
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 30px;
    font-weight: bold;
    color: white !important;
    text-decoration: none;
    gap: 15px;
}

.nombre-header {
    color: white !important;
}

.contenedor-logo-header {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    border-radius: 50%;
    background-color: white;
    height: 80px;
    width: 80px;
}

.contenedor-logo-header img {
    height: auto;
    width: 100%;

}


/* ======== RESPONSIVE ======== */
@media (max-width: 991px) {

    .navbar-brand {
        width: 100%;
        justify-content: center !important; /* centrar en móvil */
        padding: 10px 0;
        gap: 12px;
    }

    .logo-header {
        height: 40px !important; /* un poco más pequeño */
    }

    .nombre-header {
        font-size: 1.1rem;
        color: white !important;
    }

    .nombre-header:hover {
        color: white !important;
    }

    /* Evitar que el logo empuje el botón hamburguesa */
    .navbar-brand {
        margin-right: 0 !important;
        color: white !important;
    }

    .contenedor-logo-header {
    height: 50px;
    width: 50px;
}
}


html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1; /* Empuja el footer hacia abajo */
}

.nombre-header:hover {
    color: white !important;
}

.navbar-brand:hover {
    color: white !important;
}


.navbar-brand::selection {
    color: white !important;
}

.contenedor-logo-header::selection{
    color: white !important;
}
