/* ===============================================================
   Warren Projects Carousel v2.1
   Includes: glassmorphic layer, coverflow 3D, scale-blur, depth,
             fade, all easing curves, dots, responsive
   =============================================================== */

/* -- CSS custom properties (overridden per-card via JS) --------- */
:root {
    --wpw-glass-blur   : 12px;
    --wpw-glass-tint   : rgba(255,255,255,0.10);
    --wpw-glass-border : rgba(255,255,255,0.22);
    --wpw-glass-sat    : 140%;
    --wpw-glass-speed  : 500ms;
}

/* -- Wrapper ---------------------------------------------------- */
.wpw-wrap {
    position: relative;
    box-sizing: border-box;
    outline: none;
}

/* -- Empty notice (editor) -------------------------------------- */
.wpw-empty-notice {
    padding: 40px 24px;
    text-align: center;
    background: #f5f5f5;
    border: 2px dashed #ccc;
    color: #888;
    font-size: 14px;
    border-radius: 4px;
}

/* -- Top row ---------------------------------------------------- */
.wpw-top-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
}

/* -- Section header --------------------------------------------- */
.wpw-section-header { flex: 1; min-width: 0; }

.wpw-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: #9e3b2b;
    margin-bottom: 12px;
    line-height: 1;
}
.wpw-eyebrow::before {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: #9e3b2b;
    flex-shrink: 0;
}

.wpw-section-heading {
    margin: 0; padding: 0;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #1a1a1a;
    line-height: 1.2;
}

/* -- Nav arrows ------------------------------------------------- */
.wpw-nav-arrows {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.wpw-nav-arrows--below-left   { justify-content: flex-start; margin-top: 28px; }
.wpw-nav-arrows--below-center { justify-content: center;     margin-top: 28px; }
.wpw-nav-arrows--below-right  { justify-content: flex-end;   margin-top: 28px; }
.wpw-nav-arrows--header-right { flex-shrink: 0; }
.wpw-nav-arrows--header-left  { flex-shrink: 0; order: -1; }

/* -- Button ----------------------------------------------------- */
.wpw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #9e3b2b;
    background: transparent;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: background .22s ease, border-color .22s ease, opacity .22s ease, transform .18s ease;
}
.wpw-btn svg {
    width: 18px; height: 18px;
    stroke: #9e3b2b;
    display: block;
    flex-shrink: 0;
    transition: stroke .22s ease;
    pointer-events: none;
}
.wpw-btn:hover            { background: #9e3b2b; transform: scale(1.05); }
.wpw-btn:hover svg        { stroke: #ffffff; }
.wpw-btn:active           { transform: scale(0.96); }
.wpw-btn.wpw-disabled,
.wpw-btn:disabled         { opacity: .28; cursor: default; pointer-events: none; transform: none; }

.wpw-btn--side-prev,
.wpw-btn--side-next {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    z-index: 20;
}
.wpw-btn--side-prev { left: -28px; }
.wpw-btn--side-next { right: -28px; }

/* -- Carousel structure ----------------------------------------- */
.wpw-carousel-outer  { position: relative; }
.wpw-track-wrap      { overflow: visible; }

.wpw-track {
    display: flex;
    will-change: transform;
}

/* Coverflow/fade modes switch to block+absolute in JS */
.wpw-layout--coverflow,
.wpw-layout--fade {
    position: relative;
}

.wpw-slide {
    flex-shrink: 0;
    box-sizing: border-box;
    /* width + margin set by JS */
}

/* -- Card ------------------------------------------------------- */
.wpw-card {
    display: block;
    position: relative;
    height: 420px;
    overflow: hidden;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    -webkit-user-drag: none;
    /* Isolate for glass overlay */
    isolation: isolate;
}
a.wpw-card { cursor: pointer; }

.wpw-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: transform .65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    will-change: transform;
}
.wpw-card--hover-scale:hover .wpw-card-bg {
    transform: scale(1.06);
}

/* -- Overlay ---------------------------------------------------- */
.wpw-card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 65%;
    background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 1;
    transition: opacity .4s ease;
}

/* -- Caption ---------------------------------------------------- */
.wpw-card-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 16px 24px 24px;
    z-index: 3;
    /* Fade caption in on active */
    transition: opacity .4s ease .1s, transform .4s ease .1s;
}

/* Inactive slide captions fade/shift down slightly */
.wpw-far .wpw-card-caption,
.wpw-prev .wpw-card-caption,
.wpw-next .wpw-card-caption {
    opacity: 0.5;
    transform: translateY(6px);
}
.wpw-active .wpw-card-caption {
    opacity: 1;
    transform: translateY(0);
}

