/* ===== Solo Afiliados — páginas de contenido (tutoriales, descargas, legales) =====
   Este archivo es idéntico en todas las subcarpetas de contenido. Si lo cambias, cópialo a las demás. */
:root {
  --bg: #0b1120;
  --bg-2: #0f172a;
  --card: #141e33;
  --line: #22304d;
  --text: #eef2f8;
  --muted: #9aa7bd;
  --blue: #1e90ff;
  --green: #22c55e;
  --red: #f05252;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; font-size: 17px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: #5ee08e; }
code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .9em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
section { padding: 72px 0; }

h1, h2 { font-family: 'Sora', 'Inter', sans-serif; font-weight: 800; line-height: 1.2; letter-spacing: -.4px; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin-bottom: 18px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 14px; }
h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; line-height: 1.35; }
.grad { background: linear-gradient(90deg, var(--blue), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { display: block; font-size: .8rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--green); margin-bottom: 12px; }
.lead { font-size: 1.15rem; color: #cdd6e4; }
.muted { color: var(--muted); }

/* ===== Botones ===== */
.btn { display: inline-block; text-decoration: none; font-weight: 900; letter-spacing: .4px; border-radius: 999px; transition: transform .15s, box-shadow .2s, background .2s; text-align: center; }
.btn-green { background: var(--green); color: #04210f; box-shadow: 0 8px 30px rgba(34,197,94,.35); }
.btn-green:hover { background: #2fdc6c; transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: var(--card); }
.btn-ghost:hover { border-color: var(--green); }
.btn-sm { padding: 10px 20px; font-size: .9rem; }
.btn-lg { padding: 18px 34px; font-size: 1.05rem; }
.btn-xl { padding: 22px 40px; font-size: 1.15rem; }
.pulse { animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 18px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.cta-sub { display: block; margin-top: 12px; font-size: .88rem; color: var(--muted); }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11,17,32,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.logo { height: 32px; width: auto; }
.header-nav { display: flex; align-items: center; gap: 20px; }
.link-login { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.link-login:hover { color: var(--text); }

/* ===== Hero de página ===== */
.page-hero { padding: 64px 0 48px; background: radial-gradient(700px 380px at 20% 0%, rgba(30,144,255,.16), transparent 70%), radial-gradient(600px 380px at 90% 20%, rgba(34,197,94,.12), transparent 70%), var(--bg); border-bottom: 1px solid var(--line); }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .85rem; font-weight: 600; color: #cdd6e4; }

/* ===== Artículo ===== */
.article { padding: 56px 0 24px; }
.article p { margin-bottom: 16px; color: #d3dbe8; }
.article h2 { margin-top: 48px; }
.article h2:first-child { margin-top: 0; }
.video-slot { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); margin: 8px 0 32px; }
.video-slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.callout { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 12px; padding: 18px 20px; margin: 24px 0; }
.callout.tip { border-left-color: var(--green); }
.callout .c-icon { font-size: 1.3rem; line-height: 1.5; }
.callout p { margin: 0; }

.benefits { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 8px; }
.benefits li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 44px; position: relative; font-weight: 600; font-size: .95rem; }
.benefits li::before { content: '✓'; position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #04210f; font-size: .75rem; font-weight: 900; display: grid; place-items: center; }

.steps { list-style: none; counter-reset: step; margin: 24px 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 28px 64px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), var(--green)); color: #fff; font-family: 'Sora', sans-serif; font-weight: 800; display: grid; place-items: center; }
.steps > li::after { content: ''; position: absolute; left: 21px; top: 52px; bottom: 6px; width: 2px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps h3 { padding-top: 8px; }

.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 8px; }
.res { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s; }
.res:hover { border-color: var(--green); transform: translateY(-2px); }
.res .r-icon { font-size: 1.6rem; flex: 0 0 auto; }
.res b { display: block; }
.res small { color: var(--muted); font-size: .82rem; word-break: break-all; }

/* ===== Código ===== */
.code { position: relative; background: #070b14; border: 1px solid var(--line); border-radius: 12px; margin: 14px 0 24px; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line); font-size: .78rem; color: var(--muted); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.copy-btn { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px; font-size: .78rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.copy-btn:hover { border-color: var(--green); }
.copy-btn.ok { background: var(--green); color: #04210f; border-color: var(--green); }
.code pre { overflow-x: auto; padding: 16px; font-size: .88rem; line-height: 1.8; color: #b9f5cd; }

/* ===== Bloque foro (lead magnet) ===== */
.forum { background: var(--bg-2); border-block: 1px solid var(--line); }
.forum-card { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: center; background: linear-gradient(135deg, rgba(30,144,255,.1), rgba(34,197,94,.08)); border: 1px solid var(--line); border-radius: 24px; padding: 44px; }
.forum-cover { position: relative; }
.forum-cover img { filter: drop-shadow(0 25px 40px rgba(0,0,0,.55)); transform: rotate(-3deg); }
.free-sticker { position: absolute; right: -10px; bottom: 10px; background: var(--green); color: #04210f; font-weight: 900; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; transform: rotate(-12deg); box-shadow: 0 10px 30px rgba(34,197,94,.45); font-size: .9rem; }
.forum-card h2 { margin-bottom: 12px; }
.forum-card > div > p { color: #cdd6e4; margin-bottom: 18px; }
.promises { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin-bottom: 26px; font-size: .95rem; font-weight: 600; }
.promises .no::before { content: '✕ '; color: var(--red); font-weight: 900; }
.promises .yes::before { content: '✓ '; color: var(--green); font-weight: 900; }

/* ===== Relacionados ===== */
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.related { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s; }
.related:hover { border-color: var(--green); transform: translateY(-3px); }
.related span { font-size: .78rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--green); }
.related p { color: var(--muted); font-size: .93rem; margin-top: 4px; }

/* ===== Descarga ===== */
.dl-hero { text-align: center; padding: 72px 0; background: radial-gradient(700px 420px at 50% 0%, rgba(34,197,94,.2), transparent 70%), var(--bg); }
.dl-check { width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%; background: var(--green); color: #04210f; display: grid; place-items: center; font-size: 2.2rem; font-weight: 900; box-shadow: 0 0 0 10px rgba(34,197,94,.15); }
.dl-book { width: 260px; margin: 36px auto; filter: drop-shadow(0 30px 50px rgba(0,0,0,.6)); }
.progress { max-width: 520px; margin: 0 auto 28px; }
.progress-bar { height: 10px; background: var(--card); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress-bar span { display: block; height: 100%; width: 33%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: 999px; }
.progress small { display: block; margin-top: 8px; color: var(--muted); font-size: .85rem; }
.next-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 12px; }
.next { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px; text-align: left; }
.next .n-num { font-size: .78rem; font-weight: 800; letter-spacing: 1px; color: var(--green); text-transform: uppercase; }
.next p { color: var(--muted); font-size: .93rem; margin: 6px 0 16px; }
.next .btn { width: 100%; }
.networks { display: flex; justify-content: center; gap: 16px; margin-top: 18px; }
.networks img { width: 140px; border-radius: 10px; }

/* ===== Legales ===== */
.legal-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; padding: 56px 20px 24px; }
.toc { position: sticky; top: 90px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; font-size: .88rem; max-height: calc(100vh - 110px); overflow-y: auto; }
.toc b { display: block; margin-bottom: 10px; font-size: .78rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.toc a { display: block; color: #cdd6e4; text-decoration: none; padding: 5px 0; border-bottom: 1px solid var(--line); }
.toc a:last-child { border-bottom: 0; }
.toc a:hover { color: var(--green); }
.legal h2 { font-size: 1.3rem; margin: 40px 0 12px; padding-top: 12px; scroll-margin-top: 90px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: #cdd6e4; font-size: .98rem; }
.legal p { margin-bottom: 14px; }
.legal ul { margin: 0 0 16px 22px; }
.legal li { margin-bottom: 6px; }
.legal .en-divider { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.summary-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 36px; }
.summary-card ul { list-style: none; margin: 10px 0 0; }
.summary-card li { padding: 6px 0 6px 28px; position: relative; }
.summary-card li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 900; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 110px; text-align: center; font-size: .85rem; color: var(--muted); margin-top: 48px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 14px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ===== Sticky ===== */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: rgba(15,23,42,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .3s ease; }
.sticky-cta.show { transform: translateY(0); }
.sticky-text { font-size: .9rem; color: var(--muted); }
.sticky-text b { color: var(--text); }
@media (min-width: 900px) {
  .sticky-cta { left: 50%; right: auto; bottom: 20px; transform: translate(-50%, 150%); border: 1px solid var(--line); border-radius: 999px; padding: 10px 10px 10px 24px; gap: 24px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
  .sticky-cta.show { transform: translate(-50%, 0); }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .forum-card { grid-template-columns: 1fr; text-align: center; padding: 32px 22px; gap: 28px; }
  .forum-cover { max-width: 220px; margin: 0 auto; }
  .promises { text-align: left; max-width: 420px; margin-left: auto; margin-right: auto; }
  .legal-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; max-height: none; }
  .next-steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .legal-layout { padding: 40px 16px 16px; }
  .logo { height: 26px; }
  .link-login { display: none; }
  .benefits, .res-grid, .related-grid, .promises { grid-template-columns: 1fr; }
  .steps > li { padding-left: 56px; }
  .btn-xl { padding: 20px 22px; font-size: 1rem; }
  .dl-book { width: 200px; }
}
