/* Reading routes (Hipertexto_Seo, template category/route.phtml).
   Sizes in px: Magento sets html to 62.5%, so 1rem is 10px here.
   Colours from the theme tokens; brick and gold are the accents the theme uses
   on the buy buttons and section titles. Fraunces only for display type. */

.hpt-route {
    --hpt-brick: #a5351d;
    --hpt-gold: #d5a400;
    --hpt-gold-soft: #f3d36b;
    --hpt-blue: var(--promolibro-blue, #03437c);
    --hpt-deep: var(--promolibro-blue-deep, #022d53);
    --hpt-text: var(--promolibro-text, #1f2933);
    --hpt-soft: var(--promolibro-text-soft, #5f6b76);
    --hpt-line: var(--promolibro-line, #d7e1ea);
    --hpt-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --hpt-ease: cubic-bezier(.2, .7, .2, 1);
    margin: 0 0 40px;
    color: var(--hpt-text);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hpt-route-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    align-items: center;
    gap: 32px;
    min-height: 420px;
    margin: 0 0 56px;
    padding: 56px 56px 60px;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(77, 109, 141, .55) 0%, transparent 55%),
        linear-gradient(135deg, var(--hpt-deep) 0%, var(--hpt-blue) 62%, #0a5596 100%);
    color: #fff;
    isolation: isolate;
}

/* Fine paper grain over the gradient. */
.hpt-route-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 7px);
}

.hpt-route-hero__glow {
    position: absolute;
    z-index: -1;
    top: -30%;
    right: -10%;
    width: 60%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(213, 164, 0, .32) 0%, rgba(213, 164, 0, 0) 65%);
    animation: hpt-route-glow 14s ease-in-out infinite alternate;
}

@keyframes hpt-route-glow {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-8%, 12%) scale(1.15); }
}

.hpt-route-hero__eyebrow {
    margin: 0 0 14px;
    color: var(--hpt-gold-soft);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.hpt-route-hero__title {
    margin: 0 0 18px;
    color: #fff;
    font-family: var(--hpt-display);
    font-size: 54px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.04;
    text-wrap: balance;
}

.hpt-route-hero__lead {
    max-width: 56ch;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, .86);
    font-size: 17px;
    line-height: 1.65;
}

.hpt-route-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
}

.hpt-route-hero__facts li {
    margin: 0;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .9);
    font-size: 14px;
    backdrop-filter: blur(4px);
}

.hpt-route-hero__facts strong {
    color: #fff;
    font-weight: 800;
}

.hpt-route-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--hpt-gold);
    color: var(--hpt-deep);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .02em;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
    transition: transform .2s var(--hpt-ease), box-shadow .2s var(--hpt-ease), background-color .2s;
}

.hpt-route-hero__cta:hover,
.hpt-route-hero__cta:focus-visible {
    background: var(--hpt-gold-soft);
    color: var(--hpt-deep);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
}

.hpt-route-hero__cta-arrow {
    width: 9px;
    height: 9px;
    margin-top: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.hpt-route-hero__cta:hover .hpt-route-hero__cta-arrow {
    animation: hpt-route-nudge .8s ease-in-out infinite;
}

@keyframes hpt-route-nudge {
    50% { transform: translateY(4px) rotate(45deg); }
}

/* Fanned stack of the first covers. */
.hpt-route-hero__stack {
    --spread: 44px;
    --tilt: 8deg;
    position: relative;
    height: 330px;
}

.hpt-route-hero__book {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .38), 0 2px 0 rgba(255, 255, 255, .25) inset;
    transform:
        translate(-50%, -50%)
        translateX(calc((var(--i) - (var(--count) - 1) / 2) * var(--spread)))
        translateY(calc(var(--i) * -2px))
        rotate(calc((var(--i) - (var(--count) - 1) / 2) * var(--tilt)));
    transform-origin: 50% 120%;
    transition: transform .6s var(--hpt-ease);
    animation: hpt-route-fan 1.1s var(--hpt-ease) both;
    animation-delay: calc(var(--i) * 90ms + 150ms);
}

.hpt-route-hero__stack:hover {
    --spread: 62px;
    --tilt: 11deg;
}

