/* ============================================================
   AE Customer Reviews Widget — CSS
   Exact match to approved HTML design:
   - Full-width light-grey bg (#f4f4f4)
   - Giant outline text floating behind (SVG-style via CSS)
   - Left: headline + square arrow buttons
   - Right: Swiper — 2 full + 3rd partial peek
   ============================================================ */

/* ── Section ─────────────────────────────────────────────── */
.ae-reviews-section {
    background-color: #f4f4f4;
    position: relative;
    overflow: hidden;
    padding-bottom: 5rem;
    /* margin-top is controlled by section padding in Elementor */
}

/* ── Giant background outline text ───────────────────────── */
.ae-reviews-bg-wrap {
    position: absolute;
    top: 0;
    left: -2%;
    width: 80%;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    line-height: 0.88;
}

.ae-reviews-bg-text {
    display: block;
    font-family: Lato, sans-serif;
    font-size: clamp(80px, 14vw, 180px);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 0.9;
    color: transparent;
    /* Outline-only text — matches the SVG in the original */
    -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.08);
    text-stroke: 1.5px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    /* Slight bleed off left like the screenshot */
    margin-left: -0.02em;
}

/* ── Body: left panel + right swiper ─────────────────────── */
.ae-reviews-body {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    /* Pushes content below the giant text — matches padding-top:20rem */
    padding-top: 18rem;
    padding-left: 1rem;
    max-width: 1400px;
    margin: 0 0 0 auto;
}

/* ── Left panel ───────────────────────────────────────────── */
.ae-reviews-left {
    flex-shrink: 0;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ae-reviews-headline {
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin: 0;
    font-family: Lato, sans-serif;
}

/* ── Arrow navigation buttons ─────────────────────────────── */
.ae-reviews-controls {
    display: flex;
    gap: 0.75rem;
}

.ae-reviews-btn {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    border: 1.5px solid #bbbbbb;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
}

.ae-reviews-btn:hover {
    border-color: #e8192c;
    color: #e8192c;
}

.ae-reviews-btn svg {
    display: block;
    flex-shrink: 0;
}

/* Disabled state */
.ae-reviews-btn.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Right: Swiper wrapper ────────────────────────────────── */
.ae-reviews-swiper-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden; /* clip so partial 3rd card is controlled */
}

/* Swiper: overflow visible so 3rd card peeks in from right */
.ae-reviews-swiper {
    overflow: visible !important;
}

.ae-reviews-swiper .swiper-slide {
    height: auto;
    /* Exact width from original CSS: 300px per card */
    width: 300px;
}

/* ── Review Card ──────────────────────────────────────────── */
.ae-review-card {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    height: 100%;
    min-height: 220px;
    transition: box-shadow 0.25s ease;
    box-sizing: border-box;
}

.ae-review-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
}

