/**
 * Minara Meadows — Luxury Testimonial Glassmorphism Styles
 * Consistent 4:3 Image Dimensions in All Cases, Compact Hugging Image-Only Card (No Inner Frame), 15px Full Frame & Responsive Design
 */

/* ==========================================================================
   SECTION & CONTAINER
   ========================================================================== */
.testimonial-section {
    position: relative;
    padding: clamp(60px, 8vw, 110px) 0;
    background: linear-gradient(rgba(12, 16, 22, 0.72), rgba(12, 16, 22, 0.76)), url('../images/img/LivingRoom.webp') no-repeat center center;
    background-size: cover;
    background-attachment: scroll;
    color: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.testimonial-container {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 24px);
    width: 100%;
    z-index: 2;
    box-sizing: border-box;
}

/* ==========================================================================
   SLIDER WRAPPER & NAVIGATION ARROWS
   ========================================================================== */
.testimonial-slider-wrapper {
    position: relative;
    max-width: 1040px;
    margin: 0 auto;
    padding: 10px clamp(46px, 6vw, 68px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}

/* Side Navigation Arrows (Prev / Next) */
.testimonial-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(40px, 4.5vw, 48px);
    height: clamp(40px, 4.5vw, 48px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    touch-action: manipulation;
    padding: 0;
}

.testimonial-nav-btn.prev {
    left: 0;
}

.testimonial-nav-btn.next {
    right: 0;
}

.testimonial-nav-btn:hover {
    background: var(--primary, #eab308);
    border-color: var(--primary, #eab308);
    color: #0f172a;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 10px 28px rgba(234, 179, 8, 0.4);
}

.testimonial-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.testimonial-nav-btn:focus-visible {
    outline: 2px solid var(--primary, #eab308);
    outline-offset: 3px;
}

/* ==========================================================================
   UNIVERSAL GLASSMORPHISM CARD (WIDE VS COMPACT WITH STABLE SECTION HEIGHT)
   ========================================================================== */
.testimonial-glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: clamp(18px, 2.5vw, 26px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    padding: clamp(20px, 2.8vw, 30px) clamp(20px, 3.2vw, 34px);
    position: relative;
    overflow: visible;
    max-width: 900px;
    width: 100%;
    min-height: 280px;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: max-width 0.45s cubic-bezier(0.16, 1, 0.3, 1), min-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    pointer-events: none;
    border-top-left-radius: clamp(18px, 2.5vw, 26px);
    border-top-right-radius: clamp(18px, 2.5vw, 26px);
}

/* Image-Only Mode: Desktop compact width & height fitted directly to the image */
.testimonial-glass-card.card-mode-image_only,
.testimonial-glass-card:has(.testimonial-slide.active.mode-image_only) {
    max-width: 356px;
    min-height: auto;
}

/* Viewport & Track with Natural Grid Stacking (Zero layout flicker/jump) */
.testimonial-slides-viewport {
    position: relative;
    width: 100%;
    overflow: visible;
}

.testimonial-slides-track {
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: 1fr;
    position: relative;
    width: 100%;
    min-height: auto;
    align-items: center;
    justify-items: center;
    box-sizing: border-box;
}

/* Slide Item — Stacks in the exact same grid cell */
.testimonial-slide {
    grid-area: 1 / 1 / 2 / 2;
    width: 100%;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(0.99);
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s ease;
    z-index: 1;
}

.testimonial-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    z-index: 2;
}

/* Directional Slide Animations */
.testimonial-slide.slide-in-right {
    animation: mmTestimonialSlideRight 0.48s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.testimonial-slide.slide-in-left {
    animation: mmTestimonialSlideLeft 0.48s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mmTestimonialSlideRight {
    from {
        opacity: 0;
        transform: translateX(24px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes mmTestimonialSlideLeft {
    from {
        opacity: 0;
        transform: translateX(-24px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ==========================================================================
   CASE 1: FULL TESTIMONIAL (2-COLUMN GRID WITH 4:3 IMAGE)
   ========================================================================== */
.testimonial-glass-frame {
    position: relative;
    width: 300px;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: clamp(10px, 1.4vw, 14px);
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 4:3 Landscape Image inside Frame & Across All Modes */
.testimonial-glass-frame img,
.testimonial-main-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: clamp(10px, 1.4vw, 14px);
    image-rendering: auto;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-slide.active .testimonial-glass-frame img,
.testimonial-slide.active .testimonial-imageonly-card img.testimonial-main-img {
    transform: scale(1.02);
}

.testimonial-card-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: clamp(24px, 3.2vw, 38px);
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.testimonial-media-col {
    width: 300px;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.testimonial-media-col .testimonial-glass-frame {
    width: 100%;
}

.testimonial-content-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    height: 100%;
    padding-left: 0;
    box-sizing: border-box;
}

/* Quote Icon */
.testimonial-quote-icon {
    display: inline-flex;
    align-items: center;
    color: var(--primary, #eab308);
    line-height: 1;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.testimonial-quote-icon svg {
    width: clamp(28px, 3.2vw, 34px);
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(234, 179, 8, 0.35));
}

/* Text Wrapper & Clamping for Read More */
.testimonial-text-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}

/* Quote Paragraph — Exactly 2 lines in normal state */
.testimonial-quote-text {
    font-family: var(--font-sans, 'Poppins', sans-serif);
    font-size: clamp(0.92rem, 1.8vw, 1.02rem);
    font-weight: 400;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    padding: 0;
    font-style: normal;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    overflow-wrap: break-word;
    word-break: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Expanded State for Quote Paragraph */
.testimonial-text-wrapper.is-expanded .testimonial-quote-text {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    animation: mmTextExpandFade 0.3s ease forwards;
}

@keyframes mmTextExpandFade {
    from {
        opacity: 0.8;
    }

    to {
        opacity: 1;
    }
}

/* Read More / Read Less Interactive Button */
.testimonial-read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--primary, #eab308);
    font-family: var(--font-sans, 'Poppins', sans-serif);
    font-size: clamp(0.82rem, 1.5vw, 0.88rem);
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    margin-top: 6px;
    text-transform: capitalize;
    letter-spacing: 0.4px;
    transition: color 0.2s ease, transform 0.2s ease;
    touch-action: manipulation;
    line-height: 1;
}

.testimonial-read-more-btn:hover {
    color: #fde047;
    transform: translateY(-1px);
}

.testimonial-read-more-btn i {
    font-size: 0.72rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-text-wrapper.is-expanded .testimonial-read-more-btn i {
    transform: rotate(180deg);
}

.testimonial-read-more-btn:focus-visible {
    outline: 2px solid var(--primary, #eab308);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Author Block & Typography */
.testimonial-author-block {
    margin-top: auto;
    padding-top: 4px;
}

.testimonial-author-name {
    font-family: var(--font-serif, 'Playfair Display', serif);
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    overflow-wrap: break-word;
}

/* ==========================================================================
   CASE 2: IMAGE-ONLY CARD (CENTERED INSIDE UNIVERSAL FIXED CARD)
   Structure: Main Glass Card -> Centered 4:3 Image
   ========================================================================== */
.testimonial-imageonly-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

.testimonial-imageonly-card img.testimonial-main-img {
    width: 300px;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    border-radius: clamp(10px, 1.4vw, 14px);
    display: block;
    margin: 0 auto;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   CASE 3: TEXT-ONLY CARD (CENTERED QUOTE)
   ========================================================================== */
.testimonial-textonly-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 4px 8px;
    box-sizing: border-box;
}

.testimonial-quote-icon.quote-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #eab308);
    margin-bottom: 12px;
    line-height: 1;
}

.testimonial-quote-icon.quote-centered svg {
    width: clamp(28px, 3.2vw, 34px);
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(234, 179, 8, 0.35));
}

.quote-centered-text {
    max-width: 660px;
    margin: 0 auto;
}

.testimonial-textonly-card .testimonial-read-more-btn {
    margin: 6px auto 0 auto;
}

.quote-author-name {
    margin: 4px 0 0 0;
}

/* ==========================================================================
   SLIDER PAGINATION BULLET DOTS
   ========================================================================== */
.testimonial-bottom-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: clamp(16px, 2.2vw, 24px);
    position: relative;
    z-index: 5;
    box-sizing: border-box;
}

.testimonial-slider-dots-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    margin: 0;
    padding: 0;
}

.testimonial-bullet-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
    margin: 0;
    touch-action: manipulation;
}

.testimonial-bullet-dot:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: scale(1.2);
}

.testimonial-bullet-dot.active {
    width: 26px;
    height: 8px;
    border-radius: 10px;
    background: var(--primary, #eab308);
    box-shadow: 0 0 12px rgba(234, 179, 8, 0.7);
}

.testimonial-bullet-dot:focus-visible {
    outline: 2px solid var(--primary, #eab308);
    outline-offset: 2px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (BREAKPOINTS: 1024px, 768px, 480px)
   ========================================================================== */
@media (max-width: 1024px) {
    .testimonial-slider-wrapper {
        padding: 8px clamp(42px, 5.5vw, 56px);
        min-height: 350px;
    }

    .testimonial-glass-card {
        max-width: 820px;
        min-height: 270px;
        padding: 20px 24px;
    }

    .testimonial-glass-card.card-mode-image_only,
    .testimonial-glass-card:has(.testimonial-slide.active.mode-image_only) {
        max-width: 318px;
        min-height: auto;
    }

    .testimonial-card-grid {
        grid-template-columns: 270px 1fr;
        gap: 20px;
    }

    .testimonial-media-col {
        width: 270px;
        max-width: 270px;
    }

    .testimonial-glass-frame {
        width: 270px;
    }

    .testimonial-imageonly-card img.testimonial-main-img {
        width: 270px;
    }
}

@media (max-width: 768px) {
    .testimonial-slider-wrapper {
        padding: 6px clamp(38px, 5vw, 48px);
        min-height: 440px;
    }

    .testimonial-glass-card {
        max-width: 560px;
        min-height: 340px;
        padding: 20px 18px;
    }

    /* Tablet: Same outer width as full card, height hugs the image nicely */
    .testimonial-glass-card.card-mode-image_only,
    .testimonial-glass-card:has(.testimonial-slide.active.mode-image_only) {
        max-width: 560px;
        width: 100%;
        min-height: auto;
        padding: 20px 18px;
    }

    /* Stacked layout on tablet/mobile with centered content and clear visual rhythm */
    .testimonial-card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        text-align: center;
    }

    .testimonial-media-col {
        width: 266px;
        max-width: 100%;
        margin: 0 auto;
    }

    .testimonial-media-col .testimonial-glass-frame {
        width: 266px;
        max-width: 100%;
        margin: 0 auto;
    }

    .testimonial-imageonly-card img.testimonial-main-img {
        width: 266px;
    }

    .testimonial-content-col {
        align-items: center;
        text-align: center;
        padding-left: 0;
    }

    .testimonial-quote-icon {
        justify-content: center;
        margin-bottom: 8px;
    }

    .testimonial-quote-text {
        text-align: center;
        -webkit-line-clamp: 2;
        margin-bottom: 0;
    }

    .testimonial-read-more-btn {
        margin: 6px auto 0 auto;
    }

    .testimonial-author-block {
        text-align: center;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .testimonial-slider-wrapper {
        padding: 4px clamp(42px, 5.5vw, 52px);
        min-height: 430px;
    }

    .testimonial-glass-card {
        max-width: 100%;
        min-height: 330px;
        padding: 18px 14px;
        border-radius: 18px;
    }

    /* Mobile: Same full width as full card, height hugs the image nicely */
    .testimonial-glass-card.card-mode-image_only,
    .testimonial-glass-card:has(.testimonial-slide.active.mode-image_only) {
        max-width: 100%;
        width: 100%;
        min-height: auto;
        padding: 18px 14px;
    }

    .testimonial-media-col {
        width: 230px;
        max-width: 100%;
        margin: 0 auto;
    }

    .testimonial-media-col .testimonial-glass-frame {
        width: 230px;
        max-width: 100%;
        margin: 0 auto;
    }

    .testimonial-imageonly-card img.testimonial-main-img {
        width: 230px;
    }

    .testimonial-quote-text {
        font-size: 0.88rem;
        line-height: 1.62;
    }

    .testimonial-author-name {
        font-size: 0.98rem;
    }
}