/* ============================================
   HEADER CUSTOM - LA CASA DEL COLOR
   ============================================ */

:root {
    --header-height: 100px;
    --turquesa: #40E0D0;
    --naranja: #FF8C42;
    --amarillo: #FFD93D;
    --verde: #6BCB77;
    --azul: #4D96FF;
    --morado: #9B59B6;
    --fucsia: #FF6B9D;
    --blanco: #FFFFFF;
    --gris-claro: #F8F9FA;
    --gris: #6C757D;
    --gris-oscuro: #343A40;
    --gradiente-principal: linear-gradient(135deg, var(--turquesa) 0%, var(--naranja) 100%);
    --sombra-suave: 0 2px 15px rgba(0, 0, 0, 0.08);
    --sombra-fuerte: 0 4px 25px rgba(0, 0, 0, 0.12);
}

/* Header Base */
.header-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--blanco);
    box-shadow: var(--sombra-suave);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-custom.scrolled {
    box-shadow: var(--sombra-fuerte);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo Section */
.logo-section {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-title {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--gradiente-principal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--naranja);
    letter-spacing: 2px;
}

/* Navigation */
.navigation-custom {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: var(--gris-oscuro);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.nav-link:hover i,
.nav-link.active i {
    transform: scale(1.2) rotate(5deg);
}

/* Hover Effect */
.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradiente-principal);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 12px;
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blanco);
    transform: translateY(-2px);
}

/* User Badge */
.user-info-item {
    margin-right: 15px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(64, 224, 208, 0.15) 0%, rgba(255, 140, 66, 0.15) 100%);
    border: 2px solid var(--turquesa);
    border-radius: 50px;
    font-weight: 600;
    color: var(--gris-oscuro);
}

.user-badge i {
    font-size: 1.3rem;
    color: var(--turquesa);
}

/* Special Buttons */
.btn-login {
    background: var(--gradiente-principal);
    color: var(--blanco) !important;
    padding: 12px 28px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(64, 224, 208, 0.35);
}

.btn-login:hover {
    box-shadow: 0 6px 20px rgba(64, 224, 208, 0.45);
    transform: translateY(-3px);
}

.nav-profile {
    color: var(--turquesa);
}

.nav-logout {
    color: var(--naranja);
}

/* Menu Toggle (Hamburger) */
.menu-toggle-custom {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 35px;
    height: 35px;
    background: var(--gradiente-principal);
    border-radius: 10px;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(64, 224, 208, 0.3);
}

.menu-toggle-custom:hover {
    transform: scale(1.05);
}

.menu-toggle-custom.active {
    background: var(--naranja);
}

.bar {
    width: 100%;
    height: 3px;
    background: var(--blanco);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle-custom.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle-custom.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle-custom.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Rainbow Line */
.rainbow-line-header {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    display: flex;
    overflow: hidden;
}

.rainbow-line-header .line-segment {
    flex: 1;
    height: 100%;
}

.rainbow-line-header .yellow { background: var(--amarillo); }
.rainbow-line-header .green { background: var(--verde); }
.rainbow-line-header .blue { background: var(--azul); }
.rainbow-line-header .purple { background: var(--morado); }
.rainbow-line-header .fuchsia { background: var(--fucsia); }

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .header-container {
        padding: 15px 25px;
    }
    
    .logo-title {
        font-size: 1.3rem;
    }
    
    .logo-img {
        height: 60px;
    }
    
    .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .user-badge span {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 12px 20px;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .logo-title {
        font-size: 1.1rem;
    }
    
    .logo-subtitle {
        font-size: 0.75rem;
    }
    
    .menu-toggle-custom {
        display: flex;
    }
    
    .navigation-custom {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 380px;
        height: 100vh;
        background: var(--blanco);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
    }
    
    .navigation-custom.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        padding: 90px 25px 30px;
        gap: 8px;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        padding: 15px 20px;
        font-size: 1rem;
        justify-content: flex-start;
    }
    
    .user-info-item {
        margin: 0 0 25px 0;
        padding-bottom: 20px;
        border-bottom: 2px solid var(--gris-claro);
    }
    
    .user-badge {
        justify-content: center;
        padding: 15px 20px;
    }
    
    .user-badge i {
        font-size: 1.8rem;
    }
    
    .user-badge span {
        display: inline;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }
    
    .logo-img {
        height: 45px;
    }
    
    .header-container {
        padding: 10px 15px;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.navigation-custom.active .nav-item {
    animation: slideIn 0.4s ease forwards;
}

.navigation-custom.active .nav-item:nth-child(1) { animation-delay: 0.05s; }
.navigation-custom.active .nav-item:nth-child(2) { animation-delay: 0.1s; }
.navigation-custom.active .nav-item:nth-child(3) { animation-delay: 0.15s; }
.navigation-custom.active .nav-item:nth-child(4) { animation-delay: 0.2s; }
.navigation-custom.active .nav-item:nth-child(5) { animation-delay: 0.25s; }