/* =============================================================
   Nejat Before After Carousel Widget
   Slug: nejat-before-after-carousel
   All classes namespaced to .nejat-ba-carousel__* — no overlap
   with the existing .nejat-ba-gallery__* gallery widget.
   ============================================================= */

/* ── Root ────────────────────────────────────────────────────── */
.nejat-ba-carousel {
    background-color: #f5f5f5;
    padding-top: var(--nejat-section-pad-v);
    padding-bottom: var(--nejat-section-pad-v);
}

/* ── Inner container ─────────────────────────────────────────── */
.nejat-ba-carousel__inner {
    max-width: var(--nejat-max-width);
    margin: 0 auto;
    padding-left: var(--nejat-gutter);
    padding-right: var(--nejat-gutter);
}

/* ── Section header (full-width row above carousel) ─────────── */
.nejat-ba-carousel__header {
    display: flex;
    flex-direction: column;
    gap: var(--nejat-gap-sm);
    margin-bottom: var(--nejat-gap-md);
}

/* ── Left: text column ────────────────────────────────────── */

.nejat-ba-carousel__eyebrow {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: capitalize;
    color: #4ab3c8;
    margin: 0 0 8px;
}

.nejat-ba-carousel__headline {
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    color: #1a1a1a;
    margin: 0;
}

.nejat-ba-carousel__description {
    margin-top: 4px;
    color: #444444;
    font-size: 16px;
    line-height: 1.7;
    max-width: 700px;
}

.nejat-ba-carousel__description p {
    margin: 0;
    color: inherit;
}

/* ── Per-slide layout (case description left, images right) ────── */
.nejat-ba-carousel__body {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: var(--nejat-gap-lg);
    align-items: start;
}

/* ── Left column: stacks all text panels, shows one at a time ── */
.nejat-ba-carousel__text-area {
    position: relative;
}

/* ── Right column: stacks all image panels + nav below ─────── */
.nejat-ba-carousel__image-area {
    display: flex;
    flex-direction: column;
}

/* ── Per-slide text column ──────────────────────────────── */
.nejat-ba-carousel__slide-text {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.nejat-ba-carousel__slide-text.is-active {
    display: flex;
}

/* ── Per-slide case title ────────────────────────────────── */
.nejat-ba-carousel__slide-title {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
    margin: 0;
}

/* ── Info tag pills ──────────────────────────────────────── */
.nejat-ba-carousel__slide-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nejat-ba-carousel__slide-tag {
    display: inline-block;
    background-color: #e8f7fa;
    color: #4ab3c8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
}

/* ── Diagnosis / Treatment / Result sections ─────────────── */
.nejat-ba-carousel__slide-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nejat-ba-carousel__slide-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0;
}

.nejat-ba-carousel__slide-section-text {
    font-size: 15px;
    line-height: 1.6;
    color: #444444;
    margin: 0;
}

/* ── Right: image column ─────────────────────────────────────── */
/* (no longer used as a layout wrapper — kept for back-compat) */
.nejat-ba-carousel__image-col { display: contents; }

/* ── Image panel (show/hide wrapper per slide) ────────────── */
.nejat-ba-carousel__image-panel {
    display: none;
}

.nejat-ba-carousel__image-panel.is-active {
    display: block;
}

/* ── Image frame (white card housing both images) ────────────── */
.nejat-ba-carousel__image-frame {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background-color: #ffffff;
    border-radius: var(--nejat-radius);
    padding: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
}

/* ── Single image wrapper ────────────────────────────────────── */
.nejat-ba-carousel__img-wrap {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    /*
     * No fixed aspect-ratio here. The photo's own proportions define the
     * height so nothing gets cropped and no white space appears at the bottom.
     */
}

/*
 * Use higher specificity (.nejat-ba-carousel .nejat-ba-carousel__img)
 * to beat Elementor's `.elementor img { height: auto }` rule without
 * needing !important. `height: auto` + `width: 100%` is exactly what
 * we want — the photo fills the column width at its natural ratio.
 */
.nejat-ba-carousel .nejat-ba-carousel__img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Badge label ─────────────────────────────────────────────── */
.nejat-ba-carousel__img-label {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
    user-select: none;
}

/* Both Before and After labels are top-left — no --after override needed */

/* ── Navigation arrows ───────────────────────────────────────── */
.nejat-ba-carousel__nav {
    display: flex;
    justify-content: flex-end;
    gap: 28px;
    margin-top: 20px;
    align-items: center;
}

.nejat-ba-carousel__nav-btn {
    background: none !important;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    color: #1a1a1a;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
}

.nejat-ba-carousel__nav-btn:hover {
    background: none !important;
    color: #4ab3c8;
}

.nejat-ba-carousel__nav-btn--prev:hover {
    transform: translateX(-3px);
    transition: color 0.2s ease, transform 0.2s ease;
}

.nejat-ba-carousel__nav-btn--next:hover {
    transform: translateX(3px);
    transition: color 0.2s ease, transform 0.2s ease;
}

.nejat-ba-carousel__nav-btn:focus-visible {
    outline: 2px solid #4ab3c8;
    outline-offset: 4px;
    border-radius: 2px;
}

.nejat-ba-carousel__nav-btn svg {
    display: block;
    pointer-events: none;
    overflow: visible;
}

.nejat-ba-carousel__nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: inherit;
    pointer-events: none;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .nejat-ba-carousel__body {
        gap: var(--nejat-gap-md);
    }
}

@media (max-width: 768px) {
    .nejat-ba-carousel__body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nejat-ba-carousel__image-frame {
        gap: 6px;
        padding: 6px;
    }

    .nejat-ba-carousel__img-label {
        font-size: 11px;
        padding: 3px 8px;
        top: 8px;
        left: 8px;
    }

    /* No --after override — both labels stay top-left on mobile too */
}
