/* Liga Niños Unidos Del Sur - capa visual compartida */
:root {
    --surface-strong: rgba(18, 23, 28, 0.92);
    --surface-soft: rgba(255, 255, 255, 0.045);
    --line-soft: rgba(255, 255, 255, 0.12);
    --focus-ring: rgba(255, 255, 255, 0.95);
}

html {
    scroll-behavior: smooth;
    background: var(--bg-base, #07090b);
}

body {
    min-width: 320px;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--primary-neon, #00ff87) 8%, transparent), transparent 34rem),
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
}

header {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}

.header-container {
    min-height: 56px;
}

.brand {
    min-width: 0;
}

.brand-text h1,
.brand-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-link,
.hero-btn,
.tab-btn,
.sub-tab-btn,
.fecha-btn,
.toggle-cols-btn,
.social-link,
.modal-close,
.card,
.news-card,
.sponsor-slide {
    -webkit-tap-highlight-color: transparent;
}

.nav-link:focus-visible,
a:focus-visible,
button:focus-visible,
.news-card:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.nav-link:hover,
.nav-link.active {
    box-shadow: inset 0 -2px 0 var(--primary-neon);
}

.card,
.hub-card,
.news-card,
.playoff-match-card,
.partido-card,
.goleador-item {
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.16);
}

.card,
.news-card,
.hub-card,
.playoff-match-card,
.partido-card,
.goleador-item,
.tab-btn,
.fecha-btn,
.toggle-cols-btn {
    border-color: var(--line-soft);
}

.team-img,
.equipo-lado img,
.goleador-foto,
.playoff-team-meta img {
    aspect-ratio: 1;
}

.card:hover,
.hub-card:hover,
.playoff-match-card:hover,
.partido-card:hover {
    border-color: color-mix(in srgb, var(--primary-neon, #00ff87) 52%, white 10%);
}

.card,
.news-card,
.sponsor-slide,
.social-link,
.hero-btn,
.tab-btn,
.fecha-btn,
.toggle-cols-btn,
.modal-close {
    transition-duration: 220ms;
}

.hero-btn:hover,
.card:hover,
.news-card:hover {
    transform: translateY(-4px);
}

.hero-btn:active,
.tab-btn:active,
.fecha-btn:active,
.toggle-cols-btn:active,
.social-link:active {
    transform: translateY(0) scale(0.98);
}

table thead {
    background: rgba(255, 255, 255, 0.035);
}

table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-strong);
}

tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.018);
}