@keyframes hpt-route-fan {
    from {
        opacity: 0;
        transform: translate(-50%, -40%) rotate(0deg);
    }
}

/* ── Timeline ─────────────────────────────────────────────────────────── */

.hpt-route-timeline {
    --line-x: 50%;
    position: relative;
    margin: 0 0 64px;
    padding: 8px 0 0;
}

.hpt-route-timeline__line {
    position: absolute;
    top: 0;
    bottom: 34px;
    left: var(--line-x);
    width: 3px;
    margin-left: -1.5px;
    background: var(--hpt-line);
}

.hpt-route-timeline__fill {
    display: block;
    width: 100%;
    height: calc(var(--progress, 0) * 100%);
    background: linear-gradient(180deg, var(--hpt-gold-soft), var(--hpt-gold));
    box-shadow: 0 0 12px rgba(213, 164, 0, .55);
}

.hpt-route-chapter {
    position: relative;
}

.hpt-route-chapter__head {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto 36px;
    padding: 22px 28px 20px;
    background: #fff;
    border: 1px solid var(--hpt-line);
    border-top: 3px solid var(--hpt-gold);
    text-align: center;
    box-shadow: var(--promolibro-shadow, 0 8px 24px rgba(3, 67, 124, .06));
}

.hpt-route-chapter + .hpt-route-chapter .hpt-route-chapter__head {
    margin-top: 24px;
}

