/* =========================================================
   COMPONENT: HOMEPAGE TESTIMONIALS
   Premium editorial slider — mobile-first.
   Pixel-matched to the approved UI.
   ========================================================= */

.home-testimonials {
    /* Scoped tokens — design system isolated from the rest of the page */
    --ht-primary:        #134e4a;
    --ht-primary-deep:   #0f3a37;
    --ht-accent:         #eab308;
    --ht-accent-dark:    #8B6914;
    --ht-bg:             #f8f8f6;
    --ht-card-bg:        #ffffff;
    --ht-text:           #1d1d1f;
    --ht-text-muted:     #6b6b70;
    --ht-divider:        #e6e6df;

    --ht-radius-card:    24px;
    --ht-radius-cta:     20px;
    --ht-shadow-card:    0 8px 32px rgba(19, 78, 74, 0.06);
    --ht-shadow-card-h:  0 14px 40px rgba(19, 78, 74, 0.10);
    --ht-ease:           cubic-bezier(0.16, 1, 0.3, 1);

    --ht-font-sans:      'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --ht-font-serif:     "Playfair Display", Georgia, "Times New Roman", serif;
    --ht-font-script:    "Caveat", "Brush Script MT", cursive;

    position: relative;
    isolation: isolate;
    background: var(--ht-bg);
    padding: clamp(56px, 8vw, 110px) 0 clamp(48px, 6vw, 90px);
    font-family: var(--ht-font-sans);
    color: var(--ht-text);
    overflow: hidden;
}

.home-testimonials__container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ─── Decorative leaf bg (right side) ─── */
.home-testimonials__leaf-bg {
    position: absolute;
    top: 4%;
    right: -30px;
    width: 220px;
    height: 320px;
    color: var(--ht-primary);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}
.home-testimonials__leaf-bg svg {
    width: 100%;
    height: 100%;
}

/* =========================================================
   HEADER
   ========================================================= */

.home-testimonials__head {
    text-align: center;
    max-width: 920px;
    margin: 0 auto clamp(40px, 5vw, 60px);
}

.home-testimonials__eyebrow {
    font-family: var(--ht-font-script);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1;
    color: var(--ht-accent-dark);
    margin: 0 0 14px;
    letter-spacing: 0.01em;
}

.home-testimonials__heading {
    font-family: var(--ht-font-serif);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.75rem);
    line-height: 1.1;
    color: var(--ht-primary);
    margin: 0 0 20px;
    letter-spacing: -0.01em;
}

.home-testimonials__desc {
    font-size: clamp(0.95rem, 1.4vw, 1.0625rem);
    line-height: 1.7;
    color: var(--ht-text-muted);
    margin: 0 auto;
    max-width: 640px;
}

/* ─── Divider with leaf icon ─── */
.home-testimonials__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 28px auto 0;
    max-width: 280px;
    color: var(--ht-accent);
}
.home-testimonials__divider-line {
    height: 1px;
    background: var(--ht-accent);
    flex: 1;
    opacity: 0.85;
}
.home-testimonials__divider-leaf {
    flex-shrink: 0;
    color: var(--ht-accent);
}

/* =========================================================
   SLIDER WRAP + NAV
   ========================================================= */

.home-testimonials__slider-wrap {
    position: relative;
}

.home-testimonials__slider {
    overflow: hidden;
    padding: 12px 4px 36px;   /* breathing room for hover lift & shadows */
}

/* The wrapper uses Swiper's flex layout. Equal-height cards: */
.home-testimonials__slider .swiper-wrapper {
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-testimonials__slider .swiper-slide {
    height: auto;             /* let card grow; align-items:stretch equalises */
    display: flex;
}

/* ─── Nav arrows ─── */
.home-testimonials__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid #c9c9c1;
    color: var(--ht-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s var(--ht-ease),
                color 0.3s var(--ht-ease),
                border-color 0.3s var(--ht-ease),
                transform 0.3s var(--ht-ease),
                box-shadow 0.3s var(--ht-ease),
                opacity 0.2s var(--ht-ease);
    z-index: 3;
    padding: 0;
}

.home-testimonials__nav--prev { left: -8px; }
.home-testimonials__nav--next { right: -8px; }

.home-testimonials__nav:hover:not(:disabled) {
    background: var(--ht-primary);
    color: #fff;
    border-color: var(--ht-primary);
    box-shadow: 0 8px 22px rgba(19, 78, 74, 0.22);
}
.home-testimonials__nav:focus-visible {
    outline: 2px solid var(--ht-primary);
    outline-offset: 3px;
}
.home-testimonials__nav.swiper-button-disabled,
.home-testimonials__nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* =========================================================
   CARD
   ========================================================= */

.home-testimonial {
    display: flex;
    height: auto;
}

.home-testimonial__card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--ht-card-bg);
    border-radius: var(--ht-radius-card);
    padding: 36px 32px 32px;
    box-shadow: var(--ht-shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.4s var(--ht-ease),
                box-shadow 0.4s var(--ht-ease);
}

.home-testimonial__card:hover,
.home-testimonial__card:focus-within {
    transform: translateY(-4px);
    box-shadow: var(--ht-shadow-card-h);
}

/* ─── Quote mark ─── */
.home-testimonial__quote {
    display: inline-flex;
    color: var(--ht-accent);
    line-height: 0;
    margin-bottom: 18px;
}
.home-testimonial__quote svg {
    overflow: visible;
}

/* ─── Testimonial body text ─── */
.home-testimonial__text {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ht-text);
    margin: 0 0 24px;
    flex: 1 1 auto;
    /* prevent ugly long words breaking the layout */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ─── Divider line above person info ─── */
