/* ============================================================
   mm-blog.css — blog editorial (/blog). Depende de styles.css y mm-pages.css.
   Revista: tipografía grande, fotos con un mismo tratamiento de color,
   líneas de pelo en vez de cajas y una sola superficie donde hace falta.
   ============================================================ */

/* ---- Foto: un mismo tratamiento para que el stock se vea como una sola serie ---- */
.bl-img { position: relative; display: block; overflow: hidden; background: rgba(255,255,255,.04); }
.bl-img img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.82) contrast(1.05); transition: transform 1.2s var(--ease-out), filter .8s var(--ease-out); }
.bl-img::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(160deg, rgba(240,54,225,.10), rgba(145,73,255,.12) 55%, rgba(7,5,9,.18)); mix-blend-mode: soft-light; }
html[data-theme="light"] .bl-img { background: rgba(22,16,26,.05); }

/* ---- Rótulos ---- */
.bl-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; letter-spacing: -.005em; color: var(--paper-dim); text-decoration: none; }
.bl-kicker i { font-family: 'JetBrains Mono', monospace; font-style: normal; font-size: 11px; letter-spacing: .04em; padding: 3px 6px; border-radius: 6px; color: #fff; background: linear-gradient(135deg, #f036e1, #9149ff); }
.bl-read { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--paper-faint); }
.bl-read svg { width: 14px; height: 14px; transition: transform .55s var(--ease-spring); }
a:hover > * > .bl-read svg, a:hover .bl-read svg { transform: translateX(3px); }
.bl-all { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 500; color: var(--paper); text-decoration: none; white-space: nowrap; }
.bl-all svg { width: 15px; height: 15px; transition: transform .55s var(--ease-spring); }
.bl-all:hover svg { transform: translateX(3px); }

/* ---- Títulos ---- */
.bl-index-h1 { margin: 22px 0 22px; font-size: clamp(44px, 6.6vw, 96px); font-weight: 500; line-height: 1.01; letter-spacing: -.036em; text-wrap: balance; }
.bl-lead { margin: 0; max-width: 56ch; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--paper-dim); text-wrap: pretty; }
.bl-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(26px, 3.4vw, 42px); }
.bl-sec-head h2 { margin: 0; font-size: clamp(32px, 3.8vw, 56px); font-weight: 500; line-height: 1.04; letter-spacing: -.032em; text-wrap: balance; }
.bl-sec-head p { margin: 10px 0 0; font-size: 16px; color: var(--paper-dim); }

/* ---- Portada del blog ---- */
.bl-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: clamp(32px, 6vw, 96px); align-items: end; padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(32px, 4.4vw, 56px); }
.bl-toc-index { display: flex; flex-direction: column; }
.bl-toc-index a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 0; font-size: 15.5px; color: var(--paper); text-decoration: none; background: linear-gradient(90deg, var(--line-strong), var(--line) 70%, transparent) left bottom / 100% 1px no-repeat; transition: color .3s var(--ease-out), padding-left .5s var(--ease-spring); }
.bl-toc-index a:hover { padding-left: 6px; color: var(--pink); }
html[data-theme="light"] .bl-toc-index a:hover { color: #a8138f; }
.bl-toc-index b { font-family: 'JetBrains Mono', monospace; font-weight: 400; font-size: 12px; color: var(--paper-faint); }

.bl-search { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 30px; max-width: 520px; height: 54px; padding: 0 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--surface-shadow); color: var(--paper-faint); }
.bl-search > svg { width: 18px; height: 18px; flex-shrink: 0; }
.bl-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--paper); }
.bl-search input::placeholder { color: var(--paper-faint); }
.bl-search:focus-within { box-shadow: 0 0 0 1.5px rgba(240,54,225,.8), 0 0 0 5px rgba(240,54,225,.14); }
.bl-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; padding: 6px; border-radius: 18px; background: #15111a; box-shadow: 0 30px 60px -20px rgba(3,1,8,.9); }
html[data-theme="light"] .bl-results { background: #fff; box-shadow: 0 30px 60px -24px rgba(50,24,80,.3); }
.bl-results a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--paper); font-size: 15px; line-height: 1.3; }
.bl-results a:hover, .bl-results a:focus-visible { background: rgba(255,255,255,.06); }
html[data-theme="light"] .bl-results a:hover { background: rgba(22,16,26,.05); }
.bl-results small { font-size: 12px; color: var(--paper-faint); }
.bl-results p { margin: 0; padding: 12px; font-size: 14px; color: var(--paper-dim); }

