/* Sección quiniela */
.quiniela-section {
    padding: 40px 20px;
    background: linear-gradient(to right, #eaf0f6, #fff);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.quiniela-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Título con estilo profesional */
.quiniela-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #d62828, #0d3b66, #3ca55c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
}

/* Contenedor de cards */
.quiniela-team-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    justify-items: center;
}

/* Card individual con degradado en top y sombras más definidas */
.quiniela-team-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    width: 260px;
    padding: 25px 15px;
    text-align: center;
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
}

.quiniela-team-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

.quiniela-card-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #d62828, #0d3b66, #3ca55c);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

/* Logo con marco y animación */
.quiniela-team-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin: 15px auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #ccc;
    /* marco sutil */
    border-radius: 50%;
    /* lo hace circular */
    padding: 5px;
    /* espacio entre bandera y borde */
    background-color: #fff;
    /* asegura contraste con banderas blancas */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.quiniela-team-card:hover .quiniela-team-logo {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}


/* Nombre del equipo */
.quiniela-team-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #d62828;
}

/* Info de cada equipo */
.quiniela-team-info {
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: #333;
}

/* Estrellas con animación */
.quiniela-team-stars {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.quiniela-star {
    font-size: 1.4rem;
    color: #fcbf49;
    margin: 0 2px;
    transition: transform 0.2s ease;
}

.quiniela-star:hover {
    transform: scale(1.3);
}

.quiniela-star-empty {
    color: #ddd;
}














/* =================== CALENDARIO =================== */
.calendario-section {
    padding: 40px 0;
    background: #f5f7fa;

}

.calendario-title {
    text-align: center;
    font-weight: 800;
    color: #1d3557;
    font-size: 40px;
}

.calendario-subtitle {
    text-align: center;
    margin-bottom: 25px;
}

.calendario-puntos {
    color: #2a9d8f;
    font-weight: bold;
}

/* TABS */
.calendario-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.calendario-tab {
    border: 2px solid #1d3557;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}

.calendario-tab.active {
    background: #e63946;
    color: white;
    border-color: #e63946;
}

/* CONTENT */
.calendario-content {
    display: none;
}

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

/* PARTIDO CARD */
.partido-card {
    background: white;
    border-radius: 14px;
    padding: 15px;
    height: 100%;
    box-shadow: 0 6px 15px rgba(0, 0, 0, .08);
    border: 1px solid rgba(42, 157, 143, 0.35);
    /* verde sutil */
    transition: box-shadow .25s ease, transform .15s ease;
}

.partido-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    color: #1d3557;
    margin-bottom: 10px;
}

.partido-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.equipo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.equipo-resultado {
    font-size: 1.4rem;
    font-weight: bold;
}

.equipo-logo {
    width: 26px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.vs {
    font-weight: bold;
    color: #e63946;
}

.partido-footer {
    margin-top: 10px;
    font-size: .85rem;
    color: #555;
    text-align: center;
}

/* NODOS */
.nodo-partido {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, .1);
    text-align: center;
}

.nodo-header {
    font-weight: bold;
    margin-bottom: 10px;
    color: #1d3557;
}

.nodo-body {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-weight: 600;
}

.nodo-footer {
    margin-top: 10px;
    font-size: .9rem;
}

.final {
    border: 3px solid #2a9d8f;
}

.campeon {
    font-weight: bold;
    color: #2a9d8f;
}

.fecha-separador {
    margin: 2.5rem 0 1.5rem;
    padding-left: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2A398D;
    border-left: 4px solid #e63946;
    text-transform: capitalize;
}

/* =================== ACORDEON POR FECHA =================== */

.fecha-acordeon {
    margin-bottom: 1.5rem;
    border-radius: 14px;
    overflow: hidden;
    background: white;
    box-shadow: 0 6px 15px rgba(0, 0, 0, .08);
}

.fecha-header {
    width: 100%;
    border: none;
    background: #f1f3f8;
    padding: 14px 18px;
    font-weight: 800;
    color: #2A398D;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-transform: capitalize;
    position: relative;
}

.fecha-header:hover {
    background: #e9edf6;
}

.fecha-header .icono {
    font-size: 1.3rem;
    transition: transform .25s ease;
}

.fecha-acordeon.active .fecha-header .icono {
    transform: rotate(45deg);
}

.fecha-body {
    display: none;
    padding: 20px;
}

.fecha-acordeon.active .fecha-body {
    display: block;
}

/* =================== BORDE VERDE DISCRETO EN CARDS =================== */

/* .partido-card {
    border: 1px solid rgba(42, 157, 143, 0.35);
    transition: box-shadow .25s ease, transform .15s ease;
} */

.partido-card:hover {
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
    transform: translateY(-2px);
}

/* =================== MARCO ROJO DISCRETO EN FECHA =================== */


.fecha-header::before,
.fecha-header::after {
    content: "";
    position: absolute;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: #e63946;
    /* rojo institucional */
    border-radius: 2px;
}

.fecha-header::before {
    left: 10px;
}

.fecha-header::after {
    right: 10px;
}
































/* =================== QUINIELA =================== */
.mi-quiniela-section {
    padding: 40px 0;
    background: #f5f7fa;

}

.mi-quiniela-title {
    text-align: center;
    font-weight: 800;
    color: #1d3557;
    font-size: 40px;
}


.mi-quiniela-subtitle {
    text-align: center;
    margin-bottom: 25px;
}


/* CONTENT */
.mi-calendario-content {
    display: none;
}

.mi-calendario-content.active {
    display: block;
}


/* ======================================================
   TABS DE FASES
====================================================== */

/* TABS */
.mi-calendario-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.mi-calendario-tab {
    border: 2px solid #1d3557;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}

.mi-calendario-tab.active {
    background: #e63946;
    color: white;
    border-color: #e63946;
}


/* ======================================================
   ACORDEÓN POR GRUPO / FECHA
====================================================== */

.mi-fecha-acordeon {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 14px;
    overflow: hidden;
    background: white;
    box-shadow: 0 6px 15px rgba(0, 0, 0, .08);

    /* Marco azul superior */
    border-top: 5px solid #2A398D; /* azul mundial */
}


.mi-fecha-header {
    width: 100%;
    border: none;
    background: #f1f3f8;
    padding: 14px 18px;
    font-weight: 800;
    color: #2A398D;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-transform: capitalize;
    position: relative;
}

.mi-fecha-header:hover {
    background: #e9edf6;
}

.mi-fecha-header .icono {
    font-size: 1.3rem;
    transition: transform .25s ease;
}

.mi-fecha-acordeon.active .mi-fecha-header .icono {
    transform: rotate(45deg);
    /* + pasa a x */
}

.mi-fecha-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 15px;
}

.mi-fecha-acordeon.active .mi-fecha-body {
    max-height: 2000px;
    /* suficiente para tablas */
    padding: 15px;
}


/* ======================================================
   TABLAS
====================================================== */

.mi-quiniela-section table {
    margin-bottom: 20px;
}

.mi-quiniela-section th {
    background: #f8fafc;
    font-weight: 700;
    text-align: center;
}

.mi-quiniela-section td {
    vertical-align: middle;
    text-align: center;
}

.mi-quiniela-section input[type="number"] {
    text-align: center;
}


/* ======================================================
   CARDS PARA FASES FINALES
====================================================== */

.mi-partido-card {
    background: #ffffff;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* =================== MARCO ROJO DISCRETO EN FECHA =================== */

.mi-fecha-header::before,
.mi-fecha-header::after {
    content: "";
    position: absolute;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: #e63946;
    /* rojo institucional */
    border-radius: 2px;
}

.mi-fecha-header::before {
    left: 10px;
}

.mi-fecha-header::after {
    right: 10px;
}





.quiniela-equipo-cell {
    /*  display: flex; */
    align-items: center;
    /* 👈 centra vertical */
    gap: 6px;
    white-space: nowrap;
}

.quiniela-equipo-uno {
    justify-content: flex-start;
}

.quiniela-equipo-dos {
    justify-content: flex-end;
    text-align: right;
}

.td-logo {
    /*  display: flex; */
    align-items: center;
    /* centra vertical */
    justify-content: center;
    /* centra horizontal */
}

.team-logo {
    width: 40px !important;
    height: 28px !important;
    max-width: none !important;
    /* 🔥 clave contra Bootstrap */
    object-fit: contain;
    display: block;
}


.quiniela-equipo-nombre {
    line-height: 1.2;
}

/* #################### QUINIELA SPINNER INICIO #################### */

.quiniela-spinner-per {
    position: fixed;
    inset: 0;
    z-index: 1056;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay */
.quiniela-spinner-per::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(rgba(20, 20, 20, 0.85),
            rgba(0, 0, 0, 0.9));
}

/* Contenedor */
.quiniela-loader {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* ===================== BALÓN CON IMAGEN ===================== */

.ball-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
    /* más espacio para el rebote */
    margin: 0 auto;
    transform: scale(1);
    /* 🔥 reduce TODO al 75% */
}

.ball-img {
    width: 64px;
    height: 64px;
    display: block;
    margin: 0 auto;
    animation: ballBounce 0.9s infinite ease-in-out;
    will-change: transform;
}

/* Sombra realista */
.ball-wrapper .shadow {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 46px;
    height: 12px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: ballShadow 0.9s infinite ease-in-out;
    filter: blur(1px);
}

/* ===================== ANIMACIONES ===================== */

@keyframes ballBounce {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-40px) rotate(180deg);
    }

    100% {
        transform: translateY(0) rotate(360deg);
    }
}

