/* Clubs Pages */

.clubs-public-header {
    text-align: center;
}

.clubs-public-toolbar {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.clubs-back-link {
    min-width: 120px;
}

.clubs-sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.clubs-sport-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 190px;
    padding: 20px 18px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.08);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
    box-shadow: 0 6px 18px rgba(15,23,42,.07);
    transition: transform .18s ease, box-shadow .24s ease, border-color .24s ease;
}

.clubs-sport-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15,23,42,.12);
    border-color: rgba(10,168,158,.26);
}

.clubs-sport-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(10,168,158,.1);
    border: 1px solid rgba(10,168,158,.18);
    color: #0a6a63;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.clubs-sport-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
    color: #15202b;
    text-align: left;
}

.clubs-sport-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.clubs-sport-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15,23,42,.05);
    border: 1px solid rgba(15,23,42,.08);
    color: #5f6e7a;
    font-size: 12px;
    font-weight: 700;
}

.clubs-grid-public {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: stretch;
}

.club-public-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    min-height: 100%;
}

.club-public-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 100%;
    color: inherit;
    text-decoration: none;
}

.club-public-link:hover .club-nombre {
    color: var(--color-primary, #0a6a63);
}

.club-public-shield .team-shield-wrap {
    width: 78px;
    height: 78px;
    flex: 0 0 78px;
}

.club-public-shield .team-shield-wrap .team-shield {
    width: 78px;
    height: 78px;
}

.club-public-card .club-nombre {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
    text-align: center;
}

.club-public-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #5f6e7a;
}

.club-public-localidad,
.club-public-equipos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15,23,42,.05);
    border: 1px solid rgba(15,23,42,.08);
}

.club-public-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.club-public-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(10,168,158,.1);
    border: 1px solid rgba(10,168,158,.16);
    color: #0a6a63;
    font-size: 11px;
    font-weight: 700;
}

.club-public-card-empty {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.club-detail-page {
    gap: 24px;
}

.club-detail-hero {
    padding: 24px;
    border-radius: 18px;
    border: 1px solid rgba(15,23,42,.08);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
    box-shadow: 0 8px 28px rgba(15,23,42,.08);
}

.club-detail-hero-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.club-detail-shield .team-shield-wrap {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
}

.club-detail-shield .team-shield-wrap .team-shield {
    width: 96px;
    height: 96px;
}

.club-detail-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.club-detail-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.club-detail-meta,
.club-detail-tags,
.club-team-meta,
.club-match-meta,
.club-match-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.club-detail-meta span,
.club-team-meta span,
.club-match-meta span,
.club-match-head span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15,23,42,.05);
    border: 1px solid rgba(15,23,42,.08);
    color: #5f6e7a;
    font-size: 12px;
    font-weight: 700;
}

.club-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.club-detail-card {
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.08);
    background: #fff;
    box-shadow: 0 6px 18px rgba(15,23,42,.06);
}

.club-detail-card-wide {
    grid-column: 1 / -1;
}

.club-detail-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.club-detail-card-head h2 {
    margin: 0;
    font-size: 20px;
}

.club-detail-count,
.club-team-letter,
.club-match-jornada {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(10,168,158,.1);
    border: 1px solid rgba(10,168,158,.16);
    color: #0a6a63;
    font-size: 12px;
    font-weight: 800;
}

.club-team-list,
.club-match-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.club-team-item,
.club-match-item {
    padding: 14px;
    border-radius: 14px;
    background: rgba(247,251,252,.9);
    border: 1px solid rgba(15,23,42,.06);
}

.club-team-name,
.club-match-teams {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: #15202b;
    font-weight: 700;
}

.club-match-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.club-match-action {
    margin-top: 10px;
}

.team-detail-page {
    gap: 20px;
}

.team-detail-page .club-detail-hero {
    position: relative;
    overflow: hidden;
    padding: 26px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(10,168,158,.10), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
    box-shadow: 0 12px 32px rgba(15,23,42,.08);
}

.team-detail-page .club-detail-hero::after {
    content: "";
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(10,168,158,.78), rgba(14,116,144,.42));
}

.team-detail-page .club-detail-hero-main {
    align-items: flex-start;
    gap: 22px;
}

.team-detail-page .club-detail-shield .team-shield-wrap {
    width: 104px;
    height: 104px;
    flex: 0 0 104px;
}

.team-detail-page .club-detail-shield .team-shield-wrap .team-shield {
    width: 104px;
    height: 104px;
}

.team-detail-page .club-detail-copy {
    gap: 12px;
}

.team-detail-page .section-title {
    margin: 0;
    line-height: 1.04;
    letter-spacing: -.02em;
}

.team-detail-page .club-detail-meta {
    gap: 8px;
}

.team-detail-page .club-detail-meta span {
    min-height: 30px;
    padding: 4px 11px;
    background: rgba(15,23,42,.05);
    color: #526170;
}

.team-detail-page .club-detail-tags {
    gap: 8px;
}

