/*
 * Blog listing styles.
 *
 * Hand-written and linked directly from the blog views, following the same
 * convention as promotion.css — it is not part of the app.scss / Laravel Mix
 * build, so editing it needs no compile step.
 *
 * Visual model: the old blog.ev-renting.com listing — full-bleed hero built from
 * the newest article, a horizontal category filter, and a two-column grid of tall
 * image cards with a bottom gradient.
 */

/*
 * The visually-hidden helper, defined here rather than borrowed from app.css.
 *
 * app.css is a compiled bundle and is not the same on every environment —
 * production's copy carries no .is-sr-only rule, so the search and sort labels
 * rendered as stray text above the fields. A page should not depend on another
 * bundle for whether its own labels are visible.
 *
 * The labels stay in the markup: the search box and the sort menu are named for
 * a screen reader by these and nothing else.
 */
.blog-tools .is-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

:root {
    --blog-dark: #2e333d;
    --blog-green: #67bdb9;
    --blog-ink: #363636;
    --blog-muted: #757763;
    --blog-line: #e8e6df;
    --blog-max: 1344px;
    --blog-shadow: 0 8px 16px -2px rgba(9, 10, 12, .1), 0 0 0 1px rgba(9, 10, 12, .02);

    /* Brand CTA gradient, lifted from the promo page's "Enviar solicitud" button
       (.button.is-warning-gradient / .v5-cta) so the blog matches the rest of the site. */
    --blog-oker: #ffc376;
    --blog-pink: #fa7c91;
    --blog-cta: linear-gradient(137deg, #ffc376 32%, #fa7c91 100%);
    --blog-cta-shadow: 0 12px 28px rgba(250, 124, 145, .28);
    --blog-cta-shadow-hover: 0 16px 36px rgba(250, 124, 145, .42);
}

/* ---------------------------------------------------------------- hero ---- */

.blog-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 580px;
    margin-bottom: 0;
    overflow: hidden;
    background-color: var(--blog-dark);
}

.blog-hero__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Was baked into the hero's background-image; now its own layer over the img. */
.blog-hero__scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .7));
}

/* Soft vignette so the type always has something to sit on, whatever the photo. */
.blog-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(120% 80% at 20% 100%, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 60%);
}

.blog-hero__container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--blog-max);
    margin: 0 auto;
    padding: 60px 20px 56px;
}

.blog-hero__label {
    position: relative;
    display: inline-block;
    margin-bottom: 72px;
    padding-bottom: 12px;
    color: #fff;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -.5px;
    line-height: 1.1;
}

/* Gold rule under the label, tying the hero to the filter chips. */
.blog-hero__label::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 46px;
    height: 3px;
    border-radius: 2px;
    background: var(--blog-cta);
}

.blog-hero__title {
    max-width: 20ch;
    margin: 0 0 18px;
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.12;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}

.blog-hero__title a {
    color: inherit;
    line-height: inherit;
    transition: color .25s;
}

.blog-hero__title a:hover {
    color: var(--blog-oker);
}

.blog-hero__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: rgba(255, 255, 255, .88);
    font-size: 15px;
    font-weight: 600;
}

.blog-hero__author {
    color: #fff;
    font-weight: 700;
}

.blog-hero__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
}

/* Pages 2+ and empty categories have no featured image: compact, centred band. */
.blog-hero--no-image {
    min-height: 320px;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #2e333d 0%, #1f232b 100%);
}

.blog-hero--no-image::after {
    display: none;
}

.blog-hero--no-image .blog-hero__container {
    padding: 48px 20px;
}

.blog-hero--no-image .blog-hero__label {
    margin-bottom: 22px;
}

.blog-hero--no-image .blog-hero__label::after {
    left: 50%;
    transform: translateX(-50%);
}

.blog-hero--no-image .blog-hero__title {
    max-width: none;
    margin-bottom: 0;
}

.blog-hero--no-image .blog-tags-wrapper,
.blog-hero--no-image .blog-hero__meta {
    justify-content: center;
}