tbody tr:hover td {
    background: color-mix(in srgb, var(--primary-neon, #00ff87) 7%, transparent);
}

.table-responsive {
    scrollbar-color: var(--primary-neon) rgba(255, 255, 255, 0.08);
    scrollbar-width: thin;
}

.news-card[role="button"] {
    cursor: pointer;
}

.news-card[role="button"] .read-more {
    margin-top: auto;
}

.modal-overlay[aria-hidden="true"] {
    visibility: hidden;
}

.modal-overlay[aria-hidden="false"] {
    visibility: visible;
}

.modal-content {
    border-color: var(--line-soft);
}

.modal-close {
    min-width: 40px;
    min-height: 40px;
}

img {
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .header-container {
        align-items: stretch;
    }

    .brand {
        align-self: center;
    }

    nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 4px 2px 8px;
        scrollbar-width: none;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        flex: 0 0 auto;
    }
}

@media (max-width: 600px) {
    .hero-title {
        letter-spacing: 0;
    }

    .hub-header {
        align-items: flex-start;
    }

    .hub-link {
        padding: 8px 0;
    }

    .news-meta {
        gap: 10px;
        align-items: flex-start;
    }

    .news-date {
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dirección visual editorial: cancha, marcador y noche de partido */
:root {
    --ink-deep: #050708;
    --ink-soft: #0b1014;
    --surface-raised: rgba(25, 31, 36, 0.86);
    --surface-hover: rgba(255, 255, 255, 0.075);
    --text-bright: #f7faf9;
    --text-dim: #93a0a8;
    --line-bright: rgba(255, 255, 255, 0.16);
}

body {
    color: var(--text-bright);
    background-color: var(--ink-deep);
    background-image:
        radial-gradient(ellipse at 50% -12%, color-mix(in srgb, var(--primary-neon, #00ff87) 13%, transparent), transparent 42rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.018) 25%, transparent 25%) 0 0 / 7px 7px,
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: auto, auto, 64px 64px, 64px 64px;
}

header {
    background: rgba(5, 7, 8, 0.9);
    border-bottom-color: var(--line-bright);
}

.header-container {
    max-width: 1280px;
    padding-inline: 24px;
}

.brand img {
    width: 48px;
    height: 48px;
}

.brand-text h1 {
    font-size: 1rem;
    letter-spacing: 0.08em;
}

.brand-text span {
    letter-spacing: 0.18em;
}

.nav-link {
    border: 1px solid transparent;
    letter-spacing: 0.04em;
}

.nav-link.active {
    border-color: color-mix(in srgb, var(--primary-neon, #00ff87) 40%, transparent);
    background: color-mix(in srgb, var(--primary-neon, #00ff87) 12%, transparent);
}

.hero {
    min-height: 680px;
    margin-top: 72px;
}

.hero-bg {
    filter: saturate(0.9) contrast(1.08);
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(4, 6, 8, 0.84), rgba(4, 6, 8, 0.25) 65%, rgba(4, 6, 8, 0.55)),
        linear-gradient(0deg, var(--ink-deep) 2%, transparent 42%, rgba(4, 6, 8, 0.22));
}

.hero-content {
    max-width: 980px;
    text-align: left;
    margin-inline: max(20px, 6vw);
    margin-right: auto;
}

.hero-title {
    max-width: 720px;
    font-size: clamp(3.2rem, 7vw, 6.5rem);
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.hero-desc {
    max-width: 620px;
    font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.hero-content > div:last-child {
    justify-content: flex-start !important;
}

.hero-btn {
    min-height: 54px;
    border-radius: 8px;
    box-shadow: 0 16px 30px color-mix(in srgb, var(--primary-neon, #00ff87) 18%, transparent);
}

.live-hub {
    max-width: 1180px;
    margin-top: -88px;
}

.hub-grid {
    gap: 16px;
}

.hub-card,
.card,
.sponsors-slideshow-section,
.news-card {
    background: linear-gradient(145deg, rgba(29, 36, 42, 0.88), rgba(12, 16, 19, 0.9));
    border-radius: 12px;
    border-color: var(--line-bright);
}

.hub-card {
    padding: 28px;
}

.hub-header {
    border-bottom-color: var(--line-bright);
}

.hub-header h3,
.card h3,
.news-title {
    letter-spacing: -0.02em;
}

.match-item {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.match-item:hover {
    background: var(--surface-hover);
    border-color: color-mix(in srgb, var(--primary-neon, #00ff87) 36%, transparent);
}

.quick-access {
    max-width: 1180px;
    gap: 16px;
}

.card {
    min-height: 238px;
    padding: 28px;
}

.card-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 10px;
}

.card-arrow {
    border-top: 1px solid var(--line-bright);
    padding-top: 14px;
    width: 100%;
}

main {
    padding-inline: 24px;
}

.section-header {
    position: relative;
    padding-block: 18px 8px;
}

.section-header::before {
    content: '';
    display: block;
    width: 46px;
    height: 4px;
    margin: 0 auto 18px;
    border-radius: 2px;
    background: var(--primary-neon);
    box-shadow: 0 0 18px color-mix(in srgb, var(--primary-neon, #00ff87) 48%, transparent);
}

.section-title {
    letter-spacing: -0.04em;
}

.tabs {
    padding: 6px;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    border: 1px solid var(--line-bright);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.24);
}

.tab-btn {
    border-radius: 8px;
}

.card {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

footer {
    padding-block: 48px;
    background: linear-gradient(180deg, #070a0c, #030405);
}

.social-link {
    border: 1px solid var(--line-bright);
}

@media (max-width: 900px) {
    .hero {
        min-height: 620px;
    }

    .hero-content {
        margin-inline: 24px;
    }

    main {
        padding-inline: 16px;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding-inline: 14px;
    }

    .hero {
        min-height: 650px;
        margin-top: 92px;
    }

    .hero-content {
        margin-inline: 15px;
        align-self: flex-end;
        margin-bottom: 54px;
    }

    .hero-title {
        font-size: clamp(2.8rem, 14vw, 4.3rem);
    }

    .hero-desc {
        line-height: 1.5;
    }

    .hero-content > div:last-child {
        align-items: stretch;
    }

    .live-hub {
        margin-top: -48px;
    }

    .hub-card,
    .card {
        padding: 22px;
    }

    .tabs {
        width: 100%;
        justify-content: stretch;
    }

    .tab-btn {
        flex: 1 1 42%;
    }
}

/* Rediseño de marca pública: una liga regional con lenguaje de transmisión */
:root {
    --brand-lime: #d8ff3e;
    --brand-blue: #2f7cff;
    --night: #080b0e;
    --panel: #11171c;
    --panel-light: #1a232a;
    --copy: #f1f5f2;
    --copy-muted: #8d9ba3;
    --rule: rgba(255, 255, 255, 0.13);
    --display-font: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}

body {
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    background-color: var(--night);
    background-image:
        linear-gradient(116deg, rgba(216, 255, 62, 0.045), transparent 26rem),
        linear-gradient(300deg, rgba(47, 124, 255, 0.06), transparent 32rem),
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: auto, auto, 72px 72px, 72px 72px;
}

h1, h2, h3, h4, .hero-title, .section-title, .brand-text h1,
.nav-link, .tab-btn, .sub-tab-btn, .news-tag, .season-badge,
.sponsors-carousel-title, .bracket-stage-title {
    font-family: var(--display-font);
    letter-spacing: 0.02em;
}

header {
    background: rgba(8, 11, 14, 0.94);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1320px;
    min-height: 68px;
}

.brand {
    position: relative;
}

.brand::after {
    content: 'LNUS';
    position: absolute;
    left: 60px;
    top: -4px;
    font: 800 0.58rem/1 var(--display-font);
    color: var(--brand-lime);
    letter-spacing: 0.18em;
    opacity: 0.75;
}

.brand img {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 12px rgba(216, 255, 62, 0.28));
}

.brand-text h1 {
    font-size: 1.28rem;
    letter-spacing: 0.04em;
}

.brand-text span {
    color: var(--brand-lime);
    letter-spacing: 0.24em;
}

.nav-link {
    border-radius: 4px;
    font-size: 0.92rem;
    letter-spacing: 0.05em;
}

.nav-link.active {
    color: var(--night);
    background: var(--brand-lime);
    border-color: var(--brand-lime);
    box-shadow: none;
}

.nav-link:hover:not(.active) {
    color: var(--brand-lime);
    background: rgba(216, 255, 62, 0.08);
}

.hero {
    height: min(780px, 88vh);
    min-height: 650px;
    margin-top: 68px;
    justify-content: flex-start;
}

.hero-bg {
    filter: saturate(0.72) contrast(1.15);
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(8, 11, 14, 0.98) 0%, rgba(8, 11, 14, 0.72) 38%, rgba(8, 11, 14, 0.12) 82%),
        linear-gradient(0deg, var(--night) 0%, transparent 32%, rgba(8, 11, 14, 0.16));
}

.hero-lights {
    left: 8%;
    transform: none;
    width: 42%;
    background: radial-gradient(ellipse at top left, rgba(216, 255, 62, 0.18), transparent 68%);
}

.hero-content {
    max-width: 720px;
    margin-left: clamp(24px, 8vw, 132px);
    margin-right: 24px;
    text-align: left;
}

.season-badge {
    border: 0;
    border-left: 4px solid var(--brand-lime);
    border-radius: 0;
    padding: 8px 14px;
    background: rgba(216, 255, 62, 0.1);
    color: var(--brand-lime);
    box-shadow: none;
}

.hero-title {
    max-width: 660px;
    font-size: clamp(4.4rem, 9vw, 8.5rem);
    line-height: 0.86;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

.hero-title br {
    display: block;
}

.hero-title::after {
    content: '.';
    color: var(--brand-lime);
}

.hero-desc {
    max-width: 540px;
    margin-bottom: 32px;
    color: #d2dbd6;
}

.hero-btn {
    border-radius: 4px;
    min-height: 52px;
    padding-inline: 24px;
    font-family: var(--display-font);
    letter-spacing: 0.06em;
}

.hero-btn[style*="#3b82f6"] {
    background: var(--brand-blue) !important;
    box-shadow: 0 10px 30px rgba(47, 124, 255, 0.28) !important;
}

.hero-btn-alt {
    background: rgba(8, 11, 14, 0.5);
    border-color: rgba(255, 255, 255, 0.28);
}

.live-hub {
    max-width: 1240px;
    margin-top: -100px;
}

.hub-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 12px;
}

.hub-card,
.card,
.news-card {
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: 5px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.hub-card {
    padding: 22px;
}

.hub-header {
    align-items: baseline;
    padding-bottom: 13px;
    border-bottom-color: var(--rule);
}

.hub-header h3 {
    font-size: 1.45rem;
    text-transform: uppercase;
}

.hub-header h3 i {
    color: var(--brand-lime);
}

.match-item {
    border-radius: 3px;
    padding: 13px 14px;
    border-color: rgba(255, 255, 255, 0.06);
}

.match-item:hover {
    transform: translateX(4px);
    border-color: var(--brand-lime);
}

.match-teams {
    font-size: 1rem;
}

.match-cancha {
    color: var(--brand-lime);
}

.hub-table th {
    color: var(--copy-muted);
}

.hub-table td {
    padding-block: 13px;
}

.hub-table .pos-1 {
    color: var(--brand-lime);
}

.quick-access {
    max-width: 1240px;
    gap: 12px;
}

.card {
    min-height: 250px;
    padding: 26px;
}

.card-icon-wrap {
    border-radius: 4px;
    width: 48px;
    height: 48px;
}

.card h3 {
    font-size: 1.8rem;
    text-transform: uppercase;
}

.card-arrow {
    color: var(--brand-lime) !important;
    border-top-color: var(--rule);
}

.sponsors-slideshow-section {
    border-radius: 5px;
    border-style: solid;
    border-color: var(--rule);
    background: linear-gradient(100deg, rgba(216, 255, 62, 0.07), var(--panel) 35%, rgba(47, 124, 255, 0.07));
}

.sponsors-carousel-title {
    color: var(--brand-lime);
}

footer {
    position: relative;
    overflow: hidden;
}

footer::before {
    content: 'LIGA NIÑOS UNIDOS DEL SUR';
    display: block;
    margin-bottom: 28px;
    color: rgba(216, 255, 62, 0.16);
    font: 900 clamp(2rem, 7vw, 5rem)/0.8 var(--display-font);
    letter-spacing: -0.03em;
}

/* Torneos y noticias: títulos con presencia de sección, sin tocar sus datos */
main > .section-header {
    text-align: left;
    max-width: 1240px;
    margin-inline: auto;
}

main > .section-header::before {
    margin-inline: 0;
}

.section-title {
    font-size: clamp(3rem, 6vw, 5.8rem);
    line-height: 0.9;
    text-transform: uppercase;
}

.section-subtitle {
    color: var(--brand-lime);
    letter-spacing: 0.18em;
}

.tabs {
    border-radius: 5px;
    margin-bottom: 30px;
}

.tab-btn,
.sub-tab-btn,
.fecha-btn,
.toggle-cols-btn {
    border-radius: 4px;
    font-family: var(--display-font);
    letter-spacing: 0.05em;
}

.tab-btn.active,
.fecha-btn.active {
    background: var(--brand-lime);
    border-color: var(--brand-lime);
    color: var(--night);
    box-shadow: 0 8px 20px rgba(216, 255, 62, 0.16);
}

.card {
    border-radius: 5px;
}

.sub-tabs {
    border-bottom-color: var(--rule);
}

.sub-tab-btn.active {
    color: var(--brand-lime);
}

.sub-tab-btn.active::after {
    background: var(--brand-lime);
    box-shadow: 0 -2px 12px rgba(216, 255, 62, 0.4);
}

.news-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.news-card {
    grid-column: span 4;
    border-radius: 5px;
}

.news-card:first-child {
    grid-column: span 8;
    grid-row: auto;
    align-self: start;
}

.news-card:first-child .img-container,
.news-card:first-child .news-img {
    height: 330px;
}

.news-card:first-child .news-title {
    font-size: 2rem;
}

.news-tag {
    border-radius: 3px;
    color: var(--brand-lime);
    background: rgba(216, 255, 62, 0.1);
    display: block;
    border-color: rgba(216, 255, 62, 0.3);
}


.image-failed { display: none !important; }
.img-container.image-missing { display: none; }
.read-more {
    color: var(--brand-lime);
    font-family: var(--display-font);
    letter-spacing: 0.05em;
}

.modal-content {
    border-radius: 5px;
    border-top: 4px solid var(--brand-lime);
}

.modal-close:hover {
    background: var(--brand-lime);
    border-color: var(--brand-lime);
}

@media (max-width: 900px) {
    .hero-content {
        margin-left: 32px;
    }

    .hub-grid {
        grid-template-columns: 1fr;
    }

    .news-card,
    .news-card:first-child {
        grid-column: span 6;
        grid-row: auto;
    }
}

@media (max-width: 600px) {
    .brand::after {
        display: none;
    }

    .hero {
        min-height: 690px;
    }

    .hero-content {
        margin-left: 18px;
        margin-right: 18px;
    }

    .hero-title {
        font-size: clamp(4rem, 18vw, 6rem);
    }

    .hero-content > div:last-child {
        gap: 8px !important;
    }

    .live-hub {
        margin-top: -56px;
    }

    main > .section-header {
        padding-inline: 4px;
    }

    .section-title {
        font-size: clamp(3rem, 15vw, 4.5rem);
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card,
    .news-card:first-child {
        grid-column: auto;
    }

    .news-card:first-child .img-container,
    .news-card:first-child .news-img {
        height: 210px;
    }

    .news-card:first-child .news-title {
        font-size: 1.45rem;
    }
}
