/* ═══════════════════════════════════════════════════════
   IIMBG Universal Slider — slider.css v2.0
   100% container-width aware. No fixed widths.
═══════════════════════════════════════════════════════ */

/* ── CSS variables (set inline per instance) ── */
.isldr-outer {
    --isldr-vis:   1;
    --isldr-gap:   20px;
    --isldr-speed: 600ms;
    --isldr-navy:  #0d1b3e;
    --isldr-gold:  #c8a84b;
}

/* ── Outer wrapper ── */
.isldr-outer {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ── Viewport: clips overflow ── */
.isldr-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    /* Allows flex children to stretch to the explicit height */
    display: flex;
    flex-direction: column;
}

/* ═══════════════════════════════════
   SLIDE EFFECT: SLIDE (default)
═══════════════════════════════════ */
.isldr-effect-slide {
    display: flex;
    gap: var(--isldr-gap);
    transition: transform var(--isldr-speed) cubic-bezier(.4,0,.2,1);
    will-change: transform;
    /* Track must be wide enough to hold all slides — do NOT constrain to 100% */
    width: max-content;
    /* flex-grow fills the full viewport height */
    flex: 1 0 auto;
    min-height: 0;
    align-items: stretch;
}

.isldr-effect-slide .isldr-slide {
    /* Width is set directly by JS (applySlideSizes) using viewport.offsetWidth
       so it always equals the correct fraction of the visible viewport area.
       These CSS values are just safe fallbacks. */
    flex: 0 0 auto;
    min-width: 0;
    box-sizing: border-box;
    /* Column flex so img-wrap can grow to fill full slide height */
    display: flex;
    flex-direction: column;
}

/* ═══════════════════════════════════
   SLIDE EFFECT: FADE
═══════════════════════════════════ */
.isldr-effect-fade {
    position: relative;
    width: 100%;
    height: 100%;
}

.isldr-effect-fade .isldr-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--isldr-speed) ease;
    pointer-events: none;
    z-index: 0;
}

.isldr-effect-fade .isldr-slide.isldr-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
    position: relative;
}

/* ═══════════════════════════════════
   IMAGE SLIDE
═══════════════════════════════════ */
.isldr-img-wrap {
    width: 100%;
    height: 100%;
    min-height: inherit;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #e8e8e8;
    display: flex;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    /* Ensure it stretches in a flex context */
    flex: 1 1 auto;
}

/* Caption gradient overlay */
.isldr-caption {
    width: 100%;
    padding: 32px 36px;
    background: linear-gradient(to top,
        rgba(0,0,0,.75) 0%,
        rgba(0,0,0,.35) 55%,
        transparent 100%);
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.isldr-caption-title {
    font-size: clamp(1.1rem, 2.5vw, 2rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.2;
    text-shadow: 0 2px 6px rgba(0,0,0,.4);
}

.isldr-caption-text {
    font-size: clamp(.85rem, 1.4vw, 1rem);
    color: rgba(255,255,255,.88);
    margin: 0 0 16px;
    line-height: 1.6;
}

.isldr-btn {
    display: inline-block;
    background: var(--isldr-gold);
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 10px 24px;
    border-radius: 6px;
    transition: opacity .2s, transform .15s;
}
.isldr-btn:hover {
    opacity: .9;
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

/* ═══════════════════════════════════
   CUSTOM HTML SLIDE
═══════════════════════════════════ */
.isldr-slide > *:not(.isldr-img-wrap):not(.isldr-caption) {
    height: 100%;
    box-sizing: border-box;
}

/* ═══════════════════════════════════
   ARROWS
═══════════════════════════════════ */

/* Arrows must be positioned relative to the viewport wrapper (which matches
   the image height), not the full outer wrapper that also includes the dots. */
.isldr-viewport-wrap {
    position: relative;
}

.isldr-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.93);
    box-shadow: 0 2px 14px rgba(0,0,0,.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--isldr-navy);
    padding: 0;
    transition: background .18s, box-shadow .18s, transform .18s;
    outline: none;
}
.isldr-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,.22);
    transform: translateY(-50%) scale(1.08);
}
.isldr-arrow:focus-visible {
    outline: 3px solid var(--isldr-gold);
    outline-offset: 2px;
}
.isldr-arrow:disabled {
    opacity: .28;
    cursor: not-allowed;
}
.isldr-prev { left: -16px; }
.isldr-next { right: -16px; }

/* Keep arrows inside on small screens */
@media (max-width: 580px) {
    .isldr-prev { left: 6px; }
    .isldr-next { right: 6px; }
}

/* ═══════════════════════════════════
   DOTS
═══════════════════════════════════ */
.isldr-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0 2px;
}

.isldr-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--isldr-navy);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background .2s, transform .2s, border-color .2s;
    outline: none;
}
.isldr-dot:hover {
    transform: scale(1.3);
    background: rgba(13,27,62,.25);
}
.isldr-dot.isldr-active {
    background: var(--isldr-gold);
    border-color: var(--isldr-gold);
    transform: scale(1.35);
}
.isldr-dot:focus-visible {
    outline: 2px solid var(--isldr-gold);
    outline-offset: 2px;
}

/* ═══════════════════════════════════
   ACCESSIBILITY / MOTION
═══════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .isldr-effect-slide,
    .isldr-effect-fade .isldr-slide,
    .isldr-arrow,
    .isldr-dot,
    .isldr-btn { transition: none !important; }
}