.wpw-card-location {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.4;
}
.wpw-card-subtitle {
    font-size: 13px;
    letter-spacing: .10em;
    text-transform: uppercase;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}
.wpw-card-desc {
    font-size: 13px;
    color: rgba(255,255,255,.8);
    margin-top: 6px;
    line-height: 1.5;
}
.wpw-card-cta {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    border: 1px solid #fff;
    color: #fff;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background .22s ease, color .22s ease;
}
.wpw-card-cta:hover { background: #fff; color: #000; }

/* ==============================================================
   GLASS LAYER
   A frosted-glass pane sits over each slide.
   - Active slide: glass melts away revealing crisp content.
   - Inactive slides: glass shimmers, blurring + tinting them.
   ============================================================== */
.wpw-glass {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
    /* Layered glass effect */
    background     : var(--wpw-glass-tint);
    backdrop-filter: blur(var(--wpw-glass-blur)) saturate(var(--wpw-glass-sat));
    -webkit-backdrop-filter: blur(var(--wpw-glass-blur)) saturate(var(--wpw-glass-sat));
    border         : 1px solid var(--wpw-glass-border);
    /* Shimmer edge using box-shadow */
    box-shadow: inset 1px 1px 0 var(--wpw-glass-border),
                inset -1px -1px 0 rgba(0,0,0,0.08);
    /* Default: invisible - JS adds state classes */
    opacity : 0;
    transition:
        opacity        var(--wpw-glass-speed) cubic-bezier(0.45,0,0.20,1),
        backdrop-filter var(--wpw-glass-speed) cubic-bezier(0.45,0,0.20,1),
        transform      var(--wpw-glass-speed) cubic-bezier(0.45,0,0.20,1),
        background     var(--wpw-glass-speed) cubic-bezier(0.45,0,0.20,1);
    transform: translateZ(0);
    will-change: opacity, backdrop-filter;
}

/* Active glass state - class added when slide BECOMES active, then removed */
.wpw-glass--inactive {
    opacity: 0;
    backdrop-filter: blur(0px) saturate(100%);
    -webkit-backdrop-filter: blur(0px) saturate(100%);
    background: transparent;
}

/* Fully hidden after melt animation completes */
.wpw-glass--hidden {
    opacity: 0;
    display: none; /* stop consuming GPU after reveal */
}

/* Glass ON - inactive slides */
.wpw-glass--active {
    opacity: 1;
    transform: translateZ(0);
}

/* Shimmer animation for inactive slides */
@keyframes wpw-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

.wpw-glass--active::after {
    content   : '';
    position  : absolute;
    inset     : 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255,255,255,0.06) 50%,
        transparent 60%
    );
    background-size: 200% 100%;
    animation : wpw-shimmer 3.5s ease-in-out infinite;
    border-radius: inherit;
}

/* -- Active slide: crisp, elevated ----------------------------- */
.wpw-active .wpw-card {
    /* Subtle ring to lift the active card */
    box-shadow:
        0 24px 60px rgba(0,0,0,0.40),
        0  6px 20px rgba(0,0,0,0.28),
        0  0  0  1px rgba(255,255,255,0.08);
}
.wpw-prev .wpw-card,
.wpw-next .wpw-card {
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}
.wpw-far .wpw-card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* -- Slide-level transition helpers (JS also sets inline) ------- */
.wpw-slide {
    transition:
        transform  550ms cubic-bezier(0.45,0,0.20,1),
        opacity    550ms cubic-bezier(0.45,0,0.20,1),
        filter     550ms ease,
        z-index    0ms;
}

/* ==============================================================
   COVERFLOW: make sure perspective origin is set on track
   ============================================================== */
.wpw-layout--coverflow .wpw-slide {
    transform-style: preserve-3d;
}

/* ==============================================================
   DOTS
   ============================================================== */
.wpw-dots-wrap { margin-top: 28px; }

.wpw-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wpw-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(0,0,0,.22);
    border: none; padding: 0;
    cursor: pointer;
    transition: background .25s ease, width .25s ease, transform .25s ease;
    flex-shrink: 0;
}
.wpw-dot.wpw-dot--active {
    background: #9e3b2b;
    width: 24px;
    border-radius: 4px;
    transform: scaleY(1.1);
}

/* -- Responsive ------------------------------------------------- */
@media (max-width: 768px) {
    .wpw-top-row { flex-direction: column; align-items: flex-start; }
    .wpw-nav-arrows--header-right,
    .wpw-nav-arrows--header-left { align-self: flex-end; order: 1; }
}

/* -- Template slide layout -------------------------------------- */
.wpw-slide--template { }
.wpw-slide--template .elementor-section,
.wpw-slide--template .e-container { height: 100%; }