@keyframes ballShadow {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 0.45;
    }

    50% {
        transform: translateX(-50%) scale(0.6);
        opacity: 0.2;
    }

    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.45;
    }
}


/* #################### QUINIELA SPINNER FINAL #################### */






































































/* =================== RANKING =================== */
.ranking-section {
    padding: 40px 0;
    background: #f5f7fa;

}

.ranking-title {
    text-align: center;
    font-weight: 800;
    color: #1d3557;
    font-size: 40px;
}


.ranking-subtitle {
    text-align: center;
    margin-bottom: 25px;
}


/* CONTENT */
.ranking-content {
    display: none;
}

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

/* ================= TOP 3 ================= */

.ranking-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    align-items: end;
}

.ranking-card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .08);
    position: relative;
}

.ranking-card.first {
    border-top: 5px solid #e63946;
    transform: translateY(-10px);
}

.ranking-card.second {
    border-top: 5px solid #457b9d;
}

.ranking-card.third {
    border-top: 5px solid #2a9d8f;
}

.ranking-position {
    width: 42px;
    height: 42px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #1d3557;
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ranking-card.first .ranking-position {
    background: #e63946;
}

.ranking-points {
    display: block;
    margin-top: 6px;
    font-weight: 700;
    color: #2a9d8f;
}

/* ================= TABLA ================= */

.ranking-table-wrapper {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .08);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table thead {
    background: #1d3557;
    color: white;
}

.ranking-table th,
.ranking-table td {
    padding: 14px 16px;
    text-align: left;
}

.ranking-table tbody tr:nth-child(even) {
    background: #f1f4f8;
}

.pos-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-weight: 700;
}

