/* HEADER - ESTILOS PRINCIPALES */

/* CONTENEDOR PRINCIPAL */
.header-contenedor {
    max-width: 1200px;
    transition: transform 0.3s ease;
    margin: 0 auto;
}

.header-contenedor.menu-abierto {
    transform: translateX(300px);
    /* Eliminado: opacity: 0; visibility: hidden; */
}

/* CABECERA SUPERIOR */
.header-cabecera-superior {
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, #c4c4c4 0%, #5b5b5b 100%);
    color: white;
    position: relative;
    z-index: 100;
    border-radius: 4px;
    display: flex;
}

/* BARRA DE NAVEGACIÓN PRINCIPAL */
.header-navbar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

/* SECCIÓN IZQUIERDA: LOGO + BOTÓN MENÚ */
.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* LOGO */
.header-logo {
    display: flex;
    align-items: center;
}

.header-logo a {
    text-decoration: none;
}

.header-logo-img {
    height: 50px;
    width: auto;
    background: white;
    border-radius: 50%;
    padding: 3px;
    border: 2px solid white;
    transition: transform 0.3s;
}

.header-logo-img:hover {
    transform: scale(1.05);
}

/* BOTÓN MENÚ HAMBURGUESA */
.header-menu-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid white;
    border-radius: 4px;
    padding: 8px 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.header-menu-btn:hover {
    background: rgba(255,255,255,0.8);
    transform: scale(1.02);
    color: #064d8a;
}

/* SECCIÓN CENTRAL: TÍTULO DE LA APP */
.header-center {
    text-align: center;
    display: flex;
    align-items: center;
}

.header-app-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.header-app-title a {
    color: white;
    text-decoration: none;
}

.header-app-title a:hover {
    opacity: 0.9;
}

/* SECCIÓN DERECHA: AVATAR + ENLACES + NOMBRE */
.header-right {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-direction: row-reverse;
}

/* Avatar del usuario */
.header-avatar {
    display: flex;
    align-items: center;
}

.header-avatar-img {
    width: auto;
    height: 55px;
    border-radius: 50%;
    border: 1px inset #93b1cd;
    background: #fff;
    transition: transform 0.3s;
    padding: 1px;
}

.header-avatar-img:hover {
    transform: scale(1.05);
}

/* Nombre del usuario */
.header-user-name {
    font-size: 0.9rem;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

/* Enlaces de usuario */
.header-user-link {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 2rem;
    font-size: 0.92rem;
    font-weight: bold;
    transition: all 0.2s;
    color: white;
    text-decoration: none;
}

.header-user-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.header-link-logout {
    background: rgb(210, 232, 249);
    color: #333;
}

.header-link-logout:hover {
    background: rgba(220, 38, 38, 0.9);
    color: white;
}

/* MENÚ LATERAL - PANTALLA COMPLETA */
.header-menu-lateral {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    color: white;
    width: 320px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

.header-menu-lateral.abierto {
    transform: translateX(0);
}

/* HEADER DEL MENÚ */
.header-menu-lateral-header {
    background: rgba(0,0,0,0.3);
    color: white;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-menu-lateral-titulo {
    font-size: 1.3rem;
    font-weight: bold;
}

.header-menu-lateral-cerrar {
    background: none;
    border: 2px solid white;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.header-menu-lateral-cerrar:hover {
    background: white;
    color: #2c3e50;
}

/* CONTENIDO DEL MENÚ */
.header-menu-lateral-contenido {
    padding: 1.5rem;
}

.header-menu-lateral-contenido .menu a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1rem;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
    font-size: 1rem;
}

.header-menu-lateral-contenido .menu a:hover {
    background: rgba(255,255,255,0.1);
    padding-left: 0.5rem;
}

/* OPCIONES DE AUTENTICACIÓN EN EL MENÚ */
.header-menu-auth {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.header-menu-auth a {
    display: block;
    padding: 0.75rem;
    text-align: center;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.header-menu-auth a:hover {
    background: rgba(255,255,255,0.2);
}

.header-menu-auth-registro {
    background: #2196F3;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header-navbar {
        align-items: center;
    }
    
    .header-app-title {
        font-size: 1.2rem;
    }
    
    .header-user-name {
        font-size: 0.8rem;
    }
    
    .header-user-link {
        padding: 0.3rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .header-avatar-img {
        height: 45px;
    }
    
    .header-menu-lateral {
        width: 280px;
    }
    
    .header-user-links {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-cabecera-superior {
        padding: 0.5rem;
    }
    
    .header-right {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .header-user-name {
        font-size: 0.8rem;
    }
    
    .header-app-title {
        font-size: 1rem;
    }
    
    .header-avatar-img {
        height: 40px;
    }
    
    .header-menu-btn span {
        display: none;
    }
}