/* alexlatino.com — blog. Usa los tokens, nav, botones y footer de style.css */

body.blog { background: radial-gradient(ellipse 70% 50% at 80% 0%, rgba(74, 16, 118, .5) 0%, rgba(46, 32, 67, .2) 45%, rgba(15, 12, 23, 0) 75%) no-repeat, var(--ink); background-size: 100% 90vh; }
.bl-wrap { max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }
.bl-skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--gold); color: var(--on-gold); padding: 10px 16px; font-weight: 700; border-radius: 4px; }
.bl-skip:focus { left: 8px; }

/* nav: menú móvil y enlace activo */
.nav__burger { display: none; appearance: none; border: 1px solid var(--line); background: rgba(15, 12, 23, .4); color: var(--cream); width: 44px; height: 44px; border-radius: 4px; cursor: pointer; padding: 0; place-items: center; }
.nav__burger span, .nav__burger span::before, .nav__burger span::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .3s var(--ease), background .2s; }
.nav__burger span::before, .nav__burger span::after { content: ""; position: absolute; left: 0; }
.nav__burger span::before { top: -6px; }
.nav__burger span::after { top: 6px; }
.nav__burger[aria-expanded="true"] span { background: transparent; }
.nav__burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 900px) {
  .nav__burger { display: grid; }
  .blog .nav__links {
    display: none; position: absolute; top: 100%; left: var(--gutter); right: var(--gutter); flex-direction: column; align-items: stretch; gap: 0; margin-top: 6px;
    background: rgba(15, 12, 23, .97); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 6px; padding: 8px 0; font-size: .95rem;
  }
  .blog .nav__links.is-open { display: flex; }
  .blog .nav__links a, .blog .nav__links .nav__soon { padding: 14px 20px; }
  .blog .nav__links a::after { display: none; }
}

/* ---------- barra de progreso ---------- */
.bl-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 95; background: transparent; pointer-events: none; }
.bl-progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--violet), var(--gold)); }

/* ---------- índice del blog ---------- */
.bl-hero { padding-block: clamp(130px, 18vh, 190px) clamp(28px, 5vw, 56px); }
.bl-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); font-weight: 700; line-height: .98; letter-spacing: -.04em; margin-top: 14px; max-width: 16ch; }
.bl-hero h1 em { font-style: normal; color: var(--gold); }
.bl-hero p { color: var(--mute); font-size: clamp(1rem, 1.3vw, 1.2rem); max-width: 54ch; margin-top: 22px; }

.bl-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; margin-bottom: clamp(28px, 4vw, 48px); border-block: 1px solid var(--line); }
.bl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-chip { appearance: none; border: 1px solid var(--line); background: transparent; color: var(--mute); font: inherit; font-size: .82rem; font-weight: 700; letter-spacing: .04em; padding: .6em 1.1em; border-radius: 999px; cursor: pointer; transition: color .25s, border-color .25s, background .25s; }
.bl-chip:hover { color: var(--cream); border-color: rgba(255, 255, 255, .4); }
.bl-chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.bl-search { position: relative; flex: 0 1 280px; }
.bl-search input { width: 100%; font: inherit; font-size: .9rem; color: var(--cream); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 999px; padding: .65em 1.1em .65em 2.6em; }
.bl-search input::placeholder { color: rgba(255, 255, 255, .4); }
.bl-search input:focus { outline: none; border-color: var(--gold); }
.bl-search svg { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--mute); pointer-events: none; }

.bl-feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-bottom: clamp(40px, 6vw, 72px); }
.bl-feature__img { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9); }
.bl-feature__img img { display: block; width: 100%; height: auto; transition: transform .8s var(--ease); }
.bl-feature:hover .bl-feature__img img { transform: scale(1.03); }
.bl-feature__tag { margin-bottom: 14px; }
.bl-feature h2 { font-size: clamp(1.7rem, 3.2vw, 2.8rem); font-weight: 700; line-height: 1.05; letter-spacing: -.03em; }
.bl-feature h2 a:hover { color: var(--gold); }
.bl-feature p { color: var(--mute); margin-top: 16px; max-width: 48ch; }

.bl-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: rgba(255, 255, 255, .55); letter-spacing: .04em; margin-top: 18px; }
.bl-tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }

