/* Variables CSS */
:root {
    --primary-color: #dc3545;
    --secondary-color: #c82333;
    --text-color: #333;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Aplicar Poppins a todo el sitio */
* {
    font-family: 'Poppins', sans-serif;
}

/* Header Styles */
.top-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-container img {
    height: 40px;
    width: auto;
}

/* Navegación principal */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 auto;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.nav-menu a i {
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

/* Menú de usuario */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.user-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 0.5rem;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-weight: 400;
}

.user-dropdown a:hover {
    background: var(--light-gray);
}

.user-dropdown a:first-child {
    border-radius: 8px 8px 0 0;
}

.user-dropdown a:last-child {
    border-radius: 0 0 8px 8px;
}

/* Botón menú móvil */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Estilos móviles */
@media (max-width: 768px) {
    .top-header {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
    }
    
    .logo-container img {
        height: 35px;
    }
    
    .mobile-menu-btn {
        display: block;
        order: 3;
    }
    
    .user-menu {
        order: 2;
        margin-right: 1rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        border-radius: 0 0 8px 8px;
        overflow: hidden;
        order: 4;
        width: 100%;
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-menu a {
        color: var(--text-color);
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        font-weight: 500;
        justify-content: flex-start;
    }
    
    .nav-menu a:last-child {
        border-bottom: none;
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        background: var(--light-gray);
        color: var(--primary-color);
        transform: none;
    }
    
    .user-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .user-dropdown {
        right: 0;
        min-width: 160px;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 0.5rem 0.75rem;
    }
    
    .logo-container img {
        height: 30px;
    }
    
    .user-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .nav-menu a {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
}

/* Ajustes para el contenido principal */
body {
    margin: 0;
    padding-top: 70px;
    font-family: 'Poppins', sans-serif;
}

/* Animaciones suaves */
* {
    transition: all 0.3s ease;
}

/* Mejoras de accesibilidad */
.mobile-menu-btn:focus,
.user-btn:focus,
.nav-menu a:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Estados hover mejorados */
.nav-menu a:hover i,
.nav-menu a.active i {
    transform: scale(1.1);
}

.user-btn:hover i {
    transform: rotate(180deg);
}