/* ==========================================================================
   ANAZ — Testimonials section ("Testimonials" Elementor widget)
   Adapted from html/css/testimonials.css. Requires assets/css/base.css.

   Class map: .testimonials → .monks-testimonials, .testimonials__* →
   .monks-testimonials__*, .testimonial-card* → .monks-testimonials-card*,
   --testimonial-* → --monks-testimonials-*. Child rules are scoped under the
   section class so Elementor's `.elementor img` / button resets and kit
   typography never override the design. Elementor style controls use
   `{{WRAPPER}} .monks-testimonials …` selectors, which are always more
   specific.

   Layout
     Without JS   all cards in a wrapping grid; controls hidden.
     With JS      (.monks-testimonials--enhanced) a carousel.
                  assets/js/widgets/testimonials.js sets on the carousel:
                    data-view="N"     cards on stage (Slider Settings)
                    data-tier=desktop|tablet|mobile  (configurable widths,
                                      default ≥1180 / 720–1179 / <720px)
                    data-centered     odd view > 1: active card in the
                                      middle, wider and taller (design 3-up)
                  and the track's grid columns (--monks-testimonials-columns).
       desktop    round arrows outside the cards, dots underneath
                  (or arrows flanking the dots: "Arrows Position: Below").
       tablet /   arrows flank the dots below.
       mobile
   Off-stage cards stay in the grid row (visibility: hidden) so the row
   height — and therefore the page — never jumps between slides.
   ========================================================================== */

.monks-testimonials {
    /* Section-scoped tokens (values from the Testimonials design) */
    --monks-testimonials-text: #42526B;
    --monks-testimonials-muted: #5F6F86; /* 4.8:1 on white */
    --monks-testimonials-border: #E8EDF3;
    --monks-testimonials-bg: #F8FAFD;
    --monks-testimonials-peach: #FFEDE0;
    --monks-testimonials-container: 1510px;
    --monks-testimonials-radius: 22px;
    --monks-testimonials-nav: 66px;
    --monks-testimonials-lift: 18px; /* how far the active card grows above/below its neighbours */

    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(44px, 3vw, 54px) 0 clamp(40px, 2.8vw, 52px);
    background:
        radial-gradient(60% 50% at 50% 0%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(180deg, var(--monks-testimonials-bg) 0%, #F4F7FB 100%);
    color: var(--monks-testimonials-text);
}

.monks-testimonials .monks-testimonials__inner {
    position: relative;
    z-index: 1;
    max-width: calc(var(--monks-testimonials-container) + 2 * var(--monks-testimonials-nav) + 2 * 28px + 2 * var(--anaz-gutter));
    margin: 0 auto;
    padding: 0 var(--anaz-gutter);
}

/* ---- Decorative peach geometry ----------------------------------------- */

.monks-testimonials .monks-testimonials__decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.monks-testimonials .monks-testimonials__shape {
    position: absolute;
    border-radius: 48px;
    transform: skewX(-24deg);
    /* Fade every shape out towards the bottom */
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 100%);
}

/* Left: a strong band hugging the edge + a paler one behind it */
.monks-testimonials .monks-testimonials__shape--l1 {
    top: 16%;
    left: -150px;
    width: 300px;
    height: 70%;
    background: linear-gradient(160deg, rgba(255, 158, 102, 0.32) 0%, rgba(255, 196, 160, 0.22) 60%, rgba(255, 220, 196, 0) 100%);
}

.monks-testimonials .monks-testimonials__shape--l2 {
    top: 30%;
    left: 40px;
    width: 300px;
    height: 62%;
    background: linear-gradient(160deg, rgba(255, 214, 188, 0.4) 0%, rgba(255, 232, 216, 0.16) 70%, rgba(255, 240, 229, 0) 100%);
}

/* Right: two bands stepping down towards the edge */
.monks-testimonials .monks-testimonials__shape--r1 {
    top: 25%;
    right: -40px;
    width: 220px;
    height: 70%;
    background: linear-gradient(200deg, rgba(255, 214, 188, 0.42) 0%, rgba(255, 232, 216, 0.14) 70%, rgba(255, 240, 229, 0) 100%);
}

.monks-testimonials .monks-testimonials__shape--r2 {
    top: 35%;
    right: -170px;
    width: 300px;
    height: 70%;
    background: linear-gradient(200deg, rgba(255, 162, 110, 0.3) 0%, rgba(255, 196, 160, 0.2) 60%, rgba(255, 220, 196, 0) 100%);
}

/* ---- Introduction ------------------------------------------------------ */

/* Alignment variables are set by the widget's "Alignment" control */
.monks-testimonials .monks-testimonials__intro {
    max-width: 880px;
    margin: 0 var(--monks-testimonials-intro-mr, auto) clamp(24px, 2vw, 34px) var(--monks-testimonials-intro-ml, auto);
    text-align: center;
}

.monks-testimonials .monks-testimonials__eyebrow {
    display: flex;
    align-items: center;
    justify-content: var(--monks-testimonials-intro-justify, center);
    gap: 26px;
    margin: 0 0 clamp(16px, 1.6vw, 28px);
    color: var(--anaz-navy);
    font-size: clamp(12px, 0.95vw, 16px);
    font-weight: 600;
    letter-spacing: 0.3em;
    line-height: 1.3;
    text-transform: uppercase;
}

.monks-testimonials .monks-testimonials__eyebrow::before {
    content: "";
    flex: 0 0 auto;
    width: clamp(32px, 3vw, 50px);
    height: 3px;
    border-radius: 2px;
    background: var(--anaz-orange);
}

.monks-testimonials .monks-testimonials__title {
    margin: 0 0 clamp(14px, 1.3vw, 20px);
    color: var(--anaz-navy-dark);
    font-size: clamp(1.8rem, 4.6vw + 0.75rem, 5.6rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.95;
}

.monks-testimonials .monks-testimonials__title-line {
    display: block;
}

.monks-testimonials .monks-testimonials__title-line--accent {
    color: var(--anaz-orange);
}

.monks-testimonials .monks-testimonials__desc {
    max-width: 780px;
    margin: 0 var(--monks-testimonials-intro-mr, auto) 0 var(--monks-testimonials-intro-ml, auto);
    color: #4A5873;
    font-size: clamp(1rem, 0.85rem + 0.5vw, 1.375rem);
    font-weight: 500;
    line-height: 1.5;
}

/* ---- Cards (shared by static + carousel layouts) ------------------------ */

.monks-testimonials .monks-testimonials__track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: clamp(20px, 2.4vw, 40px);
}

.monks-testimonials .monks-testimonials-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: clamp(24px, 1.7vw, 30px) clamp(22px, 2.3vw, 40px) clamp(24px, 1.8vw, 32px);
    background: rgba(255, 255, 255, 0.96);
    border: 1.5px solid transparent;
    border-radius: var(--monks-testimonials-radius);
    box-shadow: 0 16px 40px rgba(11, 45, 73, 0.06), 0 2px 6px rgba(11, 45, 73, 0.03);
    transition:
        transform 0.4s var(--anaz-ease),
        box-shadow 0.4s var(--anaz-ease),
        border-color 0.35s ease,
        background-color 0.35s ease;
}