/* Artículo destacado: la foto ocupa todo y el texto vive encima */
.bl-lead-wrap { padding-bottom: clamp(16px, 2vw, 24px); }
.bl-leadcard { position: relative; display: block; border-radius: 30px; overflow: hidden; color: #fff; text-decoration: none; transition: transform .7s var(--ease-spring); isolation: isolate; }
.bl-leadcard:hover { transform: translateY(-3px); }
.bl-leadcard .bl-img { aspect-ratio: 21 / 9; min-height: 420px; }
.bl-leadcard:hover .bl-img img { transform: scale(1.025); }
.bl-leadcard-txt { position: absolute; inset: auto 0 0 0; z-index: 2; display: flex; flex-direction: column; gap: 12px; padding: clamp(24px, 4vw, 56px); background: linear-gradient(180deg, transparent, rgba(7,5,9,.72) 38%, rgba(7,5,9,.92)); }
.bl-leadcard-txt .bl-kicker, .bl-leadcard-txt .bl-read, .bl-leadcard-txt .bl-excerpt { color: rgba(255,255,255,.78); }
.bl-leadcard-h { max-width: 22ch; font-size: clamp(30px, 4.2vw, 60px); font-weight: 500; line-height: 1.04; letter-spacing: -.032em; text-wrap: balance; }
.bl-leadcard-txt .bl-excerpt { max-width: 60ch; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.5; }

/* Tarjetas: foto al borde, sin marco */
.bl-card { display: flex; flex-direction: column; min-width: 0; color: var(--paper); text-decoration: none; border-radius: 22px; transition: transform .7s var(--ease-spring); }
.bl-card:hover { transform: translateY(-3px); }
.bl-card .bl-img { aspect-ratio: 3 / 2; border-radius: 22px; }
.bl-card:hover .bl-img img { transform: scale(1.04); filter: saturate(.95) contrast(1.05); }
.bl-card-txt { display: flex; flex-direction: column; gap: 9px; flex: 1; padding: 18px 2px 4px; }
.bl-card-h { font-size: 21px; font-weight: 500; line-height: 1.2; letter-spacing: -.02em; text-wrap: pretty; }
.bl-excerpt { font-size: 15px; line-height: 1.5; color: var(--paper-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bl-card .bl-read { margin-top: auto; padding-top: 4px; }
.bl-card.is-big .bl-card-h { font-size: clamp(26px, 2.7vw, 38px); line-height: 1.1; letter-spacing: -.028em; }
.bl-card.is-big .bl-excerpt { font-size: 16.5px; -webkit-line-clamp: 3; }
.bl-card.is-big .bl-img { aspect-ratio: 16 / 10; border-radius: 26px; }

/* Carrusel de comparativas */
.bl-vs-sec { overflow: hidden; }
.bl-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 330px); gap: 22px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px max(40px, calc((100vw - 1200px) / 2)) 18px; scroll-padding-inline: max(40px, calc((100vw - 1200px) / 2)); scrollbar-width: none; }
.bl-rail::-webkit-scrollbar { display: none; }
.bl-rail .bl-card { scroll-snap-align: start; }
.bl-rail .bl-img { aspect-ratio: 4 / 5; }

/* Tema: una tarjeta grande y una lista */
.bl-feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.bl-rows { display: flex; flex-direction: column; }
.bl-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px 0; color: var(--paper); text-decoration: none; background: linear-gradient(90deg, var(--line-strong), var(--line) 70%, transparent) left bottom / 100% 1px no-repeat; }
.bl-row:first-child { padding-top: 0; }
.bl-row .bl-img { aspect-ratio: 4 / 3; border-radius: 14px; }
.bl-row:hover .bl-img img { transform: scale(1.05); }
.bl-row-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bl-row .bl-card-h { font-size: 17.5px; line-height: 1.26; letter-spacing: -.014em; transition: color .3s var(--ease-out); }
.bl-row:hover .bl-card-h { color: var(--pink); }
html[data-theme="light"] .bl-row:hover .bl-card-h { color: #a8138f; }

/* Archivo */
.bl-archive-cols { column-count: 3; column-gap: clamp(28px, 4vw, 56px); }
.bl-archive-cols > div { break-inside: avoid; margin-bottom: 34px; }
.bl-archive-cols h3 { margin: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--paper-faint); }
.bl-archive-cols h3 a { color: inherit; text-decoration: none; }
.bl-archive-cols ul { margin: 0; padding: 0; list-style: none; }
.bl-archive-cols li a { display: block; padding: 7px 0; font-size: 15px; line-height: 1.35; color: var(--paper-dim); text-decoration: none; transition: color .3s var(--ease-out); }
.bl-archive-cols li a:hover { color: var(--paper); }

