.modern-card {
    border-radius: 16px;
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
    /* AÑADIDO: Color de fondo de reserva (fallback) para evitar el blanco */
    background-color: #34495e;
    /* Esto garantiza que si el gradiente rotativo falla, la tarjeta se vea oscura */

    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Sutil borde para definición */
}

/* Efecto de elevación al pasar el mouse */
.modern-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 30px rgba(42, 191, 170, 0.25);
    /* Sombra con toque turquesa */
}

/* Tipografía dentro de la tarjeta */
.modern-card h1 {
    color: white;
    font-weight: 700;
    font-size: 3rem;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Botón estilo "fantasma" */
.modern-card .btn-visual {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.modern-card:hover .btn-visual {
    background: #2ABFAA;
    /* Color turquesa al hacer hover */
    border-color: #2ABFAA;
    color: white;
    font-weight: bold;
}

/* Badge de "Reciente" */
.modern-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #2ABFAA;
    /* Turquesa de la marca */
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

/* --- NUEVOS GRADIENTES BASADOS EN LA IMAGEN --- */

/* 1. Institucional: De Azul Oscuro a Turquesa */
.grad-brand-1 {
    background: linear-gradient(135deg, #34495e 0%, #2ABFAA 100%);
}

/* 2. Turquesa Profundo: De Turquesa a un Azul verdoso */
.grad-brand-2 {
    background: linear-gradient(135deg, #2ABFAA 0%, #16a085 100%);
}

/* 3. Azul Corporativo: Variaciones del azul oscuro del header */
.grad-brand-3 {
    background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
}

.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
}

/* Línea vertical central */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: #ccc;
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

/* Alineación a la izquierda */
.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
    /* Contenido a la derecha para ítems impares */
}

/* Alineación a la derecha */
.timeline-item:nth-child(even) {
    flex-direction: row;
    /* Contenido a la izquierda para ítems pares */
}

.timeline-item-content {
    width: 45%;
    /* Espacio para el contenido */
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Flecha indicadora del lado del contenido */
.timeline-item:nth-child(odd) .timeline-item-content::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -10px;
    /* Apunta hacia el centro */
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid #fff;
}

.timeline-item:nth-child(even) .timeline-item-content::after {
    content: '';
    position: absolute;
    top: 20px;
    left: -10px;
    /* Apunta hacia el centro */
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid #fff;
}

.timeline-year {
    font-size: 1.5em;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 5px;
}

.timeline-description {
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    color: #555;
}

/* Círculos en la línea central */
.timeline-year::before {
    content: '';
    position: absolute;
    top: 15px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #007bff;
    border: 2px solid #fff;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-year::before {
    left: calc(50% - 8px);
    /* Posición central para el círculo */
}

.timeline-item:nth-child(even) .timeline-year::before {
    left: calc(50% - 8px);
    /* Posición central para el círculo */
}

/* Ajustes para pantallas pequeñas (móviles) */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 20px;
        /* Mueve la línea a la izquierda */
        transform: none;
    }

    .timeline-item {
        flex-direction: column !important;
        /* Apila los elementos */
        align-items: flex-start;
        margin-left: 20px;
        /* Alinea los ítems a la izquierda de la línea */
    }

    .timeline-item-content {
        width: calc(100% - 40px);
        /* Ancho completo */
        margin-left: 20px;
        /* Espacio desde la línea */
    }

    .timeline-item-content::after {
        border: none;
        /* Elimina las flechas */
    }

    .timeline-year::before {
        left: -28px !important;
        /* Alinea el círculo con la línea */
        top: 0px;
    }
}

h1 {
    text-align: center;
    font-weight: Bold;
    color: #2c3e50;
    margin-bottom: 40px;
}

h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 40px;
    font-weight: 700;
}



.timeline-year-center {
    position: absolute;
    /* Permite posicionarlo sobre la línea */
    top: 15px;
    left: 50%;
    /* Lo mueve a la mitad del contenedor */
    transform: translate(-50%, 0);
    /* Lo centra horizontalmente */

    /* Estilo visual del año */
    background-color: #007bff;
    /* Fondo azul para destacar */
    color: white;
    /* Texto blanco */
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.2em;
    z-index: 2;
    /* Asegura que esté por encima de la línea */
}

/* 1. Contenedor de la Columna (Asegura que todas las tarjetas tengan la misma altura) */
.col-md-4.premio-card-container {
    /* Es mejor ser específico si estás usando Bootstrap */
    display: flex;
    /* Habilita Flexbox */
    flex-direction: column;
    /* Apila los elementos verticalmente */
    height: 100%;
    /* Asegura que la tarjeta ocupe toda la altura disponible de la fila */
}

/* 2. Encabezado de la Tarjeta (Asegura la altura para la imagen y el título) */
.premio-card-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Mantiene la imagen arriba y el título abajo */
    align-items: center;

    flex-grow: 1;
    /* Permite que este elemento crezca y ocupe el espacio necesario */
    min-height: 250px;
    /* Alto fijo de respaldo para asegurar espacio para títulos largos */
    padding-bottom: 15px;
    text-align: center;
}

/* 3. Acordeón (Se empuja al fondo) */
.premio-accordion {
    margin-top: auto;
    /* Esta es la clave: empuja el acordeón al final del contenedor. */
}

/* 4. Limpieza de Márgenes del Título */
.premio-card-header h3 {
    margin-top: 0;
    margin-bottom: 0;
    padding: 0 10px;
    /* Evita que el texto de dos líneas se pegue a los bordes */
}
/* --- VIDEOS ARCHIVE SECTION --- */
.edition-section {
    padding: 60px 0;
    background: #fff;
}

