:root {
    --color-primary: #C8102E;
    --color-primary-light: #FADEE2;
    --color-primary-trans: rgba(200, 16, 46, 0.08);
    --color-secondary: #0033A0;
    --color-secondary-light: #D9E2F3;
    --color-secondary-trans: rgba(0, 51, 160, 0.08);
    --color-background: #FDF9F3;
    --color-text-dark: #002147;
    --color-text-light: #6B7280;
    --color-favorite: #F59E0B;
    --font-sans: 'Montserrat', sans-serif;
    --radius-card: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text-light);
    background-color: var(--color-background);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary-trans);
    clip-path: polygon(0% 15%, 100% 0%, 85% 100%, 15% 85%);
    z-index: -1;
    transform: rotate(20deg);

}

body::after {
    content: '';
    position: fixed;
    top: 180vh;
    right: -30vw;
    width: 70vw;
    height: 150vh;
    background-color: var(--color-secondary-trans);
    clip-path: polygon(20% 0%, 80% 20%, 100% 80%, 0% 100%);
    z-index: -1;
    transform: rotate(-15deg);
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background-color: var(--color-secondary);
    border-radius: 10px;
    border: 2px solid var(--color-background);
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-text-dark);
}

/* Highlighting de búsqueda */
mark.search-highlight {
    background-color: rgba(245, 158, 11, 0.3);
    color: inherit;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

mark.search-highlight:hover {
    background-color: rgba(245, 158, 11, 0.5);
}

.main-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.main-header .logo,
.main-header .nav-link {
    color: var(--color-background);
    transition: color 0.3s ease;
}

.main-header.scrolled .logo,
.main-header.scrolled .nav-link {
    color: var(--color-text-dark);
}

.main-header .nav-link:hover {
    color: #FFF; /* Blanco puro al pasar el ratón */
}

.main-header.scrolled {
    position: fixed;
    background-color: rgba(253, 249, 243, 0.85);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 1.25rem;
    font-weight: 900;
}

.nav-link {
    font-weight: 700;
    transition: color 0.2s ease;
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-out;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hero-andes {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #010419 40%, #151A3D 70%, #5D3756 100%);
}

.hero-content {
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-logo-container {
    animation: fadeInUp 0.8s 1.2s ease-out forwards;
    opacity: 0;
}

.hero-logo {
    max-height: 500px;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    color: var(--color-text-dark);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
    animation: fadeInUp 0.8s 1.4s ease-out forwards;
    opacity: 0;
}

.geo-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.layer-4 {
    background-color: #0D1026; /* Casi negro azulado */
    clip-path: polygon(0 85%, 15% 75%, 30% 82%, 50% 70%, 70% 80%, 85% 75%, 100% 88%, 100% 100%, 0% 100%);
    animation: andes-rise-left 1.5s 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    z-index: 1;
}

.layer-3 {
    background-color: #151A3D; /* Azul profundo */
    clip-path: polygon(0 90%, 20% 80%, 40% 88%, 65% 75%, 80% 85%, 100% 80%, 100% 100%, 0% 100%);
    animation: andes-rise-right 1.5s 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    z-index: 2;
}

.layer-2 {
    background-color: var(--color-text-dark); /* El azul oscuro principal */
    clip-path: polygon(0 100%, 0 92%, 25% 82%, 45% 90%, 70% 80%, 80% 88%, 100% 95%, 100% 100%);
    animation: andes-rise-left 1.5s 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    z-index: 3;
}

.layer-1 {
    background-color: var(--color-secondary); /* Azul marino */
    clip-path: polygon(100% 100%, 30% 100%, 55% 90%, 80% 94%, 100% 90%);
    animation: andes-rise-right 1.5s 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    z-index: 4;
}

.marquee {
    padding: 1.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    background-color: var(--color-secondary);
}

.marquee-content {
    display: flex;
    animation: marquee 30s linear infinite;
}

.marquee .separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 2rem;
    animation: pulse 2s ease-in-out infinite;
}

/* Enlace destacado de Certificados */
.nav-link-certificados {
    font-weight: 900;
    font-size: 1.125rem;
    color: #FFF !important;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    padding: 0.625rem 1.25rem !important;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.4);
    position: relative;
    animation: pulse-glow 2s ease-in-out infinite;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.nav-link-certificados::after {
    display: none;
}

.nav-link-certificados:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.5);
    color: #FFF !important;
}

/* Menú Mobile Profesional */
.mobile-menu-button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
}

.mobile-menu-button.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-button.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-button.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 33, 71, 0.8);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 40;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: linear-gradient(180deg, #002147 0%, #003366 100%);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 50;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-content {
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.mobile-menu-header {
    padding: 0 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.mobile-menu-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    letter-spacing: 0.5px;
}

.mobile-menu-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.mobile-menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mobile-menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
}

