/* ============================================================
   Logo Carousel Pro — Public Styles
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.lcp-carousel-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* ── Track outer (clip box) ──────────────────────────────── */
.lcp-carousel-track-outer {
    overflow: hidden;
    width: 100%;
    position: relative;
}

/* ── Track (moving strip) ────────────────────────────────── */
.lcp-carousel-wrapper.lcp-mode-horizontal .lcp-carousel-track {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: max-content;
    will-change: transform;
}

.lcp-carousel-wrapper.lcp-mode-vertical .lcp-carousel-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: max-content;
    will-change: transform;
}

/* ── Logo item ───────────────────────────────────────────── */
.lcp-carousel-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* ── Logo image ──────────────────────────────────────────── */
.lcp-logo-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    filter: grayscale(30%) opacity(0.75);
    transition: filter 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

/* ── Link wrapper ────────────────────────────────────────── */
.lcp-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
}

/* ── Hover: colorize + lift ──────────────────────────────── */
.lcp-carousel-item:hover .lcp-logo-img,
.lcp-logo-link:hover .lcp-logo-img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.06);
}

/* ── Pause animation on hover ────────────────────────────── */
.lcp-carousel-wrapper:hover .lcp-carousel-track {
    animation-play-state: paused !important;
}

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes lcp-scroll-horizontal {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes lcp-scroll-vertical {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* ── Running state ───────────────────────────────────────── */
.lcp-carousel-wrapper.lcp-mode-horizontal .lcp-carousel-track.lcp-running {
    animation-name:            lcp-scroll-horizontal;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-fill-mode:       none;
    animation-play-state:      running;
}

.lcp-carousel-wrapper.lcp-mode-vertical .lcp-carousel-track.lcp-running {
    animation-name:            lcp-scroll-vertical;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-fill-mode:       none;
    animation-play-state:      running;
}

/* ── Fade edges using CSS mask (works on any background) ─── */
.lcp-carousel-wrapper.lcp-mode-horizontal .lcp-carousel-track-outer {
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
}

.lcp-carousel-wrapper.lcp-mode-vertical .lcp-carousel-track-outer {
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 12%,
        black 88%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 12%,
        black 88%,
        transparent 100%
    );
}

/* ── Responsive: never overflow container ────────────────── */
.lcp-carousel-wrapper * {
    box-sizing: border-box;
}

/* ============================================================
   GALLERY MODE — fanned playing-card photo gallery  (1.2.0)
   ============================================================ */

.lcp-carousel-wrapper.lcp-mode-gallery {
    /* The wrapper itself must not clip the lifted/rotated cards. */
    overflow: visible;
}

/* The scrolling "hand". Vertical padding leaves room for the lift,
   tilt and drop shadow, because an overflow-x scroller also clips Y. */
.lcp-mode-gallery .lcp-gallery-hand {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    /* Clearance for tilt + hover lift grows with the card, so big cards are
       never clipped by the scroller. */
    --lcp-pad: calc(min(var(--lcp-card-w, 240px), 64vw) * .14);
    padding: calc(var(--lcp-pad) + 44px) 44px calc(var(--lcp-pad) + 52px);
    margin: 0;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}
.lcp-mode-gallery .lcp-gallery-hand::-webkit-scrollbar { display: none; }
.lcp-mode-gallery .lcp-gallery-hand.lcp-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }

/* ── One card ─────────────────────────────────────────────── */
.lcp-mode-gallery .lcp-card {
    --lcp-w: min(var(--lcp-card-w, 240px), 64vw);
    --r: 0deg;
    --y: 0px;
    position: relative;
    flex: 0 0 auto;
    display: block;
    width: var(--lcp-w);
    aspect-ratio: var(--lcp-ratio, 5 / 7);
    margin: 0;
    margin-inline-start: calc(var(--lcp-w) * var(--lcp-ov, -0.3));
    text-decoration: none !important;
    color: inherit;
    border: 0;
    outline: none;
    box-shadow: none;
    background: none;
    /* Fan pivot sits below the card, like a hand of cards. */
    transform-origin: 50% 115%;
    transform: translateY(var(--y)) rotate(var(--r));
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}
/* Auto margins centre a short hand but never push a long one off-screen. */
.lcp-mode-gallery .lcp-card:first-child { margin-inline-start: auto; }
.lcp-mode-gallery .lcp-card:last-child  { margin-inline-end: auto; }

.lcp-mode-gallery .lcp-card:hover,
.lcp-mode-gallery .lcp-card:focus-visible { z-index: 40; }

