/* Header Elegante */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 160, 23, 0.2);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 0 100px; /* Padding izquierdo para dejar espacio al sidebar */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Para pantallas grandes, el header-top actúa como contenedor invisible */
.header-top {
    display: contents; /* Los elementos se comportan como si no existiera el contenedor */
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--gold-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-gold);
}

.logo-icon i {
    font-size: 1.5rem;
    color: var(--black);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-playfair);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--white);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.8rem;
    color: var(--dark-gold);
    font-weight: 500;
    letter-spacing: 1px;
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link:hover {
    color: var(--dark-gold);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-gradient);
    transition: var(--transition-smooth);
}

.nav-link:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Responsive Design para Header */
@media (max-width: 1024px) {
    .header-content {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.5rem 0;
    }
    
    .header-content {
        padding: 0 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    /* Primera fila: Logo y botón SIEMPRE juntos */
    .header-top {
        display: flex !important; /* Forzar flex en responsive */
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .logo-text {
        display: none;
    }
    
    /* Segunda fila: Navegación centrada */
    .header-nav {
        display: flex;
        justify-content: center;
        width: 100%;
        gap: 1rem;
        margin: 0;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.3rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.4rem 0;
    }
    
    .header-content {
        padding: 0 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    /* Primera fila: Logo y botón SIEMPRE en la misma línea */
    .header-top {
        display: flex !important; /* Forzar flex en responsive */
        justify-content: space-between;
        align-items: center;
        width: 100%;
        min-height: 40px;
    }
    
    .logo {
        flex-shrink: 0; /* No se puede comprimir */
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .logo-icon i {
        font-size: 1.2rem;
    }
    
    .logo-text {
        display: none;
    }
    
    .header-actions {
        flex-shrink: 0; /* No se puede comprimir */
    }
    
    /* Segunda fila: Navegación */
    .header-nav {
        display: flex;
        justify-content: space-around;
        width: 100%;
        gap: 0.5rem;
        margin: 0;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
        white-space: nowrap;
        flex: 1;
        text-align: center;
    }
    
    .btn-outline {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Breakpoint específico para evitar problemas en pantallas muy pequeñas */
@media (max-width: 360px) {
    .header-content {
        padding: 0 0.5rem;
    }
    
    .btn-outline {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .nav-link {
        font-size: 0.7rem;
        padding: 0.2rem 0.3rem;
    }
}