/* Header Design - Variables importadas desde base/variables.css */

.header-container {
    background: var(--COLOR-1, #FFE6C8);
    padding: 30px 50px 30px 20px;
    min-height: 133px;
}

.header-container .container-fluid {
    align-items: center;
    justify-content: space-between;
}

/* Logo del header */
.header-logo-container {
    display: flex;
    width: 361px;
    height: auto;
    padding: 10px 0;
    justify-content: center;
    align-items: center;
    gap: 16.928px;
    aspect-ratio: 361.00/133.44;
}

.header-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.header-logo-mobile {
    display: none;
}

.header-logo-desktop {
    display: block;
}

/* Botón hamburguesa */
.header-container .navbar-toggler {
    border: none;
    padding: 4px 8px;
    background: transparent;
}

.header-container .navbar-toggler svg {
    width: 24px;
    height: 24px;
    color: var(--COLOR-3);
}

.header-container .navbar-toggler:focus {
    box-shadow: none;
}

/* Navegación - Estilo unificado para todos los enlaces */
.header-container .navbar-nav {
    align-items: center;
}

.header-container .navbar-nav .nav-link {
    color: var(--COLOR-2);
    font-size: 16px;
    font-weight: 400;
    padding: 8px 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-container .navbar-nav .nav-link:hover {
    color: var(--COLOR-3) !important;
}

.header-container .navbar-nav .nav-link:focus {
    color: var(--COLOR-3) !important;
}

/* Icono de logout */
.logout-icon {
    width: 28px;
    height: 28px;
    transition: all 0.3s ease;
}

.header-container .navbar-nav .nav-link:hover .logout-icon {
    filter: brightness(0) saturate(100%) invert(46%) sepia(86%) saturate(1733%) hue-rotate(11deg) brightness(96%) contrast(94%);
}

.logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.logout-link:hover {
    transform: scale(1.1);
}

.logout-icon {
    width: 40px;
    height: 45px;
    display: block;
}

/* Estilos antiguos mantenidos para compatibilidad */
.navbar {
    height: var(--header-height);
    min-height: var(--header-height);
    padding: 0 3%;
    box-shadow: none;
}

.navbar .right-info {
    margin-left: auto;
    width: fit-content;
}

.navbar .logout {
    display: flex;
}

.navbar .username {
    margin-right: 10px;
    cursor: pointer;
}

.navbar .username:hover {
    color: var(--secondary) !important;
}

.navbar-nav .nav-item:not(.dropdown) .nav-link:hover,
.navbar-nav .nav-item:not(.dropdown) .nav-link.active {
    color: var(--secondary);
}

.navbar-nav .nav-item:not(.dropdown) .nav-link:hover::after {
    width: 100%;
    transition: width .5s;
}

.navbar-nav .nav-item:not(.dropdown) .nav-link::after {
    content: '';
  display: block;
    width: 0;
    height: 3px;
    margin-top: 2px;
    background: var(--secondary);
}

.navbar-nav .nav-item:not(.dropdown) .nav-link.active::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background: var(--secondary);
}

.navbar-nav .nav-item:not(.dropdown) .nav-link:focus,
.navbar-nav .nav-item:not(.dropdown) .nav-link:target {
    color: var(--secondary);
}

.navbar-nav .dropdown .nav-link:hover,
.navbar-nav .dropdown .nav-link.active {
    color: inherit;
}

.navbar-nav .dropdown .nav-link::after {
    display: none;
}

.navbar-nav .dropdown .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Responsive para móviles - Arreglar header */
@media (max-width: 991px) {
    .header-container {
        padding: 20px 15px;
        min-height: auto;
    }
    .header-logo{
        max-height: fit-content !important;
    }
    
    .header-logo-container {
        width: 250px;
        height: auto;
        max-height: 80px;
        padding: 5px 0;
    }
    
    /* El menú colapsado mejorado */
    .header-container .navbar-collapse {
        background: rgba(255, 230, 200, 0.95);
        margin-top: 20px;
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(19, 49, 33, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(19, 49, 33, 0.1);
    }
    
    .header-container .navbar-nav {
        align-items: stretch;
        gap: 8px;
    }
    
    .header-container .navbar-nav .nav-item {
        margin: 0;
    }
    
    .header-container .navbar-nav .nav-link {
        padding: 12px 16px;
        border-radius: 8px;
        background: transparent;
        transition: all 0.3s ease;
        justify-content: flex-start;
        font-weight: 500;
    }
    
    .header-container .navbar-nav .nav-link:hover {
        background: rgba(242, 112, 23, 0.1);
        color: var(--COLOR-3) !important;
        transform: translateX(5px);
    }
    
    /* Separador visual sutil */
    .header-container .navbar-nav .nav-item:not(:last-child) .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 16px;
        right: 16px;
        height: 1px;
        background: rgba(19, 49, 33, 0.1);
    }
    
    .header-container .navbar-nav .nav-item {
        position: relative;
    }
}

@media (max-width: 768px) {
    .header-container {
        display: flex;
        height: auto;
        min-height: 100px;
        margin: 0 !important;
        padding: 10px 15px !important;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 15px;
        position: relative;
    }
    
    .header-container .container-fluid {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .header-logo-container {
        width: auto;
        height: auto;
        max-width: none;
        max-height: none;
        flex-shrink: 0;
        margin-left: -15px;
    }
    
    /* Cambiar a imagen móvil */
    .header-logo-desktop {
        display: none;
    }
    
    .header-logo-mobile {
        display: block;
        width: auto;
        height: auto;
        max-width: none;
        max-height: none;
    }
    
    /* Botón hamburguesa - evitar salto de línea */
    .header-container .navbar-toggler {
        flex-shrink: 0;
        margin-left: auto;
    }
    
    /* El menú colapsado mejorado */
    .header-container .navbar-collapse {
        background: rgba(255, 230, 200, 0.95);
        margin-top: 20px;
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(19, 49, 33, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(19, 49, 33, 0.1);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    .header-container .navbar-nav {
        align-items: stretch;
        gap: 8px;
    }
    
    .header-container .navbar-nav .nav-item {
        margin: 0;
        position: relative;
    }
    
    .header-container .navbar-nav .nav-link {
        padding: 12px 16px;
        border-radius: 8px;
        background: transparent;
        transition: all 0.3s ease;
        justify-content: flex-start;
        font-weight: 500;
    }
    
    .header-container .navbar-nav .nav-link:hover {
        background: rgba(242, 112, 23, 0.1);
        color: var(--COLOR-3) !important;
        transform: translateX(5px);
    }
    
    /* Separador visual sutil */
    .header-container .navbar-nav .nav-item:not(:last-child) .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 16px;
        right: 16px;
        height: 1px;
        background: rgba(19, 49, 33, 0.1);
    }
    
    .header-right-section {
        gap: 10px;
    }
    
    .progress-text {
        font-size: 14px;
    }
    
    .logout-icon {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 10px 8px;
    }
    
    .header-logo-container {
        width: auto;
        height: auto;
        max-width: none;
        max-height: none;
    }
    
    .header-container .navbar-toggler svg {
        width: 20px;
        height: 20px;
    }
    
    .progress-text {
        font-size: 12px;
    }
    
    .logout-icon {
        width: 24px;
        height: 24px;
    }
    
    .header-right-section {
        gap: 8px;
    }
}