/* =========================================================
   mexluckyapk.com — hoja de estilos principal
   Sitio de reseña/afiliado independiente sobre MexLucky.
   Mobile-first. Sin frameworks externos.
   ========================================================= */

:root {
  --bg: #090b10;
  --bg-soft: #0d1017;
  --bg-card: #11151d;
  --bg-card-hover: #161b25;
  --border: #212736;
  --blue: #3b6bff;
  --blue-dim: #2451e0;
  --blue-deep: #10203f;
  --gold: #f2a83d;
  --gold-light: #ffce85;
  --text: #eef1f6;
  --text-dim: #a7b0c0;
  --text-faint: #7d8494;
  --danger: #ff6b6b;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --max-w: 1120px;
  --header-h: 64px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--blue);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  z-index: 1000;
  font-weight: 700;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  /* Solid (no backdrop-filter): a filter/backdrop-filter on this ancestor would
     create a new containing block, which traps the position:fixed mobile nav
     inside this 64px header box instead of the viewport. Keep this solid. */
  background: rgba(9, 11, 16, 0.98);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.2px;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.brand .mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand .mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand .mex { color: #fff; }
.brand .lucky { color: var(--blue); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.site-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg-soft);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.site-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 14px 20px 28px;
  display: flex;
  flex-direction: column;
}
.site-nav a {
  display: block;
  padding: 14px 4px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.site-nav a[aria-current="page"] { color: var(--blue); }
.site-nav .nav-cta {
  margin-top: 16px;
  border-bottom: none;
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    inset: auto;
    background: transparent;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    border-top: none;
    overflow: visible;
  }
  .site-nav ul {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 4px;
  }
  .site-nav a {
    padding: 8px 12px;
    border-bottom: none;
    border-radius: var(--radius-s);
    font-size: 0.95rem;
  }
  .site-nav a:hover { background: var(--bg-card); }
  .site-nav .nav-cta { margin-top: 0; margin-left: 8px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  line-height: 1.1;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(160deg, var(--blue) 0%, var(--blue-dim) 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(59, 107, 255, 0.3);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-gold {
  background: linear-gradient(160deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #221a04;
  box-shadow: 0 6px 20px rgba(242, 168, 61, 0.22);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-block { width: 100%; }
.btn-sm { padding: 10px 16px; font-size: 0.88rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 40px 0 36px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 320px;
  background: radial-gradient(ellipse at 70% 0%, rgba(59, 107, 255, 0.25), transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 1.85rem;
  line-height: 1.18;
  margin: 0 0 14px;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.hero .lede {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 62ch;
  margin: 0 0 22px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-media {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.hero-media img {
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  flex: 0 0 auto;
  height: 220px;
  width: auto;
}

@media (min-width: 700px) {
  .hero h1 { font-size: 2.5rem; }
  .hero .lede { font-size: 1.12rem; }
}
@media (min-width: 900px) {
  .hero { padding: 64px 0 52px; }
  .hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
  }
  .hero-media {
    margin-top: 0;
    overflow: visible;
    flex-wrap: wrap;
  }
}

/* ---------- Sections ---------- */
section { padding: 40px 0; }
.section-tight { padding: 28px 0; }
.section-head { max-width: 68ch; margin-bottom: 26px; }
.section-head .kicker {
  color: var(--gold);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  display: block;
}
h2 { font-size: 1.5rem; margin: 0 0 10px; font-weight: 800; letter-spacing: -0.2px; }
h3 { font-size: 1.15rem; margin: 0 0 8px; font-weight: 750; }
p { color: var(--text-dim); margin: 0 0 14px; }
.lead-text { color: var(--text); font-size: 1.05rem; }

@media (min-width: 700px) {
  h2 { font-size: 1.85rem; }
}

.alt-bg { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Grids & Cards ---------- */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.card h3 { color: var(--text); }
.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--blue);
  background: rgba(59, 107, 255, 0.12);
  border: 1px solid rgba(59, 107, 255, 0.32);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.game-card { text-align: left; }
.game-card figure { margin: 0 0 12px; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--border); }
.game-card figure img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.game-card h3 { font-size: 1rem; margin-bottom: 4px; }
.game-card .meta { color: var(--text-faint); font-size: 0.82rem; margin-bottom: 0; }

.promo-card { display: flex; flex-direction: column; gap: 12px; }
.promo-card figure { margin: 0; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--border); background: #0b0e14; display:flex; align-items:center; justify-content:center; }
.promo-card figure img { width: 100%; height: auto; object-fit: contain; }
.promo-card .pct { color: var(--gold); font-weight: 800; font-size: 0.9rem; }
.icon-tile {
  width: 56px; height: 56px;
  border-radius: var(--radius-s);
  background: linear-gradient(160deg, rgba(59,107,255,0.18), rgba(59,107,255,0.05));
  border: 1px solid rgba(59,107,255,0.3);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.icon-tile svg { width: 26px; height: 26px; color: var(--blue); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 4px 0 20px 46px;
  border-left: 2px solid var(--border);
  margin-left: 17px;
}
.steps li:last-child { border-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: -19px;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--blue) 0%, var(--blue-dim) 100%);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps h3 { margin-bottom: 4px; }
.steps p:last-child { margin-bottom: 0; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-m); }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--gold); font-weight: 700; background: var(--bg-soft); white-space: nowrap; }
td { color: var(--text-dim); }
tr:last-child td { border-bottom: none; }

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--bg-card);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}
.faq-q .ic { flex: 0 0 auto; width: 20px; height: 20px; transition: transform 0.2s ease; color: var(--blue); }
.faq-item[data-open="true"] .faq-q .ic { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 18px;
}
.faq-a > div { padding-bottom: 18px; color: var(--text-dim); }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- Callout / disclaimer ---------- */
.callout {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: var(--radius-m);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.callout .ic { flex: 0 0 auto; width: 22px; height: 22px; color: var(--gold); margin-top: 2px; }
.callout p { margin: 0; font-size: 0.92rem; }
.callout.warn { border-color: rgba(255, 107, 107, 0.35); }
.callout.warn .ic { color: var(--danger); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 14px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: 0.82rem; color: var(--text-faint); }
.breadcrumbs a { text-decoration: none; color: var(--text-faint); }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--text-faint); opacity: 0.5; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 40px 0;
}
.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  margin-bottom: 26px;
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-grid h3 { font-size: 0.85rem; color: var(--text); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { text-decoration: none; color: var(--text-dim); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--blue); }
.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  color: var(--text-faint);
  font-size: 0.8rem;
}
.footer-legal p { color: var(--text-faint); font-size: 0.8rem; margin-bottom: 10px; }
.age-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 4px 8px;
  font-weight: 800;
  color: var(--text);
  font-size: 0.78rem;
  margin-bottom: 12px;
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
}
.badge svg { width: 14px; height: 14px; color: var(--blue); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.lazy-fade { opacity: 0; transition: opacity 0.4s ease; }
.lazy-fade.is-loaded { opacity: 1; }

::selection { background: var(--blue); color: #fff; }
