/* Acertijo del Día — temas2.css */
:root {
  --bg: hsl(220 20% 98.5%);
  --fg: hsl(240 10% 12%);
  --card-bg: #fff;
  --border: hsl(240 6% 88%);
  --muted: hsl(240 4% 46%);
  --primary: hsl(250 85% 60%);
  --shell-bg: hsla(243, 26%, 87%, 0.96);
  --shell-border: hsl(250 18% 78% / 0.95);
}

[data-theme="dark"] {
  --bg: hsl(240 10% 7%);
  --fg: hsl(240 5% 96%);
  --card-bg: hsl(240 8% 10%);
  --border: hsl(240 4% 18%);
  --muted: hsl(240 5% 64%);
  --primary: hsl(250 90% 72%);
  --shell-bg: hsla(240, 8%, 10%, 0.96);
  --shell-border: hsl(240 8% 20% / 0.95);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: var(--bg); color: var(--fg); }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv02","cv03","cv04","cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  padding-bottom: 56px;
}
button { cursor: pointer; font: inherit; border: 0; background: transparent; color: inherit; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

/* ═══════════════════════════════════════════
   PAGE LAYOUT
   ═══════════════════════════════════════════ */
.temas-page {
  width: min(52rem, calc(100% - 2.5rem));
  margin-inline: auto;
  padding: 5.8rem 0 4rem;
}

.page-hd {
  margin-bottom: 1.6rem;
}
.page-hd h1 {
  font-family: "Crimson Pro", serif;
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.05;
  color: var(--fg);
}
.page-sub {
  margin-top: 0.3rem;
  font-size: 0.86rem; font-weight: 480; color: var(--muted);
}

/* ═══════════════════════════════════════════
   THEMES GRID
   ═══════════════════════════════════════════ */
.themes-grid { /* wrapper general, sin grid directo */ }

.themes-section-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.82rem;
  margin-bottom: 2.8rem;
}
@media (min-width: 640px) {
  .themes-section-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ═══════════════════════════════════════════
   INTRO EDITORIAL
   ═══════════════════════════════════════════ */
.temas-intro {
  margin-bottom: 1.4rem;
}
.temas-intro p {
  font-size: 0.9rem; line-height: 1.65; color: var(--muted);
}

/* ═══════════════════════════════════════════
   THEME CARD
   ═══════════════════════════════════════════ */
.theme-card {
  position: relative;
  display: flex; flex-direction: column;
  gap: 0;
  padding: 1.1rem 1.05rem 1rem;
  border-radius: 1.15rem;
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  min-height: 160px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 10px hsl(0 0% 0% / 0.16), 0 1px 2px hsl(0 0% 0% / 0.08);
}
.theme-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px hsl(0 0% 0% / 0.25), 0 2px 6px hsl(0 0% 0% / 0.1);
}
.theme-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, hsl(0 0% 100% / 0.13) 0%, transparent 50%);
  pointer-events: none;
}