.bl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 32px); padding-bottom: clamp(60px, 9vw, 120px); }
.bl-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(27, 20, 40, .55); transition: transform .5s var(--ease), border-color .3s; }
.bl-card:hover { transform: translateY(-6px); border-color: rgba(212, 189, 105, .5); }
.bl-card__img { display: block; overflow: hidden; }
.bl-card__img img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; transition: transform .8s var(--ease); }
.bl-card:hover .bl-card__img img { transform: scale(1.04); }
.bl-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.bl-card h3 { font-size: 1.18rem; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; margin-top: 10px; }
.bl-card h3 a::after { content: ""; position: absolute; inset: 0; } /* toda la tarjeta es clicable */
.bl-card { position: relative; }
.bl-card p { color: var(--mute); font-size: .92rem; margin-top: 10px; }
.bl-card .bl-meta { margin-top: auto; padding-top: 18px; }
.bl-empty { display: none; padding: 40px 0 80px; color: var(--mute); text-align: center; }
.bl-empty.is-on { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.bl-cta { margin: 0 auto clamp(60px, 9vw, 120px); max-width: 1180px; padding-inline: var(--gutter); }
.bl-cta__box { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(120deg, rgba(74, 16, 118, .5), rgba(27, 20, 40, .6)); }
.bl-cta__box h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 700; line-height: 1.05; letter-spacing: -.03em; }
.bl-cta__box p { color: var(--mute); margin-top: 10px; max-width: 52ch; }
.bl-cta__btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- artículo ---------- */
.ar-head { padding: clamp(120px, 16vh, 170px) 0 clamp(24px, 4vw, 44px); max-width: 860px; }
.ar-crumbs { font-size: .78rem; color: rgba(255, 255, 255, .5); letter-spacing: .04em; margin-bottom: 22px; }
.ar-crumbs a { color: var(--mute); transition: color .25s; }
.ar-crumbs a:hover { color: var(--gold); }
.ar-crumbs span { margin-inline: 8px; opacity: .5; }
.ar-head h1 { font-size: clamp(2rem, 4.8vw, 3.8rem); font-weight: 700; line-height: 1.03; letter-spacing: -.035em; margin-top: 14px; }
.ar-lead { font-size: clamp(1.08rem, 1.5vw, 1.3rem); color: var(--cream); opacity: .88; margin-top: 22px; max-width: 60ch; }
.ar-by { display: flex; align-items: center; gap: 14px; margin-top: 28px; font-size: .84rem; color: var(--mute); }
.ar-by__av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--violet), var(--gold)); color: var(--cream); font-weight: 700; font-size: .85rem; letter-spacing: .04em; flex: none; }
.ar-by strong { color: var(--cream); display: block; font-weight: 700; }
.ar-cover { margin: 0 0 clamp(32px, 5vw, 56px); }
.ar-cover img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); }

.ar-layout { display: grid; grid-template-columns: minmax(0, 720px) 260px; gap: clamp(40px, 7vw, 110px); justify-content: center; padding-bottom: clamp(40px, 6vw, 80px); }
.ar-toc { position: sticky; top: 96px; align-self: start; font-size: .86rem; }
.ar-toc h2 { font-size: .7rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 14px; }
.ar-toc ol { display: grid; gap: 2px; border-left: 1px solid var(--line); counter-reset: toc; }
.ar-toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--mute); line-height: 1.35; transition: color .25s, border-color .25s; }
.ar-toc a:hover { color: var(--cream); }
.ar-toc a.is-current { color: var(--gold); border-left-color: var(--gold); }
.ar-share { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.ar-share a, .ar-share button { appearance: none; font: inherit; font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--mute); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: .55em 1em; cursor: pointer; transition: color .25s, border-color .25s; }
.ar-share a:hover, .ar-share button:hover { color: var(--gold); border-color: var(--gold); }

.ar-body { font-size: clamp(1.02rem, 1.1vw, 1.12rem); line-height: 1.8; color: rgba(255, 255, 255, .88); min-width: 0; }
.ar-body > * + * { margin-top: 1.25em; }
.ar-body h2 { font-size: clamp(1.5rem, 2.6vw, 2.15rem); line-height: 1.12; letter-spacing: -.025em; font-weight: 700; color: var(--cream); margin-top: 2.4em; scroll-margin-top: 96px; }
.ar-body h3 { font-size: 1.2rem; line-height: 1.25; font-weight: 700; color: var(--cream); margin-top: 1.9em; scroll-margin-top: 96px; }
.ar-body h2 + *, .ar-body h3 + * { margin-top: .8em; }
.ar-body a { color: var(--gold); border-bottom: 1px solid rgba(212, 189, 105, .4); transition: border-color .25s, color .25s; }
.ar-body a:hover { color: var(--gold-hover); border-color: var(--gold-hover); }
.ar-body strong { color: var(--cream); }
.ar-body ul, .ar-body ol { padding-left: 1.3em; display: grid; gap: .55em; }
.ar-body ul { list-style: none; }
.ar-body ul li { position: relative; }
.ar-body ul li::before { content: ""; position: absolute; left: -1.15em; top: .72em; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.ar-body ol { list-style: decimal; }
.ar-body ol li::marker { color: var(--gold); font-weight: 700; }
.ar-body blockquote { margin-inline: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold); color: var(--cream); font-size: 1.12em; line-height: 1.55; }
.ar-body hr { border: 0; height: 1px; background: var(--line); margin-block: 2.4em; }
.ar-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: rgba(255, 255, 255, .08); padding: .12em .45em; border-radius: 4px; }
.ar-body .tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.ar-body table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.5; min-width: 520px; }
.ar-body th, .ar-body td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ar-body th { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); background: rgba(255, 255, 255, .04); }
.ar-body tr:last-child td { border-bottom: 0; }

