/* ============================================================================
   Advertisement banner carousel (home page).
   Fully namespaced: every rule is scoped under .adv-carousel-section, custom
   properties are on the wrapper (not :root) and prefixed --adv-*, and every
   class is prefixed .adv-* so nothing collides with Bootstrap or the site theme.

   NOTE: the site uses html{font-size:62.5%} (1rem = 10px). The reference design
   assumed 1rem = 16px, so this component uses PX units throughout to stay the
   intended size regardless of the site's root font-size. The section heading
   deliberately reuses the theme's .section-title markup so it matches the site.
   ============================================================================ */

.adv-carousel-section {
    --adv-ink: #241417;
    --adv-card-bg: #ffffff;
    --adv-red: #df041de0;
    --adv-red-dark: #c40419;
    --adv-red-soft: #FDE8EA;
    --adv-line: #EFE3E1;
    --adv-dur: .55s;
    --adv-ease: cubic-bezier(.22, .61, .36, 1);

    /* The section heading + description are theme elements (.section-title /
       .section-content-wrapper) and intentionally inherit the site's font and
       colour. The design font/colour are applied to the carousel shell only. */
    padding: 16px 0 24px;
}
.adv-carousel-section * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

.adv-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Centre the reused theme section title/description within this section only
   (the theme default is a left title with a right-aligned link). The title's
   underline bar is anchored left:0 by the theme, so re-centre it too. */
.adv-carousel-section .section-title-wrapper { justify-content: center; }
.adv-carousel-section .section-title { text-align: center; }
.adv-carousel-section .section-title::after { left: 50%; transform: translateX(-50%); }
.adv-carousel-section .section-content-wrapper { text-align: center; }
.adv-carousel-section .section-content-wrapper p { max-width: 1100px; margin: 0 auto; }

.adv-carousel-section .adv-carousel-shell {
    max-width: 1100px; margin: 0 auto; padding: 24px 16px 32px;
    /* The 3D card design uses its own font/colour; the heading above stays on the theme. */
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--adv-ink);
}

.adv-carousel-section .adv-stage-3d {
    position: relative;
    height: 320px;
    perspective: 1500px;
    display: flex; align-items: center; justify-content: center;
    touch-action: pan-y; cursor: grab; outline: none;
}
.adv-carousel-section .adv-stage-3d.adv-dragging { cursor: grabbing; }
.adv-carousel-section .adv-stage-3d:focus-visible {
    box-shadow: 0 0 0 3px var(--adv-red-soft), 0 0 0 5px var(--adv-red); border-radius: 24px;
}
@media (min-width: 640px) { .adv-carousel-section .adv-stage-3d { height: 430px; } }

.adv-carousel-section .adv-card-3d {
    position: absolute;
    width: min(633px, 76vw);
    aspect-ratio: 17 / 11.5;
    border-radius: 20px;
    overflow: hidden;
    background: var(--adv-card-bg);
    box-shadow: 0 30px 60px -26px rgba(36, 20, 23, .4);
    will-change: transform, opacity;
    transition: transform var(--adv-dur) var(--adv-ease), opacity var(--adv-dur) var(--adv-ease), filter var(--adv-dur) var(--adv-ease);
}
.adv-carousel-section .adv-card-3d.adv-no-transition { transition: none; }
.adv-carousel-section .adv-card-3d img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; max-width: none;
}
.adv-carousel-section .adv-card-scrim-top {
    position: absolute; top: 0; left: 0; right: 0; height: 45%;
    background: linear-gradient(180deg, rgba(20, 10, 12, .55) 0%, rgba(20, 10, 12, 0) 100%);
}
.adv-carousel-section .adv-card-scrim-bottom {
    position: absolute; bottom: 0; left: 0; right: 0; height: 55%;
    background: linear-gradient(0deg, rgba(20, 10, 12, .82) 0%, rgba(20, 10, 12, 0) 100%);
}

.adv-carousel-section .adv-badge {
    position: absolute; top: 14px; left: 14px;
    display: inline-block; white-space: nowrap;
    font-size: 11px; line-height: 1; font-weight: 700; letter-spacing: .4px;
    padding: 6px 11px; border-radius: 999px;
    color: #fff; background: var(--adv-red); backdrop-filter: blur(3px);
}

/* Full-card click target when a banner link is set (sits above the artwork). */
.adv-carousel-section .adv-card-link { position: absolute; inset: 0; z-index: 6; }

.adv-carousel-section .adv-card-info { position: absolute; left: 14px; right: 14px; bottom: 14px; color: #fff; z-index: 7; }
.adv-carousel-section .adv-card-info .adv-name { font-size: 17px; line-height: 1.25; font-weight: 700; margin: 0 0 3px; color: #fff; }
.adv-carousel-section .adv-card-info .adv-meta {
    font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, .82); margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.adv-carousel-section .adv-controls-row {
    display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 24px;
}
.adv-carousel-section .adv-nav-btn {
    width: 44px; height: 44px; border-radius: 999px;
    border: 1px solid var(--adv-red); background: #fff; color: var(--adv-ink);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; line-height: 1; cursor: pointer;
    box-shadow: 0 10px 22px -14px rgba(36, 20, 23, .4);
    transition: background .2s ease, color .2s ease, transform .15s ease, border-color .2s ease;
}
.adv-carousel-section .adv-nav-btn:hover { border-color: var(--adv-red); color: var(--adv-red); }
.adv-carousel-section .adv-nav-btn:active { transform: scale(.94); }
.adv-carousel-section .adv-nav-btn:focus-visible { outline: 2px solid var(--adv-red); outline-offset: 2px; }
.adv-carousel-section .adv-nav-btn.adv-accent { background: var(--adv-red); border-color: var(--adv-red); color: #fff; }
.adv-carousel-section .adv-nav-btn.adv-accent:hover { background: var(--adv-red-dark); }

.adv-carousel-section .adv-dots { display: flex; align-items: center; gap: 6px; }
.adv-carousel-section .adv-dot {
    width: 8px; height: 8px; border-radius: 999px; background: var(--adv-line);
    transition: width .3s var(--adv-ease), background .3s ease;
    cursor: pointer; border: none; padding: 0;
}
.adv-carousel-section .adv-dot.adv-is-active { width: 26px; background: var(--adv-red); }
.adv-carousel-section .adv-dot:focus-visible { outline: 2px solid var(--adv-red); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .adv-carousel-section .adv-card-3d,
    .adv-carousel-section .adv-dot { transition: none !important; }
}