.pos-circle.blue {
    background: #457b9d;
}

.pos-circle.green {
    background: #2a9d8f;
}

.pts {
    font-weight: 700;
    color: #2a9d8f;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
    .ranking-top {
        grid-template-columns: 1fr;
    }
}


/* ================= FILTROS RANKING ================= */

.ranking-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0 50px;

    justify-content: center;
    /* 👈 CENTRAR BOTONES */
}


.ranking-btn {
    padding: 10px 20px;
    border-radius: 999px;
    background: white;
    border: 2px solid #1d3557;
    color: #1d3557;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
}

.ranking-btn:hover {
    background: #1d3557;
    color: white;
}

.ranking-btn.active {
    background: #e63946;
    border-color: #e63946;
    color: white;
}

@media (max-width: 768px) {
    .ranking-filters {
        gap: 10px;
    }
}
































/* =================== PREMIOS =================== */
.premios-section {
    padding: 40px 0;
    background: #f5f7fa;

}

.premios-title {
    text-align: center;
    font-weight: 800;
    color: #1d3557;
    font-size: 40px;
}


.premios-subtitle {
    text-align: center;
    margin-bottom: 25px;
}


/* CONTENT */
.premios-content {
    display: none;
}

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

/* ================= TOP PREMIOS ================= */

.premios-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.premio-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.premio-card h3 {
    margin: 10px 0 5px;
    color: #1d3557;
}

.premio-card span {
    font-weight: 800;
    color: #2a9d8f;
}

.premio-icon {
    font-size: 36px;
}

.premio-card.first {
    border-top: 4px solid #e63946;
}

.premio-card.second {
    border-top: 4px solid #457b9d;
}

.premio-card.third {
    border-top: 4px solid #2a9d8f;
}

/* ================= TIMELINE ================= */

.premios-timeline {
    position: relative;
    margin: 60px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #dce1e8;
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item.left {
    justify-content: flex-end;
    padding-right: 55%;
}

.timeline-item.right {
    justify-content: flex-start;
    padding-left: 55%;
}

.timeline-content {
    background: white;
    padding: 18px 22px;
    border-radius: 14px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .08);
    width: 100%;
    max-width: 280px;
}

.timeline-content h4 {
    margin-bottom: 4px;
    color: #1d3557;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: #2a9d8f;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

@media (max-width: 768px) {

    .premios-top {
        grid-template-columns: 1fr;
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-item {
        padding: 0 0 0 50px !important;
        justify-content: flex-start !important;
    }

    .timeline-dot {
        left: 20px;
    }
}

/* ================= FILTROS QUINIELA ================= */

.quiniela-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0 50px;

    justify-content: center;
    /* 👈 CENTRAR BOTONES */
}


.quiniela-btn {
    padding: 10px 20px;
    border-radius: 999px;
    background: white;
    border: 2px solid #1d3557;
    color: #1d3557;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
}

.quiniela-btn:hover {
    background: #1d3557;
    color: white;
}

.quiniela-btn.active {
    background: #e63946;
    border-color: #e63946;
    color: white;
}

@media (max-width: 768px) {
    .quiniela-filters {
        gap: 10px;
    }
}

/* ================= VISIBILIDAD ================= */

.quiniela-content {
    display: none;
}

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