/* --- Tipstar MX - Estilos Globales --- */

/* 1. Variables de Color (Tu Paleta "White Theme") */
:root {
    --color-background: #e9ecef; /* Gris claro para mayor contraste */
    --color-surface: #ffffff;    /* Blanco para tarjetas y superficies */
    --color-primary: #3d5afe;     /* Azul eléctrico principal */
    --color-secondary: #28a745;   /* Verde para acentos de éxito o "acierto" */
    --color-text-primary: #212529; /* Negro suave para texto principal */
    --color-text-secondary: #6c757d;/* Gris para texto secundario o descriptivo */
    --color-border: #dee2e6;       /* Borde sutil */
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* 2. Reseteo y Estilos Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.6;
}

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

img {
    max-width: 100%;
    display: block;
}

/* 3. Estructura Principal (Header, Main, Footer) */
.main-header {
    background-color: var(--color-surface);
    box-shadow: var(--shadow-light);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
}

.logo a {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-text-primary);
}

.main-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    /* Dejamos espacio abajo para que no lo tape el menú móvil */
    padding-bottom: 100px; 
}

/* 4. Menú de Navegación de Escritorio */
.desktop-nav {
    display: none; /* Oculto por defecto, lo mostramos en pantallas grandes */
}

.desktop-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

.desktop-nav a {
    color: var(--color-text-secondary);
    font-weight: 600;
    transition: color 0.3s ease;
}

.desktop-nav a:hover {
    color: var(--color-primary);
}

.soon-badge {
    font-size: 0.7em;
    background-color: var(--color-border);
    color: var(--color-text-secondary);
    padding: 2px 5px;
    border-radius: 5px;
    margin-left: 5px;
}

.login-btn {
    background-color: var(--color-primary);
    color: white !important;
    padding: 8px 20px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background-color: #304ffe; /* Un azul un poco más oscuro */
}

/* 5. Menú Hamburguesa (Móvil) */
.hamburger-menu {
    display: block; /* Visible por defecto */
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text-primary);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* 6. Barra de Navegación Inferior (Móvil) */
.mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: var(--color-surface);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.nav-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    flex-grow: 1;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.nav-icon span {
    font-size: 0.7rem;
    font-weight: 500;
}

.nav-icon.active {
    color: var(--color-primary); /* El icono activo se pinta de azul */
}

.nav-icon.disabled {
    color: var(--color-border);
    pointer-events: none;
}

/* 7. Pie de Página (Escritorio) */
.main-footer {
    display: none; /* Oculto en móvil */
    background-color: #2c3e50; /* Un fondo oscuro para el footer, como es clásico */
    color: #ecf0f1;
    padding: 40px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--color-primary);
    padding-bottom: 5px;
    display: inline-block;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #bdc3c7;
}

.newsletter-form {
    display: flex;
    margin-top: 10px;
}

.newsletter-form input {
    flex-grow: 1;
    border: none;
    padding: 10px;
    border-radius: 5px 0 0 5px;
}

.newsletter-form button {
    border: none;
    background-color: var(--color-primary);
    color: white;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
}

/* 8. Media Queries para Diseño Responsivo */
@media (min-width: 768px) {
    .main-content {
        padding-bottom: 20px; /* Restauramos el padding en escritorio */
    }
    
    .hamburger-menu {
        display: none; /* Ocultamos la hamburguesa */
    }

    .desktop-nav {
        display: block; /* Mostramos el menú de escritorio */
    }

    .mobile-nav {
        display: none; /* Ocultamos la barra de navegación inferior */
    }

    .main-footer {
        display: block; /* Mostramos el pie de página tradicional */
    }
}


/* --- Estilos para la Página de Inicio (index.php) --- */

/* 9. Botones Generales */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px; /* Bordes redondeados para un look moderno */
    font-weight: 700;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-secondary {
    background-color: var(--color-surface);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(61, 90, 254, 0.2);
}

/* 10. Secciones Generales */
.hero-section, .sports-section, .picks-section, .cta-section {
    padding: 60px 0;
    text-align: center;
}

h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

/* 11. Estilo de la Sección Hero */
.hero-section {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(244, 247, 249, 1)), url('URL_DE_IMAGEN_DE_FONDO.jpg'); /* Opcional: añade una imagen de fondo sutil */
    background-size: cover;
    padding-top: 40px;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-text-primary);
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 15px auto 30px;
}

/* 12. Estilo de la Sección de Deportes */
.sports-grid {
    display: grid;
    grid-template-columns: 1fr; /* Una columna en móvil */
    gap: 20px;
}

.sport-card {
    background-color: var(--color-surface);
    padding: 40px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.sport-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
}

