/**
 * Homepage "Upcoming offers" banner (Views/Home/Index.cshtml).
 *
 * Plain CSS - no Tailwind build step. A brand-red gradient with soft glows and
 * a dot texture, three offer coupons, and a traveller photo in an arch frame
 * with SVG decor (sun, clouds, a plane flying a dashed route). Every animation stops under
 * prefers-reduced-motion. Logical properties keep it correct in RTL.
 */

.offers {
    --offers-red: #8B2225;
    --offers-gold: #E3B95F;
    --offers-gold-light: #F7DFA6;
    --offers-ink: #1F1A17;

    padding-block: 32px;
}

.offers .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
}

.offers-card {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: center;
    gap: 8px;
    padding: 26px 20px;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(120deg, #8B2225 0%, #A8323A 48%, #5E1B33 100%);
    color: #FFFFFF;
    box-shadow: 0 30px 60px -36px rgba(94, 27, 51, 0.85);
}

/* Fine dot texture, fading out towards the photo. */
.offers-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1.6px);
    background-size: 18px 18px;
    -webkit-mask-image: linear-gradient(to right, #000, transparent 75%);
    mask-image: linear-gradient(to right, #000, transparent 75%);
}

/* Soft colour glows drifting in the background. */
.offers-blob {
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    filter: blur(50px);
    pointer-events: none;
    animation: offers-drift 14s ease-in-out infinite alternate;
}

.offers-blob-a {
    top: -140px;
    left: -90px;
    width: 340px;
    height: 340px;
    background: rgba(227, 185, 95, 0.38);
}

.offers-blob-b {
    right: -60px;
    bottom: -160px;
    width: 380px;
    height: 380px;
    background: rgba(255, 128, 110, 0.3);
    animation-delay: -7s;
}

@keyframes offers-drift {
    from { transform: translate(0, 0); }
    to { transform: translate(40px, 24px); }
}

/* ---- Copy ------------------------------------------------------------- */

.offers-content {
    position: relative;
    min-width: 0;
}

.offers-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.offers-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* "Live" dot with an expanding ring. */
.offers-pulse {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--offers-gold);
}

.offers-pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--offers-gold);
    animation: offers-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes offers-ping {
    75%, 100% {
        opacity: 0;
        transform: scale(2.6);
    }
}

.offers-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
}

.offers-all-icon {
    font-size: 17px !important;
    transition: transform 0.25s ease;
}

.offers-all:hover .offers-all-icon {
    transform: translateX(3px);
}

