@import 'variables.css';

/* RESET GENERAL Y COMPORTAMIENTO PREMIUM */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.body-principal {
    font-family: var(--fuente-principal);
    background-color: var(--negro-absoluto);
    color: var(--blanco);
    height: 100%;
    margin: 0;
}

/* ==========================================================
   HEADER Y NAV PREMIUM FLOATING
   ========================================================== */
.body-principal header {
    background: var(--color-navbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gris-borde);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease;
}

.body-principal .nav-container {
    width: 90%;
    max-width: 1400px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.body-principal .logo {
    color: var(--blanco);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.body-principal nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
    margin-bottom: 0;
}

.body-principal nav a {
    color: var(--texto-secundario);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.body-principal nav a:hover {
    color: var(--blanco);
}

/* EFECTO LÍNEA DINÁMICA DE HOVER */
.body-principal nav a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 3px;
    bottom: -6px;
    left: 0;
    background: var(--gradiente-bmw);
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.body-principal nav a:hover::after,
.body-principal nav a.active::after {
    width: 100%;
}

.body-principal nav a.active {
    color: var(--blanco);
}

/* BOTÓN LOGIN */
.body-principal .btn-login {
    background: var(--gradiente-cta);
    padding: 8px 20px;
    border-radius: 20px;
    color: var(--blanco) !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(34, 146, 187, 0.2);
    transition: all 0.3s ease;
}

.body-principal .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 146, 187, 0.4);
}

/* FOOTER UNIFICADO */
footer {
    background: var(--negro-absoluto);
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--gris-borde);
    width: 100vw;
    margin-left: calc(-10vw - 10px);
    /* Ajuste de alineación para ocupar todo el ancho */
    margin-top: 30px;
    flex-shrink: 0;
}

footer p {
    font-size: 0.85rem;
    color: var(--texto-secundario);
    margin: 0;
}

/* ==========================================================
   MODAL DE INGRESO (ADMINISTRACIÓN)
   ========================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.modal-overlay.show-modal {
    display: flex !important;
}

.modal-content {
    background-color: var(--negro-tarjeta) !important;
    color: var(--blanco) !important;
    width: 90%;
    max-width: 400px;
    padding: 40px;
    border-radius: 20px;
    border: 2px solid var(--azul-claro);
    position: relative;
    box-shadow: var(--sombra-premium), var(--brillo-azul);
    text-align: center;
    animation: zoomIn 0.3s ease;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: var(--texto-secundario);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--rojo);
}

.input-group-custom label {
    color: var(--texto-secundario);
    margin-bottom: 5px;
    display: block;
    font-size: 0.85rem;
}

.input-group-custom .form-control {
    background-color: var(--blanco) !important;
    color: var(--texto-oscuro) !important;
    border-radius: 8px !important;
    border: 1px solid #ced4da !important;
    padding: 12px !important;
    font-size: 0.95rem;
}

.btn-login-modal {
    width: 100%;
    padding: 14px;
    background: var(--gradiente-cta) !important;
    border: none !important;
    border-radius: 10px !important;
    color: var(--blanco) !important;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 146, 187, 0.4);
}

#errorLogin {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    display: none;
}

/* ==========================================================
   ANIMACIONES Y RESPONSIVE
   ========================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 991px) {
    .body-principal header {
        padding: 10px 0;
    }

    .body-principal .nav-container {
        position: relative;
    }

    nav {
        display: none !important;
        position: absolute;
        top: 100%;
        right: 0;
        width: 220px;
        background: rgba(10, 10, 10, 0.98);
        border: 1px solid var(--gris-borde);
        padding: 20px;
        border-radius: 12px;
        box-shadow: var(--sombra-premium);
        z-index: 1000;
        flex-direction: column;
        gap: 15px;
    }

    nav.active {
        display: flex !important;
    }

    nav ul {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        text-align: right;
        align-items: flex-end;
    }

    /* Hamburguesa responsive */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 26px;
        height: 18px;
        cursor: pointer;
        z-index: 1100;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--blanco);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .menu-toggle.is-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* ==========================================================
   SCROLLBAR PERSONALIZADO
   ========================================================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #2292bb;
    border-radius: 6px;
    border: 3px solid #0a0a0a;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e7a9c;
}