.team-detail-page .club-public-tag {
    min-height: 30px;
    padding: 5px 11px;
    font-weight: 800;
}

.team-detail-intro {
    margin: 10px 0 0;
    max-width: 760px;
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
}

.team-detail-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.team-detail-hero-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(10,168,158,.13);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,252,.96));
    box-shadow: 0 8px 18px rgba(15,23,42,.05);
}

.team-detail-hero-stat span {
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .05em;
    line-height: 1;
    text-transform: uppercase;
}

.team-detail-hero-stat strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
}

.team-detail-page .club-detail-grid {
    gap: 16px;
}

.team-detail-page .club-detail-card {
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(15,23,42,.06);
}

.team-detail-page .club-detail-card-head {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15,23,42,.08);
}

.team-detail-page .club-detail-card-head h2 {
    font-size: clamp(19px, 1.8vw, 22px);
    line-height: 1.1;
    color: #15202b;
}

.team-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.team-detail-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 92px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.06);
    background: linear-gradient(180deg, rgba(248,251,253,.98), rgba(244,249,250,.98));
}

.team-detail-stat__label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #677784;
}

.team-detail-stat__value {
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.12;
    color: #15202b;
}

.team-detail-racha {
    justify-content: flex-start;
}

.team-detail-page .club-match-list {
    gap: 14px;
}

.team-detail-page .club-match-item {
    position: relative;
    overflow: hidden;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248,251,253,.98), rgba(244,249,250,.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.team-detail-page .club-match-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: rgba(15,23,42,.10);
}

.team-detail-page .club-match-item.is-win::before {
    background: #16a34a;
}

.team-detail-page .club-match-item.is-draw::before {
    background: #d97706;
}

.team-detail-page .club-match-item.is-loss::before {
    background: #dc2626;
}

.team-detail-page .club-match-item.is-upcoming::before {
    background: #2563eb;
}

.team-detail-page .club-match-item.is-win {
    border-color: rgba(22,163,74,.18);
}

.team-detail-page .club-match-item.is-draw {
    border-color: rgba(217,119,6,.18);
}

.team-detail-page .club-match-item.is-loss {
    border-color: rgba(220,38,38,.16);
}

.team-detail-page .club-match-item.is-upcoming {
    border-color: rgba(37,99,235,.18);
}

.team-detail-page .club-match-head,
.team-detail-page .club-match-meta {
    align-items: center;
}

.team-detail-page .club-match-head {
    margin-bottom: 10px;
}

.team-detail-page .club-match-body {
    gap: 10px;
}

.team-detail-page .club-match-context {
    display: flex;
    justify-content: flex-start;
    grid-column: 1 / -1;
    margin-bottom: 2px;
}

.team-detail-page .club-match-side {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.team-detail-page .club-match-side.is-home {
    background: rgba(10,168,158,.10);
    color: #0a6a63;
}

.team-detail-page .club-match-side.is-away {
    background: rgba(37,99,235,.10);
    color: #1d4ed8;
}

.team-detail-page .club-match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    row-gap: 8px;
    margin-bottom: 0;
}

.team-detail-page .club-match-team {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    color: #15202b;
    text-align: center;
}

.team-detail-page .club-match-team--away {
    justify-content: flex-start;
    text-align: center;
}

.team-detail-page .club-match-team .team-shield-wrap,
.team-detail-page .club-match-team .team-shield-fallback {
    order: 1;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.92),
        0 10px 22px rgba(15, 23, 42, 0.12);
}

.team-detail-page .club-match-team > span:not(.team-shield-wrap) {
    order: 2;
    min-width: 0;
    max-width: 100%;
    min-height: 2.5em;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.team-detail-page .club-match-team.is-current > span:not(.team-shield-wrap) {
    color: #0a6a63;
}

.team-detail-page .club-match-team.is-current .team-shield-wrap {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.92),
        0 12px 24px rgba(10,168,158,.22);
    border-color: rgba(10,168,158,.22);
}

.team-detail-page .club-match-teams > strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
    border: 1px solid rgba(10,168,158,.14);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.8),
        0 12px 24px rgba(15,23,42,.10);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.01em;
    color: #15202b;
}

.team-detail-page .club-match-item:hover .club-match-teams > strong {
    border-color: rgba(10,168,158,.22);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.86),
        0 14px 28px rgba(10,168,158,.14);
}

.team-detail-page .club-match-teams > strong:not(:has(*)) {
    white-space: nowrap;
}

.team-detail-page .club-match-teams > strong {
    position: relative;
}

.team-detail-page .club-match-teams > strong.is-scheduled {
    min-width: 62px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15,23,42,.04);
    border: 1px solid rgba(15,23,42,.08);
    box-shadow: none;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #607180;
}

.team-detail-page .club-match-teams > strong.is-scheduled::after {
    display: none;
}

.team-detail-page .club-match-teams > strong::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 7px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(10,168,158,.42), rgba(14,116,144,.20));
    opacity: .8;
}

.team-detail-page .club-match-meta span {
    min-height: 28px;
    padding: 4px 10px;
}

