/* ==========================================================================
   1. FUENTES Y VARIABLES GLOBALES (NUEVOS COLORES VIBRANTES)
   ========================================================================== */

/* Importa la fuente desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&display=swap');

:root {
    --color-background: #0A1931; /* Azul más intenso y moderno */
    --color-background-light: #18335C; /* Azul secundario más claro */
    --color-text-light: #FFFFFF;
    --color-accent: #FFD700; /* Dorado más vibrante y eléctrico */
    --color-special: #F92C2C; /* Rojo más intenso para la balota especial */
    --font-primary: 'Montserrat', sans-serif;
}

/* ==========================================================================
   2. ESTILOS GENERALES (body, h1, h2, container)
   ========================================================================== */

body {
    font-family: var(--font-primary);
    margin: 0;
    background-color: var(--color-background);
    color: var(--color-text-light);
}

.container-main {
    max-width: 1100px; /* Un poco más de ancho para pantallas grandes */
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2 {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
}

/* ==========================================================================
   3. HEADER Y NAVEGACIÓN PRINCIPAL (LOGO MÁS GRANDE)
   ========================================================================== */

.main-header {
    background-color: var(--color-background-light);
    padding: 15px 0;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3); /* Borde dorado más visible */
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container .logo-img {
    height: 120px; /* --- CAMBIO: Logo más grande para escritorio --- */
    width: auto;
    display: block;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 35px;
}

.main-nav ul li a {
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 700;
    padding-bottom: 5px;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--color-accent);
}

.main-nav ul li a:hover::after {
    width: 100%;
}
/* ==========================================================================
   4. ESTILOS DE SECCIONES PRINCIPALES
   ========================================================================== */

.seccion-principal {
    padding: 80px 0;
    background: linear-gradient(rgba(13, 27, 63, 0.8), rgba(13, 27, 63, 1));
    text-align: center;
}

.seccion-principal h1 {
    font-size: 1.5em;
    font-weight: 400;
}

.seccion-principal .premio {
    font-size: clamp(3.5rem, 10vw, 6rem);
    font-weight: 900;
    color: var(--color-accent);
    margin: 10px 0 30px;
    text-shadow: 0 0 20px rgba(249, 199, 79, 0.5);
}

.countdown-display {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
}

.countdown-item span {
    font-size: 3em;
    font-weight: 700;
}

.countdown-item small {
    font-size: 0.8em;
    font-weight: 400;
    letter-spacing: 1px;
}

.seccion-ganadores {
    padding: 60px 0;
    background-color: var(--color-background-light);
    text-align: center;
}

.detalles-sorteo {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.8);
    margin-top: -15px;
    margin-bottom: 30px;
}

.seccion-historial {
    padding: 60px 0;
}

/* ==========================================================================
   5. ESTILOS DE BALOTAS
   ========================================================================== */

/* Contenedor de balotas del último ganador */
.balotas-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* Balotas Grandes */
.balota {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    background-image: url('img/yellow-ball.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #000;
    font-size: 2.5em;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
    padding-top: 5px;
}

.balota.balota-especial {
    background-image: url('img/red-ball.png');
    color: #fff;
}

/* Contenedor de balotas del historial */
.balotas-pasado {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Balotas Pequeñas */
.balota-small {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background-image: url('img/yellow-ball.png');
    background-size: cover;
    background-position: center;
    color: #000;
    font-size: 1.3em;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding-top: 3px;
    border-radius: 50%;
}

.balota-small.balota-especial-small {
    background-image: url('img/red-ball.png');
    color: #fff;
}

/* ==========================================================================
   6. ESTILOS DE HISTORIAL Y TARJETAS
   ========================================================================== */

.lista-sorteos-pasados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.sorteo-pasado-card {
    background-color: var(--color-background-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sorteo-pasado-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(249, 199, 79, 0.2);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 12px;
    font-weight: 700;
    color: var(--color-accent);
}

.card-body {
    padding: 25px 20px;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-footer span {
    color: rgba(255, 255, 255, 0.7);
}

.card-footer strong {
    color: #fff;
    font-weight: 700;
}

/* ==========================================================================
   7. PÁGINAS ESPECÍFICAS (history.php, terminos.php)
   ========================================================================== */

.history-page, .terminos-page {
    padding: 60px 0;
}

.history-title, .terminos-title {
    font-size: 3em;
    font-weight: 900;
    color: var(--color-accent);
    text-align: center;
    margin-bottom: 10px;
}

.history-subtitle, .terminos-subtitle {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-bottom: 50px;
}

.terminos-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-background-light);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.terminos-content h2 {
    font-size: 1.8em;
    color: var(--color-accent);
    margin-top: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(249, 199, 79, 0.2);
    padding-bottom: 10px;
}

.terminos-content p, .terminos-content li {
    font-size: 1em;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    text-align: justify;
}

/* ==========================================================================
   8. FOOTER Y REDES SOCIALES
   ========================================================================== */

/* ==========================================================================
   8. FOOTER Y REDES SOCIALES
   ========================================================================== */

.main-footer {
    background-color: var(--color-background); /* Azul oscuro de fondo */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px; /* Espacio arriba del banner */
    text-align: center;
}

.footer-banner-container img {
    max-width: 1200px; /* El banner no crecerá más de 1200px */
    width: 100%;       /* Ocupará el 100% del espacio disponible, hasta el máximo */
    height: auto;      /* ¡La clave! La altura se ajusta automáticamente para no deformar la imagen */
    display: block;
    margin: 0 auto;
}

.footer-banner-container {
    margin-bottom: 30px; /* Espacio debajo del banner */
}


.footer-content {
    padding-bottom: 30px; /* Espacio al final de la página */
}

.social-media {
    margin-bottom: 20px;
}

.social-media a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5em; /* Tamaño del ícono */
    margin: 0 15px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-media a:hover {
    color: var(--color-accent); /* Cambia a amarillo al pasar el mouse */
    transform: scale(1.2); /* Lo hace un poco más grande */
}

.main-footer .terminos {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.main-footer .terminos a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: bold;
}

.main-footer .terminos a:hover {
    color: var(--color-accent);
}
/* --- ESTILOS PARA BOTÓN DE WHATSAPP Y NUEVO FOOTER --- */
/* --- ESTILOS PARA BOTÓN DE WHATSAPP (CORRECCIÓN FINAL) --- */

a.whatsapp-flotante { /* Selector más específico para evitar conflictos */
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: #FFF !important; /* Importante para forzar el color del texto */
    border-radius: 25px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease;
    white-space: nowrap; /* ¡Clave! Evita que el texto se parta en varias líneas */
}

a.whatsapp-flotante i {
    font-size: 1.8rem;
}

a.whatsapp-flotante:hover {
    transform: scale(1.05);
    background-color: #128C7E;
}
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column; /* Apila el logo y el menú */
        gap: 20px; /* Espacio entre el logo y los links */
    }

    .main-header {
        padding: 20px 0;
    }

    .seccion-principal .premio {
        font-size: clamp(3rem, 15vw, 5rem); /* Ajusta el tamaño del premio en móviles */
    }

    .balota {
        width: 60px; /* Balotas más pequeñas en móviles */
        height: 60px;
        font-size: 2em;
    }

    .balotas-display {
        gap: 10px;
    }

    .whatsapp-flotante {
        bottom: 15px;
        right: 15px;
        padding: 8px 15px;
    }

    .whatsapp-flotante span {
        display: none; /* Oculta el texto en móviles, dejando solo el ícono */
    }
}