/**
 * Dashboard Styles - Foro CIX "Pulso de la Conexión"
 * Estilos para el dashboard interactivo (foro.html)
 * @version 2.0.0
 * @author Sistema de Agenda CIX
 */

/* ============================================
   VARIABLES CSS Y CONFIGURACIÓN BASE
   ============================================ */
:root {
    /* Paleta de colores corporativa */
    --color-primary: #3B82F6;
    --color-primary-dark: #2563EB;
    --color-primary-light: #60A5FA;
    
    --color-secondary: #8B5CF6;
    --color-accent: #F59E0B;
    
    /* Colores de fases del evento */
    --color-montaje: rgba(156, 163, 175, 0.7);
    --color-recepcion: rgba(96, 165, 250, 0.7);
    --color-foro: rgba(59, 130, 246, 0.7);
    --color-pausa: rgba(251, 191, 36, 0.7);
    --color-ceremonia: rgba(79, 70, 229, 0.7);
    --color-celebracion: rgba(236, 72, 153, 0.7);
    --color-cierre: rgba(107, 114, 128, 0.7);
    
    /* Colores de fondo y texto */
    --color-bg-main: #FDFBF8;
    --color-bg-card: #FFFFFF;
    --color-bg-secondary: #F9FAFB;
    --color-text-primary: #1a202c;
    --color-text-secondary: #4A5568;
    --color-text-muted: #718096;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Espaciado */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Bordes */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ============================================
   ESTILOS BASE
   ============================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--color-bg-main);
    color: var(--color-text-primary);
    line-height: 1.6;
}

/* ============================================
   NAVEGACIÓN
   ============================================ */
.nav-link {
    transition: all var(--transition-base);
    border-bottom: 3px solid transparent;
    position: relative;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--color-primary);
    background-color: rgba(59, 130, 246, 0.05);
}

.nav-link.active {
    border-bottom-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    background-color: rgba(59, 130, 246, 0.08);
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--color-primary);
    transition: width var(--transition-base);
}

.nav-link:hover::before {
    width: 100%;
}

/* ============================================
   TARJETAS
   ============================================ */
.card {
    background-color: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 2px solid var(--color-bg-secondary);
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   SECCIONES DE CONTENIDO
   ============================================ */
.content-section {
    display: none;
    animation: fadeIn var(--transition-base);
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CRONOGRAMA (CHART.JS)
   ============================================ */
.chart-container {
    position: relative;
    width: 100%;
    height: 500px;
    max-height: 80vh;
    background-color: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

@media (min-width: 768px) {
    .chart-container {
        height: 600px;
        max-height: 70vh;
    }
}

@media (min-width: 1024px) {
    .chart-container {
        height: 700px;
    }
}

/* Detalles del timeline */
#timeline-details {
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, #ffffff 100%);
    border-left: 4px solid var(--color-primary);
    transition: all var(--transition-base);
}

#timeline-details:empty::after {
    content: 'Selecciona un bloque en el gráfico para ver su información aquí.';
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

/* ============================================
   MAPA DEL EVENTO
   ============================================ */
.map-area {
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    min-height: 200px;
    position: relative;
    transition: all var(--transition-base);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.map-area:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-md);
}

.map-hotspot {
    position: absolute;
    width: 1rem;
    height: 1rem;
    background-color: var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
}

.map-hotspot:hover {
    animation: none;
    transform: scale(1.3);
    background-color: var(--color-primary-dark);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.map-phase-btn {
    transition: all var(--transition-base);
    font-weight: 500;
}

.map-phase-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.map-phase-btn:active {
    transform: translateY(0);
}

/* ============================================
   ARCO NARRATIVO
   ============================================ */
.narrative-card {
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.narrative-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.narrative-card:hover::before {
    transform: scaleX(1);
}

.narrative-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.narrative-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.narrative-details:not(.hidden) {
    max-height: 500px;
}

/* ============================================
   CONTADOR REGRESIVO
   ============================================ */
.countdown-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all var(--transition-base);
}

.countdown-box:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.countdown-number {
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   DETALLES TÉCNICOS
   ============================================ */
.tech-card {
    border-left: 4px solid var(--color-primary);
    transition: all var(--transition-base);
}

.tech-card:hover {
    border-left-width: 6px;
}

/* ============================================
   BADGES Y ETIQUETAS
   ============================================ */
.phase-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .chart-container {
        height: 400px;
    }
    
    .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .countdown-box {
        padding: 0.5rem 0.75rem;
    }
}

/* ============================================
   UTILIDADES
   ============================================ */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   ANIMACIONES ADICIONALES
   ============================================ */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in-left {
    animation: slideInFromLeft var(--transition-base);
}

.animate-slide-in-right {
    animation: slideInFromRight var(--transition-base);
}