.tc-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 0.55rem;
}
.tc-icon { opacity: 0.88; }
.tc-badge {
  font-size: 0.56rem; font-weight: 780; letter-spacing: 0.06em; text-transform: uppercase;
  background: hsl(0 0% 100% / 0.2); border-radius: 999px;
  padding: 0.18em 0.6em;
  color: #fff;
  backdrop-filter: blur(4px);
  align-self: flex-start;
}
.tc-body { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.tc-name { font-size: 0.98rem; font-weight: 780; letter-spacing: -0.015em; line-height: 1.2; }
.tc-tagline { font-size: 0.67rem; font-weight: 440; line-height: 1.4; color: hsl(0 0% 100% / 0.72); }
.tc-foot {
  display: flex; justify-content: flex-end; align-items: center;
  margin-top: 0.7rem; padding-top: 0.55rem;
  border-top: 1px solid hsl(0 0% 100% / 0.15);
}
.tc-explore {
  display: inline-flex; align-items: center; gap: 0.32em;
  font-size: 0.67rem; font-weight: 640; letter-spacing: 0.02em;
  color: hsl(0 0% 100% / 0.8);
  transition: color 0.12s, gap 0.18s;
}
.tc-arrow { flex-shrink: 0; transition: transform 0.18s ease; opacity: 0.85; }
.theme-card:hover .tc-explore { color: #fff; gap: 0.48em; }
.theme-card:hover .tc-arrow { transform: translateX(2px); opacity: 1; }

/* ═══════════════════════════════════════════
   GRADIENT CLASSES
   ═══════════════════════════════════════════ */
.sec-grad-logica  { background: linear-gradient(145deg, #0d9488, #34d399); }
.sec-grad-jugadas { background: linear-gradient(145deg, #e11d6d, #f472b6); }
.sec-grad-numeros { background: linear-gradient(145deg, #d97706, #fbbf24); }
.sec-grad-trampa  { background: linear-gradient(145deg, #5b6abf, #8b5cf6); }
.sec-grad-azar    { background: linear-gradient(145deg, #475569, #6366f1); }
.sec-grad-ingenio { background: linear-gradient(145deg, #7c3aed, #a78bfa); }

/* ═══════════════════════════════════════════
   SPOTLIGHT
   ═══════════════════════════════════════════ */
.spotlight-hd {
  margin: 0 0 1.2rem;
}
.spotlight-hd h2 {
  font-family: "Crimson Pro", serif;
  font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em;
  color: var(--fg);
}
.spotlight-hd p {
  font-size: 0.84rem; color: var(--muted); margin-top: 0.2rem;
}
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.72rem;
  margin-bottom: 2.4rem;
}
@media (min-width: 640px) {
  .spotlight-grid { grid-template-columns: repeat(3, 1fr); }
}
.spotlight-card {
  position: relative;
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 1rem 0.95rem 0.9rem;
  border-radius: 1rem;
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  min-height: 120px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 2px 8px hsl(0 0% 0% / 0.14);
}
.spotlight-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, hsl(0 0% 100% / 0.14) 0%, transparent 50%);
  pointer-events: none;
}
.spotlight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px hsl(0 0% 0% / 0.22);
}
.sp-section {
  font-size: 0.56rem; font-weight: 820; letter-spacing: 0.1em; text-transform: uppercase;
  color: hsl(0 0% 100% / 0.65);
}
.sp-title {
  font-size: 0.88rem; font-weight: 780; letter-spacing: -0.015em; line-height: 1.25;
  flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sp-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 0.5rem; padding-top: 0.45rem;
  border-top: 1px solid hsl(0 0% 100% / 0.18);
}
.sp-diff { font-size: 0.62rem; font-weight: 660; color: hsl(0 0% 100% / 0.8); }
.sp-cta {
  display: inline-flex; align-items: center; gap: 0.28em;
  font-size: 0.62rem; font-weight: 660; color: hsl(0 0% 100% / 0.7);
  transition: color 0.12s, gap 0.18s;
}
.sp-arrow { flex-shrink: 0; transition: transform 0.18s ease; opacity: 0.8; }
.spotlight-card:hover .sp-cta { color: #fff; gap: 0.42em; }
.spotlight-card:hover .sp-arrow { transform: translateX(2px); opacity: 1; }

/* ═══════════════════════════════════════════
   FOOTER COUNT
   ═══════════════════════════════════════════ */
.themes-footer {
  margin-top: 1.4rem;
  font-size: 0.78rem; font-weight: 480;
  color: var(--muted);
  text-align: center;
}
.themes-footer strong { font-weight: 720; color: var(--fg); }

/* ═══════════════════════════════════════════
   SUPPORT CTA
   ═══════════════════════════════════════════ */
.support-cta {
  display: grid; grid-template-columns: 44px 1fr 16px;
  align-items: center; gap: 0.9rem;
  margin: 2.4rem 0 0; padding: 1.3rem 1.2rem;
  border: 1px solid #4b3c72; border-radius: 20px;
  background: radial-gradient(circle at 16% 0, rgba(255,255,255,0.18), transparent 38%), linear-gradient(135deg, #241f2c, #4b3c72);
  box-shadow: 0 12px 32px rgba(45,39,54,0.18);
  color: #fff; text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.support-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(45,39,54,0.26); }
.support-cta-icon { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,0.13); display: grid; place-items: center; }
.support-cta-body strong { display: block; font-size: 1rem; font-weight: 860; letter-spacing: -0.02em; }
.support-cta-body p { margin: 0.18rem 0 0; font-size: 0.76rem; font-weight: 500; color: rgba(255,255,255,0.7); line-height: 1.4; }
.support-cta-arrow { opacity: 0.7; }

/* ═══════════════════════════════════════════
   SITE FOOTER
   ═══════════════════════════════════════════ */
.site-footer-std { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--border); }
.footer-top-std { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; margin-bottom: 0.5rem; }
.footer-links-std { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 0.6rem; }
.footer-links-std a { font-size: 0.75rem; font-weight: 500; color: var(--muted); transition: color 0.12s ease; }
.footer-links-std a:hover { color: var(--fg); }
.footer-legal-std a { font-size: 0.72rem; color: var(--muted); opacity: 0.72; }
.footer-sep-std { font-size: 0.68rem; color: var(--muted); opacity: 0.5; user-select: none; }
.footer-copy-std { text-align: center; font-size: 0.72rem; color: var(--muted); opacity: 0.7; line-height: 1.4; }
.heart-std { color: #fb7185; }


/* ═══════════════════════════════════════════
   DARK MODE — theme cards & spotlight
   ═══════════════════════════════════════════ */
[data-theme="dark"] .theme-card {
  box-shadow: 0 2px 12px hsl(0 0% 0% / 0.4), 0 1px 3px hsl(0 0% 0% / 0.2);
}
[data-theme="dark"] .theme-card:hover {
  box-shadow: 0 10px 32px hsl(0 0% 0% / 0.55), 0 2px 8px hsl(0 0% 0% / 0.25);
}
[data-theme="dark"] .tc-badge {
  background: hsl(0 0% 100% / 0.14);
}
[data-theme="dark"] .sec-grad-logica  { background: linear-gradient(145deg, #0a7870, #1d9e6e); }
[data-theme="dark"] .sec-grad-jugadas { background: linear-gradient(145deg, #9a1248, #c94080); }
[data-theme="dark"] .sec-grad-numeros { background: linear-gradient(145deg, #9a5505, #c98a10); }
[data-theme="dark"] .sec-grad-trampa  { background: linear-gradient(145deg, #3d4888, #6840b0); }
[data-theme="dark"] .sec-grad-azar    { background: linear-gradient(145deg, #2e3a4a, #454a9a); }
[data-theme="dark"] .sec-grad-ingenio { background: linear-gradient(145deg, #5628b8, #8456d4); }
[data-theme="dark"] .spotlight-card {
  box-shadow: 0 2px 10px hsl(0 0% 0% / 0.38);
}
[data-theme="dark"] .spotlight-card:hover {
  box-shadow: 0 8px 26px hsl(0 0% 0% / 0.5);
}
[data-theme="dark"] .support-cta {
  border-color: rgba(120, 90, 180, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
}