.mobile-menu-link:hover::before {
    transform: scaleY(1);
}

.mobile-menu-link svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.mobile-menu-link:hover svg {
    opacity: 1;
    transform: scale(1.1);
}

.mobile-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1rem 1rem;
}

.mobile-menu-link-certificados {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    margin: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(200, 16, 46, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.mobile-menu-link-certificados::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.mobile-menu-link-certificados:hover::before {
    left: 100%;
}

.mobile-menu-link-certificados:active {
    transform: scale(0.98);
}

.mobile-menu-link-certificados svg {
    flex-shrink: 0;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.mobile-menu-certificados-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.mobile-menu-certificados-title {
    color: white;
    font-size: 1.125rem;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.mobile-menu-certificados-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Animaciones de entrada para los items del menú */
.mobile-menu.active .mobile-menu-link,
.mobile-menu.active .mobile-menu-link-certificados {
    animation: slideInFromRight 0.4s ease forwards;
    opacity: 0;
}

.mobile-menu.active .mobile-menu-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu.active .mobile-menu-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-menu.active .mobile-menu-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-menu.active .mobile-menu-link:nth-child(4) { animation-delay: 0.25s; }
.mobile-menu.active .mobile-menu-link:nth-child(5) { animation-delay: 0.3s; }
.mobile-menu.active .mobile-menu-link-certificados { animation-delay: 0.4s; }

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(200, 16, 46, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(200, 16, 46, 0.6), 0 0 30px rgba(200, 16, 46, 0.3);
    }
}

.main-header.scrolled .nav-link-certificados {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #FFF !important;
}

.program-section {
    padding-top: 8rem;
    padding-bottom: 12vh;
    background-color: var(--color-surface);
    display: flex;
    flex-direction: column;
    height: 160vh;
    box-sizing: border-box;
}

.program-section .container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-text-dark);
    text-align: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.filter-bar-wrapper {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    padding: 1rem;
    border-radius: var(--radius-card);
    box-shadow: 0 10px 30px rgba(0, 33, 71, 0.08);
    margin-bottom: 1.5rem;
    z-index: 40;
    flex-shrink: 0;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .filter-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .filter-bar {
        grid-template-columns: 2fr 1fr 1fr 1fr auto;
    }
}

.filter-bar input,
.filter-bar select,
.filter-bar button {
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    transition: all 0.2s ease;
}

.filter-bar input:hover,
.filter-bar select:hover {
    transform: scale(1.02);
}


.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.2);
}

.filter-bar button {
    background-color: #f3f4f6;
    font-weight: 700;
    color: #374151;
}

.filter-bar button:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
}
.filter-bar button:active {
    transform: translateY(0) scale(0.98);
}

.program-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 3rem;
}

.program-scroll-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    margin: 0 -1rem;
    min-height: 0;
}

.tab-button {
    font-size: 1.125rem;
    font-weight: 700;
    padding: 0 1rem 1rem;
    margin: 0 1rem;
    color: var(--color-text-light);
    border-bottom: 4px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease-out;
}

.tab-button:hover {
    color: var(--color-text-dark);
}

.tab-button.active {
    color: var(--color-primary);
}

.tab-button.active::after {
    transform: scaleX(1);
}

#program-content {
    width: 100%;
    min-height: 400px;
    padding: 1rem;
}

.program-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    transition: opacity 0.3s ease-out;
    justify-content: start; /* Evita que las tarjetas se centren cuando hay pocas */
}

/* Limitar el ancho máximo de las tarjetas cuando hay pocas */
.program-card {
    background-color: white;
    border-radius: var(--radius-card);
    box-shadow: 0 4px 20px rgba(0, 33, 71, 0.07);
    border-left: 5px solid;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 450px; /* Añadir ancho máximo */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 1024px) {
    .program-content-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2.5rem;
    }
}

.program-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 33, 71, 0.1);
}

.program-card.is-simposio {
    border-color: var(--color-secondary);
}

.program-card.is-ponencia {
    border-color: var(--color-primary);
}

.program-scroll-container {
    flex: 1;
    min-height: 0; 
    overflow-y: auto;
    padding: 1rem;
    margin: 0 -1rem;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-moderator {
    font-size: 0.875rem;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

.card-authors {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 500;
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.4;
}

.card-eje {
    background-color: rgba(0, 51, 160, 0.1);
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    align-self: flex-start;
    margin-bottom: 0.5rem;
}

/* TAG DE TURNO MEJORADO */
.card-turn-order {
    font-size: 0.7rem;
    color: var(--color-text-dark);
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    align-self: flex-start;
}

.card-tags {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.02);
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-light);
    display: flex;
    justify-content: space-between;
    border-bottom-left-radius: var(--radius-card);
    border-bottom-right-radius: var(--radius-card);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 10;
}

