/* =========================================================
   STYLE.CSS
   WEB DE LOTERÍAS
   ORDEN:
   1. RESET
   2. BASE GENERAL
   3. HEADER / HERO
   4. BARRA RESULTADOS ANTERIORES
   5. GRID DE TARJETAS
   6. TARJETAS Y ELEMENTOS
   7. TEMAS / COLORES
   8. RESPONSIVE
========================================================= */

/* =========================================================
   1. RESET
========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}




html {
  scroll-behavior: smooth;
}

/* =========================================================
   2. BASE GENERAL
========================================================= */
body {
  font-family: Arial, sans-serif;
  background: #ffffff;
  color: #111111;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-loteria {
  width: 100%;
}

/* =========================================================
   3. HEADER / HERO PRINCIPAL
   Mobile First
========================================================= */

/* ---------- Barra superior naranja ---------- */
.top-bar {
  background: #f97300;
  border: 1px solid #111111;
  min-height: 78px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: visible;
}

/* ---------- Lado izquierdo: bolas ---------- */
.top-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.ball {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f2f2f2;
  color: #f97300;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}

/* ---------- Centro: logo ---------- */
.logo-center {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 0.82;
  flex: 0 1 auto;
}

.logo-center:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

.logo-small {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.logo-big {
  color: #ffffff;
  font-size: 2.8rem;
  font-weight: 900;
}

/* ---------- Derecha: botón y menú ---------- */
.top-right {
  position: relative;
  flex: 0 0 auto;
}

.btn-loterias {
  background: #c62800;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  min-width: auto;
  white-space: nowrap;
}

.arrow {
  margin-left: 4px;
  font-size: 0.95rem;
}

/* ---------- Menú desplegable ---------- */
.menu-loterias {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: #d24700;
  border-radius: 6px;
  overflow: hidden;
  display: none;
  z-index: 1000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.menu-loterias.active {
  display: block;
}

.menu-loterias ul {
  list-style: none;
}

.menu-loterias li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-loterias li:last-child {
  border-bottom: none;
}

.menu-loterias a {
  display: block;
  padding: 14px 16px;
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
}

.menu-loterias a:hover {
  background: #b83b00;
}

/* ---------- Contenido del hero ---------- */
.hero-content {
  background: #e9e9e9;
  padding: 14px 16px 16px;
}

.hero-content h1 {
  max-width: 760px;
  font-size: 1.75rem;
  line-height: 1.1;
  font-weight: 900;
  text-align: center;
  margin: 0 auto 8px;
  color: #121212;
}

.hero-content p {
  max-width: 780px;
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: center;
  margin: 0 auto 6px;
  color: #2f3438;
}

/* =========================================================
   4. BARRA DE RESULTADOS ANTERIORES
   (luego aquí se puede conectar un calendario real)
========================================================= */
.resultados-anteriores-bar {
  background: #e9e9e9;
  padding: 22px 0 18px;
  display: none;
}

.resultados-anteriores-bar.visible {
  display: block;
}

.resultados-anteriores-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.btn-fecha-anterior {
  width: 100%;
  max-width: 100%;
  background: #444444;
  color: #ffffff;
  border: none;
  min-height: 50px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
}

.texto-fecha,
.fecha-valor {
  display: inline-block;
}

.fecha-valor {
  white-space: nowrap;
}

.fecha-box {
  width: 22px;
  height: 22px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 15px;
}

.fecha-box::before {
  content: "📅";
}

.fecha-anterior-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* =========================================================
   5. GRID DE TARJETAS DE RESULTADOS
========================================================= */
.resultados-grid-section {
  background: #e9e9e9;
  padding: 8px 0 30px;
}

.resultados-grid-section.loteria-seleccionada {
  padding-top: 18px;
}

.resultados-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.publicidad-fija-movil {
  display: none;
}

.publicidad-movil {
  display: none;
}

/* =========================================================
   6. TARJETAS Y ELEMENTOS INTERNOS
========================================================= */

/* ---------- Tarjeta general ---------- */
.resultado-card {
  background: #f3f3f3;
  border: 1px solid #cfcfcf;
  overflow: hidden;
}

.resultado-card.oculto-por-loteria {
  display: none;
}

.resultado-card.solo-en-detalle {
  display: none;
}

.resultados-grid-section.loteria-seleccionada .resultado-card.solo-en-detalle:not(.oculto-por-loteria) {
  display: block;
}

.hero-content.oculto-por-loteria {
  display: none;
}

/* =========================================================
   FOOTER DE HORARIOS
========================================================= */
.footer-horarios {
  background: #111111;
  color: #ffffff;
  padding: 34px 0 110px;
}

.footer-simple {
  padding: 0;
}

.footer-links {
  background: #000000;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 0;
  padding: 18px 14px;
}

.footer-links a {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover {
  color: #ffb12f;
}

.footer-nosotros {
  border-bottom: 1px solid #3a3a3a;
  margin-bottom: 26px;
  padding-bottom: 22px;
}

.footer-nosotros span {
  color: #ffb12f;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-nosotros h2 {
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1.2;
  margin-top: 6px;
}

.footer-nosotros p {
  color: #dcdcdc;
  max-width: 760px;
  font-size: 0.95rem;
  line-height: 1.55;
  margin-top: 8px;
}

.pagina-info {
  background: #111111;
  color: #ffffff;
}

.info-page {
  min-height: 100vh;
  padding: 26px 0 50px;
}

.volver-inicio {
  color: #ffca6a;
  display: inline-block;
  font-weight: 800;
  margin-bottom: 24px;
  text-decoration: none;
}

.volver-inicio:hover {
  text-decoration: underline;
}

.pagina-info h1 {
  color: #ffffff;
  font-size: 2rem;
  line-height: 1.12;
  margin: 8px 0;
}

.footer-horarios-encabezado {
  max-width: 760px;
  margin-bottom: 22px;
}

.footer-horarios-encabezado span {
  color: #ffb12f;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-horarios-encabezado h2 {
  margin: 8px 0;
  font-size: 1.8rem;
  line-height: 1.1;
}

.footer-horarios-encabezado p {
  color: #d7d7d7;
  line-height: 1.5;
}

.horarios-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.horario-card {
  background: #202020;
  border-left: 5px solid #f07a00;
  padding: 16px;
}

.horario-card h3 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.horario-card p {
  color: #dcdcdc;
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 8px;
}

.horario-card strong {
  color: #ffca6a;
}

.footer-festivos {
  border-top: 1px solid #3a3a3a;
  margin-top: 30px;
  padding-top: 26px;
}

.footer-festivos-encabezado {
  max-width: 760px;
  margin-bottom: 16px;
}

.footer-festivos-encabezado span {
  color: #ffb12f;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-festivos-encabezado h2 {
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1.2;
  margin-top: 6px;
}

.footer-festivos-encabezado p,
.festivo-nota {
  color: #dcdcdc;
  font-size: 0.95rem;
  line-height: 1.5;
}

.festivos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.festivo-card {
  background: #1c1c1c;
  border: 1px solid #3a3a3a;
  border-top: 4px solid #f07a00;
  border-radius: 8px;
  padding: 15px;
}

.festivo-card h3 {
  color: #ffca6a;
  font-size: 1rem;
  margin-bottom: 8px;
}

.festivo-card p {
  color: #dcdcdc;
  font-size: 0.94rem;
  line-height: 1.5;
}

.festivo-nota {
  background: #2a1d0f;
  border-left: 5px solid #ffb12f;
  margin-top: 14px;
  padding: 12px 14px;
}

.footer-privacidad {
  border-top: 1px solid #3a3a3a;
  margin-top: 30px;
  padding-top: 26px;
}

.footer-privacidad > div:first-child {
  margin-bottom: 14px;
}

.footer-privacidad span {
  color: #ffb12f;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-privacidad h2 {
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1.2;
  margin-top: 6px;
}

.privacidad-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.privacidad-grid p {
  color: #dcdcdc;
  font-size: 0.95rem;
  line-height: 1.55;
}

.privacidad-grid a {
  color: #ffca6a;
  font-weight: 800;
  text-decoration: none;
}

.privacidad-grid a:hover {
  text-decoration: underline;
}

.footer-terminos {
  border-top: 1px solid #3a3a3a;
  margin-top: 28px;
  padding-top: 26px;
}

.footer-terminos > div:first-child {
  margin-bottom: 14px;
}

.footer-terminos span {
  color: #ffb12f;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-terminos h2 {
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1.2;
  margin-top: 6px;
}

.terminos-lista {
  display: grid;
  gap: 10px;
}

.terminos-lista article {
  background: #181818;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 14px;
}

.terminos-lista h3 {
  color: #ffca6a;
  font-size: 1rem;
  margin-bottom: 6px;
}

.terminos-lista p {
  color: #dcdcdc;
  font-size: 0.95rem;
  line-height: 1.55;
}

.terminos-lista a {
  color: #ffca6a;
  font-weight: 800;
  text-decoration: none;
}

.terminos-lista a:hover {
  text-decoration: underline;
}

/* ---------- Barra superior de la tarjeta ---------- */
.card-top {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #184d18;
}

.card-top-link {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.card-top-link:hover {
  text-decoration: underline;
}

.card-top-con-extra {
  justify-content: space-between;
}

/* ---------- Cuerpo de la tarjeta ---------- */
.card-body {
  padding: 14px 12px 16px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ---------- Meta: fecha + estadísticas ---------- */
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.fecha-tag {
  background: #7dd36a;
  color: #2f6630;
  padding: 4px 8px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 2px;
}

.badge-estadisticas {
  background: #59656e;
  color: #ffffff;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 12px;
  display: none;
}

/* ---------- Título y mini logo ---------- */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-header h3 {
  font-size: 1.05rem;
  line-height: 1.2;
  color: #555555;
  font-weight: 800;
}

.logo-mini {
  font-size: 0.72rem;
  font-weight: 800;
  color: #3b9d54;
  text-align: right;
  white-space: nowrap;
}

/* ---------- Bloque “¿Ganaste?” ---------- */
.estado-ganaste {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f5f1f;
  display: none;
}

.estado-ganaste-claro {
  color: #ffffff;
}

.estado-ganaste-oscuro {
  color: #2e2b6f;
}

.icono-like,
.icono-dislike {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.7rem;
}

.icono-like {
  background: #11c774;
}

.icono-dislike {
  background: #ff2b2b;
}

/* ---------- Bolas ---------- */
.bolas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.bola {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.bola.verde {
  background: #d9d9d9;
  color: #7b7b7b;
}

.bola.azul {
  background: #58a7ff;
}

.bola.roja {
  background: #f25454;
}

.bola.gris {
  background: #d9d9d9;
  color: #7b7b7b;
}

.bola.roja-suave {
  background: #f5b7b7;
  color: #a94444;
}

.bola.azul-suave {
  background: #b8daf8;
  color: #2e6ea8;
}

.billetes-lista {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.billete-numero {
  background: #d9d9d9;
  color: #5d676f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 44px;
  padding: 0 14px;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.tema-rojo .bola {
  width: 50px;
  height: 50px;
  background: #d9d9d9;
  color: #7b7b7b;
  font-size: 1.25rem;
  font-weight: 500;
}

.tema-rojo .bola.azul-suave {
  background: #b8daf8;
  color: #2e6ea8;
}

/* ---------- Multiplicador ---------- */
.multiplicador {
  min-width: 44px;
  height: 42px;
  padding: 0 10px;
  border-radius: 4px;
  background: #41a62a;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
}

/* =========================================================
   7. TEMAS / COLORES
========================================================= */

/* ---------- Colores de barras superiores ---------- */
.tema-verde .card-top {
  background: #56c85e;
}

.tema-amarillo .card-top {
  background: #f4c313;
  color: #8a6700;
}

.tema-azul .card-top {
  background: #22379d;
  color: #ffffff;
}

.tema-celeste .card-top {
  background: #14acd8;
  color: #ffffff;
}

.tema-morado .card-top {
  background: #4a478a;
  color: #ffffff;
}

.tema-rojo .card-top {
  background: #ef3b45;
  color: #ffffff;
}

.tema-suerte .card-top {
  background: #393694;
  color: #ffffff;
}

.tema-lotedom .card-top {
  background: #111cf0;
  color: #ffffff;
}

.tema-naranja .card-top {
  background: #f1733a;
  color: #ffffff;
}

.tema-king .card-top {
  background: #0f5ea5;
  color: #ffd948;
}

/* ---------- Colores de logos mini ---------- */
.logo-mini-azul {
  color: #2d57b8;
}

.logo-mini-celeste {
  color: #1ea9d7;
}

.logo-mini-morado {
  color: #4a478a;
}

.logo-mini-rojo {
  color: #ef3b45;
}

.logo-mini-suerte {
  color: #393694;
}

.logo-mini-lotedom {
  color: #3757d6;
}

.logo-mini-naranja {
  color: #f1733a;
}

.logo-mini-king {
  color: #0f5ea5;
}

/* ---------- Variantes de fecha ---------- */
.fecha-tag-azul {
  background: #243896;
  color: #ffd83d;
}

.fecha-tag-celeste {
  background: #11add8;
  color: #ffffff;
}

.fecha-tag-gris {
  background: #555f68;
  color: #ffffff;
}

.fecha-tag-rojo {
  background: #ef5343;
  color: #ffffff;
}

.fecha-tag-naranja {
  background: #f1733a;
  color: #ffffff;
}

/* =========================================================
   8. RESPONSIVE
========================================================= */

/* ---------- móviles muy pequeños ---------- */
@media (max-width: 390px) {
  .top-bar {
    padding: 8px 8px;
    gap: 6px;
  }

  .top-left {
    gap: 4px;
  }

  .ball {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .logo-small {
    font-size: 0.78rem;
  }

  .logo-big {
    font-size: 2.2rem;
  }

  .btn-loterias {
    padding: 10px 12px;
    font-size: 0.92rem;
    border-radius: 12px;
  }

  .arrow {
    font-size: 0.82rem;
    margin-left: 2px;
  }
}

/* ---------- móvil general ---------- */
@media (max-width: 767px) {
  body {
    padding-bottom: 108px;
  }

  .resultados-anteriores-bar {
    padding: 0 0 14px;
  }

  .publicidad-fija-movil {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    min-height: 92px;
    background: #ffffff;
    border-top: 2px solid #222222;
    color: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: lowercase;
  }

  .publicidad-fija-movil a {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 92px;
  }

  .publicidad-fija-movil img {
    display: block;
    max-width: 100%;
    max-height: 92px;
    object-fit: contain;
  }

  .publicidad-movil {
    margin: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .publicidad-movil a {
    display: block;
    width: 100%;
    max-width: 300px;
  }

  .publicidad-movil img {
    display: block;
    width: 100%;
    height: auto;
  }

  .btn-fecha-anterior {
    min-height: 46px;
    padding: 10px 12px;
    gap: 8px;
    font-size: 0.92rem;
  }

  .texto-fecha,
  .fecha-valor {
    font-size: 0.92rem;
  }

  .fecha-box {
    width: 18px;
    height: 18px;
  }
}

/* ---------- tablet ---------- */
@media (min-width: 768px) {
  .top-bar {
    padding: 20px 28px;
    min-height: 110px;
    gap: 18px;
  }

  .ball {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  .logo-small {
    font-size: 1.5rem;
  }

  .logo-big {
    font-size: 4.2rem;
  }

  .btn-loterias {
    font-size: 1.6rem;
    padding: 16px 26px;
    border-radius: 18px;
  }

  .menu-loterias {
    width: 260px;
  }

  .hero-content {
    padding: 18px 30px 20px;
  }

  .hero-content h1 {
    font-size: 2.3rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .btn-fecha-anterior {
    min-height: 54px;
    font-size: 1.1rem;
    gap: 12px;
  }

  .fecha-box {
    width: 24px;
    height: 24px;
  }

  .resultados-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .footer-horarios {
    padding: 42px 0 46px;
  }

  .horarios-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .privacidad-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .festivos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .terminos-lista {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .card-body {
    min-height: 170px;
  }
}

/* ---------- desktop grid ---------- */
@media (min-width: 1100px) {
  .resultados-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .horarios-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- desktop grande ---------- */
@media (min-width: 1200px) {
  .top-bar {
    padding: 18px 50px;
    min-height: 108px;
  }

  .top-left {
    gap: 10px;
  }

  .ball {
    width: 54px;
    height: 54px;
    font-size: 1.8rem;
  }

  .logo-small {
    font-size: 1.8rem;
  }

  .logo-big {
    font-size: 4.8rem;
  }

  .btn-loterias {
    font-size: 2.2rem;
    padding: 16px 34px;
    border-radius: 20px;
  }

  .menu-loterias {
    width: 280px;
  }

  .hero-content h1 {
    font-size: 2.45rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .btn-fecha-anterior {
    min-height: 50px;
    font-size: 1rem;
  }

  .texto-fecha {
    min-width: 240px;
    text-align: right;
  }

  .fecha-valor {
    min-width: 120px;
    text-align: left;
  }
}
