/* =========================================
   TU ESTÉTICA BASE (INTACTA)
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-size: cover;      
    background-position: center; 
    background-repeat: no-repeat; 
    background-attachment: fixed; 
    background-color: #000000; 
    font-family: 'Inter', sans-serif;
    height: 200vh; 
    color: #ffffff; 
}

.main-header {
    position: fixed;
    top: 25px; 
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
}

.nav-links {
    display: flex;
    align-items: center; 
    gap: 15px;
    max-width: 800px; 
    overflow: hidden; 
    white-space: nowrap; 
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 500;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    opacity: 1;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.menu-icon {
    color: #ffffff;
    display: flex;
    align-items: center;
    cursor: pointer;
    opacity: 0.8;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Base avatar style */
.avatar {
    width: 28px;
    height: 28px;
    background: #333; /* Tu gris base sólido que mantengo */
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden; /* CRUCIAL: Esto es lo que "corta" la imagen al círculo */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar:hover, .avatar.active {
    background: #444; /* Un gris ligeramente más claro al hover */
    border-color: rgba(255, 255, 255, 0.3);
}

/* NUEVO: Estilo para la imagen dentro del avatar para que rellene */
.user-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen llene el espacio sin deformarse y sea cortada por el borde circular */
    display: block;
}

.status-indicator {
    width: 7px;
    height: 7px;
    background: #8e94f2; 
    border-radius: 50%;
    box-shadow: 0 0 10px #8e94f2;
}

/* =========================================
   LÓGICA DEL DROPDOWN Y PUENTE INVISIBLE
========================================= */
.dropdown-item {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-item::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -50px; 
    width: 180px;
    height: 45px; 
}

.dropdown-item:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =========================================
   ESTRUCTURA INTERNA Y ANIMACIÓN DE FECHAS
========================================= */
.content-wrapper {
    display: flex;
    gap: 20px;
}

.text-section {
    width: 60%;
    color: #fff;
}

.category {
    font-size: 10px;
    color: #ffffff; 
    opacity: 50%;
    letter-spacing: 2px;
    font-weight: 600;
    display: block;
    margin-bottom: 15px;
    padding-left: 20px; 
    padding-top: 20px;  
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-row {
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-name {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    transition: 0.3s;
}

.event-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    max-height: 0;      
    opacity: 0;         
    overflow: hidden;   
    margin-top: 0;
    transform: translateY(-5px); 
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-row:hover .event-date, 
.event-row.active .event-date {
    max-height: 20px;   
    opacity: 1;         
    margin-top: 6px;    
    transform: translateY(0); 
}

.event-row:hover .event-name, .event-row.active .event-name {
    color: #ffffff; 
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* =========================================
   AFICHE Y BOTÓN
========================================= */
.preview-box {
    width: 300px;
    height: 240px;
    position: relative;
    border-radius: 40px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out; 
    opacity: 1; 
}

/* ========================================================
   SOLUCIÓN DEL BUG DEL BLUR (HEADER CON FONDO FALSO)
======================================================== */
.header-container {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: transparent; 
    backdrop-filter: none; 
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 50px;
    gap: 30px;
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative; 
    z-index: 1001;
}

.header-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.06); 
    backdrop-filter: blur(15px) saturate(150%); 
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border-radius: 50px;
    z-index: -1; 
}

.dropdown-content {
    position: fixed; 
    top: 90px; 
    left: 50%; 
    transform: translateX(-50%) translateY(-10px); 
    width: 800px; 
    padding: 8px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px) saturate(150%); 
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 50px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 900;
}

/* =========================================
   LA MAGIA DE LA ANIMACIÓN (ESTADO COLAPSADO)
========================================= */
.header-container.collapsed {
    gap: 12px;
    padding: 8px 12px; 
}

.header-container.collapsed .nav-links {
    max-width: 0;
    opacity: 0;
    gap: 0;
    visibility: hidden; 
    transform: scaleX(0.8); 
}

.header-container.collapsed .menu-icon {
    transform: scale(1);
}

/* =========================================
   VERSIÓN MOBILE (Máx 768px)
========================================= */
@media (max-width: 768px) {
    .main-header {
        top: 15px; 
        padding: 0 10px; 
    }
    .header-container {
        width: 100%; 
        justify-content: space-between; 
        padding: 10px 15px;
        gap: 15px; 
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); 
    }
    .header-container.collapsed {
        width: 115px; 
        padding: 10px 20px; 
        justify-content: space-between; 
        gap: 0; 
    }
    .header-container.collapsed .user-status {
        padding-left: 0;
        border-left: none;
        gap: 6px; 
    }
    .nav-links {
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        max-width: 500px;
        opacity: 1;
        visibility: visible;
        transform: scaleX(1); 
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .header-container.collapsed .nav-links {
        max-width: 0;
        opacity: 0;
        gap: 0;
        margin: 0;
        padding: 0;
        visibility: hidden;
    }
    .dropdown-content {
        width: 90vw; 
        top: 70px;  
        padding: 15px;
    }
    .preview-box { display: none !important; }
    .text-section { width: 100%; }
    .event-row { padding: 12px 15px; }
}

/* =========================================
   NUEVO: LÓGICA VISUAL DEL LOGIN
========================================= */
/* Ajuste necesario para posicionar el cuadro debajo */
#user-menu-container {
    position: relative;
}

/* ELIMINADO EL OVERRIDE QUE HACÍA EL FONDO DEL AVATAR TRANSPARENTE */


.login-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    position: absolute;
    top: calc(100% + 25px);
    right: -15px; 
    width: 250px;
    
    /* 👇 ESTO ES LO QUE CAMBIA: El mismo efecto espejo del header */
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px) saturate(150%); 
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    z-index: 999;
    
    display: flex;
    flex-direction: column;
    gap: 16px;
}



.login-dropdown.show-login {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.login-dropdown h4 {
    margin: 0 0 5px 0;
    color: #ffffff;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.login-input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.login-input:focus {
    border-color: #8b9bb4;
    background: rgba(0, 0, 0, 0.4);
}

.login-btn {
    background: #ffffff;
    color: rgb(69, 69, 69);
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.login-btn:hover { background: #ececec; }