/* =========================================
   1. BARRA DE NAVEGACIÓN (NAVBAR)
   ========================================= */

.navbar { 
    background: white; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    width: 100%;             /* Asegura ancho total */
    padding: 10px 0;
}

.nav-container { 
    display: flex; 
    justify-content: space-between; /* Elementos a las esquinas extremas */
    align-items: center; 
    width: 100%; 
    padding: 0 30px;         /* Espacio lateral en PC */
    box-sizing: border-box; 
}

/* Logo */
.logo { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    text-decoration: none;
    color: inherit;
}

.logo h1 {
    font-size: 1.8rem; 
    margin: 0;
    font-weight: 900;
}

/* Contenedor de Botones */
.nav-buttons {
    display: flex;
    gap: 15px;
}

/* --- Adaptación Navbar para Móvil (max 600px) --- */
@media (max-width: 600px) {
    .nav-container {
        padding: 0 15px; /* Menos margen en bordes */
    }

    .logo h1 {
        font-size: 1.4rem; /* Texto más pequeño */
    }

    .logo-icon {
        width: 35px;
        height: 35px;
    }

    /* Ocultamos el texto, dejamos solo iconos */
    .nav-buttons .btn span {
        display: none;
    }

    /* Botones cuadrados */
    .nav-buttons .btn {
        padding: 8px 12px;
        gap: 0;
        font-size: 1.1rem;
    }
    
    .nav-buttons {
        gap: 8px; 
    }
}

/* =========================================
   2. HERO SECTION (BANNER AZUL)
   ========================================= */

.hero { 
    position: relative; 
    background: linear-gradient(135deg, var(--blue-primary), #1d4ed8); 
    padding: 60px 0; 
    text-align: center; 
    color: white; 
    overflow: hidden; 
}

.hero-content { 
    position: relative; 
    z-index: 2; 
}

.badge-promo { 
    background: var(--yellow); 
    color: var(--blue-dark); 
    padding: 5px 15px; 
    border-radius: 20px; 
    font-weight: bold; 
    display: inline-block; 
    margin-bottom: 20px; 
    animation: bounce 2s infinite; 
}

.hero h2 { 
    font-size: 2.5rem; 
    margin-bottom: 10px; 
}

.hero-stats { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    margin: 30px 0; 
    flex-wrap: wrap; 
}

.stat { 
    background: rgba(255,255,255,0.1); 
    padding: 8px 15px; 
    border-radius: 8px; 
    backdrop-filter: blur(5px); 
}

.btn-cta { 
    background: linear-gradient(to right, var(--yellow), #f59e0b); 
    color: var(--blue-dark); 
    font-size: 1.1rem; 
    padding: 12px 30px; 
    border-radius: 30px; 
}

/* =========================================
   3. GRILLA DE JUEGOS (GAMES GRID)
   ========================================= */

/* Encabezado de la sección (Juegos Disponibles) */
.section-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px;
    margin-top: 40px; /* Separación del banner azul */
    padding: 0 10px;  
}

/* Contenedor Grid Principal */
.games-grid {
    display: grid;
    /* MÓVIL POR DEFECTO: 2 Columnas */
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;               
    margin-bottom: 40px;     
    justify-content: center; 
}

/* Tarjeta Individual */
.game-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column; /* Alineación vertical interna */
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

/* --- Imagen del Juego (Control de Altura) --- */
.game-img {
    position: relative;
    width: 100%;
    height: 120px; /* Altura fija en Móvil */
    background-color: #e5e7eb;
}

.game-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-img img {
    transform: scale(1.1);
}

/* Badge "HOT" */
.hot-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Información del Juego */
.game-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1; 
}

.game-info h4 {
    font-size: 0.95rem;
    margin: 0 0 8px 0;
    color: #1f2937;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Puntos suspensivos si es largo */
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Etiquetas (Loterias, Deportes, etc) */
.tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
}

.tag-purple { background-color: #8b5cf6; }
.tag-blue { background-color: #3b82f6; }
.tag-red { background-color: #f43f5e; }

/* Estrellas / Rating */
.rating {
    font-size: 0.8rem;
    font-weight: bold;
    color: #d97706;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Botón Jugar (Overlay) */
.overlay-play {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(37, 99, 235, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .overlay-play { opacity: 1; }

.btn-play {
    background: #facc15;
    color: #1e3a8a;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* =========================================
   4. MEDIA QUERIES (AJUSTES TABLET Y PC)
   ========================================= */

/* Tablet (>= 768px) */
@media (min-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 Columnas */
        gap: 20px;
    }
    
    .game-img {
        height: 150px; /* Un poco más alto */
    }

    .hero h2 { 
        font-size: 3.5rem; 
    }
}

/* PC / Desktop (>= 1024px) */
@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 Columnas (Tu diseño deseado) */
        gap: 25px; 
    }

    .game-img {
        height: 170px; /* Altura ideal para PC */
    }

    .game-info h4 {
        font-size: 1rem;
    }
}

/* =========================================
   AJUSTE: OCUPAR TODO EL ANCHO (FULL WIDTH)
   ========================================= */

/* Esta clase reemplaza al .container tradicional */
.main-fluid {
    width: 100%;
    max-width: 100%; /* Elimina el límite de 1200px */
    padding: 0 30px; /* Margen lateral igual que el menú (header) */
    box-sizing: border-box;
}

/* Ajuste del título "Juegos Disponibles" */
.section-header {
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 0; /* Ya el padding lo da el .main-fluid */
}

/* --- Actualización de la Grilla para pantallas muy anchas --- */

/* Mantenemos tu configuración actual hasta 1024px... */
/* Pero agregamos soporte para pantallas muy grandes (Full HD / 4K) */
@media (min-width: 1400px) {
    .games-grid {
        /* Si la pantalla es gigante, usamos 5 o 6 columnas */
        /* para aprovechar el espacio extra */
        grid-template-columns: repeat(5, 1fr); 
    }
}

@media (min-width: 1800px) {
    .games-grid {
        grid-template-columns: repeat(6, 1fr); 
    }
}