/* SEO / enlazado de la ficha de equipo. Mantiene la estética actual de Comuniate. */
.team-seo-intro {
    margin: 0 0 18px;
    padding: 11px 14px;
    border: 1px solid #ececec;
    border-left: 4px solid #f39c12;
    border-radius: 4px;
    background: #fafafa;
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}
.team-seo-intro p { margin: 0; }
.team-seo-intro a { font-weight: 600; text-decoration: none; }
.team-seo-intro a:hover,
.team-seo-intro a:focus { text-decoration: underline; }
a.especialista-badge--link { color: inherit; text-decoration: none; }
a.especialista-badge--link:hover,
a.especialista-badge--link:focus { color: inherit; text-decoration: underline; }
.team-sp-player__link { color: inherit; text-decoration: none; }
.team-sp-player__link:hover,
.team-sp-player__link:focus { color: inherit; text-decoration: underline; }
@media (max-width: 767px) {
    .team-seo-intro { margin-bottom: 14px; padding: 10px 12px; font-size: 13px; }
}


/* /cuando-juega/: calendario y resultados compactos. */
.team-schedule-tabs {
    padding: 0;
    margin: 0 0 10px;
    width: 100%;
}
.team-schedule-tabs::after,
.team-schedule-tabs .tab-pane::after {
    content: '';
    display: block;
    clear: both;
}
.team-schedule-column {
    width: 100%;
    padding: 0;
}
.team-schedule-list,
.team-results-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 12px;
}
.team-schedule-empty {
    margin: 0;
    border-radius: 8px;
}
.team-schedule-card,
.team-result-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    overflow: hidden;
}
.team-schedule-card__link,
.team-result-card__link {
    display: block;
    color: inherit;
    text-decoration: none !important;
}
.team-schedule-card__link:hover,
.team-schedule-card__link:focus,
.team-result-card__link:hover,
.team-result-card__link:focus {
    color: inherit;
    background: #fafafa;
    text-decoration: none !important;
}

/* Próximos partidos */
.team-schedule-card__link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 8px 11px;
}
.team-schedule-card__team {
    width: 35%;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.team-schedule-card__team:last-child {
    flex-direction: row-reverse;
    text-align: right;
}
.team-schedule-card__logo {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    object-fit: contain;
}
.team-schedule-card__name {
    display: block;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.22;
    color: #222;
}
.team-schedule-card__center {
    width: 30%;
    padding: 5px 6px;
    border-radius: 8px;
    background: #f7f9fc;
    text-align: center;
}
.team-schedule-card__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 2px;
}
.team-schedule-card__competition {
    width: 15px;
    height: 15px;
    object-fit: contain;
}
.team-schedule-card__round {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    color: #2b5ea7;
}
.team-schedule-card__date {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    color: #222;
}
.team-schedule-card__time {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.2;
    color: #777;
}

/* Resultados: compactos, pero con lectura y estado más claros. */
.team-result-card {
    position: relative;
    border-width: 1px;
}
.team-result-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}
.team-result-card--partido_ganado {
    background: #f0fbf4;
    border-color: #caebd7;
}
.team-result-card--partido_empatado {
    background: #fff8ea;
    border-color: #f0deb0;
}
.team-result-card--partido_perdido {
    background: #fff0f0;
    border-color: #efc7c7;
}
.team-result-card--partido_ganado::before { background: #22a35a; }
.team-result-card--partido_empatado::before { background: #d5a33a; }
.team-result-card--partido_perdido::before { background: #df5a5a; }
.team-result-card__link {
    position: relative;
    min-height: 64px;
    padding: 8px 10px 8px 13px;
}
.team-result-card__badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .03em;
    white-space: nowrap;
}
.team-result-card--partido_ganado .team-result-card__badge { background: #dff5e8; color: #1f8b4b; }
.team-result-card--partido_empatado .team-result-card__badge { background: #fff0cc; color: #9b6a00; }
.team-result-card--partido_perdido .team-result-card__badge { background: #ffdede; color: #b34141; }
.team-result-card__row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.team-result-card__team {
    width: 36%;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}
.team-result-card__team:last-child {
    flex-direction: row-reverse;
    text-align: right;
}
.team-result-card__logo {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    object-fit: contain;
}
.team-result-card__name {
    display: block;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.22;
    color: #222;
}
.team-result-card__center {
    width: 28%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-align: center;
    padding-top: 0;
}
.team-result-card__score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 23px;
    line-height: 1;
    color: #111;
}
.team-result-card__score span {
    font-size: 14px;
    color: #999;
    font-weight: 400;
}
.team-result-card__meta {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: #666;
}
.team-schedule-answer {
    clear: both;
    width: 100%;
    margin: 8px 0 18px;
    padding: 10px 12px;
    border: 1px solid #ececec;
    border-left: 4px solid #f39c12;
    border-radius: 8px;
    background: #fafafa;
    color: #555;
    line-height: 1.5;
}
.team-schedule-answer p { margin: 0; }

/* En desktop mostramos Próximos + Últimos resultados realmente a dos columnas. */
@media (min-width: 768px) {
    .team-schedule-tabs {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
    }
    .team-schedule-tabs > .tab-pane {
        display: block !important;
        opacity: 1 !important;
        width: auto !important;
        float: none !important;
        margin: 0;
    }
    .team-schedule-tabs .team-schedule-column {
        width: 100% !important;
        float: none !important;
        padding: 0;
    }
}

/* En móvil recuperamos el comportamiento de pestañas: una sección cada vez. */
@media (max-width: 767px) {
    .team-schedule-tabs {
        display: block;
    }
    .team-schedule-tabs > .tab-pane {
        display: none;
    }
    .team-schedule-tabs > .tab-pane.active {
        display: block;
    }
    .team-schedule-answer {
        padding: 10px 11px;
        font-size: 13px;
    }
    .team-schedule-card__link {
        min-height: 56px;
        padding: 7px 9px;
    }
    .team-schedule-card__team,
    .team-result-card__team {
        width: 35%;
    }
    .team-schedule-card__center {
        width: 30%;
    }
    .team-result-card__center {
        width: 30%;
        padding-top: 0;
    }
    .team-schedule-card__logo,
    .team-result-card__logo {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }
    .team-schedule-card__name,
    .team-result-card__name,
    .team-schedule-card__date {
        font-size: 13px;
    }
    .team-result-card__score {
        font-size: 20px;
    }
    .team-result-card__meta {
        font-size: 11px;
    }
    .team-result-card__badge {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* /plantilla/: introducción y separación de la plantilla por demarcación. */
.team-roster-intro {
    margin-bottom: 10px;
    padding-left: 0;
    padding-right: 0;
    line-height: 1.6;
}
.team-roster-intro p { margin-bottom: 12px; }
@media (max-width: 767px) {
    .team-roster-intro { font-size: 13px; }
}

/* /actualidad/: introducción de la landing de noticias del equipo. */
.team-news-intro {
    margin: 0 0 18px;
    padding: 11px 14px;
    border: 1px solid #ececec;
    border-left: 4px solid #f39c12;
    border-radius: 8px;
    background: #fafafa;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}
@media (max-width: 767px) {
    .team-news-intro {
        margin-bottom: 14px;
        padding: 10px 12px;
        font-size: 13px;
    }
}
