* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
    background: #006600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
}

.header > .header-container.container {
    max-width: none;
    width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
}

.header-logo { height: 120px; width: auto; }

.company-name {
    color: #FFE417;
    font-size: 1.8rem;
    margin-right: auto;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.dropdown { position: relative; }

.dropdown-btn {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #FFFFFF;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    min-width: 400px;
    z-index: 999;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px;
}

.dropdown:hover .dropdown-content {
    display: flex;
    gap: 20px;
}

.dropdown-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.dropdown-column a {
    color: #330033;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background 0.3s;
    white-space: nowrap;
}

.dropdown-column a:hover { background: #FFE417; }

/* ── Hero ────────────────────────────────────────────────── */
.hero-section {
    background-size: cover;
    background-position: center;
    height: 320px;
    position: relative;
    margin-bottom: 0;
}

.fecha-hoy {
    background-color: #FFE417;
    color: #333333;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-align: center;
    text-transform: uppercase;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   SECCIÓN DE LOGOS DE LOTERÍAS
══════════════════════════════════════════════════════════ */
.logos-loterias-section {
    background: #0a1a0a;
    padding: 2.5rem 1rem 2rem;
    text-align: center;
}

.logos-titulo {
    color: #FFE417;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.8rem;
}

.logos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 0.6rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* Cada ítem ocupa ~1/8 de la fila → 8 por fila en desktop */
.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    width: calc(100% / 8 - 0.6rem);
    min-width: 90px;
    padding: 0.7rem 0.3rem;
    border-radius: 10px;
    transition: background 0.2s, transform 0.2s;
}

.logo-item:hover {
    background: rgba(255, 228, 23, 0.12);
    transform: translateY(-4px);
}

.logo-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    transition: transform 0.2s;
}

.logo-item:hover img { transform: scale(1.1); }

.logo-item span {
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════════════════
   BOTÓN FLOTANTE — volver a #inicio
══════════════════════════════════════════════════════════ */
#btn-inicio-flotante {
    position: fixed;
    right: 20px;
    bottom: 30px;
    z-index: 900;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #006600;
    color: #FFE417;
    font-size: 1.8rem;
    line-height: 1;
    border: 2px solid #FFE417;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.2s, background 0.2s;
}

#btn-inicio-flotante.visible {
    opacity: 1;
    pointer-events: auto;
}

#btn-inicio-flotante:hover {
    background: #FFE417;
    color: #006600;
    transform: scale(1.1);
}

/* ── Sección de Lotería ──────────────────────────────────── */
.loteria-section {
    padding: 4rem 0;
    border-bottom: 2px solid #FFE417;
}