.edition-section:nth-child(even) {
    background: #fdfdfd;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: #2ABFAA;
    border-radius: 2px;
}

.video-card {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-info {
    padding: 20px;
    text-align: center;
}

.video-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #34495e;
    margin: 0;
    line-height: 1.4;
}

/* --- MODERN FORMS & CAPTCHA --- */
.modern-form-wrap {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.required-asterisk {
    color: #dc3545;
    font-weight: bold;
}

.form-group label {
    font-weight: 600;
    color: #4e4e4e;
    margin-bottom: 8px;
}

.captcha-box {
    background: #e9ecef;
    padding: 10px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 3px;
    font-weight: bold;
}

.captcha-container {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* --- TOGGLE BUTTONS (SI/NO) --- */
.toggle-group {
    display: flex;
    gap: 0;
    background: #eee;
    padding: 4px;
    border-radius: 30px;
    border: 1px solid #ddd;
    max-width: 250px;
    margin: 0 auto;
}

.toggle-btn {
    flex: 1;
    text-align: center;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-bottom: 0;
}

.toggle-group input:checked + label {
    background: #2ABFAA;
    color: white;
    box-shadow: 0 2px 8px rgba(42, 191, 170, 0.4);
}

.toggle-btn:hover:not(.toggle-group input:checked + label) {
    background: #e0e0e0;
}

/* --- SOCIOS & PARTNERS SECTION --- */
#partner-section {
    padding: 25px 0;
    background-color: #f8f9fa;
}

#partner-section .partners ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

#partner-section .partners ul li {
    display: inline-block;
}

#partner-section .partners img {
    max-height: 300px;
    width: auto;
    margin: 0 auto;
}

.seccion-auspiciantes {
    width: 100%;
    background-color: #f8f9fa;
    padding: 40px 0;
    border-top: 1px solid #e7e7e7;
}

.seccion-auspiciantes + .seccion-auspiciantes {
    padding-top: 0;
    border-top: none;
}

#partner-section + .seccion-auspiciantes {
    padding-top: 10px;
}

.seccion-auspiciantes h3 {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
}

.seccion-auspiciantes h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: #2ABFAA;
    border-radius: 2px;
}

/* --- LOGO CAROUSEL ANIMATION --- */
.logo-slider-container {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.logo-slider-container::before,
.logo-slider-container::after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 100px;
    z-index: 2;
    background: linear-gradient(to right, #f8f9fa, rgba(248, 249, 250, 0));
}

.logo-slider-container::after {
    right: 0;
    background: linear-gradient(to left, #f8f9fa, rgba(248, 249, 250, 0));
}

.logo-strip {
    display: flex;
    width: max-content;
    gap: 40px;
    align-items: center;
    animation: scrollAnimation 60s linear infinite;
}

.logo-slider-container:hover .logo-strip {
    animation-play-state: paused;
}

.logo-item {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-item img:hover {
    transform: scale(1.1);
}

@keyframes scrollAnimation {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- HELPER CLASSES FOR REGISTRATION FORMS --- */
.label-captcha {
    display: block;
    font-weight: 600;
    color: #4e4e4e;
}

.input-captcha {
    display: inline-block;
    width: 220px;
    height: 45px;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid #ced4da;
    border-radius: 8px;
    margin: 0 auto !important;
}

.btn-submit-registro {
    background: #2ABFAA;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    transition: all 0.3s;
    color: white;
}

.btn-submit-registro:hover {
    background: #23a896;
    color: white;
}

/* Specific to select2 in forms */
.select2-container {
    width: 100% !important;
}

/* --- SHARED PAGE COMPONENTS (Reglas, Consultas, etc.) --- */
.modern-page-section {
    padding: 80px 0;
    background: #fff;
}

.modern-container-center {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.modern-section-title {
    color: #2c3e50;
    font-size: 32px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.modern-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #2ABFAA;
    border-radius: 2px;
}

.modern-intro-text {
    color: #7f8c8d;
    font-size: 18px;
    margin-bottom: 40px;
    font-weight: 400;
}

.modern-link-aqua {
    color: #2ABFAA;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.modern-link-aqua:hover {
    border-bottom-color: #2ABFAA;
}

/* --- BUTTONS --- */
.btn-modern-brand {
    background: #2ABFAA;
    color: white;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(42, 191, 170, 0.3);
    border: none;
}

.btn-modern-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 191, 170, 0.4);
    color: white;
}

/* --- SOCIAL BUTTONS (from consultas.php) --- */
.social-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #f0f2f5;
    color: #2c3e50;
    border-radius: 50%;
    font-size: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon-btn:hover {
    background: #2ABFAA;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(42, 191, 170, 0.3);
}

.social-share-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* --- COMMON ANIMATIONS --- */
@keyframes fadeInModern {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeInModern 0.3s ease-out;
}

/* --- SELECT2 MODERN OVERRIDES --- */
.select2-container--default .select2-selection--single {
    border: 2px solid #e5e5e5 !important;
    border-radius: 8px !important;
    height: auto !important;
    padding: 10px 12px !important;
    transition: all 0.3s !important;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #2ABFAA !important;
    outline: none !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #2ABFAA !important;
}

.select2-dropdown {
    border: 2px solid #e5e5e5 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
}

.modern-select-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.modern-select-input:focus {
    border-color: #2ABFAA;
    outline: none;
}