/* Categoría */
.bl-cat-hero { padding-top: clamp(28px, 4vw, 56px); padding-bottom: 8px; }
.bl-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 30px; }
.bl-pills a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; color: var(--paper-dim); text-decoration: none; background: rgba(255,255,255,.05); transition: background .3s var(--ease-out), color .3s var(--ease-out); }
html[data-theme="light"] .bl-pills a { background: rgba(22,16,26,.05); }
.bl-pills a:hover { color: var(--paper); background: rgba(255,255,255,.09); }
.bl-pills a.on { color: #fff; background: linear-gradient(110deg, #f036e1, #9149ff); }
.bl-mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 3.4vw, 44px) clamp(20px, 2.4vw, 32px); }
.bl-mosaic .is-big { grid-column: span 2; grid-row: span 2; }
.bl-cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }

/* ---- Artículo ---- */
.bl-head { padding-top: clamp(20px, 3vw, 40px); max-width: 1020px; }
.bl-kicker-link { min-height: 32px; font-size: 14px; color: var(--paper); }
.bl-kicker-link:hover { color: var(--pink); }
.bl-h1 { margin: 16px 0 20px; font-size: clamp(38px, 5.4vw, 78px); font-weight: 500; line-height: 1.04; letter-spacing: -.034em; text-wrap: balance; }
.bl-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; margin: 26px 0 0; font-size: 14px; color: var(--paper-faint); }
.bl-meta img { width: 28px; height: auto; }
.bl-meta span:first-of-type { color: var(--paper); font-weight: 500; }
.bl-cover { margin-top: clamp(28px, 3.6vw, 44px); margin-bottom: clamp(36px, 5vw, 64px); }
.bl-cover .bl-img { aspect-ratio: 16 / 8; max-height: 620px; width: 100%; border-radius: 28px; box-shadow: var(--surface-shadow); }