/* Tag pill, used in the hero and on the cards. */
.blog-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.blog-tag-pill {
    display: inline-block;
    padding: 6px 13px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    text-decoration: none;
    transition: background .3s, border-color .3s;
}

a.blog-tag-pill:hover {
    border-color: transparent;
    background: var(--blog-cta);
    color: var(--blog-ink);
}

/* ------------------------------------------------------ category filter ---- */

/*
 * Filter chips, styled in the same language as the promo page: frosted glass,
 * an amber glow that drifts out on hover, a lift, and a shimmer sweep across
 * the label. The active chip is filled with the promo gold.
 *
 * Label and count sit in their own z-index:1 wrappers so the blurred glow
 * pseudo-elements can live behind them inside the clipped pill.
 */
.blog-tags-filter {
    position: relative;
    max-width: var(--blog-max);
    margin: 0 auto 10px;
    /* Generous gap under the hero so the filter reads as its own band rather
       than as part of the banner. */
    padding: 44px 20px 22px;
}

.blog-tags-filter__container {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 4px 2px 8px;
}

.blog-tags-filter__container::-webkit-scrollbar {
    display: none;
}

.blog-tag-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: .72rem 1.15rem;
    border: 1px solid var(--blog-line);
    border-radius: 100px;
    background: #fff;
    color: var(--blog-ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px -4px rgba(9, 10, 12, .12);
    /* Same transition contract as the promo CTA. */
    transition: transform .2s, box-shadow .2s, border-color .2s, background .2s, color .2s;
}

.blog-tag-link:hover,
.blog-tag-link:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(250, 124, 145, .45);
    background: #fff;
    color: var(--blog-ink);
    box-shadow: var(--blog-cta-shadow);
}

/* Active chip is the promo "Enviar solicitud" button, verbatim. */
.blog-tag-link--active {
    border-color: transparent;
    background: var(--blog-cta);
    color: var(--blog-ink);
    box-shadow: var(--blog-cta-shadow);
}

.blog-tag-link--active:hover,
.blog-tag-link--active:focus-visible {
    transform: translateY(-2px);
    border-color: transparent;
    background: var(--blog-cta);
    color: var(--blog-ink);
    box-shadow: var(--blog-cta-shadow-hover);
}

.blog-tag-link--active @media (prefers-reduced-motion: reduce) {
    .blog-tag-link,
    .blog-tag-link::before,
    .blog-tag-link::after {
        transition: none;
    }

    .blog-tag-link:hover {
        transform: none;
    }
}


/* ------------------------------------------------- search & sort ---- */

/*
 * Sits under the category chips and borrows their vocabulary — same pill
 * radius, same hairline, same focus treatment — so the three controls read as
 * one filter bar rather than a form bolted onto a listing.
 */
.blog-tools {
    max-width: var(--blog-max);
    margin: 0 auto;
    padding: 0 20px 26px;
}

.blog-tools__form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.blog-search {
    position: relative;
    /* Capped rather than fluid: a search field the full width of the page reads
       as a headline input, and nobody types a 1000px query. */
    flex: 0 1 420px;
    min-width: 0;
}

/* Sort sits at the far end of the bar, opposite the search. */
.blog-sort { margin-left: auto; }

.blog-search__icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--blog-muted);
    font-size: 15px;
}

.blog-search__input {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 0 2.6rem 0 3rem;
    border: 1px solid var(--blog-line);
    border-radius: 100px;
    background: #fff;
    color: var(--blog-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: normal;
    box-shadow: 0 2px 8px -4px rgba(9, 10, 12, .12);
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}

.blog-search__input::placeholder { color: var(--blog-muted); font-weight: 600; }

.blog-search__input:focus {
    outline: none;
    border-color: var(--blog-oker);
    box-shadow: 0 0 0 3px rgba(255, 195, 118, .35);
}

/* The browser's own clear button would sit on top of ours. */
.blog-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }

