/* ==========================================
   MAIN-STYLES.CSS - CORREGIDO TÉCNICAMENTE
   ========================================== */

/* Variables específicas para main-styles.css */
/* NOTA: Colores principales, espaciados, bordes, sombras y transiciones
   están centralizados en design-system.css */
   
:root {
    /* Variables específicas de legacy y footer */
    --footer-bg: var(--background);
    --footer-text: var(--text-dark);
    
    /* Variables específicas de sombras para elementos legacy */
    --card-border: rgba(255, 255, 255, 0.2);
    --card-shadow: rgba(0, 0, 0, 0.05);
    --card-shadow-hover: rgba(0, 0, 0, 0.15);
    
    /* Alias para tipografías (mantener compatibilidad) */
    --tipography-1: var(--typography-main);
    --tipography-titles: var(--typography-titles);
    --tipography-custom-light: var(--typography-light);
    --tipography-custom-footer: var(--typography-footer);

    --primary: #432768;
    --secondary: #6ca8be;
    --terciary: #faa406;
}


/* Enlaces usando variables en lugar de colores hardcoded */
.links a {
    color: var(--secondary) !important;
    font-size: 0.9rem;
}

.active {
    font-weight: bold;
}

/* Fuente principal con fallback corregido */
body {
    font-family: var(--tipography-1) !important;
    background-color: var(--background);
    background-repeat: no-repeat;
    background-size: cover;
}

.btn-logout,
.btn-logout:hover,
.btn-logout:active {
    background-color: var(--secondary) !important;
    font-family: var(--tipography-1) !important;
}

.index-page .container {
    padding: 0;
}
/* ==========================================
   BARRA DE DÍAS MINIMALISTA
   ========================================== */
.days-navigation {
    background: #adb5bd;
    border-bottom: 1px solid var(--neutral-200);
    padding: var(--spacing-md) 0;
}

.days-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.days-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    border-radius: 4px;
    background: var(--neutral-100);
    padding: 2px;
}

.day-tab {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: center;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
    background: transparent;
}

/* Hover removido */

