/*
 * Blog article — the "Guía" layout, under review.
 *
 * Warm header band, the photo lifting out of it, and a two-column read with a
 * sticky table of contents built from the article's own H2s.
 *
 * Same convention as blog.css / promotion.css: hand written, linked directly
 * from the view, not part of the Mix build. Folds into blog.css once approved.
 *
 * Everything here comes from the brand book in resources/sass/app.scss —
 * Funnel Sans 400/600/700, and the palette below. No new typefaces, no new hues.
 */

:root {
    --bd-pink: #fa7c91;
    --bd-oker: #ffc376;
    --bd-brown: #757763;
    --bd-beige: #d0d1cd;
    --bd-beige-light: #eff0eb;
    --bd-cream: #fff5e6;
    --bd-dark: #2e333d;
    --bd-ink: #363636;
    --bd-cta: linear-gradient(137deg, #ffc376 32%, #fa7c91 100%);
    --bd-max: 1344px;
}

/* Shared: every layout reuses the site's existing prose sizing. */
.bd-prose {
    color: var(--bd-ink);
    font-size: 17px;
    line-height: 1.75;
}

.bd-prose h2 {
    margin: 2.75rem 0 1rem;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--bd-ink);
}

.bd-prose h3 {
    margin: 2rem 0 .75rem;
    font-size: 21px;
    font-weight: 700;
    color: var(--bd-ink);
}

.bd-prose p { margin-bottom: 1.15rem; }
.bd-prose ul { margin: 0 0 1.5rem 1.25rem; list-style: disc; }
.bd-prose li { margin-bottom: .5rem; }

.bd-prose a {
    color: var(--bd-brown);
    text-decoration: underline;
    text-decoration-color: var(--bd-oker);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.bd-prose a:hover { color: var(--bd-pink); text-decoration-color: var(--bd-pink); }

/* Shared CTA band. */
.bd-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
    padding: 2.5rem;
    border-radius: 20px;
    background: var(--bd-cta);
}

.bd-cta__title {
    margin: 0 0 .4rem;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: #43301f;
}

.bd-cta__text { margin: 0; max-width: 46ch; color: rgba(67, 48, 31, .82); }

.bd-cta__buttons { display: flex; flex-wrap: wrap; gap: .75rem; }

.bd-btn {
    display: inline-flex;
    align-items: center;
    padding: .85rem 1.6rem;
    border-radius: 100px;
    background: #2e333d;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    transition: transform .2s, box-shadow .2s, background .2s;
}

.bd-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -12px rgba(46, 51, 61, .7);
}

.bd-btn--ghost {
    background: transparent;
    color: #43301f;
    box-shadow: inset 0 0 0 2px rgba(67, 48, 31, .35);
}

.bd-btn--ghost:hover { background: rgba(255, 255, 255, .55); color: #43301f; }

/* Shared related strip. */
.bd-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.bd-related__card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 16px -2px rgba(9, 10, 12, .1), 0 0 0 1px rgba(9, 10, 12, .04);
    transition: transform .25s, box-shadow .25s;
}

.bd-related__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 32px -8px rgba(9, 10, 12, .18), 0 0 0 1px rgba(9, 10, 12, .04);
}

.bd-related__card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.bd-related__body { padding: 1.1rem 1.25rem 1.35rem; }

.bd-related__cat {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--bd-pink);
}

.bd-related__title {
    margin: .45rem 0 .5rem;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bd-ink);
}

.bd-related__meta { margin: 0; font-size: 13px; color: var(--bd-brown); }

.bd-section-heading {
    margin: 0 0 1.5rem;
    font-size: 28px;
    font-weight: 700;
    color: var(--bd-ink);
}

/* Shared spec table. */
.bd-table-wrap { overflow-x: auto; margin: 2.5rem 0; border-radius: 16px; box-shadow: 0 0 0 1px var(--bd-beige); }
.bd-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 15px; }
.bd-table caption { padding: 1rem 1.25rem 0; text-align: left; font-size: 13px; color: var(--bd-brown); }
.bd-table thead th {
    padding: .9rem 1.25rem;
    text-align: left;
    font-weight: 700;
    color: #fff;
    background: var(--bd-dark);
    white-space: nowrap;
}
.bd-table tbody th { text-align: left; font-weight: 700; color: var(--bd-ink); }
.bd-table tbody th, .bd-table tbody td { padding: .85rem 1.25rem; border-top: 1px solid var(--bd-beige-light); }
.bd-table tbody tr:nth-child(even) { background: #fbfaf7; }

/* ═══════════════════════════════════════════════ 1 · GUÍA (sidebar + TOC) ══ */

.g-band { padding: 2.25rem 0 0; }
.g-wrap { max-width: var(--bd-max); margin: 0 auto; padding: 0 24px; }

.g-crumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; font-size: 14px; color: var(--bd-brown); }
.g-crumbs a { color: var(--bd-brown); }
.g-crumbs a:hover { color: var(--bd-pink); }
.g-crumbs span[aria-current] { color: var(--bd-ink); font-weight: 600; }

.g-pill {
    display: inline-block;
    padding: .4rem 1.1rem;
    border-radius: 100px;
    /* Same oker→pink gradient as the CTA, so one warm accent runs through the
       whole article instead of a green badge and yellow everywhere else. */
    background: var(--bd-cta);
    color: #43301f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: transform .2s, box-shadow .2s;
}