.blog-search__clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--blog-line);
    color: var(--blog-ink);
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
    transition: background .2s;
}

.blog-search__clear:hover { background: var(--blog-beige, #d0d1cd); color: var(--blog-ink); }

.blog-sort { flex: 0 0 auto; position: relative; }

.blog-sort__select {
    box-sizing: border-box;
    height: 48px;
    padding: 0 2.6rem 0 1.15rem;
    border: 1px solid var(--blog-line);
    border-radius: 100px;
    background: #fff;
    color: var(--blog-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: normal;
    cursor: pointer;
    box-shadow: 0 2px 8px -4px rgba(9, 10, 12, .12);
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
    /* Chevron drawn in the background so the control keeps its pill shape on
       every platform; a native select arrow would square off the right edge. */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23757763' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.15rem center;
    background-size: 11px;
}

.blog-sort__select:focus {
    outline: none;
    border-color: var(--blog-oker);
    box-shadow: 0 0 0 3px rgba(255, 195, 118, .35);
}

/* Only reachable without JavaScript — the select submits on change. */
.blog-tools__go {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.blog-tools__go:focus-visible {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    padding: .82rem 1.4rem;
    border-radius: 100px;
    background: var(--blog-cta);
    color: var(--blog-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.blog-tools__result {
    margin: 14px 0 0;
    color: var(--blog-muted);
    font-size: 15px;
}

.blog-tools__result strong { color: var(--blog-ink); }

@media screen and (max-width: 600px) {
    .blog-tools__form { gap: 10px; }
    .blog-search { flex: 1 1 100%; }
    .blog-sort, .blog-sort__select { width: 100%; }
}

/* ---------------------------------------------------------------- grid ---- */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
    max-width: var(--blog-max);
    margin: 0 auto;
    padding: 8px 20px 20px;
}

.blog-grid__item--wide {
    grid-column: 1 / -1;
}

/*
 * Cards are sized by aspect-ratio, not a fixed height. Every hero image in the
 * corpus is 16:9, so a portrait card would crop away half the photograph — 3:2
 * keeps 84% of the frame, and the full-width card goes cinematic at 21:9.
 */
.post-card {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 18px;
    background-color: #1a1a1a;
    box-shadow: 0 6px 20px -10px rgba(9, 10, 12, .35);
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-cta-shadow-hover);
}

.blog-grid__item--wide .post-card {
    aspect-ratio: 21 / 9;
}

.post-card__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% center;
    transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}

.post-card:hover .post-card__img {
    transform: scale(1.04);
}

/* Scrim only where the type sits, so the photograph stays vivid. */
.post-card__overlay {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 1;
    height: 62%;
    background: linear-gradient(0deg, rgba(12, 13, 15, .88) 0%, rgba(12, 13, 15, .55) 42%, transparent 100%);
}

/* Hairline ring keeps the card defined against the light page background. */
.post-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
    pointer-events: none;
}

.post-card__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 28px;
}

/* Category sits in the top-left corner, out of the way of the headline. */
.post-card__meta {
    position: absolute;
    top: 20px;
    left: 20px;
    margin: 0;
}

.post-card__title {
    margin: 0 0 14px;
    max-width: 24ch;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.4px;
    line-height: 1.2;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .3);
    /* Keep every card's headline to three lines so the grid stays even. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

.blog-grid__item--wide .post-card__title {
    max-width: 30ch;
    font-size: 32px;
}

.post-card:hover .post-card__title {
    color: var(--blog-oker);
}

.post-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.post-card__byline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 13.5px;
    font-weight: 500;
}

.post-card__author {
    color: #fff;
    font-weight: 700;
}

.post-card__author::after {
    content: "·";
    margin-left: 8px;
    color: rgba(255, 255, 255, .45);
}

.post-card__date {
    color: rgba(255, 255, 255, .72);
}

.post-card__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform .2s, background .2s;
}

.post-card:hover .post-card__arrow {
    transform: translateX(3px);
    background: var(--blog-cta);
}

.post-card:hover .post-card__arrow svg path {
    stroke: var(--blog-ink);
}

.post-card__footer svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* ------------------------------------------------- related ("Sigue leyendo") ---- */

.blog-related {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.blog-related__heading {
    margin-bottom: 20px;
    color: var(--blog-ink);
    font-size: 26px;
    font-weight: 700;
}

.blog-related__grid {
    display: grid;
    /* auto-fit rather than a fixed 3 columns: a couple of articles list only two
       related posts, and this lets those two fill the row instead of leaving a hole. */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.related-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--blog-shadow);
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 24px -8px rgba(9, 10, 12, .22);
}

.related-card__figure {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1a1a1a;
}

.related-card__figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s;
}