/* Featured / current testimonial */
.monks-testimonials .monks-testimonials-card.is-active {
    border-color: rgba(255, 101, 0, 0.72);
    background:
        radial-gradient(120% 70% at 0% 0%, rgba(255, 237, 224, 0.75) 0%, rgba(255, 237, 224, 0) 60%),
        radial-gradient(90% 60% at 100% 100%, rgba(255, 237, 224, 0.55) 0%, rgba(255, 237, 224, 0) 60%),
        #FFFCFA;
    box-shadow: 0 22px 52px rgba(255, 101, 0, 0.10), 0 4px 12px rgba(11, 45, 73, 0.04);
}

.monks-testimonials .monks-testimonials-card__icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: clamp(56px, 4vw, 70px);
    height: clamp(56px, 4vw, 70px);
    margin-bottom: clamp(12px, 1vw, 16px);
    border-radius: 50%;
    background: var(--monks-testimonials-peach);
    color: var(--anaz-orange);
}

.monks-testimonials .monks-testimonials-card__icon svg {
    width: 54%;
    height: auto;
}

.monks-testimonials .monks-testimonials-card__quote {
    margin: 0 0 clamp(18px, 1.4vw, 22px);
    padding: 0;
    border: 0;
}

.monks-testimonials .monks-testimonials-card__quote p {
    margin: 0;
    color: var(--monks-testimonials-text);
    font-size: clamp(1.03rem, 0.8rem + 0.45vw, 1.375rem);
    font-weight: 500;
    line-height: 1.38;
    overflow-wrap: break-word;
}

/* Pushed to the bottom so dividers line up across cards of unequal quote length */
.monks-testimonials .monks-testimonials-card__profile {
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.3vw, 22px);
    margin-top: auto;
    padding-top: clamp(16px, 1.2vw, 20px);
    border-top: 1px solid var(--monks-testimonials-border);
}

.monks-testimonials .monks-testimonials-card__photo {
    flex: 0 0 auto;
    width: clamp(60px, 4.6vw, 80px);
    max-width: none;
    height: clamp(60px, 4.6vw, 80px);
    border: 3px solid var(--anaz-white);
    border-radius: 50%;
    object-fit: cover;
    background: var(--anaz-ice);
    box-shadow: 0 6px 16px rgba(11, 45, 73, 0.10);
}

