﻿/* ═══════════════════════════════════════════════════════════════════════════
   Ver Partidos Hoy - Diseno Moderno 2026
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --accent: #00c853;
    --accent-dark: #009624;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --max-width: 900px;
    --header-height: 64px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER / BANNER PRINCIPAL
   ═══════════════════════════════════════════════════════════════════════════ */

.banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.banner-content a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.banner-content a.banner-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.banner-logo {
    height: 40px;
    width: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.banner-live {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #fff;
    font-weight: 500;
}

.banner-live::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse-live 1.5s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENIDO PRINCIPAL
   ═══════════════════════════════════════════════════════════════════════════ */

.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 16px 40px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════════════════════════════════════ */

.breadcrumb {
    margin-bottom: 16px;
    font-size: 0.8rem;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.breadcrumb-list li {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
}

.breadcrumb-list li:not(:last-child)::after {
    content: "\203A";
    margin-left: 8px;
    color: var(--text-muted);
    font-size: 1rem;
}

.breadcrumb-list a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-list a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TITULO H1 CON PAIS
   ═══════════════════════════════════════════════════════════════════════════ */

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.page-title .country-flag {
    height: 22px;
    width: auto;
    vertical-align: middle;
    margin-left: 8px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEO INTRO
   ═══════════════════════════════════════════════════════════════════════════ */

.seo-intro {
    margin-bottom: 24px;
}

.seo-intro p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.seo-intro strong {
    color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENEDOR DE PARTIDOS
   ═══════════════════════════════════════════════════════════════════════════ */

#matches-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.seccion {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s;
}

.seccion:hover {
    box-shadow: var(--shadow-lg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TITULO DEL DIA
   ═══════════════════════════════════════════════════════════════════════════ */

.titulo-dia {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLA DE PARTIDOS
   ═══════════════════════════════════════════════════════════════════════════ */

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

col.col-partido { width: 34%; }
col.col-liga    { width: 28%; }
col.col-hora    { width: 16%; }
col.col-canal   { width: 22%; }

thead {
    background: var(--primary-light);
}

th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--primary);
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    vertical-align: middle;
    overflow: hidden;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: #f8faff;
}

/* Partido (equipos) */
.col-partido div {
    line-height: 1.4;
    font-weight: 500;
}

.vs-sep {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    line-height: 1;
    margin: 3px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Liga */
.col-liga {
    color: var(--text-secondary);
}

.liga-inner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.league-icon-img {
    flex-shrink: 0;
    width: 20px;
    height: 15px;
    object-fit: contain;
    margin-top: 2px;
    border-radius: 2px;
}

.liga-texto {
    min-width: 0;
    font-size: 0.82rem;
    line-height: 1.4;
}

/* Hora */
td.col-hora {
    white-space: nowrap;
    font-weight: 700;
    color: var(--text);
    font-size: 0.9rem;
}

/* Canal / Donde ver */
.donde-ver-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 4px rgba(26,115,232,0.3);
}

.donde-ver-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(26,115,232,0.4);
}

.donde-ver-link:active {
    transform: translateY(0);
}

.canal-short { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   ESTADOS: LOADING, ERROR, VACIO
   ═══════════════════════════════════════════════════════════════════════════ */

.loading-state,
.error-state,
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
}

.loading-state p,
.error-state p,
.empty-state p {
    margin-top: 12px;
    font-size: 0.95rem;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-state a {
    color: var(--primary);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FAQ SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.faq-section {
    background-color: var(--bg-card);
    margin-top: 40px;
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.faq-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

.faq-section h2 {
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 24px 0;
    letter-spacing: -0.02em;
}

.faq-item {
    margin-bottom: 8px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item[open] {
    border-color: var(--primary);
}

.faq-item summary {
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: "+";
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 50%;
    flex-shrink: 0;
}

.faq-item[open] summary::before {
    content: "\2212";
    background: var(--primary);
    color: white;
}

.faq-item summary:hover {
    background: var(--primary-light);
}

.faq-item p {
    margin: 0;
    padding: 0 20px 16px 56px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.site-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e2e8f0;
    padding: 40px 0 30px;
    margin-top: 40px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
    text-align: center;
}

.footer-info p {
    margin: 4px 0;
    font-size: 0.9rem;
}

.footer-info p:first-child {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.footer-links {
    margin: 20px 0;
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-links p {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.8;
}

.footer-copyright {
    margin-top: 16px;
}

.footer-copyright p {
    margin: 0;
    font-size: 0.75rem;
    color: #64748b;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOSCRIPT FALLBACK
   ═══════════════════════════════════════════════════════════════════════════ */

.noscript-content {
    background: var(--bg-card);
    padding: 32px 24px;
    border-radius: var(--radius);
    max-width: 600px;
    margin: 20px auto;
    box-shadow: var(--shadow-md);
}

.noscript-content h2 {
    color: var(--text);
    margin: 0 0 16px;
    font-size: 1.25rem;
}

.noscript-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.noscript-content li {
    margin: 8px 0;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - TABLET (max 768px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    .banner {
        padding: 0 16px;
    }

    .banner-content a.banner-title {
        font-size: 1.1rem;
    }

    .banner-logo {
        height: 34px;
        width: 34px;
    }

    .main-content {
        padding: 16px 12px 32px;
    }

    .page-title {
        font-size: 1.4rem;
    }

    th, td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    .titulo-dia {
        font-size: 0.88rem;
        padding: 12px 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - MOBILE (max 540px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 540px) {
    .banner-live {
        display: none;
    }

    .main-content {
        padding: 12px 8px 24px;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .page-title .country-flag {
        height: 16px;
    }

    .seo-intro p {
        font-size: 0.85rem;
    }

    .seccion {
        border-radius: var(--radius-sm);
    }

    .titulo-dia {
        font-size: 0.82rem;
        padding: 10px 14px;
    }

    /* Tabla responsive */
    col.col-partido { width: 38%; }
    col.col-liga    { width: 25%; }
    col.col-hora    { width: 17%; }
    col.col-canal   { width: 20%; }

    th {
        padding: 8px 8px;
        font-size: 0.7rem;
    }

    td {
        padding: 10px 8px;
        font-size: 0.78rem;
    }

    td.col-hora {
        font-size: 0.8rem;
    }

    .vs-sep {
        font-size: 0.6rem;
        margin: 2px 0;
    }

    .league-icon-img {
        width: 16px;
        height: 12px;
    }

    .liga-texto {
        font-size: 0.72rem;
    }

    .donde-ver-link {
        padding: 6px 10px;
        font-size: 0.68rem;
        border-radius: 16px;
    }

    .canal-full { display: none; }
    .canal-short { display: inline; }

    /* FAQ responsive */
    .faq-section {
        padding: 24px 0;
    }

    .faq-section h2 {
        font-size: 1.2rem;
    }

    .faq-item summary {
        font-size: 0.88rem;
        padding: 12px 14px;
    }

    .faq-item p {
        font-size: 0.82rem;
        padding: 0 14px 14px 44px;
    }

    /* Footer responsive */
    .footer-content {
        padding: 0 12px;
    }

    .footer-info p {
        font-size: 0.82rem;
    }

    .footer-links p {
        font-size: 0.72rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - EXTRA SMALL (max 380px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 380px) {
    .page-title {
        font-size: 1.05rem;
    }

    td, th {
        padding: 8px 6px;
        font-size: 0.72rem;
    }

    .donde-ver-link {
        padding: 5px 8px;
        font-size: 0.62rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESIBILIDAD
   ═══════════════════════════════════════════════════════════════════════════ */

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 1000;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0 0 8px 0;
    transition: top 0.2s;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK MODE (respeta preferencia del sistema)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f172a;
        --bg-card: #1e293b;
        --text: #f1f5f9;
        --text-secondary: #94a3b8;
        --text-muted: #64748b;
        --border: #334155;
        --border-light: #1e293b;
        --primary-light: #1e3a5f;
    }

    .banner {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
        box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    }

    thead {
        background: rgba(26,115,232,0.1);
    }

    th {
        border-bottom-color: rgba(26,115,232,0.3);
    }

    tr:hover {
        background-color: rgba(26,115,232,0.05);
    }

    .donde-ver-link {
        box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }

    .faq-section {
        background-color: var(--bg-card);
    }

    .faq-item {
        background: var(--bg);
    }
}
