/* RESET GLOBAL Y PREVENCIÓN DE SCROLL HORIZONTAL */
*,
*::before,
*::after {
    box-sizing: border-box !important;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: #0b1329 !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    width: 100% !important;
    height: 100%;
    min-height: 100vh;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}
/* 1. Obligar a que la página ocupe toda la altura de la ventana */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #0b132b; /* O el color de fondo oscuro que estés usando */
}

/* HEADER Y NAVEGACIÓN */
.main-header {
    background-color: #030712 !important;
    border-bottom: 4px solid #10b981 !important;
    padding: 1.2rem 2rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* LOGO */
#site-logo:link, 
#site-logo:visited {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    color: #10b981 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
}

#site-logo span {
    color: #f97316 !important;
}

/* ENLACES DEL MENÚ */
.nav-links {
    display: flex !important;
    list-style: none !important;
    gap: 1.2rem !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
}

/* ESTADO NORMAL Y VISITADO (VERDE ESMERALDA Y NARANJA CORAL) */
.menu-item:link {
    color: #10b981 !important;
    font-weight: 800 !important;
    font-size: 1.05rem !important;
    padding: 0.8rem 1.4rem !important;
    border-radius: 8px !important;
    display: inline-block !important;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out !important;
}

.menu-item:visited {
    color: #f97316 !important;
    font-weight: 800 !important;
    font-size: 1.05rem !important;
    padding: 0.8rem 1.4rem !important;
    border-radius: 8px !important;
    display: inline-block !important;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out !important;
}

/* HOVER CON RECUADRO Y TEXTO NEGRO */
.menu-item:hover,
.menu-item:focus {
    color: #000000 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.05) !important;
}

/* BOTÓN ACCESO Y SALIR */
.btn-access:link, 
.btn-access:visited {
    background-color: #10b981 !important;
    color: #000000 !important;
    font-weight: 800 !important;
    padding: 0.8rem 1.4rem !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.2s ease-in-out !important;
}

.btn-access:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.9) !important;
    transform: scale(1.05) !important;
}

/* CONTENEDORES PRINCIPALES DE LAS VISTAS */
main {
    flex: 1;
    width: 100% !important;
    height: 100%;
    min-height: 100vh;
    max-width: 100vw !important;
    padding: 2rem 1rem;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
}

.card h3 {
    color: #10b981;
    margin-bottom: 0.8rem;
}

/* ==========================================================================
   ADAPTACIÓN RESPONSIVE PARA PANTALLAS MÓVILES (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .main-header {
        padding: 0.8rem 1rem !important;
    }

    .nav-container {
        flex-direction: column !important;
        gap: 0.8rem !important;
    }

    .nav-links {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.4rem !important;
        width: 100% !important;
    }

    .menu-item:link,
    .menu-item:visited {
        font-size: 0.9rem !important;
        padding: 0.4rem 0.7rem !important;
    }

    .btn-access:link,
    .btn-access:visited {
        font-size: 0.9rem !important;
        padding: 0.4rem 0.8rem !important;
    }
}