.hpt-route-chapter__title {
    margin: 0 0 6px;
    color: var(--hpt-blue);
    font-family: var(--hpt-display);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.hpt-route-chapter__text {
    margin: 0;
    color: var(--hpt-soft);
    font-size: 15px;
    line-height: 1.55;
}

.hpt-route-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hpt-route-step {
    position: relative;
    display: flex;
    margin: 0 0 40px;
}

.hpt-route-step--even {
    justify-content: flex-end;
}

/* Number on the line. */
.hpt-route-step__node {
    position: absolute;
    z-index: 2;
    top: 34px;
    left: var(--line-x);
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-left: -23px;
    border: 3px solid var(--hpt-line);
    border-radius: 50%;
    background: #fff;
    color: var(--hpt-blue);
    font-family: var(--hpt-display);
    font-size: 19px;
    font-weight: 700;
    transition: background-color .35s, border-color .35s, color .35s, transform .35s var(--hpt-ease), box-shadow .35s;
}

.hpt-route-step.is-reached .hpt-route-step__node {
    border-color: var(--hpt-gold);
    background: var(--hpt-gold);
    color: var(--hpt-deep);
    box-shadow: 0 0 0 6px rgba(213, 164, 0, .18);
    transform: scale(1.06);
}

.hpt-route-step__card {
    position: relative;
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 22px;
    width: calc(50% - 52px);
    padding: 20px 22px 20px 20px;
    background: #fff;
    border: 1px solid var(--hpt-line);
    box-shadow: var(--promolibro-shadow, 0 8px 24px rgba(3, 67, 124, .06));
    transition: transform .3s var(--hpt-ease), box-shadow .3s var(--hpt-ease), border-color .3s;
}

/* Little arrow from the card to the line. */
.hpt-route-step__card::after {
    content: "";
    position: absolute;
    top: 48px;
    right: -8px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-top: 1px solid var(--hpt-line);
    border-right: 1px solid var(--hpt-line);
    transform: rotate(45deg);
}

.hpt-route-step--even .hpt-route-step__card::after {
    right: auto;
    left: -8px;
    transform: rotate(-135deg);
}

.hpt-route-step__card:hover {
    border-color: var(--promolibro-line-strong, #b8c9d8);
    box-shadow: 0 18px 40px rgba(3, 67, 124, .14);
    transform: translateY(-4px);
}

.hpt-route-step__cover {
    display: block;
    align-self: start;
    perspective: 600px;
}

.hpt-route-step__cover img,
.hpt-route-step__nocover {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: var(--promolibro-subtle, #f6f9fc);
    box-shadow: 0 10px 22px rgba(2, 45, 83, .22);
    transform-origin: 0 50%;
    transition: transform .45s var(--hpt-ease), box-shadow .45s var(--hpt-ease);
}

.hpt-route-step__nocover {
    display: grid;
    place-items: center;
    padding: 10px;
    color: var(--hpt-blue);
    font-family: var(--hpt-display);
    font-size: 14px;
    text-align: center;
}

.hpt-route-step__card:hover .hpt-route-step__cover img {
    box-shadow: 14px 16px 28px rgba(2, 45, 83, .28);
    transform: rotateY(-14deg) translateX(-2px);
}

.hpt-route-step__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
}

.hpt-route-step__num {
    color: var(--hpt-brick);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.hpt-route-step__year {
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(213, 164, 0, .14);
    color: #7a5d00;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
}

.hpt-route .hpt-route-step__title,
.hpt-route .hpt-route-step__title a,
.hpt-route .hpt-route-chapter__title,
.hpt-route .hpt-route-about__title,
.hpt-route .hpt-route-more__title,
.hpt-route .hpt-route-more__name,
.hpt-route .hpt-route-hero__title {
    font-family: var(--hpt-display);
}

.hpt-route-step__title {
    margin: 0 0 4px;
    font-family: var(--hpt-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.hpt-route-step__title a {
    color: var(--hpt-deep);
    text-decoration: none;
}

.hpt-route-step__title a:hover,
.hpt-route-step__title a:focus-visible {
    color: var(--hpt-blue);
    text-decoration: underline;
    text-decoration-color: var(--hpt-gold);
    text-underline-offset: 3px;
}

.hpt-route-step__author {
    margin: 0 0 10px;
    color: var(--hpt-soft);
    font-size: 14px;
    font-style: italic;
}

.hpt-route-step__note {
    margin: 0 0 16px;
    color: var(--hpt-text);
    font-size: 15px;
    line-height: 1.6;
}

.hpt-route-step__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px dashed var(--hpt-line);
}

.hpt-route-step__price {
    color: var(--hpt-blue);
    font-size: 18px;
    font-weight: 800;
}

.hpt-route-step__cta {
    display: inline-block;
    padding: 9px 18px;
    background: var(--hpt-brick);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color .2s, transform .2s var(--hpt-ease);
}

.hpt-route-step__cta:hover,
.hpt-route-step__cta:focus-visible {
    background: #8a2a15;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.hpt-route-step__cta--ask {
    background: var(--hpt-soft);
}

.hpt-route-timeline__end {
    position: relative;
    z-index: 1;
    margin: 8px 0 0;
    text-align: center;
}

.hpt-route-timeline__end span {
    display: inline-block;
    padding: 8px 18px;
    border: 2px solid var(--hpt-gold);
    border-radius: 999px;
    background: #fff;
    color: var(--hpt-deep);
    font-family: var(--hpt-display);
    font-size: 16px;
    font-style: italic;
}

/* Reveal: only once the script has confirmed it can show them again. */
.hpt-route.is-animated .hpt-route-step .hpt-route-step__card {
    opacity: 0;
    transform: translateX(-36px);
    transition: opacity .7s var(--hpt-ease), transform .7s var(--hpt-ease), box-shadow .3s, border-color .3s;
}

.hpt-route.is-animated .hpt-route-step--even .hpt-route-step__card {
    transform: translateX(36px);
}

.hpt-route.is-animated .hpt-route-step .hpt-route-step__node {
    opacity: 0;
    transform: scale(.4);
}

.hpt-route.is-animated .hpt-route-step.is-in .hpt-route-step__card {
    opacity: 1;
    transform: none;
}

.hpt-route.is-animated .hpt-route-step.is-in .hpt-route-step__card:hover {
    transform: translateY(-4px);
}

.hpt-route.is-animated .hpt-route-step.is-in .hpt-route-step__node {
    opacity: 1;
    transform: scale(1);
    transition-delay: .15s;
}

.hpt-route.is-animated .hpt-route-step.is-in.is-reached .hpt-route-step__node {
    transform: scale(1.06);
}

.hpt-route.is-animated .hpt-route-chapter__head {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s var(--hpt-ease), transform .7s var(--hpt-ease);
}

.hpt-route.is-animated .hpt-route-chapter__head.is-in {
    opacity: 1;
    transform: none;
}

/* ── About + FAQ ─────────────────────────────────────────────────────── */

.hpt-route-about {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 48px;
    margin: 0 0 48px;
    padding: 44px 48px;
    background: var(--promolibro-subtle, #f6f9fc);
    border: 1px solid var(--hpt-line);
}

.hpt-route-about__eyebrow {
    margin: 0 0 8px;
    color: var(--hpt-brick);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.hpt-route-about__faq .hpt-route-about__eyebrow {
    margin-bottom: 18px;
}

.hpt-route-about__title {
    margin: 0 0 18px;
    color: var(--hpt-blue);
    font-family: var(--hpt-display);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
}

.hpt-route-about__body {
    font-size: 16px;
    line-height: 1.75;
}

.hpt-route-about__body p {
    margin: 0 0 14px;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.hpt-route-about__body a {
    color: var(--hpt-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Other routes ────────────────────────────────────────────────────── */

.hpt-route-more__title {
    margin: 0 0 18px;
    color: var(--hpt-blue);
    font-family: var(--hpt-display);
    font-size: 28px;
    font-weight: 700;
}

.hpt-route-more__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hpt-route-more__grid li {
    margin: 0;
}

.hpt-route-more__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    min-height: 160px;
    padding: 22px 22px 20px;
    overflow: hidden;
    background: linear-gradient(150deg, var(--hpt-deep), var(--hpt-blue));
    color: #fff;
    text-decoration: none;
    transition: transform .3s var(--hpt-ease), box-shadow .3s var(--hpt-ease);
}

.hpt-route-more__card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(213, 164, 0, .35), transparent 70%);
    transition: transform .5s var(--hpt-ease);
}

.hpt-route-more__card:hover,
.hpt-route-more__card:focus-visible {
    color: #fff;
    text-decoration: none;
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(2, 45, 83, .3);
}

.hpt-route-more__card:hover::after {
    transform: scale(1.6);
}

.hpt-route-more__name {
    font-family: var(--hpt-display);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
}

.hpt-route-more__teaser {
    color: rgba(255, 255, 255, .78);
    font-size: 14px;
    line-height: 1.5;
}

.hpt-route-more__count {
    margin-top: auto;
    color: var(--hpt-gold-soft);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ── Floating step counter ───────────────────────────────────────────── */

.hpt-route-progress {
    position: fixed;
    z-index: 60;
    left: 50%;
    bottom: 22px;
    margin: 0;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(2, 45, 83, .92);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .25);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 16px);
    transition: opacity .3s, transform .3s var(--hpt-ease);
    backdrop-filter: blur(6px);
}

.hpt-route-progress strong {
    color: var(--hpt-gold-soft);
}

.hpt-route-progress.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 1023px) {
    .hpt-route-hero {
        grid-template-columns: 1fr;
        padding: 40px 32px 44px;
    }

    .hpt-route-hero__stack {
        height: 260px;
        order: -1;
    }

    .hpt-route-hero__book {
        width: 120px;
    }

    .hpt-route-hero__title {
        font-size: 44px;
    }

    .hpt-route-about {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 36px 32px;
    }
}

@media (max-width: 899px) {
    .hpt-route-timeline {
        --line-x: 22px;
    }

    .hpt-route-step,
    .hpt-route-step--even {
        justify-content: flex-start;
    }

    .hpt-route-step__card {
        width: auto;
        flex: 1;
        margin-left: 60px;
    }

    .hpt-route-step__card::after,
    .hpt-route-step--even .hpt-route-step__card::after {
        right: auto;
        left: -8px;
        transform: rotate(-135deg);
    }

    .hpt-route.is-animated .hpt-route-step .hpt-route-step__card,
    .hpt-route.is-animated .hpt-route-step--even .hpt-route-step__card {
        transform: translateY(26px);
    }

    .hpt-route-chapter__head {
        margin-left: 60px;
        text-align: left;
    }
}

@media (max-width: 767px) {
    .hpt-route-hero {
        min-height: 0;
        margin-bottom: 36px;
        padding: 30px 20px 34px;
    }

    .hpt-route-hero__stack {
        height: 210px;
        --spread: 34px;
    }

    .hpt-route-hero__book {
        width: 96px;
    }

    .hpt-route-hero__title {
        font-size: 34px;
    }

    .hpt-route-hero__lead {
        font-size: 15px;
    }

    .hpt-route-step__node {
        top: 22px;
        width: 38px;
        height: 38px;
        margin-left: -19px;
        font-size: 16px;
    }

    .hpt-route-step__card {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 14px;
        margin-left: 50px;
        padding: 16px 14px 16px 14px;
    }

    .hpt-route-step__card::after {
        top: 32px;
    }

    .hpt-route-step__title {
        font-size: 18px;
    }

    .hpt-route-step__note {
        font-size: 14px;
    }

    .hpt-route-chapter__head {
        margin-left: 50px;
        padding: 18px 18px 16px;
    }

    .hpt-route-chapter__title {
        font-size: 22px;
    }

    .hpt-route-about {
        padding: 28px 20px;
    }

    .hpt-route-about__title,
    .hpt-route-more__title {
        font-size: 24px;
    }

    .hpt-route-progress {
        bottom: 16px;
    }
}

/* ── Hub: /rutas-de-lectura.html ─────────────────────────────────────── */

.hpt-route .hpt-route-hero__eyebrow a {
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(243, 211, 107, .5);
}

.hpt-route-hero__eyebrow a:hover,
.hpt-route-hero__eyebrow a:focus-visible {
    color: #fff;
    text-decoration: none;
    border-bottom-color: #fff;
}

.hpt-route-more__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 20px;
    margin: 0 0 18px;
}

.hpt-route-more__head .hpt-route-more__title {
    margin: 0;
}

.hpt-route-more__all {
    color: var(--hpt-blue);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .04em;
    text-decoration: underline;
    text-decoration-color: var(--hpt-gold);
    text-underline-offset: 4px;
}

.hpt-hub-how {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 56px;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.hpt-hub-how__item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 22px 22px 22px 84px;
    background: #fff;
    border: 1px solid var(--hpt-line);
    box-shadow: var(--promolibro-shadow, 0 8px 24px rgba(3, 67, 124, .06));
    color: var(--hpt-soft);
    font-size: 15px;
    line-height: 1.5;
}

.hpt-hub-how__item strong {
    color: var(--hpt-deep);
    font-size: 16px;
}

.hpt-hub-how__num {
    position: absolute;
    top: 50%;
    left: 22px;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-top: -23px;
    border-radius: 50%;
    background: var(--hpt-gold);
    color: var(--hpt-deep);
    font-family: var(--hpt-display);
    font-size: 22px;
    font-weight: 700;
}

.hpt-hub-routes {
    display: grid;
    gap: 28px;
    margin: 0 0 64px;
    padding: 0;
    list-style: none;
}

.hpt-hub-route {
    margin: 0;
}

.hpt-hub-route__link {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 40px;
    min-height: 300px;
    padding: 36px 48px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--hpt-line);
    box-shadow: var(--promolibro-shadow, 0 8px 24px rgba(3, 67, 124, .06));
    color: var(--hpt-text);
    text-decoration: none;
    isolation: isolate;
    transition: transform .35s var(--hpt-ease), box-shadow .35s var(--hpt-ease), border-color .35s;
}

/* Blue panel behind the covers. */
.hpt-hub-route__link::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40%;
    background:
        radial-gradient(90% 80% at 50% 100%, rgba(213, 164, 0, .25), transparent 60%),
        linear-gradient(150deg, var(--hpt-deep), var(--hpt-blue));
    transition: width .5s var(--hpt-ease);
}

.hpt-hub-route--flip .hpt-hub-route__link {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
}

.hpt-hub-route--flip .hpt-hub-route__link::before {
    left: auto;
    right: 0;
}

.hpt-hub-route--flip .hpt-hub-route__fan {
    order: 2;
}

.hpt-hub-route__link:hover,
.hpt-hub-route__link:focus-visible {
    border-color: var(--promolibro-line-strong, #b8c9d8);
    box-shadow: 0 22px 48px rgba(3, 67, 124, .16);
    color: var(--hpt-text);
    text-decoration: none;
    transform: translateY(-4px);
}

.hpt-hub-route__link:hover::before {
    width: 44%;
}

.hpt-hub-route__num {
    position: absolute;
    z-index: -1;
    right: 28px;
    bottom: -34px;
    color: transparent;
    font-family: var(--hpt-display);
    font-size: 180px;
    font-weight: 700;
    line-height: 1;
    -webkit-text-stroke: 2px rgba(3, 67, 124, .1);
    pointer-events: none;
}

.hpt-hub-route--flip .hpt-hub-route__num {
    right: auto;
    left: 28px;
}

.hpt-hub-route__fan {
    --spread: 40px;
    --tilt: 7deg;
    position: relative;
    display: block;
    height: 230px;
}

.hpt-hub-route__fan img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 118px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
    transform:
        translate(-50%, -50%)
        translateX(calc((var(--i) - (var(--count) - 1) / 2) * var(--spread)))
        rotate(calc((var(--i) - (var(--count) - 1) / 2) * var(--tilt)));
    transform-origin: 50% 120%;
    transition: transform .55s var(--hpt-ease);
}

.hpt-hub-route__link:hover .hpt-hub-route__fan {
    --spread: 58px;
    --tilt: 11deg;
}

.hpt-hub-route__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hpt-hub-route__eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--hpt-brick);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.hpt-route .hpt-hub-route__name {
    margin: 0;
    color: var(--hpt-deep);
    font-family: var(--hpt-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.12;
    transition: color .25s;
}

.hpt-hub-route__link:hover .hpt-hub-route__name {
    color: var(--hpt-blue);
}

.hpt-hub-route__intro {
    max-width: 60ch;
    color: var(--hpt-soft);
    font-size: 16px;
    line-height: 1.65;
}

.hpt-hub-route__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    margin-top: 8px;
}

