.hb-recent {
    position: relative;
    padding: 92px 0 106px;
    background:
        radial-gradient(circle at 8% 0%, rgba(40, 113, 63, 0.07), transparent 32%),
        linear-gradient(180deg, #fbfcfb 0%, #f4f7f4 100%);
    overflow: hidden;
}

.hb-recent[hidden] {
    display: none !important;
}

.hb-recent__inner {
    width: min(1360px, calc(100vw - 56px));
    margin: 0 auto;
}

.hb-recent__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 34px;
}

.hb-recent__title {
    margin: 0;
    color: #1f2b35;
    font-size: clamp(2.1rem, 3.6vw, 4rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.hb-recent__text {
    margin: 0;
    max-width: 420px;
    color: #5d6b7d;
    font-size: 1.05rem;
    line-height: 1.55;
}

.hb-recent__wrap {
    position: relative;
    min-width: 0;
    margin-inline: calc((100vw - min(1360px, calc(100vw - 56px))) / -2);
    overflow: hidden;
    contain: layout paint;
    padding-left: calc((100vw - min(1360px, calc(100vw - 56px))) / 2);
}

.hb-recent__wrap::before,
.hb-recent__wrap::after {
    content: "";
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    pointer-events: none;
}

.hb-recent__wrap::before {
    left: 0;
    width: clamp(14px, 2vw, 28px);
    background: linear-gradient(90deg, rgba(247, 248, 245, 0.56), rgba(247, 248, 245, 0));
}

.hb-recent__wrap::after {
    right: 0;
    width: clamp(82px, 8vw, 126px);
    background: linear-gradient(90deg, rgba(247, 248, 245, 0), rgba(247, 248, 245, 0.9) 88%);
}

.hb-recent__rail {
    display: flex;
    align-items: center;
    gap: clamp(88px, 7vw, 116px);
    overflow-x: auto;
    scroll-snap-type: none;
    scroll-padding-left: clamp(210px, 15vw, 260px);
    padding: 46px clamp(110px, 9vw, 150px) 78px clamp(96px, 8vw, 130px);
    scrollbar-width: none;
}

.hb-recent__rail::-webkit-scrollbar {
    display: none;
}

.hb-recent__rail.is-programmatic-scroll {
    scroll-snap-type: none;
}

.q-glass-rail.is-programmatic-scroll,
.stories-track.is-programmatic-scroll {
    scroll-snap-type: none !important;
}

.hb-recent__rail::after {
    content: "";
    flex: 0 0 clamp(620px, 56vw, 900px);
    min-height: 1px;
}

.hb-recent-card {
    position: relative;
    display: block;
    flex: 0 0 clamp(390px, 30vw, 430px);
    overflow: hidden;
    border-radius: 30px;
    background: #fff;
    border: 1px solid rgba(228, 233, 237, 0.9);
    box-shadow: 0 16px 45px rgba(17, 31, 43, 0.08);
    color: inherit;
    cursor: pointer;
    scroll-snap-align: none;
    transform-origin: left center;
    transition:
        transform .46s cubic-bezier(.2, .72, .18, 1),
        box-shadow .52s cubic-bezier(.2, .72, .18, 1),
        border-color .52s cubic-bezier(.2, .72, .18, 1),
        opacity .52s cubic-bezier(.2, .72, .18, 1);
}

.hb-recent-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.26) 42%, transparent 64%);
    transform: translateX(-130%);
    transition: transform .72s ease;
}

.hb-recent-card:hover::before {
    transform: translateX(130%);
}

.hb-recent-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 34px 90px rgba(17, 31, 43, 0.16);
    border-color: rgba(40, 113, 63, 0.35);
}

.hb-recent-card.is-active {
    transform: scale(1.13);
    box-shadow: 0 34px 90px rgba(17, 31, 43, 0.18);
    border-color: rgba(40, 113, 63, 0.24);
    opacity: 1;
    z-index: 4;
}

.hb-recent-card.is-active:hover {
    transform: scale(1.13) translateY(-4px);
}

.hb-recent-card:not(.is-active) {
    opacity: 0.88;
}

.hb-recent-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    background: #dfe5e7;
    aspect-ratio: 16 / 9;
}

.hb-recent-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(8, 16, 20, 0) 52%, rgba(8, 16, 20, 0.18) 74%, rgba(8, 16, 20, 0.48) 100%),
        radial-gradient(circle at 12% 0%, rgba(255,255,255,0.16), transparent 30%);
    opacity: 0.82;
    transition: opacity .35s ease;
}

.hb-recent-card:hover .hb-recent-card__media::after {
    opacity: 0.95;
}

.hb-recent-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .7s ease, filter .7s ease;
}

.hb-recent-card:hover .hb-recent-card__media img {
    transform: scale(1.045);
    filter: saturate(1.08) contrast(1.04);
}

.hb-recent-card__likes {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 5;
    border-radius: 999px;
    background: rgba(22, 31, 37, 0.58);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 8px 13px;
    font-size: 0.9rem;
    font-weight: 900;
}