.team-detail-page .club-match-status.is-finalizado {
    background: rgba(16,185,129,.10);
    border-color: rgba(16,185,129,.18);
    color: #047857;
}

.team-detail-page .club-match-status.is-programado {
    background: rgba(37,99,235,.10);
    border-color: rgba(37,99,235,.18);
    color: #1d4ed8;
}

.team-detail-page .club-match-status.is-directo,
.team-detail-page .club-match-status.is-en-juego {
    background: rgba(220,38,38,.12);
    border-color: rgba(220,38,38,.18);
    color: #b91c1c;
}

.team-detail-page .club-match-status.is-descanso {
    background: rgba(245,158,11,.14);
    border-color: rgba(245,158,11,.18);
    color: #b45309;
}

.team-detail-page .club-match-status.is-aplazado,
.team-detail-page .club-match-status.is-cancelado {
    background: rgba(107,114,128,.12);
    border-color: rgba(107,114,128,.18);
    color: #4b5563;
}

.team-detail-page .club-match-action {
    display: flex;
    justify-content: flex-start;
    margin-top: 12px;
}

@media (max-width: 900px) {
    .team-detail-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .clubs-grid { grid-template-columns: repeat(2, 1fr); }
    .club-detail-grid { grid-template-columns: 1fr; }
    .club-detail-card-wide { grid-column: auto; }
}

@media (max-width: 600px) {
    .clubs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .clubs-sports-grid {
        grid-template-columns: 1fr;
    }

    .clubs-sport-card {
        min-height: auto;
        padding: 16px 14px;
    }

    .clubs-sport-title {
        font-size: 18px;
    }

    .clubs-grid-public {
        grid-template-columns: 1fr;
    }

    .club-public-card {
        padding: 16px 12px;
    }

    .club-public-shield .team-shield-wrap {
        width: 68px;
        height: 68px;
        flex: 0 0 68px;
    }

    .club-public-shield .team-shield-wrap .team-shield {
        width: 68px;
        height: 68px;
    }

    .club-detail-hero {
        padding: 18px 14px;
    }

    .club-detail-hero-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .club-detail-shield .team-shield-wrap {
        width: 78px;
        height: 78px;
        flex: 0 0 78px;
    }

    .club-detail-shield .team-shield-wrap .team-shield {
        width: 78px;
        height: 78px;
    }

    .club-detail-card {
        padding: 16px 14px;

    }

    .team-detail-page .club-detail-hero {
        padding: 18px 14px;
    }

    .team-detail-page .club-detail-hero::after {
        left: 14px;
        right: 14px;
    }

    .team-detail-page .club-detail-hero-main {
        gap: 16px;
    }

    .team-detail-page .club-detail-shield .team-shield-wrap {
        width: 84px;
        height: 84px;
        flex: 0 0 84px;
    }

    .team-detail-page .club-detail-shield .team-shield-wrap .team-shield {
        width: 84px;
        height: 84px;
    }

    .team-detail-hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .team-detail-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .team-detail-stat {
        min-height: 86px;
        padding: 12px;
        border-radius: 14px;
    }

    .team-detail-stat__value {
        font-size: 18px;
    }

    .team-detail-page .club-match-item {
        padding: 14px;
    }

    .team-detail-page .club-match-teams {
        gap: 8px;
    }

    .team-detail-page .club-match-team {
        gap: 7px;
    }

    .team-detail-page .club-match-team .team-shield-wrap,
    .team-detail-page .club-match-team .team-shield-fallback {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .team-detail-page .club-match-team > span:not(.team-shield-wrap) {
        min-height: 2.45em;
        font-size: 13px;
    }

    .team-detail-page .club-match-teams > strong {
        min-width: 74px;
        min-height: 42px;
        padding: 0 12px;
        border-radius: 14px;
        font-size: 16px;
    }

    .team-detail-page .club-match-teams > strong.is-scheduled {
        min-width: 56px;
        min-height: 36px;
        font-size: 11px;
    }
}

@media (max-width: 390px) {
    .team-detail-hero-stats {
        grid-template-columns: 1fr;
    }

    .team-detail-stats {
        grid-template-columns: 1fr;
    }

    .team-detail-page .club-detail-meta,
    .team-detail-page .club-detail-tags,
    .team-detail-page .club-match-meta,
    .team-detail-page .club-match-head {
        gap: 6px;
    }

    .team-detail-page .club-match-team {
        gap: 6px;
    }

    .team-detail-page .club-match-team .team-shield-wrap,
    .team-detail-page .club-match-team .team-shield-fallback {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .team-detail-page .club-match-team > span:not(.team-shield-wrap) {
        min-height: 2.4em;
        font-size: 12px;
    }

    .team-detail-page .club-match-teams > strong {
        min-width: 66px;
        min-height: 38px;
        font-size: 14px;
    }

    .team-detail-page .club-match-teams > strong.is-scheduled {
        min-width: 52px;
        min-height: 34px;
        font-size: 10px;
    }
}

