/* ══════════════════════════
   BLOG — extends style.css, same palette/vars
══════════════════════════ */

/* ── Hero ── */
.blog-hero { background: var(--g-hero); padding: 130px 0 44px; position: relative; overflow: hidden; }
.blog-hero .hero-dots { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px); background-size: 36px 36px; mask-image: radial-gradient(ellipse 70% 70% at 60% 40%, black 10%, transparent 80%); }
.blog-hero h1 { font-size: clamp(1.9rem,3.6vw,2.7rem); font-weight: 800; color: #fff; margin-bottom: 10px; position: relative; z-index: 2; }
.blog-hero p { font-size: .95rem; color: rgba(255,255,255,.6); max-width: 620px; line-height: 1.7; position: relative; z-index: 2; }

.bc-preview-banner { background: var(--sun); color: var(--ink); text-align: center; font-size: .85rem; font-weight: 700; padding: 10px 16px; }

/* ── Category pills ── */
.bc-pills-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 28px 0 0; }
.bc-pill { text-decoration: none; }
.bc-pill-active { background: var(--g-brand); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(240,78,26,.35); }

/* ── Grid & card ── */
.bc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 48px 0 40px; }
.bc { display: flex; flex-direction: column; background: #fff; border: 1.5px solid #EAE5F5; border-radius: 18px; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; position: relative; box-shadow: 0 6px 20px rgba(15,10,30,.05); }
.bc:hover { transform: translateY(-6px); border-color: rgba(240,78,26,.25); box-shadow: 0 20px 50px rgba(15,10,30,.14); }
.bc-img-link { position: relative; display: block; overflow: hidden; }
.bc-img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform .4s ease; }
.bc:hover .bc-img { transform: scale(1.06); }
.bc-img-placeholder { display: flex; align-items: center; justify-content: center; font-size: 2.4rem; background: linear-gradient(135deg, var(--off), #EDE9FB); }
.bc-img-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,7,25,.55) 0%, rgba(11,7,25,0) 45%); pointer-events: none; }
.bc-cat { position: absolute; top: 14px; left: 14px; z-index: 2; display: inline-flex; align-items: center; font-family: var(--f-head); font-weight: 700; font-size: .64rem; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: rgba(15,10,30,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.3); border-radius: 20px; padding: 5px 12px; }
.bc-body { padding: 20px 22px 18px; display: flex; flex-direction: column; flex: 1; }
.bc-title { font-family: var(--f-head); font-weight: 700; font-size: 1.08rem; line-height: 1.32; color: var(--ink); text-decoration: none; margin-bottom: 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bc-title:hover { color: var(--fire); }
.bc-desc { font-size: .82rem; color: var(--muted); line-height: 1.65; margin-bottom: 18px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 16px; border-top: 1.5px solid #EAE5F5; }
.bc-author-block { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bc-avatar { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--g-brand); color: #fff; font-family: var(--f-head); font-weight: 700; font-size: .74rem; display: flex; align-items: center; justify-content: center; }
.bc-author-block > div { display: flex; flex-direction: column; min-width: 0; }
.bc-author { font-size: .74rem; font-weight: 700; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-date { font-size: .68rem; color: var(--lite); }
.bc-arrow { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--fire); background: rgba(240,78,26,.08); font-size: .85rem; transition: transform .25s ease, background .25s ease; }
.bc:hover .bc-arrow { transform: translateX(3px); background: rgba(240,78,26,.15); }
.bc-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 60px 0; font-size: .92rem; }

@media (max-width: 1024px) { .bc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .bc-grid { grid-template-columns: 1fr; } }

/* ── Pagination ── */
.bc-pagination { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 20px 0 110px; }
.bc-page-link { font-size: .85rem; font-weight: 700; color: var(--fire); text-decoration: none; }
.bc-page-link.bc-page-disabled { color: var(--lite); pointer-events: none; }
.bc-page-status { font-size: .82rem; color: var(--muted); }

/* ── Article page ── */
.ba-hero { background: var(--g-hero); padding: 130px 0 68px; position: relative; overflow: hidden; }
.ba-hero .hero-dots { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(ellipse 60% 70% at 30% 30%, black 10%, transparent 80%); }
.ba-breadcrumb { display: flex; gap: 8px; font-size: .78rem; color: rgba(255,255,255,.5); margin-bottom: 18px; position: relative; z-index: 2; }
.ba-breadcrumb a { color: rgba(255,255,255,.7); text-decoration: none; }
.ba-breadcrumb a:hover { color: #fff; }
.ba-title { font-family: var(--f-head); font-weight: 800; font-size: clamp(1.7rem,3.4vw,2.5rem); color: #fff; line-height: 1.28; max-width: 780px; position: relative; z-index: 2; }

/* La imagen ya no se monta sobre el header oscuro (border-radius invisible
   contra un fondo del mismo tono) — queda separada, con aire propio, sobre
   el fondo claro de la página, donde el borde redondeado y la sombra sí se
   perciben. */
.ba-image-wrap { margin-top: 34px; }
.ba-featured-image { width: 100%; max-height: 480px; object-fit: cover; border-radius: 20px; display: block; box-shadow: 0 24px 60px rgba(15,10,30,.16); }

@media (max-width: 640px) {
  .ba-hero { padding: 110px 0 44px; }
  .ba-image-wrap { margin-top: 22px; }
  .ba-featured-image { border-radius: 16px; max-height: 260px; }
}

/* ── Byline — bajo la imagen destacada, "flota" sobre su borde inferior ── */
.ba-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; background: #fff; border: 1.5px solid #EAE5F5; border-radius: 16px; padding: 16px 26px; box-shadow: 0 14px 34px rgba(15,10,30,.08); margin-top: 24px; }
.ba-byline-overlap { margin-top: -32px; position: relative; z-index: 3; }
.ba-byline-authors { display: flex; align-items: center; gap: 11px; }
.ba-byline-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--g-brand); color: #fff; font-family: var(--f-head); font-weight: 700; font-size: .8rem; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(15,10,30,.18); flex-shrink: 0; }
.ba-byline-authors .ba-byline-avatar[style*="--i: 1"],
.ba-byline-authors .ba-byline-avatar[style*="--i: 2"],
.ba-byline-authors .ba-byline-avatar[style*="--i: 3"] { margin-left: -16px; }
.ba-byline-name { font-size: .86rem; font-weight: 700; color: var(--ink); }
.ba-byline-sep { width: 1px; height: 22px; background: #EAE5F5; }
.ba-byline-item { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--muted); }
.ba-byline-item svg { width: 16px; height: 16px; color: var(--fire); flex-shrink: 0; }

@media (max-width: 640px) {
  .ba-byline { padding: 14px 18px; gap: 12px 16px; }
  .ba-byline-sep { display: none; }
  .ba-byline-overlap { margin-top: -20px; }
}

.ba-layout { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; padding: 32px 0 110px; position: relative; }
.ba-layout.ba-sidebar-collapsed { grid-template-columns: 1fr; gap: 0; }

/* ── Botón para ocultar/mostrar el sidebar — anclado a la esquina superior
     derecha de la card de contenido, no al layout, así no necesita
     recalcular su posición cuando el sidebar colapsa. ── */
.ba-sidebar-toggle { position: absolute; top: 22px; right: 22px; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1.5px solid #EAE5F5; box-shadow: 0 6px 16px rgba(15,10,30,.08); display: flex; align-items: center; justify-content: center; color: var(--fire); cursor: pointer; padding: 0; transition: box-shadow .2s ease, border-color .2s ease; z-index: 5; }
.ba-sidebar-toggle:hover { border-color: rgba(240,78,26,.3); box-shadow: 0 8px 20px rgba(15,10,30,.14); }
.ba-sidebar-toggle svg { width: 15px; height: 15px; transition: transform .3s ease; }
.ba-layout.ba-sidebar-collapsed .ba-sidebar-toggle svg,
.ba-layout.ba-sidebar-hiding .ba-sidebar-toggle svg { transform: rotate(180deg); }

.ba-sidebar { transition: opacity .3s ease, transform .3s ease; }
.ba-layout.ba-sidebar-hiding .ba-sidebar { opacity: 0; transform: translateX(24px); pointer-events: none; }
.ba-layout.ba-sidebar-collapsed .ba-sidebar { display: none; }

@media (max-width: 640px) {
  .ba-sidebar-toggle { top: 16px; right: 16px; }
}

.ba-content { position: relative; background: #fff; border: 1.5px solid #EAE5F5; border-radius: 20px; padding: 44px 48px; box-shadow: 0 10px 30px rgba(15,10,30,.05); font-size: 1.03rem; line-height: 1.9; color: var(--ink2); letter-spacing: .1px; }

@media (max-width: 640px) {
  .ba-content { padding: 28px 22px; border-radius: 16px; }
}
.content-body p:first-of-type { font-size: 1.2rem; line-height: 1.7; color: var(--ink); font-weight: 500; }
.content-body h2 { display: flex; align-items: center; gap: 13px; font-family: var(--f-head); font-weight: 800; font-size: 1.5rem; color: var(--ink); margin: 44px 0 16px; }
.content-body h2::before { content: ''; width: 6px; height: 1.35em; flex-shrink: 0; background: var(--g-brand); border-radius: 3px; }
.content-body h3 { font-family: var(--f-head); font-weight: 700; font-size: 1.2rem; color: var(--ink); margin: 32px 0 12px; }
.content-body h4 { font-weight: 700; font-size: 1.05rem; color: var(--ink); margin: 24px 0 10px; }
.content-body p { margin: 0 0 20px; }
.content-body ul, .content-body ol { margin: 0 0 20px; padding-left: 22px; }
.content-body li { margin-bottom: 8px; }
.content-body li::marker { color: var(--fire); }
.content-body strong { color: var(--ink); font-weight: 700; }
.content-body a { color: var(--fire); font-weight: 600; text-decoration-color: rgba(240,78,26,.35); text-underline-offset: 2px; }
.content-body a:hover { text-decoration-color: var(--fire); }
.content-body img { max-width: 100%; height: auto; border-radius: 14px; margin: 10px 0 26px; box-shadow: 0 12px 30px rgba(15,10,30,.1); }
.content-body blockquote { position: relative; background: linear-gradient(135deg, rgba(240,78,26,.05), rgba(208,24,120,.05)); border-left: 3px solid var(--fire); border-radius: 0 12px 12px 0; padding: 14px 22px; margin: 0 0 26px; color: var(--ink2); font-style: italic; font-size: 1.02rem; }
.content-body pre { background: var(--ink); color: #F5F3FF; padding: 20px 22px; border-radius: 14px; overflow-x: auto; margin: 0 0 26px; font-size: .82rem; box-shadow: 0 12px 30px rgba(15,10,30,.15); }
.content-body code { font-family: ui-monospace, monospace; }
.content-body figure { margin: 0 0 26px; }
.content-body figcaption { font-size: .78rem; color: var(--lite); text-align: center; margin-top: 8px; }

.ba-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0 22px; }
.ba-tags .cc-tag { text-decoration: none; }
.ba-widget-section .ba-tags { margin: 0; }
.ba-share { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: var(--muted); padding-top: 22px; border-top: 1.5px solid #EAE5F5; }
.ba-share a { color: var(--fire); text-decoration: none; font-weight: 600; padding: 6px 14px; border-radius: 20px; background: rgba(240,78,26,.07); transition: background .2s ease; }
.ba-share a:hover { background: rgba(240,78,26,.14); }

.ba-sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
.ba-widget { background: #fff; border: 1.5px solid #EAE5F5; border-radius: 16px; padding: 20px 22px; box-shadow: 0 10px 26px rgba(15,10,30,.05); transition: box-shadow .2s ease, border-color .2s ease; }
.ba-widget:hover { box-shadow: 0 14px 34px rgba(15,10,30,.09); border-color: rgba(240,78,26,.15); }
.ba-widget h4 { display: flex; align-items: center; gap: 8px; font-family: var(--f-head); font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; }
.ba-widget h4 svg { width: 15px; height: 15px; color: var(--fire); flex-shrink: 0; }
.ba-widget-section { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid #F0EDF9; }
.ba-widget-section:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.ba-widget p { font-size: .87rem; color: var(--ink2); margin: 0; }
.ba-author-card { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ba-author-card:last-child { margin-bottom: 0; }
.ba-author-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--g-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--f-head); font-weight: 700; box-shadow: 0 4px 10px rgba(240,78,26,.28); flex-shrink: 0; }
.ba-author-name { font-size: .89rem; font-weight: 700; color: var(--ink); }
.ba-author-role { font-size: .74rem; color: var(--muted); }
.ba-related-list { display: flex; flex-direction: column; }
.ba-related-item { font-size: .85rem; font-weight: 600; color: var(--ink2); text-decoration: none; line-height: 1.4; padding: 10px 0; border-bottom: 1px solid #F0EDF9; transition: color .2s ease; }
.ba-related-item:last-child { border-bottom: none; padding-bottom: 0; }
.ba-related-item:first-child { padding-top: 0; }
.ba-related-item:hover { color: var(--fire); }

@media (max-width: 1024px) {
  .ba-layout { grid-template-columns: 1fr; }
  .ba-sidebar { position: static; }
}
