/* =======================================================================
 * KOOR Slider – frontend styles
 *
 * Layout matches the design:
 *   - rounded card with thin border
 *   - bottom row: progress bar (left, full width) + arrows
 *   - arrows are square outlined boxes containing only the icon (no fill)
 * ======================================================================= */

.koor-slider {
    --koor-slider-card-bg: transparent;
    --koor-slider-card-border: #1A1A1A;
    --koor-slider-card-radius: 24px;
    --koor-slider-progress-track: #D9D2C7;
    --koor-slider-progress-fill: #1A1A1A;
    --koor-slider-arrow-bg: transparent;
    --koor-slider-arrow-border: #1A1A1A;
    --koor-slider-arrow-color: #1A1A1A;
    --koor-slider-arrow-size: 56px;
    --koor-slider-arrow-radius: 4px;

    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.koor-slider *,
.koor-slider *::before,
.koor-slider *::after {
    box-sizing: border-box;
}

/* ---------- Splide track / list ---------- */
/* IMPORTANT: Splide sets inline width on .splide__slide.
   We must NOT override that with flex, otherwise slides stack on top
   of each other (the issue from screenshot 1). */
.koor-slider .splide {
    visibility: visible;
}

.koor-slider .splide__track {
    overflow: hidden;
}

/* Right-side overflow: slides can spill out of the container to the right,
   while the left edge stays clipped (no slides peek in from the left). */
.koor-slider--right-overflow .splide__track {
    overflow: visible;
    /* inset(top right bottom left) — negative right value extends the visible
       area past the track's right edge; left:0 keeps the left edge clipped. */
    clip-path: inset(-100vh -100vw -100vh 0);
}

.koor-slider .splide__list {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
}

.koor-slider .splide__slide {
    box-sizing: border-box;
    height: auto;
    min-width: 0;
    display: flex;
    /* Do NOT set flex / width here — Splide manages it inline */
}

/* ---------- Card ---------- */
.koor-slider__card {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: var(--koor-slider-card-bg);
    border: 1px solid var(--koor-slider-card-border);
    border-radius: var(--koor-slider-card-radius);
    padding: 32px;
    min-height: 320px;
    position: relative;
}

/* The body wrapper is invisible to the flex layout — title/text behave
   exactly as before, but the absolutely-positioned number is a sibling. */
.koor-slider__card-body {
    display: contents;
}

/* When the card has a bottom-left number, reserve space so the number
   doesn't overlap with text. Specificity bumped to win over Elementor's
   {{WRAPPER}} .koor-slider__card padding selector. */
.koor-slider .koor-slider__card.koor-slider__card--has-number {
    padding-bottom: 80px;
}

.koor-slider__number {
    position: absolute;
    left: 32px;
    bottom: 32px;
    font-size: 1.25rem;
    line-height: 1;
    font-weight: 600;
    color: #1A1A1A;
}

@media (max-width: 767px) {
    .koor-slider .koor-slider__card.koor-slider__card--has-number {
        padding-bottom: 64px;
    }

    .koor-slider__number {
        left: 24px;
        bottom: 24px;
    }
}

/* ---------- Year stack (year_list layout) ----------
   Two stacked bordered boxes: year on top, list below. */
.koor-slider__year-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 320px;
}

/* Inner cards inside the stack don't carry the slide-level min-height —
   only the stack itself does. */
.koor-slider__year-stack .koor-slider__card {
    min-height: 0;
}

.koor-slider__year-stack .koor-slider__card--year {
    flex: 0 0 auto;
}

.koor-slider__year-stack .koor-slider__card--list {
    flex: 1 1 auto;
}

.koor-slider__title,
.koor-slider__year {
    margin: 0 0 16px 0;
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 600;
    color: #1A1A1A;
}

.koor-slider__year {
    font-size: 1.75rem;
    margin-bottom: 0 !important;
}

.koor-slider__divider {
    border: 0;
    border-top: 1px solid var(--koor-slider-card-border);
    margin: 0 0 20px 0;
}

.koor-slider__text {
    margin: 0;
    color: #3D3D3D;
    line-height: 1.55;
}

/* WYSIWYG output: reset paragraph margins for clean layout */
.koor-slider__text p {
    margin: 0 0 12px 0;
}

.koor-slider__text p:last-child {
    margin-bottom: 0;
}

.koor-slider__text strong,
.koor-slider__text b {
    font-weight: 700;
}

.koor-slider__text a {
    color: inherit;
    text-decoration: underline;
}

.koor-slider__text ul,
.koor-slider__text ol {
    margin: 0 0 12px 0;
    padding-left: 1.25em;
}

/* Bulleted list with diamond markers (orange diamonds) */
.koor-slider__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.koor-slider__list li {
    position: relative;
    padding-left: 20px;
    line-height: 1.5;
    color: #3D3D3D;
}

.koor-slider__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    background-color: #EE5A24;
    transform: rotate(45deg);
}

/* ---------- Footer: progress bar + arrows ---------- */
.koor-slider__footer {
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.koor-slider__progress {
    flex: 1 1 auto;
    height: 1px;
    background-color: var(--koor-slider-progress-track);
    position: relative;
    overflow: hidden;
    align-self: center;
}

.koor-slider__progress-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    height: 100%;
    background-color: var(--koor-slider-progress-fill);
    transition: width 0.4s ease;
}

.koor-slider__arrows {
    display: flex;
    gap: 12px;
    flex: 0 0 auto;
}

.koor-slider__arrow {
    width: var(--koor-slider-arrow-size) !important;
    height: var(--koor-slider-arrow-size);
    border: none !important;
    border-radius: var(--koor-slider-arrow-radius);
    background-color: var(--koor-slider-arrow-bg);
    color: var(--koor-slider-arrow-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    font: inherit;
    line-height: 1;
}

.koor-slider__arrow:hover {
    background-color: #1A1A1A;
    color: #1A1A1A !important;
}

.koor-slider__arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: transparent;
    color: var(--koor-slider-arrow-color);
}

.koor-slider__arrow svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    display: block;
}

/* The icon points LEFT by default — flip it horizontally for the next button */
.koor-slider__arrow--next svg {
    transform: scaleX(-1);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .koor-slider__card {
        padding: 28px;
    }
}

@media (max-width: 767px) {
    .koor-slider__card {
        padding: 24px;
        border-radius: 20px;
        min-height: 260px;
    }

    .koor-slider__footer {
        margin-top: 24px;
        gap: 16px;
    }

    .koor-slider__arrow {
        --koor-slider-arrow-size: 44px;
    }

    .koor-slider__arrow svg {
        width: 14px;
        height: 14px;
    }
}