.hb-recent-card__likes::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 6px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.8 8.2c0 5.3-8.8 11.1-8.8 11.1S3.2 13.5 3.2 8.2a5 5 0 0 1 8.8-3.1 5 5 0 0 1 8.8 3.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.8 8.2c0 5.3-8.8 11.1-8.8 11.1S3.2 13.5 3.2 8.2a5 5 0 0 1 8.8-3.1 5 5 0 0 1 8.8 3.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hb-recent-card__actions {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hb-recent-card__btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: linear-gradient(180deg, rgba(226, 236, 243, 0.56) 0%, rgba(212, 224, 232, 0.44) 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 7px 16px rgba(12, 26, 18, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.46);
    backdrop-filter: blur(14px) saturate(1.22);
    -webkit-backdrop-filter: blur(14px) saturate(1.22);
    cursor: pointer;
    transition: .2s ease;
    position: relative;
}

.hb-recent-card__btn svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

.hb-recent-card__btn svg path {
    stroke-width: 4;
}

.hb-recent-card__btn[data-action="favorite"] svg path {
    stroke-width: 3;
}

.hb-recent-card__btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(250, 252, 254, 0.72) 0%, rgba(240, 245, 248, 0.58) 100%);
    color: #28713f;
    border-color: rgba(255, 255, 255, 0.82);
}

.hb-recent-card__btn.is-active {
    background: linear-gradient(180deg, rgba(248, 251, 253, 0.42) 0%, rgba(236, 242, 246, 0.3) 100%);
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 7px 16px rgba(12, 26, 18, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.hb-recent-card__btn[data-action="favorite"].is-active {
    color: #d9253a;
    filter: saturate(1.2) contrast(1.08);
}

.hb-recent-card__btn[data-action="compare"].is-active {
    color: #004c4b;
    filter: saturate(1.15) contrast(1.1);
}

.hb-recent-card__info {
    display: block;
    padding: 30px 36px 34px;
}

.hb-recent-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 0 2px;
}

.hb-recent-card__name {
    color: #1f2b35;
    font-size: 1.32rem;
    font-weight: 900;
    line-height: 1.1;
}

.hb-recent-card__price {
    color: #17652d;
    font-size: 1rem;
    font-weight: 900;
    white-space: nowrap;
    padding-left: 22px;
}

.hb-recent-card__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.hb-recent-card__meta span {
    min-width: 0;
    min-height: 66px;
    border-radius: 14px;
    background: #f8faf9;
    border: 1px solid #e8edf0;
    padding: 15px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #667388;
    font-size: 0.78rem;
    font-weight: 700;
}

.hb-recent-card__meta strong {
    color: #0d2438;
    font-size: 1rem;
    line-height: 1;
}

.hb-recent__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 8px 0 0;
}

.hb-recent__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hb-recent__dot {
    position: relative;
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #dce1e6;
    overflow: hidden;
    cursor: pointer;
    transition: width .28s ease, background .28s ease, transform .28s ease;
}

.hb-recent__dot::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #8fb89b, #28713f);
    transform: scaleX(var(--progress, 0));
    transform-origin: left center;
    transition: transform .12s linear;
}

.hb-recent__dot:hover {
    transform: scale(1.14);
    background: #b8c6be;
}

.hb-recent__dot.is-active {
    width: 34px;
    background: #d9dee5;
}

.hb-recent__toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #142637;
    background: #f0f2f5;
    box-shadow: inset 0 0 0 1px rgba(228, 233, 237, 0.78);
    cursor: pointer;
    transition: transform .24s ease, background .24s ease, color .24s ease;
}

.hb-recent__toggle:hover {
    transform: translateY(-1px);
    color: #28713f;
    background: #e7eee9;
}