.g-pill:hover {
    color: #43301f;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -6px rgba(250, 124, 145, .45);
}

/* Title and standfirst share a row: the subtitle sits to the right of the
   title, bottom-aligned so their last lines settle on the same baseline. */
.g-head {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: end;
    gap: .75rem 3.5rem;
    margin: 1rem 0 1.5rem;
}

.g-title {
    margin: 0;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.5px;
    color: var(--bd-ink);
}

.g-lead {
    margin: 0;
    padding-bottom: .3rem;
    font-size: 19px;
    line-height: 1.6;
    color: var(--bd-brown);
}

.g-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; font-size: 14px; color: var(--bd-brown); }
.g-meta strong { color: var(--bd-ink); font-weight: 700; }
.g-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--bd-beige); }

/* Full-width photo, straight after the header — nothing to lift out of now. */
.g-figure { max-width: var(--bd-max); margin: 2.5rem auto 0; padding: 0 24px; }
.g-figure img {
    display: block;
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 18px 40px -12px rgba(9, 10, 12, .28);
}

.g-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 4rem;
    max-width: var(--bd-max);
    margin: 3rem auto 0;
    padding: 0 24px;
}

.g-side { position: sticky; top: 96px; align-self: start; }

.g-side__label {
    margin: 0 0 .9rem;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--bd-brown);
}

.g-toc { list-style: none; margin: 0 0 2rem; padding: 0; border-left: 2px solid var(--bd-beige-light); }

.g-toc a {
    display: block;
    padding: .5rem 0 .5rem 1rem;
    margin-left: -2px;
    border-left: 2px solid transparent;
    font-size: 14px;
    line-height: 1.4;
    color: var(--bd-brown);
    transition: color .2s, border-color .2s;
}

.g-toc a:hover { color: var(--bd-ink); }

.g-toc a.is-active {
    border-left-color: var(--bd-pink);
    color: var(--bd-ink);
    font-weight: 700;
}

.g-author {
    padding: 1.1rem 1.25rem;
    border-radius: 14px;
    background: var(--bd-cream);
}

.g-author__name { margin: 0 0 .15rem; font-size: 15px; font-weight: 700; color: var(--bd-ink); }
.g-author__role { margin: 0; font-size: 13px; line-height: 1.4; color: var(--bd-brown); }

.g-body { max-width: 900px; }

/* Wider measure, so the type steps up with it to keep the line length sane. */
.g-body .bd-prose { font-size: 18px; line-height: 1.8; }
.g-body .bd-prose h2 { font-size: 30px; scroll-margin-top: 96px; }
.g-body .bd-prose h3 { font-size: 22px; }

.g-faq { margin-top: 3rem; }
.g-faq__item { padding: 1.25rem 0; border-top: 1px solid var(--bd-beige-light); }
.g-faq__item:last-child { border-bottom: 1px solid var(--bd-beige-light); }
.g-faq__q { margin: 0 0 .4rem; font-size: 17px; font-weight: 700; color: var(--bd-ink); }
.g-faq__a { margin: 0; color: var(--bd-brown); }

.g-tail { max-width: var(--bd-max); margin: 4rem auto 5rem; padding: 0 24px; }
.g-tail > * + * { margin-top: 4rem; }

@media screen and (max-width: 1179px) {
    /* One column, and the track must be allowed to shrink: a bare `1fr` is
       minmax(auto, 1fr), whose `auto` floor is the item's min-content — that
       pinned the column at 411px and scrolled the whole page sideways on any
       phone under ~435px. minmax(0, 1fr) plus min-width:0 removes the floor. */
    .g-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .g-body { min-width: 0; max-width: 720px; }
    .g-side { position: static; }
    .g-toc { display: none; }
    .g-head { grid-template-columns: 1fr; align-items: start; gap: 1rem; }
    .g-title { font-size: 38px; }
    .g-body .bd-prose { font-size: 17px; }
    .g-body .bd-prose h2 { font-size: 26px; }
    .bd-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media screen and (max-width: 767px) {
    .g-title { font-size: 32px; }
    .g-lead { font-size: 17px; }
    .g-wrap, .g-figure, .g-layout, .g-tail { padding-left: 20px; padding-right: 20px; }
    /* 21:9 is a letterbox on a wide screen and a 117px sliver on a phone. */
    .g-figure img { aspect-ratio: 16 / 10; border-radius: 14px; }
    .g-figure { margin-top: 1.75rem; }
    .bd-related { grid-template-columns: minmax(0, 1fr); }
    .bd-cta { padding: 1.5rem; border-radius: 16px; }
    .bd-cta__title { font-size: 22px; }
    .bd-btn { width: 100%; justify-content: center; }
    .bd-section-heading { font-size: 24px; }
    .g-tail > * + * { margin-top: 2.5rem; }
}

@media screen and (max-width: 400px) {
    .g-title { font-size: 27px; letter-spacing: -.25px; }
    .g-crumbs { font-size: 13px; }
    .bd-table { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .bd-related__card, .bd-btn, .g-pill, .g-toc a { transition: none; }
}
