@import url('fonts.googleapis.com');

/* Variables de Colores para consistencia */
:root {
    --color-primary: #22890c; /* Azul Oscuro (LMP) */
    --color-secondary: #FF6600; /* Naranja/Acento */
    --color-text: #333;
    --color-light: #f4f4f4;
    --color-white: #ffffff;
        font-family: 'Roboto', sans-serif;

}
h1 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700; /* Para el estilo Bold, si lo seleccionaste */
}



/* ================== RESET BÁSICO y FIX DE SCROLL ================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    /* Evita el scroll horizontal general de la página, solo los componentes internos lo tendrán */
    overflow-x: hidden; 
}

body {
      font-family: "Roboto", sans-serif;
      font-optical-sizing: auto;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-light);

}

body {
  font-family: 'Roboto', sans-serif; /* 'Roboto', sans-serif es el fallback */
}

h1 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700; /* Negrita */
}

p {
  font-family: 'Roboto', sans-serif;
  font-weight: 400; /* Regular */
}


a {
    text-decoration: none;
    color: var(--color-primary);
}

ul {
    list-style: none;
}

/* ================== HEADER y NAVEGACIÓN ================== */
.main-header {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo h1 {
    font-size: 1.8rem;
}

.main-nav ul {
    display: flex;
    gap: 1.5rem;
            font-family: 'Roboto', sans-serif;

}

.main-nav a {
    color: var(--color-white);
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--color-secondary);
}

.btn-live {
    background-color: var(--color-secondary);
    padding: 0.4rem 1rem;
    border-radius: 5px;
    font-weight: bold;
    color: var(--color-white) !important;
}

/* ================== MENÚ HAMBURGUESA ================== */
.hamburger {
    display: none; /* Oculto por defecto en desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 20;
}

.bar {
    width: 100%;
    height: 3px;
    background-color: var(--color-white);
    border-radius: 10px;
    transition: all 0.3s linear;
}

/* Efecto 'X' */
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ================== HERO SLIDER (Carrusel Principal) ================== */
.slider-container-wrapper {
    position: relative; /* Contenedor para posicionar las flechas */
    width: 100%;
}

.hero-slider {
    width: 100%;
    overflow-x: scroll; /* Permite el scroll de las slides */
    overflow-y: hidden;
    display: flex;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.hero-slider::-webkit-scrollbar {
    display: none;
}

.slide {
    width: 100%; 
    flex-shrink: 0; /* IMPEDIR que los slides se encojan */
    height: 600px; 
    /* PLACEHOLDER DE IMAGEN: REEMPLAZAR */
    background: url('https://linabegjc.com.mx/update/1740423406.jpeg') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center; 
}

.slide-alt {
    /* PLACEHOLDER DE IMAGEN ALTERNATIVA: REEMPLAZAR */
    background-image: url('https://linabegjc.com.mx/update/1739751203.png'); 
}

.terc {
    /* PLACEHOLDER DE IMAGEN ALTERNATIVA: REEMPLAZAR */
    background-image: url('https://linabegjc.com.mx/update/1737827309.jpeg'); 
}

.slide-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    color: var(--color-white);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.slide-content h2 {
    font-size: 2.5rem;
    color: var(--color-white);
}

.btn-slide {
    background-color: var(--color-secondary);
    color: var(--color-white) !important;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
}

/* Flechas de Control */
.slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--color-white);
    border: none;
    padding: 1rem;
    cursor: pointer;
    z-index: 10;
    font-size: 2rem;
    line-height: 1;
    transition: background-color 0.3s;
}

.slider-control:hover {
    background-color: rgba(255, 102, 0, 0.8);
}

.slider-control.prev {
    left: 1rem;
    border-radius: 0 5px 5px 0;
}

.slider-control.next {
    right: 1rem;
    border-radius: 5px 0 0 5px;
}

/* ================== MARCADORES/PARTIDOS SLIDER ================== */

.results-slider {
    width: 100%; 
    background-color: var(--color-primary); 
    padding: 1rem 0;
    margin-bottom: 2rem;
    
    /* Ocupa todas las columnas del grid del contenedor principal */
    grid-column: 1 / -1; 
    
    text-align: center;
}