.ar-body .callout { padding: 20px 24px; border: 1px solid rgba(212, 189, 105, .35); background: var(--gold-soft); border-radius: 12px; font-size: .98em; line-height: 1.65; }
.ar-body .callout > :first-child { margin-top: 0; }
.ar-body .callout b.callout__t { display: block; font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.ar-body .example { padding: 18px 22px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-size: .96em; }
.ar-body .example b.example__t { display: block; font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--mute); margin-bottom: 6px; }

.ar-app { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: clamp(20px, 3vw, 30px); border: 1px solid rgba(212, 189, 105, .4); border-radius: 16px; background: linear-gradient(120deg, rgba(74, 16, 118, .55), rgba(27, 20, 40, .7)); margin-top: 2.4em; }
.ar-app img { width: 56px; height: 56px; display: block; }
.ar-app h2, .ar-app h3 { font-size: 1.2rem; margin: 0; line-height: 1.2; }
.ar-app p { color: var(--mute); font-size: .92rem; line-height: 1.5; margin: 6px 0 0; }
.ar-body .ar-app .btn { border-bottom: 1px solid transparent; color: var(--on-gold); }

.ar-faq { margin-top: 3em; }
.ar-faq h2 { margin-top: 0; }
.ar-faq details { border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; background: rgba(255, 255, 255, .03); margin-top: 10px; }
.ar-faq summary { cursor: pointer; font-weight: 700; color: var(--cream); list-style: none; display: flex; justify-content: space-between; gap: 16px; line-height: 1.4; }
.ar-faq summary::-webkit-details-marker { display: none; }
.ar-faq summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; line-height: 1; transition: transform .25s; }
.ar-faq details[open] summary::after { transform: rotate(45deg); }
.ar-faq details p { margin-top: 12px; color: var(--mute); font-size: .96em; line-height: 1.7; }

.ar-fig { margin-inline: 0; }
.ar-fig img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.ar-fig figcaption { font-size: .82rem; line-height: 1.5; color: var(--mute); margin-top: 10px; }
.ar-body sup.cite { font-size: .72em; line-height: 0; margin-left: 2px; }
.ar-body sup.cite a { border-bottom: 0; font-weight: 700; padding: 0 1px; }
.ar-src { margin-top: 3em; padding-top: 1.6em; border-top: 1px solid var(--line); font-size: .92rem; line-height: 1.6; }
.ar-src h2 { margin-top: 0; font-size: 1.3rem; }
.ar-src__n { color: var(--mute); margin-top: .6em; font-size: .86rem; }
.ar-src ol { margin-top: 1em; padding-left: 1.6em; display: grid; gap: .8em; color: var(--mute); }
.ar-src li { scroll-margin-top: 96px; }
.ar-src li:target { color: var(--cream); }
.ar-src li a { white-space: nowrap; font-size: .9em; }
.ar-more { border-top: 1px solid var(--line); padding: clamp(40px, 6vw, 72px) 0 clamp(60px, 9vw, 110px); }
.ar-more h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 28px; }
.ar-more .bl-grid { padding-bottom: 0; }
.ar-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.ar-pn a { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .3s, transform .4s var(--ease); }
.ar-pn a:hover { border-color: var(--gold); transform: translateY(-3px); }
.ar-pn small { display: block; font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.ar-pn span { font-weight: 700; line-height: 1.3; }
.ar-pn a:last-child { text-align: right; }

/* aparición suave */
.js .bl-reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .bl-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .bl-reveal { opacity: 1; transform: none; transition: none; } .bl-card, .bl-card__img img, .bl-feature__img img { transition: none; } }

@media (max-width: 980px) {
  .ar-layout { grid-template-columns: minmax(0, 720px); }
  .ar-toc { position: static; order: -1; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03); }
  .ar-toc ol { border-left: 0; }
  .ar-toc a { padding: 6px 0; margin: 0; border-left: 0; }
  .ar-toc a.is-current { border-left: 0; }
  .ar-share { display: none; }
  .bl-grid { grid-template-columns: 1fr 1fr; }
  .bl-feature { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .bl-grid { grid-template-columns: 1fr; }
  .bl-cta__box { grid-template-columns: 1fr; }
  .ar-app { grid-template-columns: auto 1fr; }
  .ar-app .btn { grid-column: 1 / -1; }
  .ar-pn { grid-template-columns: 1fr; }
  .ar-pn a:last-child { text-align: left; }
  .bl-search { flex: 1 1 100%; }
}

/* selector de idioma ES / EN del blog (enlaces a la misma página en el otro idioma) */
.blog .lang a { color: var(--mute); text-decoration: none; padding: 6px 2px; transition: color .3s; }
.blog .lang a:hover { color: var(--cream); }
.blog .lang a.is-on { color: var(--gold); }
