/*
 * Admin-managed promotional banners (components/website/page-ad.blade.php).
 *   .page_ad--poster  sidebar poster (offers, transport)
 *   .page_ad--banner  visa: copy beside the poster
 * The ad is always one 700x1000 (7:10) frame. A slider swipes between images in
 * that frame and shows arrows, an "n / total" counter and dots. Images are never
 * cropped: the whole image shows over a blurred copy of itself.
 */

.page_ad {
    --ad-navy: #1C4482;
    --ad-sky: #68c2e5;
    --ad-head: linear-gradient(135deg, #1C4482 0%, #2f6db5 100%);
    position: relative;
}

.page_ad--transport {
    --ad-head: linear-gradient(135deg, #1C4482 0%, #1f8fb8 100%);
}

/* ---------- The 7:10 frame + slides ---------- */
.page_ad__frame {
    position: relative;
    aspect-ratio: 7 / 10;
    overflow: hidden;
    background: var(--ad-navy);
    border-radius: 14px;
}

.page_ad__track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.page_ad__track::-webkit-scrollbar {
    display: none;
}

.page_ad__track:focus-visible {
    outline: 3px solid var(--ad-sky);
    outline-offset: -3px;
}

.page_ad__slide {
    position: relative;
    display: block;
    flex: 0 0 100%;
    height: 100%;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Blurred copy of the image fills whatever the full image doesn't cover. */
.page_ad__slide::before {
    content: "";
    position: absolute;
    inset: -24px;
    background: var(--ad-img) center / cover no-repeat;
    filter: blur(18px) brightness(.85);
    transform: scale(1.1);
}

.page_ad__slide img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .5s ease;
}

a.page_ad__slide:hover img {
    transform: scale(1.03);
}

a.page_ad__slide:focus-visible {
    outline: 3px solid var(--ad-sky);
    outline-offset: -3px;
}

/* ---------- Overlays: ribbon, counter, arrows, dots ---------- */
.page_ad__ribbon,
.page_ad__counter {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    border-radius: 999px;
    pointer-events: none;
}

.page_ad__ribbon {
    inset-inline-start: 12px;
    background: var(--ad-navy);
    box-shadow: 0 4px 12px rgba(28, 68, 130, .35);
}

.page_ad__counter {
    inset-inline-end: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, .55);
    font-variant-numeric: tabular-nums;
}

.page_ad__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 14px;
    color: var(--ad-navy);
    background: rgba(255, 255, 255, .92);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .2s ease, transform .2s ease;
}

.page_ad__arrow--prev {
    inset-inline-start: 10px;
}

.page_ad__arrow--next {
    inset-inline-end: 10px;
}

.page_ad__arrow:hover,
.page_ad__arrow:focus-visible {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
    outline: none;
}

.page_ad__dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 7px;
}

.page_ad__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    background: rgba(255, 255, 255, .6);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
    cursor: pointer;
    transition: width .3s ease, background .3s ease;
}

.page_ad__dot.is-active {
    width: 24px;
    background: #fff;
}

/* ---------- Sidebar poster (offers / transport) ---------- */
.page_ad--poster {
    margin: 24px 0 30px;
    padding: 0 0 14px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 3px 12px rgba(33, 13, 58, .08);
    overflow: hidden;
}

.page_ad--poster .page_ad__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--ad-head);
}

.page_ad--poster .page_ad__head i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 14px;
    color: var(--ad-navy);
    background: #fff;
    border-radius: 50%;
}

/* Transport: a dashed "road" under the heading */
.page_ad--transport .page_ad__head {
    position: relative;
    padding-bottom: 18px;
}

.page_ad--transport .page_ad__head::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 8px;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .75) 0 10px, transparent 10px 18px);
}

.page_ad--poster .page_ad__media {
    padding: 14px 14px 0;
}

@media (min-width: 1200px) {
    /* Stay in view while scrolling long result lists. */
    .page_ad--poster {
        position: sticky;
        top: 100px;
    }
}

@media (max-width: 1199px) {
    .page_ad--poster {
        max-width: 380px;
        margin-inline: auto;
    }
}

/* ---------- Visa banner: copy + one 7:10 poster ---------- */
.page_ad--banner {
    display: grid;
    grid-template-columns: minmax(0, 480px) 280px;
    justify-content: center;
    align-items: center;
    gap: 56px;
    margin: 10px auto 40px;
    padding: 28px 36px;
    overflow: hidden;
    background: var(--ad-head);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(28, 68, 130, .22);
}

/* Passport-stamp circles in the background */
.page_ad--banner::before,
.page_ad--banner::after {
    content: "";
    position: absolute;
    border: 2px dashed rgba(255, 255, 255, .16);
    border-radius: 50%;
    pointer-events: none;
}

.page_ad--banner::before {
    width: 260px;
    height: 260px;
    bottom: -120px;
    inset-inline-start: -60px;
}

.page_ad--banner::after {
    width: 140px;
    height: 140px;
    top: -60px;
    inset-inline-end: 8%;
}

.page_ad--banner .page_ad__copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: #fff;
}

.page_ad--banner .page_ad__media {
    position: relative;
    z-index: 1;
}

.page_ad--banner .page_ad__frame {
    border: 4px solid rgba(255, 255, 255, .95);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
}

.page_ad__badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ad-navy);
    background: #fff;
    border-radius: 999px;
}

.page_ad__badge i {
    color: var(--ad-sky);
}

.page_ad__title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.35;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page_ad__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .85);
}

.page_ad__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page_ad__facts li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
}

.page_ad__facts strong {
    color: #fff;
}

.page_ad__facts i {
    color: var(--ad-sky);
}

.page_ad__cta {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 10px;
    margin-top: 4px;
    padding: 12px 24px;
    font-weight: 700;
    color: var(--ad-navy);
    text-decoration: none;
    background: #fff;
    border-radius: 10px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.page_ad__cta:hover,
.page_ad__cta:focus-visible {
    color: var(--ad-navy);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

@media (max-width: 991px) {
    .page_ad--banner {
        grid-template-columns: minmax(0, 1fr) 240px;
        gap: 32px;
        padding: 24px;
    }
}

@media (max-width: 767px) {
    .page_ad--banner {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
        margin: 10px 0 30px;
        padding: 24px 20px;
    }

    .page_ad--banner .page_ad__media {
        width: min(100%, 300px);
        margin-inline: auto;
    }

    .page_ad__title {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page_ad__slide img,
    .page_ad__arrow,
    .page_ad__dot,
    .page_ad__cta {
        transition: none;
    }
}