.home-testimonial__divider {
    border: 0;
    height: 1px;
    background: var(--ht-divider);
    margin: 0 0 22px;
    width: 100%;
}

/* ─── Person row ─── */
.home-testimonial__person {
    display: flex;
    align-items: center;
    gap: 16px;
}

.home-testimonial__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0efe8;
}
.home-testimonial__avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--ht-primary);
    background: #e6efee;
}

.home-testimonial__meta {
    min-width: 0;   /* allow ellipsis if needed */
    flex: 1;
}

.home-testimonial__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ht-primary);
    margin: 0 0 2px;
    line-height: 1.25;
}

.home-testimonial__country {
    font-size: 0.9rem;
    color: var(--ht-text-muted);
    margin: 0 0 6px;
    line-height: 1.3;
}

.home-testimonial__rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--ht-accent);
    line-height: 0;
}
.home-testimonial__star.is-empty { color: var(--ht-divider); }
.home-testimonial__star.is-filled { color: var(--ht-accent); }

/* =========================================================
   PAGINATION DOTS
   ========================================================= */
.home-testimonials__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 28px 0 0;
}
.home-testimonials__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c9c9c1;
    opacity: 1;
    transition: width 0.3s var(--ht-ease),
                background 0.3s var(--ht-ease);
    margin: 0 !important;   /* override swiper inline spacing */
    cursor: pointer;
}
.home-testimonials__pagination .swiper-pagination-bullet-active {
    background: var(--ht-primary);
    width: 26px;
    border-radius: 999px;
}

/* =========================================================
   CTA STRIP
   ========================================================= */
.home-testimonials__cta {
    position: relative;
    margin: clamp(40px, 6vw, 72px) auto 0;
    max-width: 1240px;
    background: var(--ht-primary-deep);
    color: #fff;
    border-radius: var(--ht-radius-cta);
    padding: clamp(28px, 4vw, 42px) clamp(24px, 4vw, 56px);
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 24px;
    overflow: hidden;
    isolation: isolate;
}

.home-testimonials__cta-leaf {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 130px;
    height: 180px;
    color: var(--ht-accent);
    opacity: 0.20;
    pointer-events: none;
    z-index: 0;
}
.home-testimonials__cta-leaf svg {
    width: 100%;
    height: 100%;
}

.home-testimonials__cta-text {
    position: relative;
    z-index: 1;
    padding-left: clamp(0px, 5vw, 60px); /* push text past the leaf */
}

.home-testimonials__cta-title {
    font-family: var(--ht-font-serif);
    font-size: clamp(1.3rem, 2.4vw, 1.75rem);
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
}

.home-testimonials__cta-desc {
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
    max-width: 460px;
}

.home-testimonials__cta-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ─── Buttons ─── */
.home-testimonials__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.3s var(--ht-ease),
                background 0.3s var(--ht-ease),
                color 0.3s var(--ht-ease),
                box-shadow 0.3s var(--ht-ease),
                border-color 0.3s var(--ht-ease);
    border: 1.5px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.home-testimonials__btn--primary {
    background: var(--ht-accent);
    color: #1a1a1a;
    border-color: var(--ht-accent);
    box-shadow: 0 8px 18px rgba(234, 179, 8, 0.18);
}
.home-testimonials__btn--primary:hover,
.home-testimonials__btn--primary:focus-visible {
    background: var(--ht-accent-dark);
    border-color: var(--ht-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(234, 179, 8, 0.28);
    color: #1a1a1a;
}

.home-testimonials__btn--ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}
.home-testimonials__btn--ghost:hover,
.home-testimonials__btn--ghost:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: #fff;
    transform: translateY(-2px);
    color: #fff;
}

.home-testimonials__btn:focus-visible {
    outline: 2px solid var(--ht-accent);
    outline-offset: 3px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* ─── Tablet (≤1024px) ─── */
@media (max-width: 1024px) {

    /* Hide arrows on smaller screens — swipe gesture is the primary UX */
    .home-testimonials__nav { display: none; }

    .home-testimonials__cta {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .home-testimonials__cta-text { padding-left: clamp(0px, 4vw, 40px); }
    .home-testimonials__cta-actions {
        justify-content: flex-start;
    }
}

/* ─── Mobile (≤640px) ─── */
@media (max-width: 640px) {

    .home-testimonials__head {
        margin-bottom: 36px;
    }

    .home-testimonials__divider {
        max-width: 200px;
        gap: 10px;
    }

    .home-testimonials__slider {
        /* show a hint of the next card to invite swiping */
        padding-right: 22px;
    }

    .home-testimonial__card {
        padding: 28px 24px 26px;
    }

    .home-testimonial__text {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .home-testimonials__cta {
        margin-top: 36px;
        padding: 28px 22px;
        border-radius: 16px;
    }
    .home-testimonials__cta-leaf {
        opacity: 0.12;
        width: 110px;
    }
    .home-testimonials__cta-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .home-testimonials__btn {
        width: 100%;
        padding: 14px 22px;
    }
    .home-testimonials__leaf-bg {
        width: 150px;
        height: 220px;
        opacity: 0.05;
        right: -50px;
    }
}

/* ─── Reduce motion preference ─── */
@media (prefers-reduced-motion: reduce) {
    .home-testimonial__card,
    .home-testimonials__nav,
    .home-testimonials__btn,
    .home-testimonials__pagination .swiper-pagination-bullet {
        transition: none !important;
    }
    .home-testimonial__card:hover,
    .home-testimonials__btn:hover {
        transform: none !important;
    }
}