.loteria-header-container {
    background: #006600;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.loteria-header-bar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.loteria-titulo {
    color: #FFFFFF;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.loteria-logo {
    width: 90px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.fecha-actual {
    color: #330033;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* ── Sistema de resultados ───────────────────────────────── */
.resultados-container {
    padding: 1.5rem 0.5rem;   /* menos padding lateral → más ancho disponible */
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
}

/* El container interior de cada sección no limita el ancho */
.loteria-section > .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.resultados-doble-fila {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Fila se extiende a todo el ancho, ítems distribuidos uniformemente */
.fila-resultados {
    display: flex;
    flex-wrap: nowrap;          /* sin wrap → todos en una sola fila */
    justify-content: space-evenly;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
}

/* Cada ítem crece para rellenar el espacio disponible */
.resultado-item {
    text-align: center;
    position: relative;
    flex: 1 1 0;               /* todos del mismo ancho, reparten el espacio */
    min-width: 0;              /* evita desbordamiento en flex */
}

.imagen-container {
    position: relative;
    width: 180px;              /* 180px */
    margin: 0 auto;
}

.imagen-circular {
    width: 180px;              /* 180px */
    height: 180px;             /* 180px */
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FFE417;
    display: block;
    margin: 0 auto;
}

/* Pendiente: imagen de loading con borde gris */
.imagen-container.cargando .imagen-circular {
    border-color: #cccccc;
    opacity: 0.75;
}

.hora-resultado {
    display: block;
    margin-top: 0.5rem;
    color: #330033;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Badge con número encima de la imagen */
.numero-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #FFE417;
    color: #333333;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 2;
}

/* Spinner sobre imagen pendiente */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.spinner {
    width: 50px;               /* 50px */
    height: 50px;
    border: 4px solid #cccccc;
    border-top-color: #006600;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

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

/* ── Tarjetas destacadas ────────────────────────────────── */
.tarjetas-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.tarjeta {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ── Mensajes ───────────────────────────────────────────── */
.mensaje-no-resultados {
    text-align: center;
    font-size: 1.5rem;
    color: #FF369B;
    padding: 2rem;
    border: 2px dashed #FFE417;
    margin: 2rem 0;
}

.error {
    color: #dc3545;
    background: #fff3f3;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #dc3545;
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
    background: #76004D;
    color: #FFFFFF;
    padding: 4rem 0;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.footer-company {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.footer-logo { height: 80px; width: auto; }

.footer-contact {
    color: #FFE417;
    text-align: right;
    flex: 1;
    margin-top: 0.8rem;
}

.footer-contact h3 {
    color: #FFE417;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.footer-contact p { margin-bottom: 0.4rem; }

.footer-divider {
    border: 0;
    border-top: 3px solid #FFE417;
    margin: 1.2rem auto;
    width: 90%;
}

/* ── Home page ──────────────────────────────────────────── */
.home-page .hero-section {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 520px;
    height: auto;          /* deja que el contenido defina la altura */
}

/* ── Overlay derecho sobre el banner ───────────────────── */
/* Ocupa la mitad derecha del banner */
.hero-overlay-derecha {
    position: absolute;
    right: 0;
    top: 0;
    width: 52%;            /* cubre la mitad derecha + un poco más */
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* todo alineado a la derecha por defecto */
    justify-content: center;
    gap: 1rem;
    padding: 2rem 4rem 2rem 1rem;
    z-index: 2;
}

/* Fila 1: "CON TU DIOSA DE LA" — derecha */
.hero-pretitulo {
    color: #FFFFFF;
    font-size: 2.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: right;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    margin: 0;
    line-height: 1.1;
    width: 100%;
}

/* Fila 2: imagen SUERTE — centrada (anula align-items:flex-end) */
.hero-suerte-wrap {
    width: 100%;
    display: flex;
    justify-content: center;   /* centrada horizontalmente */
}

.hero-suerte-img {
    max-width: 90%;
    max-height: 210px;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(0,0,0,0.6));
}

/* Fila 3: "SIEMPRE GANAS MUCHÍSIMO MÁS" — derecha */
.hero-subtitulo {
    color: #FFFFFF;
    font-size: 1.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: right;
    text-shadow: 2px 2px 7px rgba(0,0,0,0.8);
    margin: 0;
    width: 100%;
}

/* Fila 4: párrafo — derecha */
.hero-parrafo {
    color: #FFFFFF;
    font-size: 1.25rem;
    font-weight: 400;
    text-align: right;
    line-height: 1.6;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.9);
    margin: 0;
    width: 100%;
}

.hero-parrafo em {
    font-style: italic;
    font-weight: 600;
}

/* Fila 5: botón — alineado a la derecha */
.hero-btn-resultados {
    display: inline-block;
    background-color: #FFE417;
    color: #006600;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.7rem 2.8rem;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 0.2rem;
}

.hero-btn-resultados:hover {
    background-color: #fff176;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 26px rgba(0,0,0,0.45);
}

/* ── Agencias ───────────────────────────────────────────── */
.agencias-section {
    background-size: cover;
    background-position: center;
    padding: 4rem 0;
    position: relative;
}

.agencias-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.agencias-logo { height: 120px; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }

.agencias-texto { color: #FFFFFF; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.agencias-texto h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.agencias-texto p  { font-size: 1.5rem; font-weight: 500; }

.agencias-logos {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.agencias-logos img { height: 200px; width: auto; transition: transform 0.3s ease; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    /* En pantallas medianas: 5 logos por fila */
    .logo-item { width: calc(100% / 5 - 0.6rem); }

    .fila-resultados { gap: 0.5rem; }
    /* Imágenes se reducen proporcionalmente en pantallas medianas */
    .resultado-item { min-width: 0; }
    .imagen-circular { width: 150px; height: 150px; }
    .imagen-container { width: 150px; }
}

@media (max-width: 768px) {
    .header-container { flex-wrap: wrap; gap: 1rem; }
    .company-name { font-size: 1.5rem; order: 1; width: 100%; text-align: center; }
    .nav-menu { order: 2; width: 100%; justify-content: center; }

    .hero-section { height: 200px; }
    .fecha-hoy { font-size: 1.2rem; padding: 0.6rem 1.5rem; bottom: 20px; }

    .loteria-header-bar { flex-direction: column; gap: 0.5rem; }
    .loteria-titulo { font-size: 1.5rem; }
    .loteria-logo { width: 50px; }

    /* 3 logos por fila en móvil */
    .logo-item { width: calc(100% / 3 - 0.6rem); min-width: 80px; }
    .logo-item img { width: 52px; height: 52px; }
    .logos-titulo { font-size: 1.1rem; }

    #btn-inicio-flotante { right: 12px; bottom: 20px; width: 44px; height: 44px; font-size: 1.5rem; }

    /* En móvil las filas permiten wrap para no apretar demasiado */
    .fila-resultados {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
    }
    .imagen-circular { width: 110px; height: 110px; }
    .imagen-container { width: 110px; }

    .footer-content { flex-direction: column; align-items: center; text-align: center; }
    .footer-company { flex-direction: column; gap: 1rem; }
    .footer-contact { text-align: center; width: 100%; margin-top: 1rem; }

    /* hero overlay en móvil: ocupa todo el ancho */
    .hero-overlay-derecha {
        position: relative;
        width: 100%;
        height: auto;
        padding: 1.5rem 1.5rem;
        background: rgba(0,0,0,0.5);
        align-items: flex-end;
        justify-content: center;
    }
    .hero-pretitulo  { font-size: 1.6rem; }
    .hero-subtitulo  { font-size: 1.2rem; }
    .hero-parrafo    { font-size: 1rem; }
    .hero-suerte-img { max-height: 130px; }
    .hero-btn-resultados { font-size: 1.1rem; padding: 0.6rem 2rem; }

    .agencias-header { flex-direction: column; text-align: center; }
    .agencias-texto h2 { font-size: 2rem; }
    .agencias-texto p  { font-size: 1.2rem; }
    .agencias-logos { flex-direction: column; }
    .agencias-logos img { height: 70px; margin: 1rem 0; }
}

@media (max-width: 480px) {
    /* 2 logos por fila en pantallas muy pequeñas */
    .logo-item { width: calc(50% - 0.6rem); }
    .imagen-circular { width: 85px; height: 85px; }
    .imagen-container { width: 85px; }
}

/* ═══════════════════════════════════════════════════════════
   SECCIÓN DE LOGOS — Navegación rápida
   ═══════════════════════════════════════════════════════════ */
.logos-nav-section {
    background: linear-gradient(135deg, #004d00 0%, #006600 50%, #004d00 100%);
    padding: 2.5rem 1rem 2rem;
    border-bottom: 4px solid #FFE417;
}

.logos-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.logos-nav-titulo {
    color: #FFE417;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.8rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.logos-fila {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 1.2rem;
    margin-bottom: 1rem;
}

.logos-fila-centrada {
    justify-content: center;
}

.logo-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,228,23,0.3);
    border-radius: 12px;
    padding: 0.7rem 0.8rem 0.5rem;
    width: 110px;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.logo-nav-item:hover {
    transform: translateY(-4px) scale(1.05);
    background: rgba(255,228,23,0.18);
    border-color: #FFE417;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.logo-nav-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.logo-nav-item span {
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════════════════
   BOTÓN FLOTANTE — Volver al inicio
   ═══════════════════════════════════════════════════════════ */
.btn-inicio-flotante {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #006600;
    color: #FFE417;
    font-size: 1.3rem;
    font-weight: 700;
    border: 3px solid #FFE417;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    /* Oculto por defecto, se muestra con .visible */
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-inicio-flotante.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.btn-inicio-flotante:hover {
    background: #FFE417;
    color: #006600;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* ═══════════════════════════════════════════════════════════
   TEXTOS AUXILIARES
   ═══════════════════════════════════════════════════════════ */
.sin-datos {
    color: #888;
    font-style: italic;
    padding: 1rem;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE logos
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .logo-nav-item {
        width: 85px;
        padding: 0.5rem;
    }
    .logo-nav-item img {
        width: 48px;
        height: 48px;
    }
    .logo-nav-item span {
        font-size: 0.62rem;
    }
    .logos-nav-titulo {
        font-size: 1.2rem;
    }
    .btn-inicio-flotante {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        bottom: 1.2rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .logo-nav-item {
        width: 72px;
        padding: 0.4rem;
    }
    .logo-nav-item img {
        width: 40px;
        height: 40px;
    }
}