.monks-testimonials .monks-testimonials-card__person {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    font-size: clamp(0.92rem, 0.8rem + 0.25vw, 1.08rem);
    line-height: 1.5;
}

.monks-testimonials .monks-testimonials-card__name {
    color: var(--anaz-navy-dark);
    font-size: clamp(1rem, 0.85rem + 0.3vw, 1.2rem);
    font-style: normal;
    font-weight: 700;
    line-height: 1.45;
}

.monks-testimonials .monks-testimonials-card__role {
    color: var(--monks-testimonials-muted);
    font-weight: 500;
}

.monks-testimonials .monks-testimonials-card__company {
    color: #C84C00; /* darker orange keeps small label text at 4.6:1 */
    font-weight: 600;
}

/* ---- Carousel controls -------------------------------------------------- */

/* Controls are useless without JS, so only show them once enhanced */
.monks-testimonials .monks-testimonials__nav,
.monks-testimonials .monks-testimonials__dots {
    display: none;
}

.monks-testimonials .monks-testimonials__nav {
    place-items: center;
    width: var(--monks-testimonials-nav);
    height: var(--monks-testimonials-nav);
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--anaz-white);
    color: var(--anaz-navy);
    box-shadow: 0 12px 30px rgba(11, 45, 73, 0.12), 0 2px 6px rgba(11, 45, 73, 0.05);
    cursor: pointer;
    transition: box-shadow 0.3s ease, color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease, transform 0.3s var(--anaz-ease);
}

.monks-testimonials .monks-testimonials__nav svg {
    width: 26px;
    height: 26px;
    transition: transform 0.3s var(--anaz-ease);
}

/* Custom icons from Elementor's icon library */
.monks-testimonials .monks-testimonials__nav i {
    font-size: 26px;
    line-height: 1;
    transition: transform 0.3s var(--anaz-ease);
}

.monks-testimonials .monks-testimonials__nav svg:not([stroke]) {
    fill: currentColor;
}

/* Loop disabled: first / last slide reached */
.monks-testimonials .monks-testimonials__nav[aria-disabled="true"] {
    opacity: 0.45;
    cursor: default;
}

.monks-testimonials .monks-testimonials__nav:focus-visible {
    outline: none;
    box-shadow: var(--anaz-focus);
}

.monks-testimonials .monks-testimonials__dots {
    gap: 14px;
    align-items: center;
    justify-content: center;
}

.monks-testimonials .monks-testimonials__dot {
    position: relative;
    width: 15px;
    height: 15px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #D7DDE5;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s var(--anaz-ease);
}

/* Larger invisible hit area for touch */
.monks-testimonials .monks-testimonials__dot::after {
    content: "";
    position: absolute;
    inset: -10px;
}

.monks-testimonials .monks-testimonials__dot[aria-current="true"] {
    background: var(--anaz-orange);
    transform: scale(1.08);
}

.monks-testimonials .monks-testimonials__dot:focus-visible {
    outline: none;
    box-shadow: var(--anaz-focus);
}