.hpt-hub-route__count {
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(3, 67, 124, .08);
    color: var(--hpt-blue);
    font-size: 13px;
    font-weight: 800;
}

.hpt-hub-route__cta {
    display: inline-flex;
    gap: 8px;
    padding: 11px 20px;
    background: var(--hpt-brick);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: background-color .2s, gap .25s var(--hpt-ease);
}

.hpt-hub-route__link:hover .hpt-hub-route__cta {
    gap: 14px;
    background: #8a2a15;
}

/* Reveal. */
.hpt-hub.is-animated .hpt-hub-route,
.hpt-hub.is-animated .hpt-hub-how__item {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .8s var(--hpt-ease), transform .8s var(--hpt-ease);
}

.hpt-hub.is-animated .hpt-hub-how__item:nth-child(2) { transition-delay: .1s; }
.hpt-hub.is-animated .hpt-hub-how__item:nth-child(3) { transition-delay: .2s; }

.hpt-hub.is-animated .hpt-hub-route.is-in,
.hpt-hub.is-animated .hpt-hub-how__item.is-in {
    opacity: 1;
    transform: none;
}

.hpt-hub.is-animated .hpt-hub-route .hpt-hub-route__fan img {
    transform: translate(-50%, -50%);
}

.hpt-hub.is-animated .hpt-hub-route.is-in .hpt-hub-route__fan img {
    transform:
        translate(-50%, -50%)
        translateX(calc((var(--i) - (var(--count) - 1) / 2) * var(--spread)))
        rotate(calc((var(--i) - (var(--count) - 1) / 2) * var(--tilt)));
    transition-delay: calc(.25s + var(--i) * 70ms);
}