/* ── Card Header: avatar + name + designation ─────────────── */
.ae-review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.ae-review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.ae-review-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ae-review-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    font-family: Lato, sans-serif;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ae-review-designation {
    font-size: 11px;
    color: #888888;
    font-family: Montserrat, sans-serif;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Review body text ─────────────────────────────────────── */
.ae-review-text {
    font-size: 0.875rem;
    color: #555555;
    line-height: 1.6;
    flex: 1;
    margin: 0;
    font-family: Montserrat, sans-serif;
}

/* ── CTA link ─────────────────────────────────────────────── */
.ae-review-link {
    font-size: 0.8125rem;
    color: #e8192c;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: opacity 0.2s ease;
    font-family: Montserrat, sans-serif;
    align-self: flex-start;
    cursor: pointer;
}

.ae-review-link:hover {
    opacity: 0.75;
}

.ae-review-link--no-url {
    cursor: default;
    opacity: 0.6;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1023px) {
    .ae-reviews-body {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 12rem;
        padding-right: 1rem;
    }

    .ae-reviews-left {
        width: 100%;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .ae-reviews-headline {
        flex: 1;
        min-width: 200px;
    }

    .ae-reviews-bg-text {
        font-size: clamp(60px, 18vw, 120px);
    }
}

@media (max-width: 767px) {
    .ae-reviews-body {
        padding-top: 8rem;
        gap: 1.5rem;
    }

    .ae-reviews-bg-text {
        font-size: clamp(48px, 20vw, 96px);
    }

    .ae-reviews-section {
        padding-bottom: 3rem;
    }

    .ae-reviews-swiper .swiper-slide {
        width: 260px;
    }
}

/* ══════════════════════════════════════════════════════════
   FULL RESPONSIVE — ALL BREAKPOINTS
   Desktop XL (1400+) → Desktop (1024) → iPad Pro (900)
   → Tablet (768) → Mobile (480) → Small Mobile (320px)
   ══════════════════════════════════════════════════════════ */

/* Desktop XL ≥ 1400px */
@media (min-width: 1400px) {
    .ae-reviews-body {
        padding-left: 2rem;
    }
    .ae-reviews-left {
        width: 360px;
    }
}

/* iPad Pro / Laptop 900–1023px */
@media (min-width: 900px) and (max-width: 1023px) {
    .ae-reviews-body {
        padding-top: 14rem;
        padding-left: 1.5rem;
        gap: 2rem;
    }
    .ae-reviews-left {
        width: 280px;
    }
}

/* Tablet 768–899px */
@media (max-width: 899px) {
    .ae-reviews-body {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 11rem;
        padding-right: 1rem;
        gap: 1.5rem;
    }
    .ae-reviews-left {
        width: 100%;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    .ae-reviews-headline {
        flex: 1;
        min-width: 180px;
    }
    .ae-reviews-swiper-wrap {
        width: 100%;
    }
}

/* Mobile 480–767px */
@media (max-width: 767px) {
    .ae-reviews-body {
        padding-top: 8rem;
        padding-left: 0.75rem;
        gap: 1.25rem;
    }
    .ae-reviews-section {
        padding-bottom: 3rem;
    }
    .ae-reviews-bg-text {
        font-size: clamp(48px, 20vw, 96px);
    }
    .ae-reviews-swiper .swiper-slide {
        width: 260px;
    }
    .ae-review-card {
        padding: 1.5rem 1.25rem;
    }
}

/* Small Mobile 320–479px */
@media (max-width: 479px) {
    .ae-reviews-body {
        padding-top: 6rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        gap: 1rem;
    }
    .ae-reviews-bg-text {
        font-size: clamp(36px, 22vw, 72px);
    }
    .ae-reviews-left {
        gap: 0.75rem;
    }
    .ae-reviews-headline {
        font-size: 1rem;
    }
    .ae-reviews-swiper .swiper-slide {
        /* At 320px, 1 full card should be close to full width */
        width: min(260px, calc(100vw - 40px));
    }
    .ae-review-card {
        padding: 1.25rem 1rem;
        min-height: 180px;
    }
    .ae-review-name {
        font-size: 14px;
    }
    .ae-review-text {
        font-size: 13px;
    }
    .ae-reviews-btn {
        width: 40px;
        height: 40px;
    }
}

/* Landscape mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .ae-reviews-body {
        padding-top: 5rem;
    }
    .ae-reviews-bg-text {
        font-size: clamp(40px, 12vh, 80px);
    }
}

/* ══════════════════════════════════════════════════════════
   EQUAL HEIGHT CARDS
   All cards in the swiper row match the tallest card.
   JS sets min-height; CSS ensures the card stretches properly.
   ══════════════════════════════════════════════════════════ */
.ae-reviews-equal-height .swiper-slide {
    height: auto;           /* let slide size to content */
    display: flex;
    align-items: stretch;   /* card fills full slide height */
}

.ae-reviews-equal-height .ae-review-card {
    display: flex;
    flex-direction: column;
    height: 100%;           /* fill the slide */
    box-sizing: border-box;
}

/* Text wrap takes all available space → pushes button to bottom */
.ae-review-text-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ae-review-text {
    flex: 1;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════
   READ ALL / READ LESS TOGGLE BUTTON
   ══════════════════════════════════════════════════════════ */

/* Single paragraph — JS swaps .textContent directly.
   No show/hide CSS needed — only one <p> exists per card. */

.ae-review-toggle {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.8125rem;
    color: #e8192c;
    font-weight: 500;
    font-family: Montserrat, sans-serif;
    transition: opacity 0.2s ease;
    align-self: flex-start;
    margin-top: 6px;
    line-height: 1.4;
    text-align: left;
}

.ae-review-toggle:hover {
    opacity: 0.75;
}

.ae-toggle-label {
    display: inline;
}

.ae-toggle-arrow {
    display: inline-block;
    font-style: normal;
    line-height: 1;
    transition: none;
}

/* Word wrap on review text */
.ae-review-text {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-line; /* preserve intentional line breaks */
}