.bl-grid { display: grid; grid-template-columns: 236px minmax(0, 720px); gap: clamp(36px, 6vw, 92px); justify-content: center; align-items: start; }
.bl-toc { position: sticky; top: 108px; max-height: calc(100dvh - 130px); overflow-y: auto; scrollbar-width: none; }
.bl-toc::-webkit-scrollbar { display: none; }
.bl-toc-h { margin-bottom: 12px; font-size: 13px; font-weight: 500; color: var(--paper); }
.bl-toc ol { margin: 0; padding: 0; list-style: none; }
.bl-toc a { position: relative; display: block; padding: 7px 0 7px 14px; font-size: 13.5px; line-height: 1.34; color: var(--paper-faint); text-decoration: none; transition: color .3s var(--ease-out); }
.bl-toc a::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
.bl-toc a:hover { color: var(--paper); }
.bl-toc a.on { color: var(--paper); }
.bl-toc a.on::before { width: 2px; background: linear-gradient(180deg, #f036e1, #9149ff); }

.bl-body { min-width: 0; font-size: 18px; line-height: 1.72; color: var(--paper-dim); }
.bl-body p { margin: 0 0 1.15em; text-wrap: pretty; }
.bl-body b, .bl-body strong { font-weight: 600; color: var(--paper); }
.bl-body section > h2, .bl-vs > h2 { margin: 2.1em 0 .6em; scroll-margin-top: 100px; font-size: clamp(27px, 2.7vw, 36px); font-weight: 500; line-height: 1.14; letter-spacing: -.026em; color: var(--paper); text-wrap: balance; }
.bl-body h3 { margin: 1.7em 0 .5em; font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -.016em; color: var(--paper); }
.bl-body section > :is(ul, ol) { margin: 0 0 1.3em; padding-left: 1.2em; }
.bl-body section > :is(ul, ol) > li { margin-bottom: .55em; padding-left: .2em; }
.bl-body section > ul > li::marker { color: var(--pink); }
.bl-body section > ol > li::marker { color: var(--pink); font-family: 'JetBrains Mono', monospace; font-size: .82em; }
.bl-body a:not(.btn) { color: var(--paper); text-decoration: underline; text-decoration-color: rgba(240,54,225,.6); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .3s var(--ease-out); }
.bl-body a:not(.btn):hover { text-decoration-color: #f036e1; }
html[data-theme="light"] .bl-body a:not(.btn) { text-decoration-color: rgba(168,19,143,.5); }
.bl-body blockquote { margin: 1.6em 0; padding: 0; font-family: 'Instrument Serif', 'Iowan Old Style', Georgia, serif; font-style: italic; font-size: clamp(25px, 2.4vw, 31px); line-height: 1.28; letter-spacing: -.008em; color: var(--paper); }
.bl-body blockquote p { margin: 0; }

.bl-body .pg-answer.glass { margin-bottom: 32px; padding: 26px 30px 12px; }
.bl-body .pg-answer p { font-size: 18.5px; line-height: 1.6; color: var(--paper); }
.pg-answer-q { color: var(--paper-dim); }
.bl-key { margin-bottom: 8px; }
.bl-key-h { margin-bottom: 10px; font-size: 13px; font-weight: 500; color: var(--paper); }
.bl-key ul { margin: 0; padding: 0; list-style: none; }
.bl-key li { position: relative; padding: 10px 0 10px 22px; font-size: 16.5px; line-height: 1.5; background: linear-gradient(90deg, var(--line-strong), var(--line) 70%, transparent) left bottom / 100% 1px no-repeat; }
.bl-key li::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, #f036e1, #9149ff); }

/* Comparativa */
.bl-vs-scroll { overflow-x: auto; border-radius: 22px; background: var(--surface); box-shadow: var(--surface-shadow); scrollbar-width: thin; }
.bl-vs-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.42; }
.bl-vs-table th, .bl-vs-table td { padding: 15px 18px; text-align: left; vertical-align: top; background: linear-gradient(90deg, var(--line), var(--line)) left bottom / 100% 1px no-repeat; }
.bl-vs-table tr:last-child th, .bl-vs-table tr:last-child td { background: none; }
.bl-vs-table thead th { padding-top: 18px; padding-bottom: 14px; font-size: 15.5px; font-weight: 600; letter-spacing: -.012em; color: var(--paper); }
.bl-vs-table tbody th { width: 28%; font-weight: 500; color: var(--paper); }
.bl-vs-table td { color: var(--paper-dim); }
.bl-vs-table .is-mm { background-color: rgba(240,54,225,.06); }
.bl-vs-table thead .is-mm { color: var(--pink); }
html[data-theme="light"] .bl-vs-table thead .is-mm { color: #a8138f; }
.bl-verdict { margin: 28px 0 0; }
.bl-verdict span { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--pink); }
html[data-theme="light"] .bl-verdict span { color: #a8138f; }
.bl-verdict p { margin: 0; font-family: 'Instrument Serif', 'Iowan Old Style', Georgia, serif; font-style: italic; font-size: clamp(25px, 2.5vw, 33px); line-height: 1.26; letter-spacing: -.008em; color: var(--paper); text-wrap: pretty; }
.bl-choose { display: grid; gap: clamp(20px, 3vw, 36px); margin-top: 30px; }
.bl-choose.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bl-choose.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bl-choose h3 { margin: 0 0 10px; font-size: 17px; }
.bl-choose ul { margin: 0; padding: 0; list-style: none; }
.bl-choose li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 7px 0; font-size: 15.5px; line-height: 1.45; }
.bl-choose li svg { width: 15px; height: 15px; margin-top: .25em; color: var(--pink); }
html[data-theme="light"] .bl-choose li svg { color: #a8138f; }

.bl-tbl { overflow-x: auto; margin: 1.4em 0; border-radius: 18px; background: var(--surface); box-shadow: var(--surface-shadow); }
.bl-tbl table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.42; }
.bl-tbl th, .bl-tbl td { padding: 13px 16px; text-align: left; vertical-align: top; background: linear-gradient(90deg, var(--line), var(--line)) left bottom / 100% 1px no-repeat; }
.bl-tbl tr:last-child td { background: none; }
.bl-tbl th { font-weight: 600; color: var(--paper); }

.bl-body .faq-list { margin-top: 6px; }
.bl-body .faq-q { font-size: 17px; }
.bl-sources p { margin-bottom: .6em; font-size: 14.5px; color: var(--paper-faint); }
.bl-sources ol { margin: 0; padding-left: 1.4em; font-size: 14.5px; line-height: 1.5; }
.bl-sources li { margin-bottom: .45em; }
.bl-sources li::marker { color: var(--paper-faint); }
.bl-sources a:not(.btn) { color: var(--paper-dim); overflow-wrap: anywhere; }
.bl-author { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 44px; padding-top: 26px; font-size: 15px; line-height: 1.5; background: var(--hairline-grad) left top / 100% 1px no-repeat; }
.bl-author img { width: 48px; height: auto; }
.bl-author b { font-size: 15.5px; }
.bl-author p { margin: 2px 0 0; }

/* ---- Tablet y celular ---- */
@media (max-width: 1080px) {
  .bl-grid { grid-template-columns: minmax(0, 720px); }
  .bl-toc { position: static; max-height: none; overflow: visible; padding: 16px 18px; border-radius: 18px; background: var(--surface); }
  .bl-toc a::before { display: none; }
  .bl-toc a { padding-left: 0; font-size: 14.5px; min-height: 36px; }
  .bl-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bl-archive-cols { column-count: 2; }
}
@media (max-width: 860px) {
  .bl-hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .bl-feature { grid-template-columns: minmax(0, 1fr); }
  .bl-cards3 { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .bl-leadcard .bl-img { aspect-ratio: 4 / 5; min-height: 0; }
}
@media (max-width: 620px) {
  .bl-mosaic { grid-template-columns: minmax(0, 1fr); }
  .bl-mosaic .is-big { grid-column: auto; grid-row: auto; }
  .bl-archive-cols { column-count: 1; }
  .bl-sec-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .bl-body { font-size: 17px; }
  .bl-choose.c2, .bl-choose.c3 { grid-template-columns: minmax(0, 1fr); }
  .bl-rail { grid-auto-columns: 76vw; padding-inline: 22px; scroll-padding-inline: 22px; gap: 16px; }
  .bl-cover .bl-img { aspect-ratio: 3 / 2; border-radius: 22px; }
  .bl-row { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; }
  /* Comparativa en celular: cada criterio es un bloque y se ven todas las opciones sin deslizar */
  .bl-vs-scroll { overflow: visible; }
  .bl-vs-table, .bl-vs-table tbody, .bl-vs-table tr, .bl-vs-table th, .bl-vs-table td { display: block; width: 100%; min-width: 0; box-sizing: border-box; }
  .bl-vs-table thead { display: none; }
  .bl-vs-table tbody tr { padding: 16px 18px; background: linear-gradient(90deg, var(--line), var(--line)) left bottom / 100% 1px no-repeat; }
  .bl-vs-table tbody tr:last-child { background: none; }
  .bl-vs-table tbody th { width: 100%; padding: 0 0 8px; font-size: 16px; background: none; }
  .bl-vs-table td, .bl-vs-table tr:last-child td { display: grid; grid-template-columns: 38% minmax(0, 1fr); gap: 12px; padding: 5px 0; font-size: 15px; background: none; }
  .bl-vs-table td::before { content: attr(data-opt); font-size: 13.5px; font-weight: 500; color: var(--paper-faint); }
  .bl-vs-table td.is-mm { background: none; }
  .bl-vs-table td.is-mm::before { color: var(--pink); }
}
@media print { .bl-toc, .bl-more { display: none; } .bl-grid { display: block; } }