.hpt-hub.is-animated .hpt-hub-route.is-in .hpt-hub-route__link:hover .hpt-hub-route__fan img {
    transition-delay: 0s;
}

@media (max-width: 1023px) {
    .hpt-hub-how {
        grid-template-columns: 1fr;
    }

    .hpt-hub-route__link,
    .hpt-hub-route--flip .hpt-hub-route__link {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 0 0 28px;
    }

    .hpt-hub-route__link::before,
    .hpt-hub-route--flip .hpt-hub-route__link::before {
        right: 0;
        left: 0;
        bottom: auto;
        width: auto;
        height: 250px;
    }

    .hpt-hub-route__link:hover::before {
        width: auto;
    }

    .hpt-hub-route--flip .hpt-hub-route__fan {
        order: 0;
    }

    .hpt-hub-route__fan {
        height: 250px;
    }

    .hpt-hub-route__body {
        padding: 0 28px;
    }

    .hpt-hub-route__num,
    .hpt-hub-route--flip .hpt-hub-route__num {
        top: 180px;
        right: 16px;
        left: auto;
        bottom: auto;
        font-size: 110px;
        -webkit-text-stroke: 2px rgba(255, 255, 255, .18);
    }
}

@media (max-width: 767px) {
    .hpt-hub-route__fan img {
        width: 96px;
    }

    .hpt-hub-route__body {
        padding: 0 20px;
    }

    .hpt-route .hpt-hub-route__name {
        font-size: 26px;
    }

    .hpt-hub-route__intro {
        font-size: 15px;
    }
}

