/* ══════════════════════════════════════════════
   CONCURSO MISS & MISTER — aniversario.css
   ══════════════════════════════════════════════ */

/* ── Sección principal ── */
.concurso_area {
    padding: 60px 0;
    background: white;
}

.voto-fila {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.voto-foto {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    object-fit: cover;
    border: 2px solid #e74c3c;
    margin-right: 10px;
}

.voto-info {
    flex-grow: 1;
}

.voto-nombre {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 3px;
    display: block;
    text-transform: uppercase;
}

.voto-barra-bg {
    background: #eee;
    height: 25px;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.voto-barra-fill {
    background: #3498db;
    height: 100%;
    transition: width 1s ease-in-out;
}

.voto-porcentaje {
    position: absolute;
    right: 10px;
    top: 2px;
    font-weight: bold;
    font-size: 13px;
    color: #333;
}

.concurso_header {
    text-align: center;
    margin-bottom: 40px;
}

.concurso_header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
}

.concurso_header h2 span {
    color: #004175;
}

.concurso_header p {
    color: #555;
    font-size: 1rem;
}

/* ── Tabs principales — centrados ── */
.concurso_tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.concurso_tab_btn {
    padding: 10px 32px;
    border: 2px solid #004175;
    background: transparent;
    color: #004175;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    font-size: .95rem;
}

.concurso_tab_btn.active,
.concurso_tab_btn:hover {
    background: #004175;
    color: #fff;
}

.concurso_pane {
    display: none;
}

.concurso_pane.active {
    display: block;
}

/* ── Grid candidatos — Centrado Real ── */
.candidates_grid {
    display: grid;
    /* Cambiamos 1fr por un tamaño fijo para que no se estiren */
    grid-template-columns: repeat(3, 280px);
    /* Esto es lo que hace la magia de centrar el bloque de 3 */
    justify-content: center;
    gap: 24px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 992px) {
    .candidates_grid {
        /* Bajamos a 2 columnas en tablets, siempre centrado */
        grid-template-columns: repeat(2, 280px);
    }
}

@media (max-width: 600px) {
    .candidates_grid {
        /* 1 columna en celulares */
        grid-template-columns: 280px;
    }
}

/* ── Tarjeta ── */
.candidate_card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
    overflow: hidden;
    text-align: center;
    transition: transform .25s, box-shadow .25s;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.candidate_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}

/* ── Contenedor foto: altura fija siempre ── */
.candidate_foto_wrap {
    width: 100%;
    height: 240px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.candidate_foto_wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform .3s;
}

.candidate_card:hover .candidate_foto_wrap img {
    transform: scale(1.04);
}

/* Placeholder sin foto */
.foto_placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #ccc;
}

.foto_placeholder i {
    font-size: 3rem;
}

.foto_placeholder span {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* ── Info ── */
.candidate_info {
    padding: 16px 14px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.candidate_info .numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #004175;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.candidate_info h5 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1a1a2e;
}

.candidate_info .idioma {
    font-size: .78rem;
    color: #888;
    margin-bottom: 10px;
}

/* ── Botón votar ── */
.btn_votar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #004175;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 9px 24px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin-top: auto;
}

.btn_votar:hover {
    background: #c0303c;
}

.btn_votar:active {
    transform: scale(.96);
}

.btn_votar.voted {
    background: #28a745;
    cursor: default;
}

.btn_votar.voted:hover {
    background: #28a745;
}

.btn_votar:disabled {
    opacity: .65;
    cursor: not-allowed;
}

/* Badge Mi voto */
.badge_voto {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    display: none;
    z-index: 2;
}

.candidate_card.voted_card .badge_voto {
    display: block;
}

/* ── Nota ── */
.concurso_note {
    text-align: center;
    color: #999;
    font-size: .82rem;
    margin-top: 30px;
}

/* ══════════════════════════════════════════════
   RANKING LATERAL
   ══════════════════════════════════════════════ */
.ranking_box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
    padding: 22px 18px;
    position: sticky;
    top: 90px;
}

.ranking_box h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 14px;
}

.ranking_tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.ranking_tab {
    flex: 1;
    padding: 7px 6px;
    border: 1.5px solid #004175;
    background: transparent;
    color: #004175;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.ranking_tab.active,
.ranking_tab:hover {
    background: #004175;
    color: #fff;
}

.ranking_pane {
    display: none;
}

.ranking_pane.active {
    display: block;
}

.ranking_item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ranking_item:last-child {
    border-bottom: none;
}

.ranking_pos {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f0f0f0;
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    flex-shrink: 0;
}

.ranking_pos.gold {
    background: #FFD700;
    color: #7a5c00;
}

.ranking_pos.silver {
    background: #C0C0C0;
    color: #4a4a4a;
}

.ranking_pos.bronze {
    background: #CD7F32;
    color: #fff;
}

.ranking_nombre {
    flex: 1;
    font-size: .82rem;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking_votos {
    font-size: .8rem;
    font-weight: 700;
    color: #004175;
    white-space: nowrap;
}

.ranking_bar_wrap {
    width: 100%;
    background: #f0f0f0;
    border-radius: 4px;
    height: 4px;
    margin-top: 3px;
}

.ranking_bar {
    height: 4px;
    border-radius: 4px;
    background: #004175;
    transition: width .6s ease;
}

/* ── En vivo ── */
.live_indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .75rem;
    color: #28a745;
    font-weight: 600;
    margin-bottom: 10px;
}

.live_dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    animation: pulse_live 1.4s ease-in-out infinite;
}

