/* Blog redesign, 2026-10-22 — archive "Opción A" + post "Artículo 1".
   Loaded only on blog archives and posts (Layout extraCss). Every rule is scoped under
   .qe-blog-hero / .qe-blog / .qe-post so the captured Astra CSS elsewhere is untouched, and
   carries two classes so it still wins over Astra rules that arrive later with the deferred UCSS.
   Palette = the site's: brand blue #249fcb (dark text on it), cream #f0ecdb, ink #121305,
   AA link blue #166783 (see site.css "WCAG AA contrast"). */

:root {
  --qe-blue: #249fcb;
  --qe-cream: #f0ecdb;
  --qe-ink: #121305;
  --qe-link: #166783;
  --qe-link-hover: #0f4d63;
  --qe-line: #d9d3bb;
  --qe-soft: #eee8d3;
  --qe-body: #3d3c30;
  --qe-muted: #5f5d4c;
  --qe-sans: Helvetica, Arial, sans-serif;
}

.qe-blog .screen-reader-text, .qe-post .screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* ── Shared pieces ─────────────────────────────────────────────────────────── */
.qe-blog .qe-btn, .qe-post .qe-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; box-sizing: border-box;
  padding: 12px 22px; border-radius: 15px; font: 700 15px/1.2 var(--qe-sans); text-decoration: none; text-align: center;
}
.qe-blog .qe-btn--black, .qe-post .qe-btn--black { background: #000; color: #fff; }
.qe-blog .qe-btn--black:hover, .qe-post .qe-btn--black:hover { background: #2a2b1e; color: #fff; }
.qe-blog .qe-btn--blue, .qe-post .qe-btn--blue { background: var(--qe-blue); color: var(--qe-ink); }
.qe-blog .qe-btn--blue:hover, .qe-post .qe-btn--blue:hover { background: #4fb5da; color: var(--qe-ink); }
.qe-blog .qe-btn--white, .qe-post .qe-btn--white { background: #fff; color: var(--qe-ink); }
.qe-blog .qe-btn--white:hover, .qe-post .qe-btn--white:hover { background: var(--qe-cream); color: var(--qe-ink); }
.qe-post .qe-btn--outline { border: 1.5px solid var(--qe-ink); color: var(--qe-ink); background: transparent; }
.qe-post .qe-btn--outline:hover { background: var(--qe-ink); color: #fff; }

.qe-blog .qe-cta-dark, .qe-post .qe-cta-dark {
  background: var(--qe-ink); color: #fff; border-radius: 14px; padding: 24px 22px; display: flex; flex-direction: column; gap: 12px;
}
.qe-blog .qe-cta-dark h2, .qe-post .qe-cta-dark h2 { margin: 0; color: #fff; font-size: 22px; line-height: 1.25; }
.qe-blog .qe-cta-dark p, .qe-post .qe-cta-dark p { margin: 0; font-size: 15px; line-height: 1.5; color: #e6e3d6; }
.qe-blog .qe-cta-dark .qe-kicker, .qe-post .qe-cta-dark .qe-kicker {
  font: 700 12px/1.3 var(--qe-sans); letter-spacing: .08em; text-transform: uppercase; color: #62c3e6;
}
.qe-blog .qe-cta-dark__link, .qe-post .qe-cta-dark__link { color: #fff; font-size: 14px; text-align: center; text-decoration: underline; }
.qe-blog .qe-cta-dark__link:hover, .qe-post .qe-cta-dark__link:hover { color: #62c3e6; }

.qe-blog-hero .qe-crumbs, .qe-post .qe-crumbs { margin: 0; font: 13px/1.4 var(--qe-sans); letter-spacing: .02em; }

/* ── Archive hero ─────────────────────────────────────────────────────────── */
.qe-blog-hero { position: relative; height: 240px; overflow: hidden; background: var(--qe-ink); }
.qe-blog-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.qe-blog-hero::after { content: ""; position: absolute; inset: 0; background: rgba(18, 19, 5, .55); }
.qe-blog-hero .qe-blog-hero__in {
  position: relative; z-index: 1; box-sizing: border-box; max-width: 1290px; height: 100%; margin: 0 auto; padding: 0 25px;
  display: flex; flex-direction: column; justify-content: center; gap: 10px; color: #fff;
}
.qe-blog-hero .qe-crumbs, .qe-blog-hero .qe-crumbs a { color: #fff; }
.qe-blog-hero .qe-blog-hero__in h1 { margin: 0; max-width: 820px; color: #fff; font-size: 40px; line-height: 1.15; font-weight: 700; }
.qe-blog-hero .qe-blog-hero__intro { margin: 0; max-width: 640px; font-size: 18px; line-height: 1.5; color: #fff; }

/* ── Archive layout: sidebar (top + bottom parts) and cards ───────────────── */
.qe-blog-page #content .ast-container { display: block; max-width: 1290px; margin: 0 auto; }
.qe-blog {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); grid-template-rows: auto 1fr;
  grid-template-areas: "top main" "bottom main"; column-gap: 36px; row-gap: 22px; padding: 40px 0 64px;
}
.qe-blog .qe-side-top { grid-area: top; display: flex; flex-direction: column; gap: 22px; }
.qe-blog .qe-side-bottom { grid-area: bottom; align-self: start; display: flex; flex-direction: column; gap: 22px; }
.qe-blog .qe-blog-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.qe-blog .qe-blog-main [data-qe-listing] { display: flex; flex-direction: column; gap: 28px; }
.qe-blog [hidden] { display: none !important; }

.qe-blog .qe-search { display: flex; background: #fff; border: 1px solid var(--qe-line); border-radius: 12px; overflow: hidden; }
.qe-blog .qe-search input[type="search"] {
  flex: 1; min-width: 0; height: 48px; margin: 0; border: 0; border-radius: 0; padding: 0 16px; background: transparent;
  font: 15px/1.2 "PT Serif", Georgia, serif; color: var(--qe-ink); box-shadow: none;
}
.qe-blog .qe-search input[type="search"]::placeholder { color: var(--qe-muted); }
.qe-blog .qe-search button {
  flex: 0 0 48px; width: 48px; height: 48px; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--qe-blue);
  color: var(--qe-ink); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.qe-blog .qe-search button:hover { background: #4fb5da; }

.qe-blog .qe-topics { background: #fff; border-radius: 14px; padding: 20px 22px; }
.qe-blog .qe-topics h2 { margin: 0 0 8px; font-size: 18px; line-height: 1.3; color: var(--qe-ink); }
.qe-blog .qe-topics ul { list-style: none; margin: 0; padding: 0; }
.qe-blog .qe-topics li { margin: 0; border-bottom: 1px solid var(--qe-soft); }
.qe-blog .qe-topics li:last-child { border-bottom: 0; }
.qe-blog .qe-topics a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; color: var(--qe-ink); text-decoration: none; font-size: 15px; line-height: 1.35; }
.qe-blog .qe-topics a span { color: var(--qe-muted); font: 13px/1.6 var(--qe-sans); }
.qe-blog .qe-topics a:hover { color: var(--qe-link); }
.qe-blog .qe-topics a[aria-current="page"] { color: var(--qe-link); font-weight: 700; }
.qe-blog .qe-topics a[aria-current="page"] span { color: var(--qe-link); }

.qe-blog .qe-gift { display: flex; align-items: center; gap: 14px; padding: 14px; background: #fff; border-radius: 14px; color: var(--qe-ink); text-decoration: none; }
.qe-blog .qe-gift img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; flex: 0 0 72px; }
.qe-blog .qe-gift > span { display: flex; flex-direction: column; gap: 4px; }
.qe-blog .qe-gift strong { font-size: 16px; }
.qe-blog .qe-gift > span > span { font-size: 14px; color: var(--qe-link); }
.qe-blog .qe-gift:hover strong { color: var(--qe-link); }

.qe-blog .qe-help { border: 1px solid var(--qe-line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.6; color: var(--qe-body); }
.qe-blog .qe-help strong { font-size: 15px; color: var(--qe-ink); }
.qe-blog .qe-help a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--qe-link); text-decoration: none; min-height: 24px; }
.qe-blog .qe-help a:hover { color: var(--qe-link-hover); text-decoration: underline; }

.qe-blog .qe-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.qe-blog .qe-card { background: #fff; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; margin: 0; }
.qe-blog .qe-card > a { display: block; }
.qe-blog .qe-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.qe-blog .qe-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.qe-blog .qe-card .qe-card__cat { align-self: flex-start; font: 700 11px/1.4 var(--qe-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--qe-link); text-decoration: none; }
.qe-blog .qe-card a.qe-card__cat:hover { text-decoration: underline; }
.qe-blog .qe-card .qe-card__title { margin: 0; font-size: 19px; line-height: 1.3; font-weight: 700; }
.qe-blog .qe-card .qe-card__title a { color: var(--qe-ink); text-decoration: none; }
.qe-blog .qe-card .qe-card__title a:hover { color: var(--qe-link); }
.qe-blog .qe-card .qe-card__ex { margin: 0; font-size: 15px; line-height: 1.55; color: var(--qe-body); }
.qe-blog .qe-card .qe-card__meta { margin: auto 0 0; padding-top: 4px; font: 12px/1.4 var(--qe-sans); color: var(--qe-muted); }

.qe-blog .qe-band { background: var(--qe-blue); border-radius: 16px; padding: 28px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.qe-blog .qe-band > div:first-child { flex: 1 1 320px; }
.qe-blog .qe-band h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.25; color: var(--qe-ink); }
.qe-blog .qe-band p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--qe-ink); }
.qe-blog .qe-band__btns { display: flex; flex-wrap: wrap; gap: 12px; }

.qe-blog .qe-search-status p { margin: 0 0 4px; font-size: 17px; color: var(--qe-ink); }

.qe-blog .qe-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font: 15px/1 var(--qe-sans); }
.qe-blog .qe-pages a, .qe-blog .qe-pages span {
  min-width: 44px; height: 44px; box-sizing: border-box; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: #fff; color: var(--qe-ink); text-decoration: none;
}
.qe-blog .qe-pages a:hover { background: var(--qe-blue); }
.qe-blog .qe-pages span[aria-current] { background: var(--qe-ink); color: #fff; font-weight: 700; }

@media (max-width: 1100px) {
  .qe-blog .qe-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 921.98px) {
  .qe-blog-hero { height: auto; min-height: 200px; display: flex; }
  .qe-blog-hero .qe-blog-hero__in { width: 100%; height: auto; padding: 28px 20px; }
  .qe-blog-hero .qe-blog-hero__in h1 { font-size: 27px; line-height: 1.2; }
  .qe-blog-hero .qe-blog-hero__intro { font-size: 16px; }
  .qe-blog { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main" "bottom"; grid-template-rows: auto; padding: 24px 0 48px; row-gap: 28px; }
  .qe-blog .qe-side-top { gap: 14px; }
  /* Topics become a row of chips above the cards. */
  .qe-blog .qe-topics { background: none; padding: 0; }
  .qe-blog .qe-topics h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
  /* One swipeable row instead of six stacked chips. */
  .qe-blog .qe-topics ul { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; margin: 0; padding: 0 0 4px; scrollbar-width: none; }
  .qe-blog .qe-topics ul::-webkit-scrollbar { display: none; }
  .qe-blog .qe-topics li { border: 0; flex: 0 0 auto; }
  .qe-blog .qe-topics a { white-space: nowrap; }
  .qe-blog .qe-topics a { padding: 10px 14px; min-height: 44px; box-sizing: border-box; align-items: center; background: #fff; border-radius: 999px; font: 700 14px/1.2 var(--qe-sans); }
  .qe-blog .qe-topics a[aria-current="page"] { background: var(--qe-ink); color: #fff; }
  .qe-blog .qe-topics a[aria-current="page"] span { color: #e6e3d6; }
}
@media (max-width: 640px) {
  .qe-blog .qe-cards { grid-template-columns: minmax(0, 1fr); }
  .qe-blog .qe-band { padding: 24px 22px; }
}

/* ── Post layout ──────────────────────────────────────────────────────────── */
.qe-post-page #content .ast-container { display: block; }
.qe-post {
  display: grid; grid-template-columns: 270px minmax(0, 780px); grid-template-areas: "side main"; justify-content: center;
  column-gap: 48px; padding: 36px 0 64px;
}
.qe-post .qe-post-main { grid-area: main; min-width: 0; }
.qe-post .qe-post-side { grid-area: side; align-self: start; display: flex; flex-direction: column; gap: 22px; padding-top: 6px; }
@media (min-width: 922px) and (min-height: 760px) {
  .qe-post .qe-post-side { position: sticky; top: 110px; }
}
.qe-post .qe-article { margin: 0; padding: 0; background: none; }

.qe-post .qe-post-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.qe-post .qe-crumbs { color: var(--qe-muted); }
.qe-post .qe-crumbs a { color: var(--qe-link); }
.qe-post .qe-post-head .qe-post-title { margin: 0; font-size: 40px; line-height: 1.15; font-weight: 700; color: var(--qe-ink); }
.qe-post .qe-post-meta { margin: 0; font: 14px/1.5 var(--qe-sans); color: var(--qe-muted); }
.qe-post .qe-post-meta a { color: var(--qe-link); }
.qe-post .qe-post-head .qe-post-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; margin-top: 8px; }
.qe-post .entry-content h2 { scroll-margin-top: 110px; }
/* Astra lets wide/full blocks break out of the text column; next to a sidebar they stay inside it. */
.qe-post .entry-content .alignwide, .qe-post .entry-content .alignfull { margin-left: 0; margin-right: 0; max-width: 100%; width: auto; }

.qe-post .entry-content .qe-inline-cta {
  background: var(--qe-blue); border-radius: 16px; padding: 24px 26px; margin: 32px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
}
.qe-post .entry-content .qe-inline-cta > div { flex: 1 1 300px; }
.qe-post .entry-content .qe-inline-cta p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--qe-ink); }
.qe-post .entry-content .qe-inline-cta .qe-inline-cta__title { margin: 0 0 4px; font-size: 21px; font-weight: 700; line-height: 1.3; }
.qe-post .entry-content .qe-inline-cta a.qe-btn { color: #fff; text-decoration: none; }

.qe-post .qe-toc { background: #fff; border-radius: 14px; padding: 20px 22px; }
.qe-post .qe-toc h2 { margin: 0 0 12px; font: 700 13px/1.3 var(--qe-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--qe-link); }
.qe-post .qe-toc ol { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.4; }
.qe-post .qe-toc li { margin: 0; color: var(--qe-muted); }
.qe-post .qe-toc a { color: var(--qe-ink); text-decoration: none; }
.qe-post .qe-toc a:hover, .qe-post .qe-toc a.is-current { color: var(--qe-link); }
.qe-post .qe-toc a.is-current { font-weight: 700; }

.qe-post .qe-wa {
  display: flex; align-items: center; gap: 10px; min-height: 44px; box-sizing: border-box; border: 1px solid var(--qe-line); border-radius: 14px;
  padding: 14px 18px; font: 700 14px/1.3 var(--qe-sans); color: var(--qe-ink); text-decoration: none;
}
.qe-post .qe-wa svg { color: var(--qe-link); flex: 0 0 20px; }
.qe-post .qe-wa:hover { border-color: var(--qe-link); color: var(--qe-link); }

.qe-post .qe-end-cta { margin-top: 40px; background: #fff; border-radius: 18px; overflow: hidden; display: flex; flex-wrap: wrap; }
.qe-post .qe-end-cta > img { flex: 1 1 240px; width: 100%; min-height: 220px; max-height: 320px; object-fit: cover; }
.qe-post .qe-end-cta > div { flex: 1 1 320px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.qe-post .qe-end-cta h2 { margin: 0; font-size: 24px; line-height: 1.25; color: var(--qe-ink); }
.qe-post .qe-end-cta p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--qe-body); }
.qe-post .qe-end-cta__btns { display: flex; flex-wrap: wrap; gap: 10px; }

.qe-post .qe-related { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.qe-post .qe-related > h2 { margin: 0; font-size: 24px; color: var(--qe-ink); }
.qe-post .qe-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.qe-post .qe-related article { display: flex; flex-direction: column; gap: 10px; }
.qe-post .qe-related img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; }
.qe-post .qe-related h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.qe-post .qe-related h3 a { color: var(--qe-ink); text-decoration: none; }
.qe-post .qe-related h3 a:hover { color: var(--qe-link); }

@media (max-width: 921.98px) {
  .qe-post { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side"; row-gap: 32px; padding: 24px 0 48px; }
  .qe-post .qe-toc { display: none; }
  .qe-post .qe-post-head .qe-post-title { font-size: 30px; }
}
@media (max-width: 640px) {
  .qe-post .qe-related__grid { grid-template-columns: minmax(0, 1fr); }
  .qe-post .entry-content .qe-inline-cta { padding: 22px; }
}
