/* =====================================================================
   NE Clean — Our Work page only
   Enqueued exclusively on /our-work/. Contains the drag before/after
   comparison slider, the portfolio card and the filter pills.

   Source reference: style.css "Our Work Gallery & Before/After Slider".
   The clip position is driven by the --nec-clip custom property, which
   assets/js/neclean.js (initDragSliders) updates on pointer move.
   ===================================================================== */

/* --- Portfolio card --------------------------------------------- */
.et-l .nec-portfolio-item {
    background: var(--nec-white);
    border-radius: var(--nec-radius-xl);
    padding: 0;
    overflow: hidden;
    box-shadow: var(--nec-shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.et-l .nec-portfolio-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}
.et-l .nec-portfolio-item.nec-hidden {
    display: none;
}

/* --- Comparison slider ------------------------------------------ */
.et-l .nec-ba-slider {
    position: relative;
    width: 100%;
    border-radius: var(--nec-radius-xl) var(--nec-radius-xl) 0 0;
    overflow: hidden;
    cursor: ew-resize;
    aspect-ratio: 4/3;
    touch-action: pan-y;
    --nec-clip: 50%;
    background: #0f172a;
}
.et-l .nec-ba-slider:focus-visible {
    outline: 3px solid var(--nec-primary);
    outline-offset: -3px;
}

/* Base layer = the AFTER image */
.et-l .nec-ba-slider .nec-ba-base {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Clipped overlay = the BEFORE image */
.et-l .nec-ba-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    clip-path: polygon(0 0, var(--nec-clip) 0, var(--nec-clip) 100%, 0 100%);
    -webkit-clip-path: polygon(0 0, var(--nec-clip) 0, var(--nec-clip) 100%, 0 100%);
}
.et-l .nec-ba-overlay img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Drag handle */
.et-l .nec-ba-handle {
    position: absolute;
    top: 0;
    left: var(--nec-clip);
    width: 4px;
    height: 100%;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 3;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.et-l .nec-ba-handle-pill {
    width: 54px;
    height: 38px;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    color: var(--nec-dark-green);
    font-size: 0.85rem;
}

/* BEFORE / AFTER label bar */
.et-l .nec-ba-labels {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 36px;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 5;
    pointer-events: none;
}
.et-l .nec-ba-labels span {
    opacity: 0.9;
}

/* --- Card caption ---------------------------------------------- */
.et-l .nec-portfolio-content {
    padding: 30px;
    position: relative;
    flex-grow: 1;
}
.et-l .nec-portfolio-content h3 {
    color: var(--nec-dark-green);
    font-size: 1.35rem;
    margin-bottom: 10px;
    line-height: 1.3;
}
.et-l .nec-portfolio-content p {
    color: var(--nec-text-muted);
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.et-l .nec-portfolio-content p i {
    color: var(--nec-primary);
}

/* --- Filter pills ---------------------------------------------- */
.et-l .nec-portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}
.et-l .nec-filter-btn {
    padding: 8px 20px;
    border-radius: 30px;
    background: var(--nec-white);
    color: var(--nec-text-muted);
    font-family: var(--nec-font);
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    cursor: pointer;
    transition: all 0.3s;
}
.et-l .nec-filter-btn:hover {
    background: rgba(134, 168, 115, 0.05);
    color: var(--nec-dark-green);
    border-color: rgba(134, 168, 115, 0.3);
}
.et-l .nec-filter-btn.nec-active {
    background: var(--nec-primary);
    color: var(--nec-white);
    border-color: var(--nec-primary);
    box-shadow: 0 4px 10px rgba(134, 168, 115, 0.3);
}

/* --- Responsive ------------------------------------------------ */
@media (max-width: 768px) {
    .et-l .nec-ba-slider {
        aspect-ratio: 1/1;
    }
    .et-l .nec-portfolio-content {
        padding: 24px 20px;
    }
    .et-l .nec-filter-btn {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
}