.offers-title {
    margin: 14px 0 0;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

/* Gold word with a slow light sweep across it. */
.offers-highlight {
    background: linear-gradient(100deg, var(--offers-gold) 0%, var(--offers-gold) 35%, #FFF3D1 50%, var(--offers-gold) 65%, var(--offers-gold) 100%);
    background-size: 250% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
    animation: offers-shimmer 5s ease-in-out infinite;
}

@keyframes offers-shimmer {
    0%, 55% { background-position: 100% 0; }
    100% { background-position: -50% 0; }
}

.offers-copy {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.55;
}

/* ---- Offer coupons ---------------------------------------------------- */

/* A swipeable row on phones, three across on wider screens. */
.offers-list {
    display: flex;
    gap: 10px;
    margin: 18px -20px 0;
    padding: 4px 20px 6px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.offers-list::-webkit-scrollbar {
    display: none;
}

.offers-list > li {
    flex: 0 0 78%;
    scroll-snap-align: start;
}

.offers-coupon {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding: 11px 12px;
    border-radius: 14px;
    background: #FFFFFF;
    color: var(--offers-ink);
    text-decoration: none;
    box-shadow: 0 14px 26px -16px rgba(0, 0, 0, 0.6);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.offers-coupon:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 32px -16px rgba(0, 0, 0, 0.7);
}

.offers-coupon:focus-visible,
.offers-all:focus-visible {
    outline: 3px solid var(--offers-gold);
    outline-offset: 3px;
}

.offers-coupon-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    background: #FBEFE3;
    color: var(--offers-red);
}

.offers-coupon-icon .material-symbols-outlined {
    font-size: 21px;
}

.offers-coupon-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.offers-coupon-title {
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.offers-coupon-deal {
    color: var(--offers-red);
    font-size: 12.5px;
    font-weight: 700;
}

/* Ticket stub: dashed tear line before the start date. */
.offers-coupon-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding-inline-start: 10px;
    border-inline-start: 2px dashed #EADBCB;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.offers-coupon-date span {
    color: #8A7F78;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Coupons rise in one after another as the banner scrolls into view. */
@supports (animation-timeline: view()) {
    .offers-list > li {
        animation: offers-rise linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 30%;
    }
}

@keyframes offers-rise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- Illustration ------------------------------------------------------ */

.offers-art {
    display: none;
}

.offers-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.offers-sun-rays {
    fill: var(--offers-gold-light);
    transform-box: fill-box;
    transform-origin: center;
    animation: offers-spin 18s linear infinite;
}

.offers-sun-core {
    fill: var(--offers-gold-light);
}

@keyframes offers-spin {
    to { transform: rotate(360deg); }
}

.offers-cloud {
    fill: rgba(255, 255, 255, 0.92);
    animation: offers-float-x 9s ease-in-out infinite alternate;
}

.offers-cloud-b {
    fill: rgba(255, 255, 255, 0.7);
    animation-duration: 12s;
    animation-delay: -4s;
}

@keyframes offers-float-x {
    from { transform: translateX(-10px); }
    to { transform: translateX(14px); }
}

.offers-route {
    fill: none;
    stroke: rgba(255, 255, 255, 0.55);
    stroke-width: 2;
    stroke-dasharray: 6 8;
    stroke-linecap: round;
    animation: offers-dash 1.2s linear infinite;
}

@keyframes offers-dash {
    to { stroke-dashoffset: -14; }
}

.offers-plane {
    fill: #FFFFFF;
}

/* The art column runs down to the card's bottom edge (cancelling the card's
   bottom padding) so the cut-out traveller stands on it. The decor SVG fills
   the column; she stands on top of it. */
.offers-art {
    position: relative;
    align-self: stretch;
    margin-block-end: -28px;
}

.offers-art .offers-svg {
    position: absolute;
    inset: 0 0 28px;
    width: 100%;
    height: calc(100% - 28px);
}

/* Soft gold glow behind her, for depth on the red. */
.offers-art::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -40px;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(247, 223, 166, 0.45) 0%, rgba(227, 185, 95, 0.18) 45%, transparent 70%);
    transform: translateX(-50%);
}

/* Transparent cut-out, no frame - height-led, standing on the bottom edge. */
.offers-traveller {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: auto;
    height: 100%;
    transform: translateX(-50%);
    filter: drop-shadow(0 18px 24px rgba(40, 8, 16, 0.45));
}

/* Frosted chip beside her. */
.offers-photo-chip {
    position: absolute;
    bottom: 22px;
    left: 4%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--offers-red);
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.55);
    animation: offers-chip-float 3.2s ease-in-out infinite alternate;
}

@keyframes offers-chip-float {
    from { transform: translateY(0); }
    to { transform: translateY(-6px); }
}

/* ---- RTL -------------------------------------------------------------- */

[dir="rtl"] .offers-all-icon {
    transform: scaleX(-1);
}

[dir="rtl"] .offers-all:hover .offers-all-icon {
    transform: scaleX(-1) translateX(3px);
}

[dir="rtl"] .offers-card::before {
    -webkit-mask-image: linear-gradient(to left, #000, transparent 75%);
    mask-image: linear-gradient(to left, #000, transparent 75%);
}

/* ---- Wider screens ----------------------------------------------------- */

@media (min-width: 640px) {
    .offers-card {
        grid-template-columns: minmax(0, 1fr) 240px;
        padding: 28px 28px 28px 32px;
    }

    .offers-art {
        display: block;
        min-height: 250px;
    }

    .offers-list {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        margin-inline: 0;
        padding-inline: 0;
        overflow: visible;
    }
}

/* 900px = the site's compact breakpoint. */
@media (min-width: 900px) {
    .offers {
        padding-block: 44px;
    }

    .offers-card {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 24px;
        padding: 34px 40px 34px 44px;
    }

    .offers-title {
        font-size: 40px;
    }

    .offers-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .offers-art {
        min-height: 290px;
        margin-block-end: -34px;
    }

    .offers-art .offers-svg {
        inset: 0 0 34px;
        height: calc(100% - 34px);
    }
}

@media (min-width: 1200px) {
    .offers-card {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .offers-title {
        font-size: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .offers-blob,
    .offers-pulse::after,
    .offers-highlight,
    .offers-list > li,
    .offers-sun-rays,
    .offers-cloud,
    .offers-route,
    .offers-photo-chip {
        animation: none;
    }

    /* The plane's flight is SMIL, which CSS cannot pause - hide it instead. */
    .offers-plane {
        display: none;
    }

    .offers-coupon,
    .offers-all-icon {
        transition: none;
    }
}