/* ── Card face (white border, rounded corners, shadow) ───── */
.lcp-mode-gallery .lcp-card-face {
    position: absolute;
    inset: 0;
    display: block;
    padding: 7px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .10);
    box-shadow:
        0 14px 26px -10px rgba(0, 0, 0, .35),
        0 3px 8px rgba(0, 0, 0, .18);
    transition: transform .38s cubic-bezier(.2, .9, .25, 1.2), box-shadow .38s ease;
    will-change: transform;
    animation: none;
}

.lcp-mode-gallery .lcp-card-photo {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    background: #e9e9ee;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.lcp-mode-gallery .lcp-card-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
    border: 0;
    border-radius: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
    filter: none;
    pointer-events: none;
    -webkit-user-drag: none;
    transition: transform .6s ease;
}

/* Glossy sheen that sweeps across on hover. */
.lcp-mode-gallery .lcp-card-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .38) 47%, transparent 62%);
    background-size: 260% 100%;
    background-position: 160% 0;
    transition: background-position .8s ease;
}

/* Name tag along the bottom edge. */
.lcp-mode-gallery .lcp-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 12px 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
    text-align: start;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
    background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s ease, transform .3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Lift on hover / keyboard focus ───────────────────────── */
@media (hover: hover) {
    .lcp-mode-gallery .lcp-card:hover .lcp-card-face {
        transform: translateY(-30px) rotate(calc(var(--r) * -1)) scale(1.07);
        box-shadow:
            0 34px 44px -14px rgba(0, 0, 0, .5),
            0 8px 16px rgba(0, 0, 0, .22);
    }
    .lcp-mode-gallery .lcp-card:hover .lcp-card-photo::after { background-position: -60% 0; }
    .lcp-mode-gallery .lcp-card:hover .lcp-card-img { transform: scale(1.05); }
    .lcp-mode-gallery .lcp-card:hover .lcp-card-caption { opacity: 1; transform: none; }
}
.lcp-mode-gallery .lcp-card:focus-visible .lcp-card-face {
    transform: translateY(-30px) rotate(calc(var(--r) * -1)) scale(1.07);
    box-shadow: 0 0 0 3px #fff, 0 0 0 6px #2563eb, 0 30px 40px -14px rgba(0, 0, 0, .5);
}
.lcp-mode-gallery .lcp-card:focus-visible .lcp-card-caption { opacity: 1; transform: none; }

/* No transition lag while the hand is being scrolled. */
.lcp-mode-gallery .lcp-gallery-hand.lcp-scrolling .lcp-card-face { transition: none; }

/* ── "Dealing" entrance, played once when scrolled into view ─ */
.lcp-mode-gallery .lcp-gallery-hand.lcp-pre .lcp-card-face { opacity: 0; }
.lcp-mode-gallery .lcp-gallery-hand.lcp-dealt .lcp-card-face {
    animation: lcp-deal .75s cubic-bezier(.2, .8, .25, 1) backwards;
    animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes lcp-deal {
    from { opacity: 0; transform: translate(-70px, 50px) rotate(-16deg) scale(.82); }
    to   { opacity: 1; transform: none; }
}

/* ── Scroll arrows ────────────────────────────────────────── */
.lcp-mode-gallery { position: relative; }

.lcp-mode-gallery .lcp-gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    min-width: 0;
    margin: -23px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #1f2430;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
    cursor: pointer;
    line-height: 1;
    transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.lcp-mode-gallery .lcp-gallery-prev { left: 6px; }
.lcp-mode-gallery .lcp-gallery-next { right: 6px; }
.lcp-mode-gallery .lcp-gallery-nav:hover { transform: scale(1.1); box-shadow: 0 10px 24px rgba(0, 0, 0, .34); }
.lcp-mode-gallery .lcp-gallery-nav:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.lcp-mode-gallery .lcp-gallery-nav:disabled { opacity: 0; pointer-events: none; }
.lcp-mode-gallery.lcp-no-scroll .lcp-gallery-nav { display: none; }

/* ============================================================
   LIGHTBOX  (shared by every gallery on the page)
   ============================================================ */
.lcp-lb {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 72px;
    box-sizing: border-box;
    visibility: hidden;
    opacity: 0;
    transition: opacity .28s ease, visibility 0s linear .28s;
}
.lcp-lb[hidden] { display: none; }
.lcp-lb.lcp-lb-open { visibility: visible; opacity: 1; transition: opacity .28s ease, visibility 0s; }

.lcp-lb * { box-sizing: border-box; }

.lcp-lb .lcp-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 16, .9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.lcp-lb .lcp-lb-figure {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    margin: 0;
    padding: 0;
}
.lcp-lb.lcp-lb-open .lcp-lb-figure { animation: lcp-pop .42s cubic-bezier(.2, .85, .25, 1.15); }
@keyframes lcp-pop {
    from { opacity: 0; transform: scale(.35); }
    to   { opacity: 1; transform: scale(1); }
}

.lcp-lb .lcp-lb-imgwrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}
.lcp-lb .lcp-lb-img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, calc(100vw - 144px));
    max-height: calc(100vh - 190px);
    max-height: calc(100dvh - 190px);
    object-fit: contain;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #14161c;
    box-shadow: 0 0 0 6px #fff, 0 30px 80px rgba(0, 0, 0, .65);
    transition: opacity .25s ease;
}
.lcp-lb .lcp-lb-imgwrap.lcp-loading .lcp-lb-img { opacity: .88; }

