/* ====================== */
/* ESTILOS MEJORADOS PARA NAV-LINK */
/* ====================== */
.nav-link {
    color: var(--color-white);
    font-weight: 600;
    padding: var(--space-sm) 0;
    position: relative;
    transition: color 0.3s ease;
}

/* Barra inferior para hover y estado activo */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-accent);
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Efecto hover - Barra crece desde el centro */
.nav-link:hover::after {
    width: 100%;
    left: 0;
    background: var(--color-primary);
}

/* Estado activo - Barra completa */
.nav-link.active::after {
    width: 100%;
    background: var(--color-accent);
}

/* Versión móvil - Ajustes */
@media (max-width: 768px) {
    .nav-link::after {
        display: none; /* Ocultamos en móvil si prefieres */
    }
    
    .nav-link.active {
        color: var(--color-accent);
        font-weight: 700;
    }
}
/* ====================== */
/* Estilos base del header */
.main-header {
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2rem;
    color: var(--yellow);
}

span.logo-icon {
    font-size: 2rem;
    color: var(--yellow);
}

.logo-text {
    color: var(--white);
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.logo-highlight {
    color: var(--yellow);
    font-weight: 800;
}

/* Botones de usuario */
.user-actions {
    display: flex;
    gap: 10px;
}

.login-btn, .register-btn {
    padding: 6px 15px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.login-btn {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--yellow);
}

.register-btn {
    background: var(--yellow);
    color: var(--color-primary-dark);
    border: 2px solid var(--yellow);
}

/* Navegación principal */
.main-nav {
    background: var(--white);
    padding: 0 5%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.main-nav.active {
    max-height: 500px; /* Ajusta según necesidad */
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.nav-link {
    display: block;
    padding: 12px 0;
    color: var(--gray-dark);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--light);
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
}

/* Estilo inicial - Tres barras visibles */
.mobile-menu-toggle {
    display: none; /* Solo visible en móviles */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    z-index: 1001;
}

.toggle-bar {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Estado activo - Transformación a una sola barra (X) */
.mobile-menu-toggle.active .toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.active .toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active .toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}



/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .user-actions {
        display: none;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .logo-icon {
        font-size: 1.8rem;
    }
}

@media (min-width: 769px) {
    .main-nav {
        max-height: none !important;
        overflow: visible;
    }
    
    .nav-list {
        flex-direction: row;
    }
    
    .nav-link {
        padding: 15px 20px;
        border-bottom: none;
    }
    
    .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 20%;
        width: 60%;
        height: 3px;
        background: var(--color-primary);
        border-radius: 3px;
    }
}