.day-tab.active-day {
    background: white;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive simple */
@media (max-width: 768px) {
    .days-tabs {
        flex-direction: column;
        gap: 2px;
    }
    
    .day-tab {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .days-container {
        padding: 0 var(--spacing-md);
    }
    
    .day-tab {
        font-size: 0.9rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* Compatibilidad con el estilo anterior (no se usa en el nuevo diseño) */
.old-active-day {
    background: var(--primary) !important;
    color: white !important;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    text-shadow: none;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(var(--primary), 0.3);
    border: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.active-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left var(--transition-normal);
}


.fondo {
    background-color: var(--background);
    border-radius: var(--border-radius-md);
}

.box-shadow {
    box-shadow: var(--shadow-lg);
}

/* Títulos usando variables de color */
.title-session {
    line-height: 35px;
    background-color: var(--secondary);
    color: var(--background);
    font-family: var(--tipography-titles) !important;
    font-weight: 600;
    font-size: 22px;
    border-radius: var(--border-radius-sm);
    letter-spacing: 1px;
    padding: 10px 15px;
}

.thumb-container {
    border-right: 4px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-container img {
    width: 300px;
    cursor: pointer;
    transition: transform var(--transition-normal);
}

.thumb-container img:hover {
    transform: scale(1.05);
}

.info-container {
    display: flex;
    align-items: center;
    justify-content: left;
}

/* Tipografías corregidas con fallback */
.doctor {
    font-family: var(--tipography-1) !important;
    font-style: italic;
    color: var(--text-light);
    font-size: 16px;
}

.doctor-name {
    font-family: var(--tipography-1) !important;
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 500;
}

.video-title {
    font-family: var(--tipography-titles) !important;
    color: var(--primary);
    font-size: 22px;
    font-weight: 600;
}

.modal-title {
    font-family: var(--tipography-titles) !important;
    color: var(--secondary);
    font-weight: 600;
}

.moderan {
    font-family: var(--tipography-1) !important;
    font-style: italic;
}


.organized img,
.sponsors img {
    width: 240px;
}

.textos-patrocinadores {
    font-family: var(--tipography-1) !important;
    font-size: 16px;
    color: var(--secondary);
    font-weight: bold;
}



.head540 {
    display: none !important;
}

/* ==========================================
   BOTONES LEGACY (Compatibilidad)
   ========================================== */

.btn-pdf,
.btn-ver {
    border-radius: var(--border-radius-xl) !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    transition: all var(--transition-normal) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

.btn-pdf,
.btn-pdf:hover,
.btn-pdf:focus,
.btn-pdf:active,
.btn-pdf:checked {
    background-color: var(--accent) !important;
    border: none !important;
}

.btn-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.btn-secondary{
    background-color: var(--secondary);
}

.btn-ver,
.btn-ver:hover,
.btn-ver:focus,
.btn-ver:active,
.btn-ver:checked {
    background-color: var(--secondary);
    font-family: var(--tipography-1) !important;
    border: none !important;
}

.btn-ver:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* ==========================================
   NOTA: TODAS LAS TARJETAS MODERNAS ESTÁN EN modern-cards.css
   ========================================== */

/* Enlace hover global */
a:hover {
  color: var(--primary) !important;
}

/* Botón icon-only para casos especiales */
.btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Session container modernizado */
.session-container {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-2xl);
    border: 1px solid var(--glass-border);
}

/* Tarjetas especiales para presentaciones */
.card-presentation {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-presentation .card-title {
    color: white !important;
}

.card-presentation .speaker-institution {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* Animaciones de carga */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   NOTA: TODO EL DISEÑO RESPONSIVE DE CARDS ESTÁ EN modern-cards.css
   ========================================== */

/* Animaciones para las tarjetas */
.card {
    animation: cardSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* ==========================================
   EFECTOS AVANZADOS E INTERACTIVIDAD
   ========================================== */

/* Scroll reveal animation */
@keyframes scrollReveal {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card.reveal {
    animation: scrollReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Loading skeleton */
.card-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Focus management para accesibilidad */

.card-overlay:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Reduce motion para usuarios sensibles */
@media (prefers-reduced-motion: reduce) {
    .card,

    .card-overlay {
        transition: none;
        animation: none;
    }
    
    .card:hover {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--text-dark);
    }
    
    .speaker-institution,
    .speaker-list {
        background: var(--text-dark);
        color: var(--background);
    }
}

/* ==========================================
   UTILIDADES ADICIONALES
   ========================================== */

/* Estados de carga */
.card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Indicadores de estado */
.card-status {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--gradient-accent);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

/* Mejoras de performance */
.card-image-container img {
    content-visibility: auto;
    contain-intrinsic-size: 360px 200px;
}

/* Smooth scroll para navegación */
html {
    scroll-behavior: smooth;
}

/* Container principal mejorado */
.content-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: var(--spacing-lg) 0;
}

/* Elementos de texto mejorados para las tarjetas legacy */
.sede {
    font-family: var(--tipography-1) !important;
    font-style: italic;
    color: var(--text-light);
    font-weight: 400;
    font-size: 14px;
}

.lista {
    font-family: var(--tipography-1) !important;
    color: var(--secondary);
    font-weight: 400;
    font-size: 14px;
}

/* Imagen de overlay - CORREGIDA ruta a WebP */
.ver {
    width: 100%;
    height: 100%;
    cursor: pointer !important;
    background-image: url('../img/thumb/ver.webp') !important;
    background-size: cover !important;
    position: absolute;
    top: 0;
    opacity: 0.7;
    transition: opacity var(--transition-normal);
}

.ver:hover {
    opacity: 0.9;
}

/* ==========================================
   MODAL MODERNO
   ========================================== */

.modern-modal {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-2xl) !important;
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
}

.modern-modal-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--border-radius-2xl) var(--border-radius-2xl) 0 0;
}

.modern-modal-header .modal-title {
    font-family: var(--tipography-titles);
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

.modern-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all var(--transition-normal);
}

.modern-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modern-modal-body {
    padding: var(--spacing-xl);
    background: var(--card-bg);
}

.video-container {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.speakers-section {
    background: var(--glass-bg);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-xl);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.session-code {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--border-radius-lg);
    font-family: var(--tipography-1);
    font-size: 0.9rem;
    color: var(--text-light);
}

.modern-modal-footer {
    background: var(--glass-bg);
    border: none;
    padding: var(--spacing-lg) var(--spacing-xl);
    text-align: center;
    border-radius: 0 0 var(--border-radius-2xl) var(--border-radius-2xl);
}

.btn-close-modal {
    background: var(--gradient-secondary) !important;
    color: white !important;
    padding: 12px 24px !important;
    font-size: 1rem !important;
}

.btn-close-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
    color: white !important;
}

/* Modal responsive */
@media (max-width: 768px) {
    .modern-modal {
        margin: var(--spacing-md);
        border-radius: var(--border-radius-xl) !important;
    }
    
    .modern-modal-header,
    .modern-modal-body,
    .modern-modal-footer {
        padding: var(--spacing-lg);
    }
    
    .modern-modal-header .modal-title {
        font-size: 1.25rem;
    }
    
    .video-container {
        margin-bottom: var(--spacing-md);
    }
    
    .speakers-section {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
}

/* ==========================================
   MEJORAS DE SECCIÓN
   ========================================== */

/* Títulos de sesión modernos */
.title-session {
    line-height: 1.4;
    background: var(--gradient-primary);
    color: white;
    font-family: var(--tipography-titles) !important;
    font-weight: 700;
    font-size: 1.5rem;
    border-radius: var(--border-radius-xl);
    padding: var(--spacing-lg) var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.title-session::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left var(--transition-slow);
}

.title-session:hover::before {
    left: 100%;
}

.nombre-session {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-xl);
    padding: var(--spacing-lg) var(--spacing-xl);
    text-align: center;
    margin: var(--spacing-lg) 0;
    box-shadow: var(--shadow-md);
}

.nombre-session span {
    font-family: var(--tipography-titles);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--primary);
}

@media (max-width: 576px) {
    .thumb-container img {
        width: 100%;
    }
    .info-container {
        justify-content: center;
        margin-top: 5%;
    }
    .btn-pdf {
        margin-top: 1.5% !important;
    }
    .footer {
        height: 100px;
    }
    .footer-bar {
        display: none;
    }
    .modal-dialog {
        max-width: 710px;
    }
    .aviso-legal {
        text-align: center !important;
    }
    .thumb-container {
        border-right: 0;
    }
}

@media (max-width: 540px) {
    .head {
        display: none !important;
    }
    .head540 {
        display: block !important;
    }
    .responsive-logo {
        width: 100%;
        height: auto !important;
    }
    .title-session {
        font-size: 18px;
        line-height: 26px;
        padding: 10px;
    }
    .btn-ver,
    .btn-pdf {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 450px) {
    .thumb-container {
        margin-bottom: 5%;
    }
    .responsive-logo {
        width: 100%;
        height: auto !important;
    }

    .organized .col-12 {
        text-align: center;
    }

    .sponsors .col-12 {
        margin-bottom: 8%;
    }
}

/* ==========================================
   ESTILOS PARA BUSCADOR DE CHARLAS
   ========================================== */

.search-container {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-container .input-group {
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.search-container .form-control {
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    transition: var(--transition-normal);
}

.search-container .form-control:focus {
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
    outline: none;
}

.search-container .btn {
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-light);
    padding: 12px 16px;
    transition: var(--transition-fast);
}

.search-container .btn:hover {
    background: #ffffff;
    color: var(--accent);
}

/* Highlight de resultados de búsqueda */
.search-highlight {
    background: linear-gradient(120deg, #fff3cd 0%, #fff3cd 100%);
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Mensaje de no resultados */
.no-results-message {
    animation: fadeInUp 0.5s ease;
}

.no-results-message .alert {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left: 4px solid var(--accent);
}

.no-results-message .fas {
    color: var(--accent);
    opacity: 0.7;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive para el buscador */
@media (max-width: 768px) {
    .search-container {
        padding: 1rem !important;
    }
    
    .search-container .input-group {
        max-width: 100% !important;
    }
    
    .search-container .form-control {
        font-size: 16px; /* Evita zoom en iOS */
    }
}

@media (max-width: 450px) {
    .search-container .form-control {
        padding: 10px 12px;
    }
    
    .search-container .btn {
        padding: 10px 12px;
    }
}

/* ==========================================
   FIN DE MAIN-STYLES.CSS
   ========================================== */