/* Blog: same tokens and header as the main site (site.css); this file only adds the blog layouts. */

/* Cards and filtered items set their own display, so hidden needs to win. */
[hidden] { display: none !important; }

/* ES / EN switch on blog pages (links, styled like the homepage buttons) */
.lang a { padding: 7px 10px; font: 500 13px/1 var(--font); color: var(--ink-2); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--ink); color: var(--white); }

.crumbs { font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .5; }

.cat { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }
.cat i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.cat-ma i { background: var(--mint-ink); }
.cat-sso i { background: var(--butter-ink); }
.cat-gp i { background: var(--blush-ink); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

/* Review mode */
.review-bar { background: var(--butter); color: var(--butter-ink); font-size: 14px; }
.review-bar .wrap { padding-block: 10px; }
.reviewing .rv { background: rgba(244, 235, 195, .9); box-shadow: 0 0 0 2px rgba(244, 235, 195, .9); border-bottom: 1.5px dotted var(--butter-ink); border-radius: 2px; }

/* Blog index */
.blog-head { padding: 64px 0 28px; }
.blog-head h1 { font-size: clamp(34px, 4.6vw, 50px); font-weight: 400; letter-spacing: -0.03em; margin-top: 14px; }
.blog-head .intro { font-size: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.filters button {
  border: 1px solid var(--rule); background: var(--white); color: var(--ink-2);
  padding: 9px 14px; border-radius: 8px; font: 500 14px/1 var(--font); cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

.blog-list { padding: 12px 0 88px; }
.featured {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 0;
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; text-decoration: none;
}
.featured img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; display: block; }
.featured .body { padding: 36px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.featured .tag { align-self: flex-start; font-size: 12.5px; font-weight: 500; padding: 4px 10px; border-radius: 6px; background: var(--sky); color: var(--sky-ink); }
.featured h2 { font-size: clamp(24px, 2.8vw, 32px); }
.featured p { color: var(--ink-2); }
.featured:hover h2, .card:hover h3 { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.card { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; }
.card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--rule); }
.card .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 19px; line-height: 1.3; }
.card p { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.card .meta { margin-top: auto; padding-top: 6px; font-size: 13px; }

/* Homepage block */
#articulos .cards { margin-top: 36px; }
.more-link { display: inline-flex; margin-top: 28px; }

/* Article */
.post-head { padding-block: 48px 32px; }
.post-head .cat { margin-top: 26px; }
.post-head h1 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 400; letter-spacing: -0.03em; margin-top: 12px; max-width: 900px; }
.post-head .lede-desc { font-size: 19px; color: var(--ink-2); margin-top: 16px; max-width: 760px; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.byline b { font-weight: 500; display: block; font-size: 15px; }
.post-hero img { width: 100%; height: auto; aspect-ratio: 16 / 10; max-height: 560px; object-fit: cover; border-radius: var(--r); display: block; background: var(--rule); }
.post-hero figcaption { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; }
.post-hero { margin: 0; }

.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; padding-block: 48px 24px; align-items: start; }
.toc { position: sticky; top: 92px; font-size: 14.5px; }
.toc p { font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.toc ol { display: grid; gap: 2px; border-left: 1px solid var(--rule); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-2); line-height: 1.35; }
.toc a:hover, .toc a.on { color: var(--ink); border-left-color: var(--ink); }
.toc-mobile { display: none; background: var(--white); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 18px; margin-bottom: 28px; }
.toc-mobile summary { font-weight: 500; cursor: pointer; }
.toc-mobile ol { margin-top: 10px; display: grid; gap: 8px; padding-left: 18px; list-style: decimal; color: var(--ink-2); }
.toc-mobile a { text-decoration: none; }

.prose { max-width: 720px; font-size: 18px; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose .lead { font-size: 20px; line-height: 1.6; color: var(--ink); }
.prose h2 { font-size: 27px; margin-top: 2em; scroll-margin-top: 92px; }
.prose h3 { font-size: 20px; margin-top: 1.6em; }
.prose p, .prose li { color: #2E3A39; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--ink-2); }
.prose a { color: var(--sky-ink); text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }
.prose strong { font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; background: var(--white); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; min-width: 560px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 500; background: var(--paper); }
.prose tr:last-child td { border-bottom: 0; }
.prose .note { background: var(--sky); border-radius: 12px; padding: 18px 20px; }
.prose .note p { color: var(--sky-ink); font-size: 16.5px; }
.prose .checklist { background: var(--mint); border-radius: 12px; padding: 20px 22px; }
.prose .checklist h3 { margin-top: 0; font-size: 18px; color: var(--mint-ink); }
.prose .checklist ul { margin-top: 10px; list-style: none; padding-left: 0; }
.prose .checklist li { color: var(--mint-ink); font-size: 16.5px; padding-left: 28px; position: relative; }
.prose .checklist li::before { content: ""; position: absolute; left: 0; top: 6px; width: 15px; height: 15px; border: 1.5px solid var(--mint-ink); border-radius: 4px; }

.cta-box { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r); padding: 26px 28px; display: grid; gap: 16px; }
.cta-box p { margin: 0; }
.cta-box .q { font-size: 20px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.cta-box .s { font-size: 16px; color: var(--ink-2); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.prose .cta-box a.btn { color: inherit; text-decoration: none; }
.prose .cta-box a.btn-ink { color: var(--white); }
.btn-wa { background: var(--mint); color: var(--mint-ink); }
.btn-wa:hover { background: #C6E6D3; }
.cta-end { background: var(--sky); border-color: transparent; margin-top: 48px; }

.post-extra { max-width: 720px; display: grid; gap: 48px; padding-bottom: 72px; }
.post-extra > section { padding: 0; }
.post-extra h2 { font-size: 26px; margin-bottom: 16px; }
.faq details { border-top: 1px solid var(--rule); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 500; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 22px; line-height: 1; color: var(--ink-2); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); margin-top: 10px; }
.sources ol { list-style: decimal; padding-left: 1.3em; display: grid; gap: 8px; font-size: 15px; color: var(--ink-2); }
.sources a { color: var(--sky-ink); word-break: break-word; }
.disclaimer { font-size: 14px; color: var(--ink-2); border-left: 3px solid var(--rule); padding-left: 14px; }
.author { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; background: var(--white); border: 1px solid var(--rule); border-radius: var(--r); padding: 24px; }
.author img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.author h2 { font-size: 20px; margin: 0 0 4px; }
.author .role { font-size: 14px; color: var(--ink-2); }
.author p { font-size: 15.5px; color: var(--ink-2); margin-top: 10px; }
.author a { color: var(--sky-ink); }
.related { padding: 0 0 88px; }
.related .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; }

@media (max-width: 1000px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  .toc-mobile { display: block; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured { grid-template-columns: minmax(0, 1fr); }
  .featured img { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 680px) {
  .blog-head { padding: 40px 0 20px; }
  .cards, .related .cards { grid-template-columns: minmax(0, 1fr); }
  .featured .body { padding: 22px; }
  .post-head { padding-block: 32px 24px; }
  .prose { font-size: 17px; }
  .prose .lead { font-size: 18.5px; }
  .prose h2 { font-size: 23px; }
  .cta-box { padding: 22px; }
  .cta-actions .btn { flex: 1 1 100%; }
  .author { grid-template-columns: minmax(0, 1fr); }
  .author img { width: 72px; height: 72px; }
}