.results-slider h2 {
    color: var(--color-white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.scores-container {
    display: flex;      
    overflow-x: scroll; /* CLAVE: Permite el desplazamiento horizontal */
    overflow-y: hidden; /* Esto es correcto */
    padding: 0 2rem 1rem 2rem; 
    gap: 1.5rem; 
    
    white-space: nowrap; 
    
    /* ----- Diagnóstico / Solución Final de Ancho ----- */
    /* Temporalmente, establece un alto para verificar que el contenedor se renderice */
    /* height: 150px; */ 

    /* Aunque usamos flex, esto puede ayudar en algunos navegadores: */
    flex-wrap: nowrap;
    
    /* Oculta la barra de scroll (opcional para un diseño más limpio) */
    scrollbar-width: none;
}

.scores-container::-webkit-scrollbar {
    display: none;
}

.score-card {
    min-width: 200px; /* Ancho mínimo para cada tarjeta */
    max-width: 250px;
    flex-shrink: 0; /* CLAVE: Evita que las tarjetas se encojan, forzando el scroll */
    
    background-color: var(--color-white);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.score-card .status {
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.score-card.final .status {
    color: green;
}

.score-card.upcoming .status {
    color: var(--color-primary);
}

.score-card.live .status {
    color: red; 
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0.5; }
}

.match-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.score {
    color: var(--color-secondary);
    font-size: 1.3rem;
}

.score-card .details {
    font-size: 0.75rem;
    color: #666;
}

/* ================== CONTENIDO PRINCIPAL ================== */
.container {
    max-width: 1200px;
    margin: 0rem auto;
    padding: 0 2rem;
    padding-top: 20px;
    display: grid;
    /* Diseño de escritorio: 75% contenido, 25% sidebar */
    grid-template-columns: 3fr 1fr; 
    gap: 2rem;
}

.main-content h2 {
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-secondary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.news-card {
    background-color: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.news-card.featured .news-image {
    background-color: #ccc;
    height: 300px;
    margin-bottom: 1rem;
    border-radius: 5px;
    overflow: hidden;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* SIDEBAR */
.sidebar {
    grid-column: 2 / 3;
    padding-top: 2rem;
}

.widget {
    background-color: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.standings-widget table {
    width: 100%;
    border-collapse: collapse;
}

/* ================== FOOTER ================== */
.main-footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 0px;
}

.main-footer a {
    color: var(--color-secondary);
    margin: 0 0.5rem;
}

/* ================== MEDIA QUERY (Responsividad Móvil) ================== */
@media (max-width: 992px) {
    
    /* Mostrar Hamburguesa */
    .hamburger {
        display: flex;
    }
    
    /* Ocultar y Posicionar Menú */
    .main-nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 60px; 
        left: 0;
        background-color: var(--color-primary);
        z-index: 15;
        box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
        padding: 1rem 0;
    }
    
    .main-nav.active {
        display: block; 
    }

    .nav-menu {
        flex-direction: column;
        text-align: center;
        gap: 0;
    }

    .main-nav ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-nav a {
        display: block;
        padding: 1rem;
    }
    
    .btn-live {
        display: block;
        width: 80%;
        margin: 1rem auto;
        text-align: center;
    }
    
    /* Layout Principal - Una sola columna */
    .container {
        grid-template-columns: 1fr;
    }
    
    /* Asegurar que el contenido va primero, luego el sidebar */
    .sidebar {
        grid-column: 1 / 2;
        order: 2; 
        padding-top: 0;
    }
    
    .main-content {
        order: 1;
    }
    
    /* Ajuste del Slider Principal */
    .slide {
        height: 300px; /* Menor altura en móvil */
    }
    
    .slide-content h2 {
        font-size: 1.5rem;
    }
    
    .slide-content p {
        display: none; /* Ocultar detalles para ahorrar espacio */
    }
    
    /* Ajuste del Slider de Marcadores */
    .results-slider {
        padding: 0.5rem 0;
        margin-bottom: 1.5rem;
    }
    
    .scores-container {
        padding: 0 1rem 0.5rem 1rem; /* Menor padding en móvil */
        gap: 1rem;
    }
    
    .score-card {
        min-width: 160px; /* Un poco más estrecho en móvil para caber más */
        padding: 0.75rem;
    }
}




/* ================== DETALLE DE NOTICIA ================== */

.news-title {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.news-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-light);
    padding-bottom: 0.5rem;
}

.news-figure {
    margin: 1.5rem 0;
    text-align: center;
}

.news-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.news-figure figcaption {
    font-style: italic;
    color: #888;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.news-body p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.news-body h2, .news-body h3 {
    color: var(--color-secondary);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    border-left: 5px solid var(--color-secondary);
    padding-left: 10px;
}

.social-share {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-light);
}

.related-news {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 2px solid var(--color-primary);
}


/* ================== TABLAS DE STANDING ================== */

/* Para hacer que el contenedor de standing ocupe el ancho completo sin sidebar */
.container.standings-page {
    grid-template-columns: 1fr; /* Una sola columna */
}

/* Fuerza el contenido a usar el ancho completo en la página de standing */
.standings-page .full-width-content {
    grid-column: 1 / -1;
}

.standings-page h1 {
    font-size: 2.2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.last-update {
    text-align: center;
    color: #888;
    margin-bottom: 2rem;
}

.table-title {
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-secondary);
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.table-responsive {
    /* Permite el scroll horizontal en la tabla en pantallas pequeñas */
    overflow-x: auto;
    margin-bottom: 3rem;
}

.table-responsive table {
    width: 100%;
    min-width: 700px; /* Ancho mínimo para evitar que se aplaste en móvil */
    border-collapse: collapse;
    text-align: left;
    background-color: var(--color-white);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.table-responsive th, .table-responsive td {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    white-space: nowrap; /* Evita saltos de línea en celdas */
}

.table-responsive thead th {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.table-responsive tbody tr:nth-child(even) {
    background-color: var(--color-light);
}

.table-responsive tbody tr:hover {
    background-color: #e0e0e0;
}

.table-responsive .leader {
    background-color: #ffe5b4; /* Fondo naranja claro para el líder */
    font-weight: bold;
}

/* Ajuste para móvil: forzar el scroll horizontal de la tabla */
@media (max-width: 768px) {
    .table-responsive {
        /* Se activa el scroll horizontal por 'overflow-x: auto;' */
    }
}