/* ── Shelves: collections shown series by series ("style": "shelves") ── */

.hpt-shelves {
    display: grid;
    gap: 44px;
    margin: 0 0 64px;
}

.hpt-shelf {
    position: relative;
    padding: 30px 32px 34px;
    background: #fff;
    border: 1px solid var(--hpt-line);
    box-shadow: var(--promolibro-shadow, 0 8px 24px rgba(3, 67, 124, .06));
}

/* The shelf board under the books. */
.hpt-shelf::after {
    content: "";
    position: absolute;
    right: 32px;
    bottom: 18px;
    left: 32px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(180deg, #e6edf3, #cfdbe6);
    box-shadow: 0 6px 10px rgba(3, 67, 124, .12);
}

.hpt-shelf__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 24px;
    margin: 0 0 26px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--hpt-line);
}

.hpt-route .hpt-shelf__title {
    position: relative;
    margin: 0 0 6px;
    padding-left: 18px;
    color: var(--hpt-deep);
    font-family: var(--hpt-display);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
}

.hpt-shelf__title::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 5px;
    border-radius: 3px;
    background: var(--hpt-gold);
}

.hpt-shelf__text {
    max-width: 70ch;
    margin: 0;
    padding-left: 18px;
    color: var(--hpt-soft);
    font-size: 15px;
    line-height: 1.6;
}