.lcp-lb .lcp-lb-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    border: 3px solid rgba(255, 255, 255, .28);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: lcp-spin .8s linear infinite;
}
.lcp-lb .lcp-lb-imgwrap.lcp-loading .lcp-lb-spinner { opacity: 1; }
@keyframes lcp-spin { to { transform: rotate(360deg); } }

.lcp-lb .lcp-lb-caption {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    max-width: 100%;
    position: relative;
    z-index: 1;
    margin: 22px 0 0;
    padding: 0;
    color: #fff;
    font-size: 16px;
    line-height: 1.35;
    text-align: center;
}
.lcp-lb .lcp-lb-title { font-weight: 600; }
.lcp-lb .lcp-lb-count { font-size: 13px; opacity: .65; font-variant-numeric: tabular-nums; }
.lcp-lb .lcp-lb-link {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s ease;
}
.lcp-lb .lcp-lb-link:hover,
.lcp-lb .lcp-lb-link:focus-visible { background: rgba(255, 255, 255, .3); color: #fff; }
.lcp-lb .lcp-lb-link[hidden] { display: none; }

.lcp-lb .lcp-lb-btn {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    text-shadow: none;
    transition: background .2s ease, transform .2s ease;
}
.lcp-lb .lcp-lb-btn:hover { background: rgba(255, 255, 255, .28); transform: scale(1.08); }
.lcp-lb .lcp-lb-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lcp-lb .lcp-lb-close { top: 16px; inset-inline-end: 16px; }
.lcp-lb .lcp-lb-prev  { top: 50%; margin-top: -25px; inset-inline-start: 16px; }
.lcp-lb .lcp-lb-next  { top: 50%; margin-top: -25px; inset-inline-end: 16px; }
.lcp-lb.lcp-lb-single .lcp-lb-prev,
.lcp-lb.lcp-lb-single .lcp-lb-next,
.lcp-lb.lcp-lb-single .lcp-lb-count { display: none; }
html[dir="rtl"] .lcp-lb .lcp-lb-prev svg,
html[dir="rtl"] .lcp-lb .lcp-lb-next svg { transform: scaleX(-1); }

html.lcp-lb-lock, html.lcp-lb-lock body { overflow: hidden !important; }

/* ── Small screens ────────────────────────────────────────── */
@media (max-width: 600px) {
    .lcp-mode-gallery .lcp-gallery-hand { padding: 60px 22px 64px; }
    .lcp-mode-gallery .lcp-gallery-nav { display: none; }
    .lcp-lb { padding: 64px 12px 28px; }
    .lcp-lb .lcp-lb-img { max-width: calc(100vw - 24px); max-height: calc(100vh - 210px); max-height: calc(100dvh - 210px); box-shadow: 0 0 0 4px #fff, 0 20px 50px rgba(0, 0, 0, .6); }
    .lcp-lb .lcp-lb-btn { width: 44px; height: 44px; background: rgba(255, 255, 255, .2); }
    .lcp-lb .lcp-lb-prev, .lcp-lb .lcp-lb-next { top: auto; bottom: 18px; margin-top: 0; }
    .lcp-lb .lcp-lb-prev { inset-inline-start: 18px; }
    .lcp-lb .lcp-lb-next { inset-inline-end: 18px; }
}

/* ── Respect reduced-motion preferences ───────────────────── */
@media (prefers-reduced-motion: reduce) {
    .lcp-mode-gallery .lcp-card-face,
    .lcp-mode-gallery .lcp-card-img,
    .lcp-mode-gallery .lcp-card-caption,
    .lcp-mode-gallery .lcp-card-photo::after,
    .lcp-lb,
    .lcp-lb .lcp-lb-img { transition: none; }
    .lcp-mode-gallery .lcp-gallery-hand.lcp-dealt .lcp-card-face,
    .lcp-lb.lcp-lb-open .lcp-lb-figure { animation: none; }
    .lcp-mode-gallery .lcp-gallery-hand.lcp-pre .lcp-card-face { opacity: 1; }
}
