/* ==========================================
   1. BARRA DE NAVEGACIÓN (NAVBAR)
   ========================================== */
.navbar {
    position: absolute; /* ⬅️ CORREGIDO: Anclado a la portada, desaparece al bajar */
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(10, 20, 35, 0.95) 0%, rgba(10, 20, 35, 0) 100%);
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; 
    height: 100%; 
    background: linear-gradient(to right, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
    pointer-events: none; 
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.logo img {
    height: 60px; 
    width: auto;  
    transition: height 0.3s ease;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--color-gold);
}

.btn-consulta {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.btn-consulta:hover {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-primary);
}

/* ==========================================
   2. PANTALLA DE CARGA (PRELOADER)
   ========================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preloader-logo {
    height: 90px;
    margin-bottom: 20px;
    animation: fadeInLogo 1s ease-out forwards;
}

.preloader-line {
    width: 0; 
    height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
    animation: expandLine 1.5s ease-out 0.3s forwards; 
}

.preloader-text {
    color: var(--color-white);
    font-size: 0.9rem;
    letter-spacing: 5px;
    opacity: 0;
    animation: fadeInText 1s ease-out 0.8s forwards;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ==========================================
   3. HERO SECTION (PORTADA)
   ========================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; 
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 20, 35, 0.9) 0%, rgba(10, 20, 35, 0.4) 100%);
}

.hero-content {
    width: 100%;
}

.pill-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    color: var(--color-text-muted);
}

.hero-content h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 5.5rem;
    line-height: 1.05;
    font-weight: 700;
    margin-bottom: 1.5rem;
    max-width: 900px;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.text-gold {
    color: var(--color-gold);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* ==========================================
   4. BOTONES
   ========================================== */
.hero-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-glass {
    background-color: var(--color-gold);
    color: var(--color-primary);
    border: 1px solid var(--color-gold);
}

.btn-glass:hover {
    background-color: #a38965;
    border-color: #a38965;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border: 1px solid var(--glass-border);
}

.btn-outline:hover {
    border-color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================
   5. KEYFRAMES Y ANIMACIONES
   ========================================== */
@keyframes fadeDown {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLogo {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes expandLine {
    0% { width: 0; }
    100% { width: 250px; } 
}

@keyframes fadeInText {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.animate-fade-down,
.animate-fade-up {
    opacity: 0;
}

body.loaded .animate-fade-down {
    animation: fadeDown 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.loaded .animate-fade-up {
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

/* ==========================================
   6. RESPONSIVIDAD (MÓVIL Y TABLET)
   ========================================== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }
    
    /* Ocultamos links en móvil, dejamos el botón principal */
    .nav-links li:not(:last-child) {
        display: none; 
    }
    
    .logo img {
        height: 45px; 
    }

    .hero-content h1 {
        font-size: 2.5rem; 
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    /* ⬅️ CORREGIDO: Completado el final cortado */
    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }
}