.related-card:hover .related-card__figure img {
    transform: scale(1.05);
}

.related-card__tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 9px;
    border-radius: 8px;
    background: rgba(46, 51, 61, .88);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

.related-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px 18px 18px;
}

.related-card__title {
    margin: 0 0 10px;
    color: var(--blog-ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.32;
}

.related-card:hover .related-card__title {
    color: var(--blog-green);
}

.related-card__meta {
    margin-top: auto;
    color: #8a8a86;
    font-size: 13px;
}

@media (max-width: 900px) {
    .blog-related__grid {
        grid-template-columns: 1fr;
    }

    .related-card {
        flex-direction: row;
    }

    .related-card__figure {
        flex: 0 0 40%;
        aspect-ratio: auto;
    }
}

/* ---------------------------------------------------------- pagination ---- */

.blog-pagination-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 40px 20px 110px;
}

.blog-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 999px;
    background: rgba(255, 255, 255, .6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 28px -14px rgba(9, 10, 12, .3), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.blog-pagination__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--blog-ink);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background .25s, color .25s;
}

.blog-pagination__btn:hover {
    background: rgba(250, 124, 145, .14);
    color: var(--blog-ink);
}

.blog-pagination__btn.is-disabled {
    color: rgba(57, 58, 49, .3);
    cursor: not-allowed;
    pointer-events: none;
}

.blog-pagination__numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.blog-pagination__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--blog-ink);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background .25s, color .25s, box-shadow .25s;
}

.blog-pagination__number:hover {
    background: rgba(250, 124, 145, .16);
    color: var(--blog-ink);
}

.blog-pagination__number--active {
    background: var(--blog-cta);
    color: var(--blog-ink);
    box-shadow: var(--blog-cta-shadow);
}

.blog-pagination__gap {
    padding: 0 2px;
    color: rgba(57, 58, 49, .35);
    font-weight: 700;
}

/* --------------------------------------------------------------- empty ---- */

.blog-empty {
    max-width: var(--blog-max);
    margin: 0 auto;
    padding: 60px 20px 120px;
    color: #7a7a7a;
    font-size: 18px;
}

/* ---------------------------------------------------------- responsive ---- */

