/**
 * AWTU Template - Header Component Styles
 * Estilos específicos para el componente de header
 */

/* ========================================
   HEADER NAVBAR STYLES
   ======================================== */
.awtu-navbar {
    background-color: #1a1a1a !important;
    padding: 0.75rem 0; /* Padding aumentado un poco */
    transition: all 0.3s ease;
}

.awtu-navbar.navbar-dark {
    background-color: #1a1a1a !important;
}

/* ========================================
   LOGO STYLES
   ======================================== */
.awtu-logo {
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.awtu-logo:hover {
    text-decoration: none;
    transform: scale(1.05);
}

.logo-img {
    height: 55px;
    width: auto;
    transition: all 0.3s ease;
    filter: brightness(1) contrast(1);
}

.awtu-logo:hover .logo-img {
    filter: brightness(1.1) contrast(1.1);
    transform: scale(1.05);
}

/* Responsive logo sizing */
@media (max-width: 576px) {
    .logo-img {
        height: 35px;
    }
}

@media (max-width: 400px) {
    .logo-img {
        height: 30px;
    }
}

/* Mobile navbar padding reduction */
@media (max-width: 768px) {
    .awtu-navbar {
        padding: 0.5rem 0;
    }
}

/* ========================================
   NAVIGATION LINKS
   ======================================== */
.awtu-navbar .navbar-nav {
    margin: 0 auto;
}

.awtu-navbar .nav-link {
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
}

.awtu-navbar .nav-link:hover {
    color: #14b08e !important;
    background-color: rgba(32, 201, 151, 0.1);
    transform: translateY(-2px);
}

.awtu-navbar .nav-link.active {
    color: #14b08e !important;
    background-color: rgba(32, 201, 151, 0.15);
}

/* ========================================
   USER ACTIONS BUTTONS
   ======================================== */
.awtu-user-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.awtu-user-actions .btn {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.2rem 0.8rem;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Botón Ingresar */
.awtu-user-actions .btn-light,
.awtu-btn-ingresar {
    background-color: white !important;
    color: #333 !important;
    border: 2px solid transparent;
    border-radius: 0.3rem !important;
    font-weight: 500 !important;
    padding: 0.2rem 0.8rem !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
}

.awtu-user-actions .btn-light:hover,
.awtu-btn-ingresar:hover {
    background-color: #f8f9fa !important;
    color: #333 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Botón Descargar App */
.awtu-user-actions .btn-primary,
.awtu-btn-descargar {
    background-color: #14b08e !important;
    color: white !important;
    border: 2px solid transparent;
    border-radius: 0.3rem !important;
    font-weight: 500 !important;
    padding: 0.2rem 0.8rem !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
}

.awtu-user-actions .btn-primary:hover,
.awtu-btn-descargar:hover {
    background-color: #1a9f7a !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(32, 201, 151, 0.3);
}

/* ========================================
   DROPDOWN MENU STYLES
   ======================================== */
.awtu-navbar .dropdown-menu {
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 0.75rem;
    padding: 0.5rem;
    background-color: white;
    margin-top: 0.5rem;
}

.awtu-navbar .dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.awtu-navbar .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #14b08e;
    transform: translateX(5px);
}

.awtu-navbar .dropdown-item i {
    width: 16px;
    text-align: center;
}

/* ========================================
   NAVBAR LATERAL MÓVIL (desde la izquierda)
   ======================================== */
@media (max-width: 991.98px) {
    /* Sidebar: panel fijo que se desliza desde la izquierda */
    .awtu-navbar .navbar-collapse.awtu-nav-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 85% !important;
        max-width: 20rem !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        background-color: #1a1a1a !important;
        z-index: 1050 !important;
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
        flex-direction: column !important;
        align-items: stretch !important;
    }

    body.awtu-nav-open .awtu-navbar .navbar-collapse.awtu-nav-sidebar {
        left: 0 !important;
    }

    /* Cabecera del sidebar: título + botón cerrar */
    .awtu-nav-sidebar-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .awtu-nav-sidebar-title {
        color: #fff;
        font-weight: 600;
        font-size: 1.125rem;
    }
    .awtu-nav-close {
        color: #fff !important;
        background: transparent !important;
        padding: 0.5rem;
        font-size: 1.25rem;
        opacity: 0.9;
    }
    .awtu-nav-close:hover {
        opacity: 1;
        color: #14b08e !important;
    }

    /* Overlay: fondo oscuro al abrir el menú (solo móvil) */
    body.awtu-nav-open .awtu-nav-overlay {
        display: block !important;
        opacity: 1;
    }
}

/* Overlay base: oculto por defecto, posicionado para cubrir toda la pantalla cuando se muestra */
.awtu-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}
@media (min-width: 992px) {
    .awtu-nav-overlay {
        display: none !important;
    }
}

/* ========================================
   MOBILE RESPONSIVE (contenido del menú)
   ======================================== */
@media (max-width: 991.98px) {
    .awtu-navbar .navbar-nav {
        margin: 1rem 0;
        text-align: left;
        padding: 0 1.25rem;
    }
    
    .awtu-navbar .nav-link {
        margin: 0.25rem 0;
        padding: 0.75rem 1rem;
        display: block;
        border-radius: 0.5rem;
    }
    
    .awtu-user-actions {
        justify-content: center;
        margin-top: 1rem;
        flex-wrap: wrap;
        padding: 1rem 1.25rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .awtu-user-actions .btn {
        margin: 0.25rem;
        padding: 0.18rem 0.7rem;
    }
    
    .awtu-btn-ingresar,
    .awtu-btn-descargar {
        padding: 0.18rem 0.7rem !important;
    }

    /* Dropdown en sidebar: apilar, fondo legible y opciones con buen contraste */
    .awtu-navbar .awtu-user-actions .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        background: rgba(255, 255, 255, 0.14) !important;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 0.5rem 0;
    }
    .awtu-navbar .awtu-user-actions .dropdown-item {
        color: #f3f4f6 !important;
        padding: 0.65rem 1rem;
    }
    .awtu-navbar .awtu-user-actions .dropdown-item i {
        color: rgba(243, 244, 246, 0.9);
    }
    .awtu-navbar .awtu-user-actions .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        color: #14b08e !important;
    }
    .awtu-navbar .awtu-user-actions .dropdown-item:hover i {
        color: #14b08e;
    }
    .awtu-navbar .awtu-user-actions .dropdown-item.text-danger {
        color: #f87171 !important;
    }
    .awtu-navbar .awtu-user-actions .dropdown-item.text-danger:hover {
        color: #fca5a5 !important;
        background: rgba(248, 113, 113, 0.15) !important;
    }
    .awtu-navbar .awtu-user-actions .dropdown-divider {
        border-color: rgba(255, 255, 255, 0.15);
        margin: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    .awtu-user-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .awtu-user-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .logo-icon span {
        font-size: 16px;
    }
}

/* ========================================
   NAVBAR TOGGLER
   ======================================== */
.awtu-navbar .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.awtu-navbar .navbar-toggler:focus {
    box-shadow: none;
}

.awtu-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.awtu-navbar {
    animation: slideInDown 0.5s ease-out;
}

/* ========================================
   SCROLL EFFECTS
   ======================================== */
.awtu-navbar.scrolled {
    background-color: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.awtu-navbar .nav-link:focus,
.awtu-user-actions .btn:focus {
    outline: 2px solid #14b08e;
    outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .awtu-navbar {
        display: none !important;
    }
}