.hpt-shelf__count {
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(3, 67, 124, .08);
    color: var(--hpt-blue);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.hpt-shelf__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 30px 22px;
    margin: 0;
    padding: 0 0 26px;
    list-style: none;
}

.hpt-shelf__book {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.hpt-shelf__cover {
    display: block;
    margin: 0 0 14px;
    perspective: 700px;
}

.hpt-shelf__cover img,
.hpt-shelf__cover .hpt-route-step__nocover {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    background: var(--promolibro-subtle, #f6f9fc);
    box-shadow: 0 12px 24px rgba(2, 45, 83, .2);
    transform-origin: 0 50%;
    transition: transform .45s var(--hpt-ease), box-shadow .45s var(--hpt-ease);
}

.hpt-shelf__book:hover .hpt-shelf__cover img {
    box-shadow: 16px 18px 30px rgba(2, 45, 83, .28);
    transform: translateY(-6px) rotateY(-16deg);
}

.hpt-route .hpt-shelf__name {
    margin: 0 0 6px;
    font-family: var(--hpt-display);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}

.hpt-route .hpt-shelf__name a {
    font-family: inherit;
    color: var(--hpt-deep);
    text-decoration: none;
}

.hpt-shelf__name a:hover,
.hpt-shelf__name a:focus-visible {
    color: var(--hpt-blue);
    text-decoration: underline;
    text-decoration-color: var(--hpt-gold);
    text-underline-offset: 3px;
}

.hpt-shelf__note {
    margin: 0 0 10px;
    color: var(--hpt-soft);
    font-size: 13px;
    line-height: 1.5;
}

.hpt-shelf__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.hpt-shelf__foot .hpt-route-step__price {
    font-size: 16px;
}

.hpt-shelf__foot .hpt-route-step__cta {
    padding: 7px 13px;
    font-size: 12px;
}

.hpt-route.is-animated .hpt-shelf__head,
.hpt-route.is-animated .hpt-shelf__book {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s var(--hpt-ease), transform .7s var(--hpt-ease);
}

.hpt-route.is-animated .hpt-shelf__book:nth-child(5n+2) { transition-delay: .07s; }
.hpt-route.is-animated .hpt-shelf__book:nth-child(5n+3) { transition-delay: .14s; }
.hpt-route.is-animated .hpt-shelf__book:nth-child(5n+4) { transition-delay: .21s; }
.hpt-route.is-animated .hpt-shelf__book:nth-child(5n+5) { transition-delay: .28s; }

.hpt-route.is-animated .hpt-shelf__head.is-in,
.hpt-route.is-animated .hpt-shelf__book.is-in {
    opacity: 1;
    transform: none;
}

@media (max-width: 767px) {
    .hpt-shelf {
        padding: 22px 16px 28px;
    }

    .hpt-shelf::after {
        right: 16px;
        left: 16px;
    }

    .hpt-route .hpt-shelf__title {
        font-size: 24px;
    }

    .hpt-shelf__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 14px;
    }

    .hpt-shelf__foot .hpt-route-step__cta {
        width: 100%;
        text-align: center;
    }
}

/* ── Authors: /autores.html and /autores/{slug}.html ─────────────────── */

.hpt-author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0 0 26px;
    list-style: none;
}