@keyframes pulse_live {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .4;
        transform: scale(.7);
    }
}

/* ── Toast ── */
.toast_voto {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1a1a2e;
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: .88rem;
    font-weight: 500;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .3s, transform .3s;
    pointer-events: none;
    max-width: 320px;
}

.toast_voto.show {
    opacity: 1;
    transform: translateY(0);
}

.toast_voto.success {
    border-left: 4px solid #28a745;
}

.toast_voto.error {
    border-left: 4px solid #004175;
}

/* ==========================================================================
   CONCURSO DEPORTIVO - ESTILO CHAMPIONS (LIGHT MODE & RESPONSIVE)
   ========================================================================== */

/* Contenedor Principal */
.champions_area {
    background: #ffffff;
    color: #333333;
    padding: 50px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

/* Encabezado */
.champions_header h2 {
    color: #1e293b;
    font-weight: 700;
}

.champions_header h2 span {
    color: #004b8d;
    /* Azul institucional */
}

.champions_header p {
    color: #64748b;
    font-size: 14px;
}

/* Badge "Próximamente" */
.badge_proximamente {
    background: #004b8d;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 75, 141, 0.2);
}

/* Contenedor de Scroll para Móviles */
.tournament_scroll_wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 15px;
}

/* Estilo sutil de la barra de scroll en móviles */
.tournament_scroll_wrapper::-webkit-scrollbar {
    height: 6px;
}

.tournament_scroll_wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Estructura Flexbox de las Llaves */
.tournament_bracket {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 15px;
    min-width: 950px;
    /* Evita que la estructura colapse */
}

/* Lados Izquierdo y Derecho */
.bracket_side {
    display: flex;
    width: 40%;
    justify-content: space-between;
    align-items: center;
}

/* Columnas de Rondas (8vos, 4tos) */
.bracket_round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 340px;
    width: 46%;
}

.round_title {
    font-size: 11px;
    text-transform: uppercase;
    color: #94a3b8;
    text-align: center;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Tarjetas de Enfrentamiento (Matchups) */
.matchup {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.matchup:hover {
    transform: translateY(-2px);
    border-color: #004b8d;
    box-shadow: 0 6px 15px rgba(0, 75, 141, 0.08);
}

/* Filas de Equipos Incógnitos */
.team_incognito {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px;
    font-size: 13px;
    color: #334155;
    font-weight: 500;
}

.team_incognito:first-child {
    border-bottom: 1px solid #f1f5f9;
}

/* Círculo de Escudo Oculto */
.team_incognito i {
    background: #f1f5f9;
    border: 1px dashed #94a3b8;
    color: #64748b;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
}

/* Centro: Espacio de la Copa */
.bracket_center {
    width: 20%;
    text-align: center;
}

.copa_box {
    position: relative;
    padding: 10px;
}

/* Tu Imagen del Trofeo con Animación (¡Más Grande!) */
.main_trophy_img {
    width: 525px;
    /* Aumentado para que destaque en el centro */
    height: auto;
    /* Mantiene la proporción original de tu webp sin deformar */
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
    animation: floating 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
    display: block;
    margin: 0 auto;
    /* Lo mantiene perfectamente centrado */
}

/* Resplandor azul sutil detrás de la copa */
.pulse_glow {
    position: absolute;
    top: 15%;
    left: 20%;
    width: 90px;
    height: 90px;
    background: rgba(0, 75, 141, 0.06);
    border-radius: 50%;
    filter: blur(15px);
    z-index: 1;
}

/* Textos de la Final */
.final_info {
    position: relative;
    z-index: 2;
}

.final_info h4 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-top: 15px;
    color: #004b8d;
    margin-bottom: 2px;
}

.final_info p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

/* Animación de flotación */
@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Ajustes Media Query */
@media (max-width: 1024px) {
    .champions_area {
        padding: 40px 15px;
    }

    .bracket_round {
        height: 310px;
    }
}

/* Fondo oscuro fullscreen */
.visor-imagen {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .88);
    backdrop-filter: blur(6px);
    z-index: 99999;

    justify-content: center;
    align-items: center;

    animation: fadeIn .2s ease;
}

/* Imagen grande */
.visor-imagen img {
    max-width: 85%;
    max-height: 90vh;
    border-radius: 18px;
    object-fit: contain;

    animation: zoomIn .25s ease;
}

/* Botón cerrar */
.cerrar-visor {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 50px;
    cursor: pointer;
    font-weight: bold;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}