/* ==========================================================================
   Espacio público de torneos (/torneos)
   Diseño cohesivo con /partidos y /partidos/{id} (Flashscore + Fair Play Kids)
   Paleta estricta: Negro / Neutros oscuros, Blanco y Rojo corporativo (#dc3545)
   ========================================================================== */

.fpk-tour-wrap {
    color: #ffffff;
}

.fpk-tour-inner {
    max-width: 1140px;
    margin: 0 auto;
}

/* Encabezado principal */
.fpk-tour-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #22222b;
}

.fpk-tour-brand-accent {
    color: #dc3545;
}

.fpk-tour-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Botón píldora corporativo */
.fpk-tour-pill-btn {
    background-color: #111116;
    border: 1px solid #252530;
    color: #ffffff;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.48rem 1.15rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.fpk-tour-pill-btn:hover,
.fpk-tour-pill-btn:focus {
    background-color: #181820;
    border-color: #dc3545;
    color: #ffffff;
}

/* Secciones por tipo (Competitivo, Formativo, Amistoso, Finalizados) */
.fpk-tour-section {
    margin-bottom: 2.75rem;
}

.fpk-tour-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #22222b;
}

.fpk-tour-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.fpk-tour-count-pill {
    background-color: #16161f;
    border: 1px solid #2b2b38;
    color: rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Grid de tarjetas de torneos */
.fpk-tour-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.15rem;
}

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

@media (min-width: 992px) {
    .fpk-tour-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

/* Tarjeta individual de torneo */
.fpk-tour-card {
    background-color: #111116;
    border: 1px solid #22222b;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
    height: 100%;
}

.fpk-tour-card:hover {
    background-color: #16161e;
    border-color: #dc3545;
    transform: translateY(-2px);
    color: #ffffff;
}

.fpk-tour-card-body {
    padding: 1.25rem 1.25rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fpk-tour-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.95rem;
}

/* Escudo o logo del torneo flotante */
.fpk-tour-logo-wrap {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fpk-tour-logo-img {
    width: 100%;
    height: 100%;
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
}

.fpk-tour-logo-monogram {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background-color: #181822;
    border: 1px solid #2e2e3c;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Badges de estado / posiciones (estrictamente rojo, blanco y gris corporativo) */
.fpk-tour-status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
    text-transform: none;
    line-height: 1.2;
}

.fpk-tour-status-badge.is-active {
    background-color: rgba(220, 53, 69, 0.14);
    border: 1px solid rgba(220, 53, 69, 0.45);
    color: #ffffff;
}

.fpk-tour-status-badge.is-champion {
    background-color: rgba(220, 53, 69, 0.18);
    border: 1px solid #dc3545;
    color: #ffffff;
}

.fpk-tour-status-badge.is-runner-up {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.fpk-tour-status-badge.is-third {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.85);
}

.fpk-tour-status-badge.is-finished {
    background-color: #16161f;
    border: 1px solid #2b2b38;
    color: rgba(255, 255, 255, 0.68);
}

.fpk-tour-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 0.55rem;
}

.fpk-tour-card:hover .fpk-tour-name {
    color: #ff4d5a;
}

/* Etiqueta de categoría en la tarjeta */
.fpk-tour-cat-wrap {
    margin-bottom: 0.85rem;
}

.fpk-tour-cat-badge {
    background-color: rgba(220, 53, 69, 0.14);
    border: 1px solid rgba(220, 53, 69, 0.45);
    border-radius: 6px;
    padding: 0.22rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    display: inline-block;
    white-space: nowrap;
}

/* Metadatos (sede y fecha) */
.fpk-tour-meta-list {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
}

.fpk-tour-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.fpk-tour-dot {
    color: rgba(255, 255, 255, 0.3);
}

/* Pie de tarjeta */
.fpk-tour-card-footer {
    background-color: #0c0c10;
    border-top: 1px solid #1e1e26;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
}

.fpk-tour-matches-count {
    color: rgba(255, 255, 255, 0.62);
    font-weight: 600;
}

.fpk-tour-action-label {
    color: #ffffff;
    font-weight: 700;
    transition: color 0.15s ease;
}

.fpk-tour-card:hover .fpk-tour-action-label {
    color: #ff4d5a;
}

/* Estado vacío */
.fpk-tour-empty {
    background-color: #111116;
    border: 1px solid #22222b;
    border-radius: 14px;
    padding: 2.75rem 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 575.98px) {
    .fpk-tour-card-body {
        padding: 1.1rem 1rem 0.85rem;
    }

    .fpk-tour-name {
        font-size: 0.98rem;
    }

    .fpk-tour-card-footer {
        padding: 0.58rem 1rem;
    }
}