.favorite-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke: #d1d5db;
    fill: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.favorite-btn:hover svg {
    stroke: var(--color-favorite);
    transform: scale(1.1);
}

.share-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 10;
}

.share-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
    transition: color 0.2s ease, transform 0.2s ease;
}

.share-btn:hover svg {
    color: var(--color-secondary);
    transform: scale(1.1);
}

.ver-mesa-btn {
    position: absolute;
    bottom: 1rem;
    right: 3.5rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.ver-mesa-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
    transition: color 0.2s ease, transform 0.2s ease;
}

.ver-mesa-btn:hover svg {
    color: var(--color-primary);
    transform: scale(1.1);
}

.no-results-message {
    text-align: center;
}

.clear-filters-button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    color: white;
    background-color: var(--color-secondary);
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.clear-filters-button:hover {
    background-color: var(--color-text-dark);
    transform: scale(1.05);
}

mark {
    background-color: #fef08a;
    padding: 0.1em 0.2em;
    border-radius: 4px;
    color: var(--color-text-dark);
}

.main-footer {
    padding: 4rem 1.5rem;
    background-color: var(--color-text-dark);
    color: white;
    position: relative;
    background-image: linear-gradient(to top, #002147, #002a5a);
    clip-path: polygon(0 10vh, 100% 0, 100% 100%, 0% 100%);
    margin-top: -10vh;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding-top: 5vh;
}

.footer-logo {
    max-height: 120px;
    width: auto;
    mix-blend-mode: luminosity;
    opacity: 0.7;
    transition: opacity 0.3s ease, mix-blend-mode 0.3s ease;
}
.footer-logo:hover {
    mix-blend-mode: normal;
    opacity: 1;
}

.footer-logo.logo-alt {
    max-height: 150px;
}

.footer-text {
    max-width: 40ch;
    margin: 0 auto 1rem auto;
    font-weight: 500;
    opacity: 0.8;
}

.footer-copy {
    margin-top: 2rem;
    font-size: 0.875rem;
    opacity: 0.6;
}

.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 100;
}

.toast {
    padding: 1rem 1.5rem;
    background-color: var(--color-text-dark);
    color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    font-weight: 600;
    animation: toastIn 0.3s ease forwards;
}

.toast.out {
    animation: toastOut 0.3s ease forwards;
}

.stars-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

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

@keyframes popAndShine {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); filter: drop-shadow(0 0 8px var(--color-favorite)); }
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes andes-rise-left {
  from {
    opacity: 0;
    transform: translateY(80%) translateX(-10%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
}

@keyframes andes-rise-right {
  from {
    opacity: 0;
    transform: translateY(80%) translateX(10%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
}

.favorite-btn svg.favorited {
    stroke: var(--color-favorite);
    fill: var(--color-favorite);
    animation: popAndShine 0.4s ease-out;
}

.stars-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#stars {
  width: 1px;
  height: 1px;
  background: transparent;
  box-shadow: 1872px 694px #FFF, 1726px 81px #FFF, 1530px 583px #FFF, 62px 914px #FFF, 891px 114px #FFF, 423px 18px #FFF, 321px 1845px #FFF, 810px 1019px #FFF, 458px 1193px #FFF, 1695px 1585px #FFF, 43px 1269px #FFF, 1374px 1756px #FFF, 1421px 343px #FFF, 1423px 44px #FFF, 1485px 529px #FFF, 1799px 728px #FFF, 128px 1206px #FFF, 1060px 1079px #FFF, 1198px 846px #FFF, 1445px 544px #FFF;
  animation: animStar 50s linear infinite;
}
#stars:after {
  content: " ";
  position: absolute;
  top: 2000px;
  width: 1px;
  height: 1px;
  background: transparent;
  box-shadow: 1872px 694px #FFF, 1726px 81px #FFF, 1530px 583px #FFF, 62px 914px #FFF, 891px 114px #FFF, 423px 18px #FFF, 321px 1845px #FFF, 810px 1019px #FFF, 458px 1193px #FFF, 1695px 1585px #FFF, 43px 1269px #FFF, 1374px 1756px #FFF, 1421px 343px #FFF, 1423px 44px #FFF, 1485px 529px #FFF, 1799px 728px #FFF, 128px 1206px #FFF, 1060px 1079px #FFF, 1198px 846px #FFF, 1445px 544px #FFF;
}

#stars2 {
  width: 2px;
  height: 2px;
  background: transparent;
  box-shadow: 1399px 311px #FFF, 940px 487px #FFF, 1133px 569px #FFF, 731px 1038px #FFF, 386px 848px #FFF, 252px 1470px #FFF, 54px 129px #FFF, 795px 1248px #FFF, 1758px 459px #FFF, 408px 233px #FFF, 401px 1500px #FFF, 64px 691px #FFF;
  animation: animStar 100s linear infinite;
}
#stars2:after {
  content: " ";
  position: absolute;
  top: 2000px;
  width: 2px;
  height: 2px;
  background: transparent;
  box-shadow: 1399px 311px #FFF, 940px 487px #FFF, 1133px 569px #FFF, 731px 1038px #FFF, 386px 848px #FFF, 252px 1470px #FFF, 54px 129px #FFF, 795px 1248px #FFF, 1758px 459px #FFF, 408px 233px #FFF, 401px 1500px #FFF, 64px 691px #FFF;
}