/* "Pagination: Fraction" (1 / 3) */
.monks-testimonials .monks-testimonials__fraction {
    color: var(--anaz-navy);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.monks-testimonials .monks-testimonials__fraction-current {
    color: var(--anaz-orange);
}

/* ---- Enhanced carousel layout ------------------------------------------ */

.monks-testimonials--enhanced .monks-testimonials__carousel {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
        "track track track"
        "prev  dots  next";
    align-items: center;
    column-gap: 22px;
    row-gap: clamp(28px, 3vw, 40px);
}

.monks-testimonials--enhanced .monks-testimonials__track {
    grid-area: track;
    grid-template-columns: var(--monks-testimonials-columns, repeat(var(--monks-testimonials-view, 1), minmax(0, 1fr)));
}

.monks-testimonials--enhanced .monks-testimonials-card {
    grid-row: 1;
}

.monks-testimonials--enhanced .monks-testimonials-card.is-offstage {
    visibility: hidden;
    pointer-events: none;
}

.monks-testimonials--enhanced .monks-testimonials__nav {
    display: grid;
}

.monks-testimonials--enhanced .monks-testimonials__nav[hidden] {
    display: none;
}

.monks-testimonials--enhanced .monks-testimonials__nav--prev {
    grid-area: prev;
    justify-self: end;
}

.monks-testimonials--enhanced .monks-testimonials__nav--next {
    grid-area: next;
    justify-self: start;
}

.monks-testimonials--enhanced .monks-testimonials__dots {
    display: flex;
    grid-area: dots;
}

.monks-testimonials--enhanced .monks-testimonials__dots[hidden] {
    display: none;
}

/* Neither arrows nor pagination: no empty control row */
.monks-testimonials--no-controls .monks-testimonials__carousel {
    grid-template-areas: "track track track";
    row-gap: 0;
}

/* Centered layout: active card in the middle, slightly wider and taller */
.monks-testimonials .monks-testimonials__carousel[data-centered] .monks-testimonials__track {
    padding-block: var(--monks-testimonials-lift);
}

.monks-testimonials .monks-testimonials__carousel[data-centered] .monks-testimonials-card.is-active {
    margin-block: calc(-1 * var(--monks-testimonials-lift));
}

/* Desktop tier: arrows outside the cards (the source's ≥1180px layout) */
.monks-testimonials--enhanced:not(.monks-testimonials--nav-bottom) .monks-testimonials__carousel[data-tier="desktop"] {
    grid-template-columns: var(--monks-testimonials-nav) minmax(0, 1fr) var(--monks-testimonials-nav);
    grid-template-areas:
        "prev track next"
        ".    dots  .";
    column-gap: clamp(20px, 2vw, 32px);
    row-gap: clamp(26px, 2.6vw, 40px);
}

.monks-testimonials--enhanced:not(.monks-testimonials--nav-bottom) .monks-testimonials__carousel[data-tier="desktop"] .monks-testimonials__nav {
    justify-self: center;
}

/* Arrows beside the track but no pagination: single row */
.monks-testimonials--enhanced.monks-testimonials--no-dots:not(.monks-testimonials--nav-bottom) .monks-testimonials__carousel[data-tier="desktop"] {
    grid-template-areas: "prev track next";
    row-gap: 0;
}

/* ---- Hover (pointer devices only) --------------------------------------- */

@media (hover: hover) and (pointer: fine) {
    .monks-testimonials .monks-testimonials-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 24px 50px rgba(11, 45, 73, 0.10), 0 4px 10px rgba(11, 45, 73, 0.04);
    }

    .monks-testimonials .monks-testimonials-card.is-active:hover {
        box-shadow: 0 28px 60px rgba(255, 101, 0, 0.14), 0 4px 12px rgba(11, 45, 73, 0.05);
    }

    .monks-testimonials .monks-testimonials__nav:not([aria-disabled="true"]):hover {
        color: var(--anaz-orange);
        box-shadow: 0 16px 36px rgba(11, 45, 73, 0.16), 0 2px 6px rgba(11, 45, 73, 0.05);
    }

    .monks-testimonials .monks-testimonials__nav--prev:not([aria-disabled="true"]):hover svg,
    .monks-testimonials .monks-testimonials__nav--prev:not([aria-disabled="true"]):hover i {
        transform: translateX(-3px);
    }

    .monks-testimonials .monks-testimonials__nav--next:not([aria-disabled="true"]):hover svg,
    .monks-testimonials .monks-testimonials__nav--next:not([aria-disabled="true"]):hover i {
        transform: translateX(3px);
    }

    .monks-testimonials .monks-testimonials__dot:not([aria-current="true"]):hover {
        background: #BAC4D0;
    }
}

/* ---- Responsive --------------------------------------------------------- */

@media (max-width: 1179px) {
    .monks-testimonials {
        --monks-testimonials-nav: 56px;
    }

    .monks-testimonials .monks-testimonials__shape {
        opacity: 0.7;
    }
}

@media (max-width: 767px) {
    .monks-testimonials {
        --monks-testimonials-nav: 52px;
        --monks-testimonials-radius: 18px;
    }

    .monks-testimonials .monks-testimonials__eyebrow {
        gap: 16px;
    }

    .monks-testimonials .monks-testimonials__title {
        letter-spacing: -0.035em;
        line-height: 1.04;
    }

    /* Keep only faint edge accents so nothing sits behind the text */
    .monks-testimonials .monks-testimonials__shape--l2,
    .monks-testimonials .monks-testimonials__shape--r1 {
        display: none;
    }

    .monks-testimonials .monks-testimonials__shape--l1 {
        top: 4%;
        left: -230px;
        opacity: 0.6;
    }

    .monks-testimonials .monks-testimonials__shape--r2 {
        top: auto;
        bottom: -10%;
        right: -240px;
        opacity: 0.6;
    }

    .monks-testimonials .monks-testimonials__nav svg {
        width: 22px;
        height: 22px;
    }

    .monks-testimonials .monks-testimonials__nav i {
        font-size: 22px;
    }
}

@media (max-width: 359px) {
    .monks-testimonials--enhanced .monks-testimonials__carousel {
        column-gap: 12px;
    }

    .monks-testimonials .monks-testimonials__dots {
        gap: 10px;
    }

    .monks-testimonials .monks-testimonials__dot {
        width: 12px;
        height: 12px;
    }
}

/* ---- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .monks-testimonials .monks-testimonials-card,
    .monks-testimonials .monks-testimonials__nav,
    .monks-testimonials .monks-testimonials__nav svg,
    .monks-testimonials .monks-testimonials__dot {
        transition: none;
    }
}
