/* ================================================================
   FEF CAROUSEL EFFECTS — shared structure.

   Every effect (Coverflow, 3D Coverflow, Center-mode, Overlapping,
   Focus Center, Stacked Cards, Peeking, Multi-item Center) has its own
   look in carousel-effects/fef-ce-<effect>.css and its own layout script
   in js/carousel-effects/. This file only holds what they all share:
   the wrap / track / slide skeleton, captions, arrows and dots.

   Defaults are deliberately LOW specificity (:where / single class) so
   every Elementor Style control overrides them without !important.

   Vertical centring: slides are centred with  inset:0; margin:auto  and
   an explicit height — NOT with percentage margins. (Percentage margins
   resolve against the container WIDTH, which is what pushed the slider to
   the top and cut the centre slide off in the earlier version.)
   ================================================================ */

.fef-ce-wrap {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding: 20px 0;
    outline: none;
}
.fef-ce-wrap:focus-visible { box-shadow: 0 0 0 2px rgba(37, 99, 235, .55) inset; }

.fef-ce-track {
    position: relative;
    height: var(--fef-ce-height, 380px);
    perspective: 1200px;
    transform: translate(var(--fef-ce-shift-x, 0px), var(--fef-ce-shift-y, 0px));
    -webkit-user-select: none;
    user-select: none;
}

/* ── Slide ── */
.fef-ce-slide {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    margin: auto;                       /* centres the box both ways */
    box-sizing: border-box;
    display: flex;
    width: var(--fef-ce-slide-w, 42%);
    /* --fef-ce-fit = the biggest scale any slide reaches; dividing by it keeps a scaled-up slide inside the track. */
    height: var(--fef-ce-slide-h, calc(100% / var(--fef-ce-fit, 1)));
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .28);
    cursor: pointer;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: box-shadow .3s ease, border-color .3s ease, background-color .3s ease;
}
.fef-ce-slide.fef-ce-hidden { visibility: hidden; }
.fef-ce-slide.fef-ce-active { cursor: default; }

/* Image frame: padding on the slide makes a mat, margin here insets the picture inside it. */
.fef-ce-media {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: inherit;
}
.fef-ce-media picture { display: block; width: 100%; height: 100%; }
.fef-ce-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: var(--fef-ce-img-fit, cover);
    object-position: 50% var(--fef-ce-pos-y, 50%);
    border-radius: inherit;
    pointer-events: none;
    -webkit-user-drag: none;
}
.fef-ce-media::after {                  /* colour overlay (Style → Slides → Overlay) */
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    transition: background-color .3s ease;
    pointer-events: none;
}

/* ── Caption ── */
.fef-ce-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 16px 18px;
    background: linear-gradient(to top, rgba(0, 0, 0, .72), transparent);
    color: #fff;
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}
.fef-ce-slide.fef-ce-active .fef-ce-caption { opacity: 1; }
.fef-ce-caption-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.fef-ce-caption-desc { font-size: 13px; opacity: .9; margin: 0; }

/* ── Prev / Next buttons ── */
.fef-ce-arrow {
    position: absolute;
    top: 50%;
    z-index: 200;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    border: 0 solid transparent;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #1e293b;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .18);
    transform: translateY(-50%);
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease, opacity .2s ease;
}
.fef-ce-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.fef-ce-arrow i, .fef-ce-arrow svg { display: block; pointer-events: none; }
.fef-ce-arrow svg { width: 1em; height: 1em; fill: currentColor; }
.fef-ce-arrow.fef-ce-disabled, .fef-ce-arrow:disabled { opacity: .35; cursor: not-allowed; }
.fef-ce-prev { left: 12px; }
.fef-ce-next { right: 12px; }

/* ── Dots / numbers / bars ── */
.fef-ce-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}
.fef-ce-dot {
    box-sizing: border-box;
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0 solid transparent;
    border-radius: 50%;
    background: rgba(15, 23, 42, .25);
    color: #1e293b;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease, width .2s ease;
}
.fef-ce-dot:hover { background: rgba(15, 23, 42, .5); }
.fef-ce-dot-active { background: #1e293b; transform: scale(1.3); }
.fef-ce-dot-active:hover { background: #1e293b; }

.fef-ce-dots-numbers .fef-ce-dot {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    border-width: 1px; border-color: rgba(15, 23, 42, .25);
    transform: none;
}
.fef-ce-dots-numbers .fef-ce-dot:hover { background: rgba(15, 23, 42, .08); }
.fef-ce-dots-numbers .fef-ce-dot-active { background: #1e293b; color: #fff; border-color: #1e293b; }
.fef-ce-dots-numbers .fef-ce-dot-active:hover { background: #1e293b; }

.fef-ce-dots-bars .fef-ce-dot { width: 22px; height: 4px; border-radius: 2px; transform: none; }
.fef-ce-dots-bars .fef-ce-dot-active { width: 38px; }

/* Drag feedback */
.fef-ce-wrap.fef-ce-dragging .fef-ce-track { cursor: grabbing; }

@media (max-width: 767px) {
    .fef-ce-slide { width: var(--fef-ce-slide-w-mobile, var(--fef-ce-slide-w, 78%)); }
    .fef-ce-arrow { width: 34px; height: 34px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .fef-ce-slide, .fef-ce-arrow, .fef-ce-dot { transition: none !important; }
}