@media (max-width: 1023px) {
    .blog-hero {
        min-height: 440px;
    }

    .blog-hero__container {
        padding: 40px 20px 36px;
    }

    .blog-hero__label {
        font-size: 26px;
        margin-bottom: 40px;
    }

    .blog-hero__title {
        font-size: 34px;
        max-width: none;
    }

    .blog-tags-filter {
        padding: 32px 20px 18px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .post-card,
    .blog-grid__item--wide .post-card {
        aspect-ratio: 16 / 10;
    }

    .post-card__content {
        padding: 22px;
    }

    .post-card__title,
    .blog-grid__item--wide .post-card__title {
        font-size: 22px;
        max-width: none;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 600px) {
    .blog-hero {
        min-height: 380px;
    }

    .blog-hero__title {
        font-size: 27px;
    }

    .blog-hero__label {
        font-size: 22px;
        margin-bottom: 28px;
    }

    .blog-tags-filter {
        padding: 26px 20px 16px;
    }

    .blog-tag-link {
        font-size: 14px;
        padding: .62rem 1rem;
    }

    .post-card,
    .blog-grid__item--wide .post-card {
        aspect-ratio: 4 / 3;
    }

    .post-card__title,
    .blog-grid__item--wide .post-card__title {
        font-size: 19px;
    }

    .post-card__arrow {
        width: 38px;
        height: 38px;
    }

    .blog-pagination {
        gap: 4px;
        padding: 8px 10px;
    }

    .blog-pagination__btn span {
        display: none;
    }

    .blog-pagination__btn {
        padding: 8px 12px;
    }
}

/*****************************************
* Gallery
*
* The "Gallery" section block from the hub, rendered by
* resources/views/sections/gallery.blade.php. Three images across, the rest
* reachable by scrolling the row sideways.
*
* The source of truth is resources/sass/custom/gallery.scss, which compiles
* into app.css. It lives here as well because the blog is the only place the
* block appears and blog.css is the stylesheet those pages already load —
* app.css cannot be rebuilt from this branch.
***/

/* Bulma's .image.is-4by3 sets the ratio on the figure and stretches the img
   to fill it, but never sets object-fit, so a portrait photograph in a
   landscape tile would be squashed rather than cropped. */
.gallery .image img {
    object-fit: cover;
    object-position: center;
}

.gallery .gallery-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;

    /* Proximity rather than mandatory: mandatory snapping cancels a
       programmatic smooth scroll outright, which leaves the arrows looking
       broken. Proximity still snaps a hand scroll to a tile. */
    scroll-snap-type: x proximity;

    /* Room for the focus ring, which the overflow would otherwise clip. */
    padding-bottom: 8px;

    scrollbar-width: none;
}

.gallery .gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery .gallery-item {
    /* Exactly three across: the full width less the two 16px gaps between
       them. Basis rather than width, and no shrinking — the tiles must keep
       their size for the row to scroll at all. */
    flex: 0 0 calc((100% - 32px) / 3);
    display: block;
    color: inherit;
    scroll-snap-align: start;
}

.gallery .gallery-caption {
    display: block;
    margin-top: 8px;
}

.gallery .gallery-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

@media screen and (max-width: 768px) {

    .gallery .gallery-item {
        /* Three tiles on a phone would be too small to make out. One and a
           bit instead, so the part-visible next image shows it scrolls. */
        flex: 0 0 82%;
    }
}

/* -------------------------------------------------------------- author ---- */

/*
 * The byline links to the author's team page when they are on the team. It
 * should read as the byline it replaced, not as a blue link, so it inherits
 * the colour it sits in and only marks itself on hover.
 */
a.blog-author {
    color: inherit;
    text-decoration: none;
}

a.blog-author:hover {
    text-decoration: underline;
}

/* ------------------------------------------------- author's article list -- */

/*
 * A team member's own articles (/es/equipo/{slug}).
 *
 * The slides are the page's existing .tm-slide (app.scss) so they match the
 * team rail beside them; only what an article needs and a face does not is set
 * here — a wider slide for a headline, and a 16:9 frame instead of a square.
 *
 * Doubled up on .tm-slide.tm-article throughout: app.css is linked after this
 * file, so a single class would lose to the .tm-slide rules it is overriding.
 */
.tm-slide.tm-article {
    flex-basis: 260px;
}

.tm-slide.tm-article .ph {
    aspect-ratio: 16 / 9;
}

/* A portrait is framed on the face; a photograph of a car is not. */
.tm-slide.tm-article img {
    object-position: center;
}

.tm-slide.tm-article .n {
    /* Two lines, so one long headline cannot set the height of the whole rail. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* The date reads as a date, not as the uppercase job title it borrows from. */
.tm-slide.tm-article .r {
    color: var(--blog-muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

@media screen and (max-width: 768px) {
    .tm-slide.tm-article {
        flex-basis: 220px;
    }
}