.sport-card h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--color-text-primary);
}

.sport-card p {
    color: var(--color-text-secondary);
}

.sport-card.disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.7;
}

.sport-card.disabled:hover {
    transform: none;
    box-shadow: var(--shadow-light);
    border-color: transparent;
}


/* 13. Estilo de la Sección de Picks */
.picks-section {
    background-color: var(--color-surface); /* Fondo blanco para destacar los picks */
}

.picks-grid {
    display: grid;
    grid-template-columns: 1fr; /* Una columna en móvil */
    gap: 20px;
}

/* (El estilo de las tarjetas de picks lo añadiremos cuando carguemos los datos) */

/* 14. Estilo de la Sección CTA */
.cta-section {
    background-color: var(--color-primary);
    color: white;
    border-radius: 15px;
    margin-top: 40px;
    padding: 50px 20px;
}

.cta-section h2 {
    color: white;
    border: none;
}

.cta-section p {
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-section .btn-secondary {
    background-color: white;
    color: var(--color-primary);
    border-color: white;
}

/* 15. Media Queries para Escritorio (hacerlo multi-columna) */
@media (min-width: 768px) {
    .sports-grid {
        grid-template-columns: repeat(3, 1fr); /* Tres columnas en escritorio */
    }

    .picks-grid {
        /* Dos columnas para los picks en escritorio, máximo 4 */
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    }
}
/* --- Estilos para las Tarjetas de Picks (.pick-card) --- */

.pick-card {
    background-color: var(--color-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--color-border);
    overflow: hidden; /* Asegura que los bordes redondeados se apliquen a los hijos */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pick-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.pick-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: #f8f9fa; /* Un gris muy sutil para el encabezado */
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}

.pick-card-header .liga-logo {
    width: 20px;
    height: 20px;
}

.pick-card-header .time {
    margin-left: auto; /* Empuja la hora hasta la derecha */
    font-weight: 700;
    color: var(--color-text-primary);
}

.pick-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 20px;
}

.pick-card-body .team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 40%; /* Ancho para cada equipo */
    text-align: center;
}

.pick-card-body .team img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.pick-card-body .team span {
    font-weight: 700;
    font-size: 1rem;
}

.pick-card-body .vs {
    font-weight: 700;
    color: var(--color-text-secondary);
}

.pick-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--color-primary);
    color: white;
}

.pick-card-footer .pick-info {
    display: flex;
    flex-direction: column;
}

.pick-card-footer .pick-market {
    font-size: 0.8rem;
    opacity: 0.8;
}

.pick-card-footer .pick-prediction {
    font-size: 1.1rem;
    font-weight: 700;
}

.pick-card-footer .details-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.pick-card-footer .details-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}
/* --- ESTILOS ADICIONALES PARA EL MENÚ MÓVIL --- */

@media (max-width: 767px) {
    .desktop-nav {
        display: none;
        position: absolute;
        top: 70px; /* Altura del header */
        left: 0;
        width: 100%;
        background-color: var(--color-surface);
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        z-index: 99;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
        overflow: hidden;
    }

    .desktop-nav.is-open {
        display: block; /* Muestra el menú cuando se hace clic */
    }

    .desktop-nav ul {
        flex-direction: column; /* Apila los elementos verticalmente */
        width: 100%;
        gap: 0;
    }

    .desktop-nav li {
        text-align: center;
        width: 100%;
    }
    
    .desktop-nav a {
        padding: 18px;
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--color-background);
    }

    .desktop-nav li:last-child a {
        border-bottom: none;
    }
    
    .desktop-nav .login-btn {
        margin: 10px 20px;
        width: auto;
    }
}
/* --- ESTILOS PARA EL NUEVO FOOTER --- */

.main-footer {
    display: block; /* Visible en todas las pantallas */
    background-color: #2c3e50; /* Fondo oscuro */
    color: #ecf0f1; /* Texto claro */
    padding: 40px 20px;
    margin-top: 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr; /* Una columna en móvil */
    gap: 40px;
    text-align: center;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: white;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #bdc3c7; /* Gris claro para enlaces */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.newsletter-form {
    display: flex;
    max-width: 350px;
    margin: 20px auto;
}

.newsletter-form input {
    flex-grow: 1;
    border: none;
    padding: 12px;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.newsletter-form button {
    border: none;
    background-color: var(--color-primary);
    color: white;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
    font-weight: 600;
}

.social-icons {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: sans-serif; /* Placeholder para iconos */
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
}

/* Ajustes para Escritorio */
@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr); /* Tres columnas */
        text-align: left;
    }
    .newsletter-form {
        margin-left: 0;
    }
    .social-icons {
        justify-content: flex-start;
    }
}