.hpt-author-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--hpt-line);
    color: var(--hpt-text);
    text-decoration: none;
    transition: transform .3s var(--hpt-ease), box-shadow .3s var(--hpt-ease), border-color .3s;
}

.hpt-author-card:hover,
.hpt-author-card:focus-visible {
    border-color: var(--promolibro-line-strong, #b8c9d8);
    box-shadow: 0 16px 34px rgba(3, 67, 124, .16);
    color: var(--hpt-text);
    text-decoration: none;
    transform: translateY(-4px);
}

.hpt-author-card .hpt-author-card__fan {
    --spread: 30px;
    --tilt: 8deg;
    height: 170px;
    background:
        radial-gradient(90% 80% at 50% 100%, rgba(213, 164, 0, .25), transparent 60%),
        linear-gradient(150deg, var(--hpt-deep), var(--hpt-blue));
}

.hpt-author-card .hpt-author-card__fan img {
    width: 82px;
}

.hpt-author-card:hover .hpt-author-card__fan {
    --spread: 44px;
    --tilt: 12deg;
}

.hpt-author-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px 18px;
}

.hpt-author-card__name {
    color: var(--hpt-deep);
    font-family: var(--hpt-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hpt-author-card__years {
    color: var(--hpt-soft);
    font-size: 13px;
}

.hpt-author-card__count {
    margin-top: 6px;
    color: var(--hpt-brick);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.hpt-author-route {
    position: relative;
    display: grid;
    gap: 6px;
    margin: -24px 0 44px;
    padding: 24px 30px;
    overflow: hidden;
    background: linear-gradient(120deg, #fff8e1, #fff 60%);
    border: 1px solid #f0dc9a;
    border-left: 5px solid var(--hpt-gold);
    color: var(--hpt-text);
    text-decoration: none;
    transition: transform .3s var(--hpt-ease), box-shadow .3s var(--hpt-ease);
}

.hpt-author-route:hover,
.hpt-author-route:focus-visible {
    color: var(--hpt-text);
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(122, 93, 0, .15);
}

.hpt-author-route__eyebrow {
    color: var(--hpt-brick);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.hpt-author-route__name {
    color: var(--hpt-deep);
    font-family: var(--hpt-display);
    font-size: 24px;
    font-weight: 700;
}

.hpt-author-route__teaser {
    color: var(--hpt-soft);
    font-size: 15px;
}

.hpt-author-route__cta {
    color: var(--hpt-blue);
    font-size: 14px;
    font-weight: 800;
}

.hpt-route.is-animated .hpt-author-route {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .7s var(--hpt-ease), transform .7s var(--hpt-ease);
}

.hpt-route.is-animated .hpt-author-route.is-in {
    opacity: 1;
    transform: none;
}

@media (max-width: 767px) {
    .hpt-author-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .hpt-author-card .hpt-author-card__fan {
        height: 130px;
        --spread: 20px;
    }

    .hpt-author-card .hpt-author-card__fan img {
        width: 62px;
    }

    .hpt-author-card__name {
        font-size: 17px;
    }

    .hpt-author-route {
        margin-top: -12px;
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hpt-route *,
    .hpt-route *::before,
    .hpt-route *::after {
        animation: none !important;
        transition: none !important;
    }
}