#stars3 {
  width: 3px;
  height: 3px;
  background: transparent;
  box-shadow: 1805px 1388px #FFF, 298px 1974px #FFF, 184px 974px #FFF, 1782px 1993px #FFF, 977px 783px #FFF, 888px 987px #FFF, 1960px 453px #FFF;
  animation: animStar 150s linear infinite;
}
#stars3:after {
  content: " ";
  position: absolute;
  top: 2000px;
  width: 3px;
  height: 3px;
  background: transparent;
  box-shadow: 1805px 1388px #FFF, 298px 1974px #FFF, 184px 974px #FFF, 1782px 1993px #FFF, 977px 783px #FFF, 888px 987px #FFF, 1960px 453px #FFF;
}

.shooting-stars {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
}
.shooting-star {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 2px;
    background: linear-gradient(-45deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
    border-radius: 999px;
    filter: drop-shadow(0 0 6px white);
    animation: shooting-star-anim 10s ease-in-out infinite;
}

.shooting-star:nth-child(2) {
    animation-delay: 3s;
    animation-duration: 8s;
}


@keyframes animStar {
  from {transform: translateY(0px);}
  to {transform: translateY(-2000px);}
}

@keyframes shooting-star-anim {
    0% { transform: translateX(-50vw) translateY(-50vh) rotate(35deg); width: 0; }
    30% { width: 150px; }
    100% { transform: translateX(50vw) translateY(50vh) rotate(35deg); width: 0; }
}

@keyframes andes-rise-left {
  from { opacity: 0; transform: translateY(80%) translateX(-10%); }
  to { opacity: 1; transform: translateY(0) translateX(0); }
}

@keyframes andes-rise-right {
  from { opacity: 0; transform: translateY(80%) translateX(10%); }
  to { opacity: 1; transform: translateY(0) translateX(0); }
}

/* Modal para mesa completa */
.mesa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mesa-modal-overlay.visible {
    opacity: 1;
}

.mesa-modal-content {
    background: white;
    border-radius: var(--radius-card);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.mesa-modal-overlay.visible .mesa-modal-content {
    transform: translateY(0) scale(1);
}

.mesa-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 1rem !important;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary-light));
}

.mesa-modal-header h3 {
    margin: 0 0 0.5rem 0;
    color: var(--color-text-dark);
    font-size: 1.5rem;
    font-weight: 700;
}

.mesa-modal-header p {
    margin: 0;
    font-weight: 500;
    color: var(--color-text-dark);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-dark);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.export-pdf-btn {
    background: var(--color-primary) !important;
    color: white !important;
    border: none !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
}

.export-pdf-btn:hover {
    background: #A00D25;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
}

.export-pdf-btn:active {
    transform: translateY(0);
}

.mesa-modal-body {
    padding: 1.5rem 2rem;
}

.timeline {
    padding: 2rem;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 3rem;
    top: 2rem;
    bottom: 2rem;
    width: 3px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
    border-radius: 1.5px;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: attr(data-turn);
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 1.8rem;
    height: 1.8rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.timeline-content {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.timeline-content:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.timeline-content h4 {
    margin: 0 0 0.75rem 0;
    color: var(--color-text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.timeline-authors {
    margin: 0.5rem 0;
    color: var(--color-text-light);
    font-size: 0.9rem;
    font-style: italic;
}

.timeline-eje {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary-light));
    color: var(--color-text-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.timeline-ponencia-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-closing-badge {
    display: inline-block;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-closing {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border: 2px dashed #d1d5db;
}

.mesa-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive design para el modal */
@media (max-width: 768px) {
    .mesa-modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
        max-height: calc(100vh - 2rem);
    }

    .mesa-modal-header,
    .mesa-modal-info,
    .mesa-modal-footer {
        padding: 1rem;
    }

    .mesa-modal-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .export-pdf-btn {
        align-self: flex-end;
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .timeline {
        padding: 1rem;
    }

    .timeline::before {
        left: 2.25rem;
    }

    .timeline-item {
        padding-left: 3rem;
    }

    .timeline-number {
        width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
    }

    .mesa-modal-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}