.hb-recent__toggle svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.hb-inline-carousel-nav {
    position: relative;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.q-glass-demo__head .hb-inline-carousel-nav {
    justify-self: end;
    align-self: center;
}

.section--stories > .container .hb-inline-carousel-nav {
    width: 100%;
    margin: 12px 0 0;
    display: flex;
}

.hb-recent__head .hb-inline-carousel-nav {
    flex: 0 0 auto;
}

.hb-inline-carousel-nav[hidden] {
    display: none !important;
}

.hb-inline-carousel-nav__btn {
    width: 62px;
    height: 62px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(205, 216, 224, 0.86);
    background: rgba(255, 255, 255, 0.92);
    color: #142637;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(17, 31, 43, 0.08);
    transition: transform .22s ease, color .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease, opacity .22s ease;
    touch-action: manipulation;
}

.hb-inline-carousel-nav__btn:hover:not(:disabled) {
    transform: translateY(-2px);
    color: #fff;
    border-color: rgba(40, 113, 63, 0.58);
    background: #28713f;
    box-shadow: 0 20px 42px rgba(40, 113, 63, 0.22);
}

.hb-inline-carousel-nav__btn:focus-visible {
    outline: 3px solid rgba(40, 113, 63, 0.26);
    outline-offset: 3px;
}

.hb-inline-carousel-nav__btn:disabled {
    opacity: 0.34;
    cursor: default;
    box-shadow: none;
}

.hb-inline-carousel-nav__btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2.4;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.favorite-fly-card,
.compare-fly-card {
    position: fixed;
    z-index: 9999;
    width: 230px;
    height: 176px;
    border-radius: 20px;
    overflow: hidden;
    pointer-events: none;
    background: #fff;
    box-shadow: 0 28px 80px rgba(13, 28, 22, .24);
    border: 3px solid rgba(255,255,255,.92);
    transform-origin: center;
    will-change: transform, opacity;
}

.favorite-fly-card img,
.compare-fly-card img {
    width: 100%;
    height: 118px;
    display: block;
    object-fit: cover;
}

.favorite-fly-card span,
.compare-fly-card span {
    display: block;
    padding: 10px 12px 0;
    color: #1f2b35;
    font-size: .9rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-fly-card::after,
.compare-fly-card::after {
    position: absolute;
    right: 9px;
    top: 9px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 20px rgba(13, 28, 22, .24);
}

.favorite-fly-card::after {
    content: "♥";
    background: rgba(217, 37, 58, .92);
    font-size: 14px;
    line-height: 1;
    animation: favoriteFlyHeartPulse .72s ease-in-out infinite;
}

.compare-fly-card::after {
    content: "";
    background: rgba(0, 76, 75, .92);
    animation: compareFlyIconPulse .72s ease-in-out infinite;
}

.compare-fly-card::before {
    content: "";
    position: absolute;
    right: 19px;
    top: 15px;
    z-index: 1;
    width: 3px;
    height: 12px;
    border-radius: 999px;
    background: #fff;
    box-shadow: -5px 4px 0 #fff, 5px -3px 0 #fff;
    pointer-events: none;
}

.favorite-added-toast {
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(31, 43, 53, .88);
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    box-shadow: 0 16px 36px rgba(13, 28, 22, .18);
    animation: favoriteToast 1.35s ease both;
}

@keyframes favoriteTargetBump {
    0%, 100% { transform: translateY(0) scale(1); }
    45% { transform: translateY(-3px) scale(1.08); }
}

@keyframes favoriteFlyHeartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

@keyframes compareFlyIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.16); }
}

@keyframes favoriteToast {
    0% { opacity: 0; transform: translateY(8px); }
    16%, 78% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-8px); }
}

.favorites-flight-box.is-bumping,
.compare-flight-box.is-bumping {
    animation: favoriteTargetBump .42s cubic-bezier(.2, .72, .18, 1);
}

.catalog-quick-links.is-expanded .hb-inline-carousel-nav {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .hb-inline-carousel-nav__btn {
        transition: none;
    }
}

@media (max-width: 720px) {
    .hb-recent {
        padding: 70px 0 76px;
    }

    .hb-recent__inner {
        width: min(100% - 28px, 1360px);
    }

    .hb-recent__head {
        align-items: start;
        flex-direction: column;
        gap: 18px;
    }

    .hb-recent__title {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .hb-recent__wrap {
        margin-inline: -14px;
        padding-left: 14px;
    }

    .hb-recent__rail {
        scroll-padding-left: 18px;
        padding: 24px 120px 46px 18px;
        gap: 26px;
    }

    .hb-recent-card,
    .hb-recent-card.is-active {
        flex-basis: min(76vw, 330px);
    }

    .hb-recent-card.is-active,
    .hb-recent-card.is-active:hover {
        transform: scale(1.04);
    }

    .hb-recent-card__info {
        padding: 20px 18px 22px;
    }

    .hb-recent-card__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .hb-recent-card__price {
        padding-left: 0;
    }

    .hb-recent-card__meta {
        gap: 8px;
    }

    .hb-recent-card__meta span {
        min-height: 58px;
        padding: 11px 10px;
    }

    .hb-recent-card__btn {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .hb-recent-card__likes {
        top: 14px;
        left: 14px;
        padding: 8px 12px;
    }

    .hb-inline-carousel-nav {
        gap: 8px;
    }

    .q-glass-demo__head .hb-inline-carousel-nav {
        justify-self: start;
    }

    .section--stories > .container .hb-inline-carousel-nav {
        justify-content: center;
        margin-top: 18px;
    }

    .hb-recent__head .hb-inline-carousel-nav {
        justify-content: flex-start;
    }

    .hb-inline-carousel-nav__btn {
        width: 48px;
        height: 48px;
    }

    .hb-inline-carousel-nav__btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .favorite-fly-card,
    .compare-fly-card {
        display: none;
    }

    .favorite-fly-card::after,
    .compare-fly-card::after,
    .favorite-added-toast,
    .favorites-flight-box.is-bumping,
    .compare-flight-box.is-bumping {
        animation: none;
    }
}
