/* =========================================
   ESTILOS BASE Y CONTENEDOR (HILTI RED #D20000)
   ========================================= */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

.nl-wrap { 
    max-width: 600px; 
    margin: 0 auto; 
    background: #ffffff; 
    border-radius: 12px; 
    border: 1px solid #e1e4e8; 
    overflow: hidden; 
}

.nl-header { 
    background: #185FA5; 
    padding: 32px 24px; 
    text-align: center; 
}
.nl-header h1 { color: #E6F1FB; font-size: 24px; margin: 0 0 6px; font-weight: 800; }
.nl-header p { color: #B5D4F4; font-size: 13px; margin: 0; }

/* =========================================
   FILTROS (Los botones superiores)
   ========================================= */
.filters-container {
    padding: 20px 24px 0 24px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.filters-container::-webkit-scrollbar { display: none; }

.filter-btn {
    background-color: #f4f6f8;
    border: 1px solid #e1e4e8;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #666666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.filter-btn:hover { background-color: #e1e4e8; }

/* Filtro Activo - Rojo Hilti */
.filter-btn.active {
    background-color: #185FA5;
    color: #ffffff;
    border-color: #185FA5;
}

/* =========================================
   DISEÑO DE LOS EVENTOS
   ========================================= */
.venue-block { 
    margin-bottom: 20px; 
    border-radius: 10px; 
    border: 1px solid #e8edf2; 
    overflow: hidden; 
}
.venue-header { 
    background: #f8f9fa; 
    padding: 12px 16px; 
    border-bottom: 1px solid #e8edf2; 
    font-weight: 600; 
    display: flex;
    align-items: center;
}
.icon-box {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px; margin-right: 12px; font-size: 16px;
}

/* FILA DE EVENTO — Layout principal */
.event-row { 
    padding: 16px 16px 16px 12px;
    border-bottom: 1px solid #e8edf2;
    background-color: #ffffff;
}

.event-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;         
    height: 34px;         
    border-radius: 8px;   
    margin-right: 10px;   
    font-size: 18px;      
    flex-shrink: 0;   
}

.event-row:last-child { border-bottom: none; }

.event-row-main {
    display: flex;
    align-items: flex-start;
}

.event-content { flex-grow: 1; padding-right: 12px; }
.event-title { font-weight: 600; color: #1a1a1a; margin: 0 0 2px; font-size: 14px; }
.event-desc { color: #666666; font-size: 12px; margin: 0 0 6px; line-height: 1.4; }
.event-price { font-weight: 600; font-size: 13px; }

/* GRUPO DE BOTONES DE ACCIÓN */
.event-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    align-items: flex-end;
}

.cal-btn, .loc-btn, .info-btn {
    font-size: 11px; 
    font-weight: 600; 
    padding: 7px 12px; 
    border-radius: 6px; 
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}
.cal-btn:hover, .loc-btn:hover, .info-btn:hover { opacity: 0.85; }

.loc-btn {
    background-color: #f0f4f8;
    color: #444;
    border: 1px solid #d8dde3;
}
.loc-btn:hover { background-color: #e1e8ef; opacity: 1; }

.info-btn {
    background-color: transparent;
    color: #888;
    border: 1px solid #e1e4e8;
    font-size: 11px;
    padding: 6px 10px;
}
.info-btn:hover { background-color: #f4f6f8; opacity: 1; }
.info-btn .info-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
    font-style: normal;
}
.info-btn.expanded .info-arrow { transform: rotate(180deg); }

/* =======================================================
   PANEL DESPLEGABLE DE DESCRIPCIÓN CON DESPLAZAMIENTO VERTICAL
   ======================================================= */
.event-detail-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
    opacity: 0;
}
.event-detail-panel.open {
    max-height: 160px;     /* 🔒 Limitamos el alto de la caja para que no rompa el móvil */
    overflow-y: auto;      /* ↕️ Activa el desplazamiento vertical automático si el texto es muy largo */
    opacity: 1;
    scrollbar-width: thin; /* Hace la barra de scroll más fina y discreta en navegadores modernos */
}
.event-detail-inner {
    margin-top: 12px;
    padding: 12px 14px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #d0d9e3;
    font-size: 12px;
    color: #555;
    line-height: 1.6;
}

/* =========================================
   ACENTO LATERAL Y FONDO DE ICONO POR CATEGORÍA
   ========================================= */

/* ========================================= 
   🌟 ESTILOS ESPECIALES PARA EVENTOS DESTACADOS
   ========================================= */
.event-row.special-event {
    background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%);
    border-left: 6px solid #D20000 !important;
    box-shadow: 0 4px 12px rgba(210, 0, 0, 0.15);
    border-radius: 0 8px 8px 0;
    position: relative;
    overflow: hidden;
}

.event-row.special-event::before {
    content: '✨';
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 18px;
    opacity: 0.6;
}

.event-row.special-event .event-title {
    color: #D20000;
    font-weight: 700;
    font-size: 15px;
}

.event-row.special-event .event-icon {
    background-color: #D20000 !important;
    color: #ffffff;
    font-weight: 700;
}

.event-row.special-event .event-price {
    color: #D20000;
    font-weight: 700;
    font-size: 14px;
}

.event-row.special-event .cal-btn {
    background-color: #D20000;
    color: #ffffff;
    border-color: #D20000;
    font-weight: 700;
}
.event-row.special-event .cal-btn:hover {
    background-color: #a30000;
    border-color: #a30000;
}

.event-row.special-event .event-detail-inner {
    background-color: #fff5f0;
    border-left-color: #ff9999;
    border-left-width: 4px;
}

/* =========================================
   ACENTO LATERAL Y FONDO DE ICONO POR CATEGORÍA
   ========================================= */


/* 🎵 MUSIC (.theme-blue) */
.theme-blue.event-row { border-left: 4px solid #006097; }
.theme-blue .event-icon { background-color: #E6F4FC; }

/* 🌱 NATURE (.theme-green) */
.theme-green.event-row { border-left: 4px solid #00695C; }
.theme-green .event-icon { background-color: #E0F2F1; }

/* ⚽ SPORT (.theme-red) */
.theme-red.event-row { border-left: 4px solid #E65100; }
.theme-red .event-icon { background-color: #FFF3E0; }

/* 🧩 CULTURE (.theme-purple) */
.theme-purple.event-row { border-left: 4px solid #6A1B9A; }
.theme-purple .event-icon { background-color: #F3E5F5; }

/* 🪇 LEISURE (.theme-pink) */
.theme-pink.event-row { border-left: 4px solid #C2185B; }
.theme-pink .event-icon { background-color: #FCE4EC; }

/* ⚙️ OTHERS (.theme-grey) */
.theme-grey.event-row { border-left: 4px solid #455A64; }
.theme-grey .event-icon { background-color: #ECEFF1; }

/* =========================================
   NUEVA PALETA DE COLORES EXCLUSIVA POR CATEGORÍA
   ========================================= */

/* 🎵 MUSIC (Clase original: .theme-blue) -> AZUL CYAN */
.theme-blue .venue-header { color: #006097; }
.theme-blue .icon-box { background-color: #E6F4FC; color: #006097; }
.theme-blue .event-price { color: #2E7D32; }
.theme-blue .cal-btn { background-color: #006097; color: #ffffff; }
.theme-blue .event-detail-inner { border-left-color: #90CAF9; background-color: #F4F9FD; }

/* 🌱 NATURE (Clase original: .theme-green) -> VERDE ESMERALDA */
.theme-green .venue-header { color: #00695C; }
.theme-green .icon-box { background-color: #E0F2F1; color: #00695C; }
.theme-green .event-price { color: #2E7D32; }
.theme-green .cal-btn { background-color: #00695C; color: #ffffff; }
.theme-green .event-detail-inner { border-left-color: #80CBC4; background-color: #F2F9F9; }

/* ⚽ SPORT (Clase original: .theme-red) -> NARANJA ELÉCTRICO */
.theme-red .venue-header { color: #E65100; }
.theme-red .icon-box { background-color: #FFF3E0; color: #E65100; }
.theme-red .event-price { color: #2E7D32; }
.theme-red .cal-btn { background-color: #E65100; color: #ffffff; }
.theme-red .event-detail-inner { border-left-color: #FFCC80; background-color: #FFF9F2; }

/* 🧩 CULTURE (Clase original: .theme-purple) -> PÚRPURA AMATISTA */
.theme-purple .venue-header { color: #6A1B9A; }
.theme-purple .icon-box { background-color: #F3E5F5; color: #6A1B9A; }
.theme-purple .event-price { color: #2E7D32; }
.theme-purple .cal-btn { background-color: #6A1B9A; color: #ffffff; }
.theme-purple .event-detail-inner { border-left-color: #CE93D8; background-color: #FAF5FB; }

/* 🪇 LEISURE (Clase original: .theme-pink) -> ROSA MAGENTA */
.theme-pink .venue-header { color: #C2185B; }
.theme-pink .icon-box { background-color: #FCE4EC; color: #C2185B; }
.theme-pink .event-price { color: #2E7D32; }
.theme-pink .cal-btn { background-color: #C2185B; color: #ffffff; }
.theme-pink .event-detail-inner { border-left-color: #F48FB1; background-color: #FDF5F7; }

/* ⚙️ UNCLASSIFIED / OTHERS -> GRIS SIDERAL */
.theme-grey .venue-header { color: #455A64; }
.theme-grey .icon-box { background-color: #ECEFF1; color: #455A64; }
.theme-grey .event-price { color: #2E7D32; }
.theme-grey .cal-btn { background-color: #455A64; color: #ffffff; }
.theme-grey .event-detail-inner { border-left-color: #B0BEC5; background-color: #F7F9FA; }

/* =========================================
   ADAPTACIÓN PARA MÓVILES + ARREGLO TEXTOS LARGOS
   ========================================= */
@media (max-width: 480px) {
    .event-row-main { flex-wrap: wrap; }
    
    .event-content { 
        width: 100%; 
        padding-right: 0; 
    }
    .event-title {
        white-space: normal; 
        word-wrap: break-word;
        line-height: 1.4;
        font-size: 14px;
        margin-bottom: 4px;
        display: flex;
        align-items: center;
    }
    .event-desc {
        white-space: normal; 
        word-wrap: break-word;
        line-height: 1.4;
        font-size: 12px;
    }

    /* Ajuste de botones en móvil para que se expandan elegantemente abajo */
    .event-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
        margin-top: 12px;
        padding-left: 0;
        gap: 6px;
    }
    .cal-btn, .loc-btn, .info-btn {
        flex: 1;
        min-width: 85px;
        justify-content: center;
        padding: 9px 10px;
        font-size: 11px;
    }
}