/* =====================================================
   Joshi Card Slider – Frontend  v2.0
   Card design: full-image, rounded corners,
   gradient from top, title top-left italic,
   arrow circle top-right. Exactly as reference.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@1,400;1,600&display=swap');

/* Wrapper */
.jcs-wrap {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 48px;
    user-select: none;
}

/* Viewport – clips overflowing cards */
.jcs-viewport {
    overflow: hidden;
    border-radius: 22px; /* same radius visible in reference */
}

/* Track – flex row that slides */
.jcs-track {
    display: flex;
    gap: 16px;
    transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
    will-change: transform;
}

/* ---- THE CARD ---- */
.jcs-card {
    position: relative;
    flex: 0 0 auto;        /* width set by JS */
    border-radius: 22px;   /* rounded corners — same as reference */
    overflow: hidden;
    aspect-ratio: 3 / 4;   /* portrait, matching reference */
    cursor: default;
    transition: transform 0.3s ease;
}
.jcs-card:hover {
    transform: scale(1.015);
}

/* Full-bleed background image */
.jcs-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}
.jcs-card:hover .jcs-card-bg {
    transform: scale(1.04);
}

/* Gradient overlay — ONLY from top, like reference.
   Dark at top fading to transparent, no bottom overlay. */
.jcs-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.52) 0%,
        rgba(0, 0, 0, 0.18) 38%,
        rgba(0, 0, 0, 0) 60%
    );
    pointer-events: none;
}

/* Title — top left, italic serif, multi-line, exactly like reference */
.jcs-card-title {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0;
    pointer-events: none;
}
.jcs-card-title span {
    display: block;
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(0.95rem, 2vw, 1.25rem);
    color: #ffffff;
    line-height: 1.3;
    text-shadow: 0 1px 6px rgba(0,0,0,0.35);
    letter-spacing: 0.01em;
}

/* Arrow button — top right circle, white, exactly like reference */
.jcs-card-arrow {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.22);
    transition: background 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    border: none;
}
.jcs-card-arrow svg {
    width: 18px;
    height: 18px;
    color: #1a1a1a;
    transition: color 0.2s;
}
a.jcs-card-arrow:hover {
    background: #1a1a1a;
    transform: scale(1.08);
}
a.jcs-card-arrow:hover svg {
    color: #ffffff;
}

/* ---- PREV / NEXT ARROWS ---- */
.jcs-prev,
.jcs-next {
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% - 24px));
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    padding: 0;
}
.jcs-prev svg,
.jcs-next svg {
    width: 20px;
    height: 20px;
    color: #1a1a1a;
}
.jcs-prev { left: -20px; }
.jcs-next { right: -20px; }
.jcs-prev:hover,
.jcs-next:hover {
    background: #1a1a1a;
    box-shadow: 0 6px 24px rgba(0,0,0,0.28);
}
.jcs-prev:hover svg,
.jcs-next:hover svg { color: #fff; }

/* Hidden state (when show_arrows = 0) */
.jcs-prev.jcs--hidden,
.jcs-next.jcs--hidden { display: none; }

/* ---- DOTS ---- */
.jcs-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    align-items: center;
}
.jcs-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.22);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}
.jcs-dot.is-active {
    background: #1a1a1a;
    width: 22px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 600px) {
    .jcs-prev { left: -8px; }
    .jcs-next { right: -8px; }
    .jcs-prev, .jcs-next { width: 36px; height: 36px; }
}
