.vslider {
    --vslider-height: 380px;
    --vslider-transition: 0.7s;

    position: relative;
    width: 100%;
    height: var(--vslider-height);
    overflow: hidden;
border-radius: 12px;
    background: #0f172a;
    user-select: none;
    -webkit-user-select: none;
}

.vslider:focus {
    outline: none;
}

.vslider:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 2px;
}

[dir="rtl"] .vslider {
    direction: rtl;
}

[dir="ltr"] .vslider {
    direction: ltr;
}

.vslider__viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.vslider__track {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    transition: transform var(--vslider-transition) cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.vslider__page {
    position: relative;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.vslider__slide {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Blurred copy of the same photo fills the entire block, so the frame never
   shows bare background at any width and the text always sits on artwork. */
.vslider__slide::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--vslider-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(18px) saturate(1.25);
    transform: scale(1.2);
}

/* Mild scrim to keep the text legible on top of the blurred artwork. */
.vslider__slide::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(2, 6, 23, 0.72) 0%,
        rgba(2, 6, 23, 0.45) 45%,
        rgba(2, 6, 23, 0.35) 100%
    );
    pointer-events: none;
}

.vslider__media {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    /* Symmetric gutter: the box is centred and its width is the slide width
       minus both side margins, so the photo stays centred at any margin. */
    align-self: center;
    width: calc(100% - var(--vslider-media-margin, 7px) - var(--vslider-media-margin, 7px));
    margin-top: var(--vslider-media-margin, 7px);
    min-height: 0;
}

.vslider__content {
    position: relative;
    z-index: 3;
    flex: 0 0 calc(var(--vslider-height) * 0.30);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 16px;
    min-width: 0;
}

.vslider__image {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    /* contain keeps the whole photo visible at any slider width. */
    background-image: var(--vslider-image, none);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-user-drag: none;
    /* drop-shadow tracks the painted photo rather than the surrounding box,
       so the shadow hugs the image even with letterboxing around it. */
    filter: drop-shadow(0 6px 16px rgba(2, 6, 23, 0.6));
}

.vslider__image--placeholder {
    background-image: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.vslider__shimmer {
    position: absolute;
    inset: 0;
    /* Wide soft light wave sweeping across the whole frame. The gradient is
       200% wide so the bright half spans the full width of the photo. */
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-repeat: no-repeat;
    background-size: 200% 100%;
    /* Linear keeps the wave at a constant speed, so it never stalls and
       restarts. With the wave fully off-screen at both ends the loop point
       is invisible, which makes the repetition impossible to notice. */
    animation: vslider-shimmer 2.2s linear infinite;
    z-index: 2;
    pointer-events: none;
}

/* Right-to-left sites get the wave travelling the other way. */
[dir="rtl"] .vslider__shimmer {
    animation-direction: reverse;
}

.vslider__slide.is-loaded .vslider__shimmer {
    opacity: 0;
    transition: opacity 0.6s ease;
    animation: none;
}

@keyframes vslider-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.vslider__category {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.6;
    border-radius: 20px;
    text-decoration: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.3s ease;
}

.vslider__category:hover {
    background: rgba(255, 255, 255, 0.34);
    color: #fff;
}

.vslider__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.5;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vslider__title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.vslider__title a:hover {
    color: #ffd8a8;
}

.vslider__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.vslider__date {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.72rem;
    font-weight: 400;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}


.vslider__controls {
    position: absolute;
    top: 50%;
    inset-inline-end: 16px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 10;

    /* Arrows stay out of the way until the box is hovered, focused or touched. */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.vslider:hover .vslider__controls,
.vslider:focus-within .vslider__controls,
.vslider:focus-visible .vslider__controls,
.vslider.is-touching .vslider__controls {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.vslider__controls[hidden] {
    display: none;
}

.vslider__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.vslider__arrow svg {
    width: 14px;
    height: 14px;
}

.vslider__arrow:hover {
    background: rgba(255, 255, 255, 0.38);
    transform: scale(1.1);
}

.vslider__arrow:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.vslider__empty {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* ------------------------------------------------------------------ *
 * Lightbox. Appended to <body> so it escapes the slider clipping and
 * stacking context, hence the standalone .vslider-lightbox prefix.
 * ------------------------------------------------------------------ */

html.vslider-lightbox-open,
html.vslider-lightbox-open body {
    overflow: hidden;
}

.vslider-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(0, 0, 0, 0.88);
}

.vslider-lightbox[hidden] {
    display: none;
}

.vslider-lightbox__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 100%;
    max-height: 100%;
}

.vslider-lightbox__img {
    max-width: 92vw;
    max-height: 76vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
}

.vslider-lightbox__link {
    max-width: 60ch;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.7;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    transition: color 0.25s ease;
}

.vslider-lightbox__link:hover,
.vslider-lightbox__link:focus-visible {
    color: #ffd8a8;
    text-decoration: underline;
}

.vslider-lightbox__link[hidden] {
    display: none;
}

.vslider-lightbox__close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.25s ease;
}

.vslider-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.vslider-lightbox__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .vslider-lightbox {
        padding: 16px;
    }

    .vslider-lightbox__img {
        max-height: 70vh;
    }

    .vslider-lightbox__link {
        font-size: 0.9rem;
    }
}

[dir="ltr"] .vslider__controls {
    left: auto;
    right: 16px;
}

@media (max-width: 768px) {
    .vslider__content {
        padding: 14px 14px;
    }

    .vslider__category {
        font-size: 0.6rem;
        padding: 2px 7px;
    }

    .vslider__date {
        font-size: 0.64rem;
    }

    .vslider__controls {
        inset-inline-end: 12px;
        gap: 8px;
    }

    .vslider__arrow {
        width: 21px;
        height: 21px;
    }

    .vslider__arrow svg {
        width: 12px;
        height: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vslider *,
    .vslider *::before,
    .vslider *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

.vslider__shimmer {
        display: none;
    }
}
