/* ========================================
   TESTIMONIALS SLIDER - EXACT DESKTOP DESIGN
   Left: Testimonial Card | Right: Multiple Images Slider
   ======================================== */

/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* Main Container - Material You */
.testimonials-slider-container {
    width: 100%;
    max-width: 1400px;
    margin: 60px auto 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
    min-height: 0;
    /* Isolate from other content to prevent interference with Elementor */
    isolation: isolate;
    /* Create new stacking context - don't use contain as it can break layout */
    z-index: 0;
}

/* Section heading — desktop: centered; mobile: left-aligned */
.testimonials-section-header {
    display: flex;
    flex-direction: column;
    gap: 0;
    row-gap: 0;
    margin: 0 auto 16px;
    max-width: 100%;
    width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
}

/* Desktop / tablet: heading block centered */
@media (min-width: 768px) {
    .testimonials-section-header {
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 767px) {
    .testimonials-section-header {
        align-items: stretch;
        text-align: left;
        margin-bottom: 12px;
        padding: 0 10px;
    }
}

/*
 * Theme overrides (Blocksy, Elementor, etc.): they often set margin on h2 / p with
 * selectors like .entry-content h2, header h2 — higher than a lone class.
 * Use element + class + !important so title/subtitle spacing actually updates on PDP/home.
 */
.testimonials-slider-container header.testimonials-section-header h2.testimonials-section-title,
.testimonials-slider-container .testimonials-section-header h2.testimonials-section-title {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    border: 0;
    outline: 0;
    /* One line everywhere (homepage desktop was wrapping — rules were only inside max-width:767px) */
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(1.7rem, 2.85vw, 2.1rem);
    line-height: 2 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.testimonials-slider-container header.testimonials-section-header p.testimonials-section-subtitle,
.testimonials-slider-container .testimonials-section-header p.testimonials-section-subtitle {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: #5c5c5c;
    border: 0;
    outline: 0;
    max-width: 42rem;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(0.85rem, 2.1vw, 1.05rem);
    line-height: 1.12 !important;
    /* Kill theme h2+p gap; slight negative pull tightens subtitle to title */
    margin: 0 !important;
    margin-block-start: 0 !important;
    margin-top: -0.2em !important;
    padding: 0 !important;
}

@media (min-width: 768px) {
    .testimonials-slider-container header.testimonials-section-header p.testimonials-section-subtitle,
    .testimonials-slider-container .testimonials-section-header p.testimonials-section-subtitle {
        margin-left: auto !important;
        margin-right: auto !important;
        margin-block-start: 0 !important;
        margin-top: -0.2em !important;
    }
}

@media (max-width: 767px) {
    .testimonials-slider-container header.testimonials-section-header p.testimonials-section-subtitle,
    .testimonials-slider-container .testimonials-section-header p.testimonials-section-subtitle {
        max-width: 100%;
        text-align: left;
        margin-block-start: 0 !important;
        margin-top: -0.18em !important;
    }

    .testimonials-slider-container header.testimonials-section-header h2.testimonials-section-title,
    .testimonials-slider-container .testimonials-section-header h2.testimonials-section-title {
        font-size: clamp(1.62rem, 3.65vw, 1.875rem);
        letter-spacing: -0.04em;
        line-height: 2 !important;
    }

    .testimonials-slider-container header.testimonials-section-header p.testimonials-section-subtitle,
    .testimonials-slider-container .testimonials-section-header p.testimonials-section-subtitle {
        font-size: clamp(0.55rem, 2.85vw, 0.78rem);
        letter-spacing: -0.035em;
    }
}

/* Material You: Smooth container transitions - Scoped to container only */
/* Removed universal selector to prevent affecting content outside container */

/* Layout Wrapper - Stacked (Slider on top, Description below) */
.testimonials-layout-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Reduced from 40px for better UX - closer spacing */
    width: 100%;
    position: relative;
    /* Prevent page breaking */
    min-width: 0;
    min-height: 0;
}

/* ========================================
   TESTIMONIAL CARD SECTION (Below Slider)
   ======================================== */
.testimonials-card-section {
    width: 100%;
    position: relative;
    order: 2;
    /* Fixed height to prevent layout shifts */
    min-height: 550px;
    display: flex;
    flex-direction: column;
    margin-bottom: 0; /* No bottom margin */
    padding-bottom: 0; /* No bottom padding */
}

.testimonials-content-section {
    /* position: relative; */
    width: 100%;
    /* Fixed height to prevent layout shifts when content changes */
    height: 300px;
    min-height: 300px;
    /* flex: 1; */
}

.testimonial-content-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    /* Remove transform to prevent distance changes - all panels stay in same position */
    transform: none;
    transition: opacity 0.6s ease, 
                visibility 0.6s ease;
    display: flex;
    flex-direction: column;
    /* Ensure all panels occupy same space */
    /* Allow pointer events for clicks even when not active - needed for modal to open */
    pointer-events: auto;
    z-index: 1;
}

.testimonial-content-panel.active {
    opacity: 1;
    visibility: visible;
    transform: none;
    z-index: 2;
}

/* Material You Testimonial Card */
.testimonial-card {
    background: #F8F0EB;
    border-radius: 24px;
    padding: 40px 35px;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); */
    position: relative;
    overflow: hidden;
    /* Fixed height to prevent layout shifts */
    height: 350px;
    min-height: 300px;
    max-height: 350px;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1); */
}

/* Hover effect disabled per user preference */

/* Large Brown Quote Icon - Top Left */
.testimonial-quote-icon {
    font-size: 120px;
    line-height: 0.6;
    color: #8B7355;
    font-family: Georgia, serif;
    position: absolute;
    top: 20px;
    left: 30px;
    font-weight: normal;
    opacity: 0.7;
    z-index: 0;
}

/* Star Rating - Orange Stars */
.testimonial-rating {
    display: flex;
    gap: 6px;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
    align-items: center;
    padding-top: 10px;
}

.testimonial-rating .star {
    font-size: 32px;
    line-height: 1;
    color: #E0E0E0;
    transition: color 0.3s ease;
}

.testimonial-rating .star.filled {
    color: #FF9500;
}

/* Testimonial Text - Dark Gray; body is clamped to 4 lines, full text in modal */
.testimonial-text {
    font-size: 20px;
    line-height: 1.7;
    color: #333333;
    font-weight: 400;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
    flex: 0 1 auto;
}

.testimonial-text-body {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.testimonial-read-full-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.78em;
    font-weight: 500;
    color: #666666;
    line-height: 1.3;
}

/* Full plain text for modal (not visible; JS reads .text()) */
.testimonial-full-description {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: pre-wrap !important;
    border: 0 !important;
}

/* Author Info - Bottom with Checkmark */
.testimonial-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    justify-content: flex-start;
    margin-top: 8px;
    margin-bottom: 0;
}

.author-checkmark {
    width: 20px;
    height: 20px;
    background: #333333;
    color: #FFFFFF;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    line-height: 1;
}

.author-name {
    font-size: 16px;
    font-weight: 500;
    color: #333333;
}


/* ========================================
   IMAGES SECTION (Top - Order 1)
   ======================================== */
.testimonials-images-section {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    order: 1;
}

.testimonials-images-swiper {
    width: 100% !important;
    height: auto !important;
    padding: 10px 0 0 0;
    overflow: visible !important;
    flex: 1;
    position: relative;
    min-width: 0;
    max-width: 100%;
    display: block !important;
    visibility: visible !important;
    box-sizing: border-box !important;
    isolation: isolate !important;
}

.testimonials-images-swiper.swiper {
    display: block !important;
    visibility: visible !important;
    /* Prevent interference with other Swiper instances */
    pointer-events: auto !important;
}

/* Ensure only our testimonial slider arrows work */
.testimonials-slider-container .testimonials-nav-arrow {
    pointer-events: auto !important;
    z-index: 100 !important;
}

/* Prevent other slider arrows from affecting our slider */
.testimonials-slider-container .swiper-button-prev:not(.testimonials-nav-prev),
.testimonials-slider-container .swiper-button-next:not(.testimonials-nav-next) {
    display: none !important;
}

.testimonials-images-swiper .swiper-wrapper {
    align-items: stretch;
    /* Prevent overflow issues */
    will-change: transform;
    display: flex !important;
    visibility: visible !important;
    /* Force GPU acceleration for smooth animations */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -webkit-overflow-scrolling: touch;
    /* Enable smooth scrolling on iOS */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ========================================
   COVERFLOW SLIDER STYLING
   ======================================== */

/* Coverflow: Slide widths - Optimized for triple slider */
.testimonial-image-slide {
    width: 240px !important;
    height: auto !important;
    flex-shrink: 0;
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 8px;
    position: relative;
    /* Prevent layout shifts */
    min-width: 0;
    visibility: visible !important;
    opacity: 1 !important;
    /* Hide overflow to prevent extra content showing */
    overflow: hidden;
}

/* Desktop: Coverflow slider - Optimized for triple slider */
@media (min-width: 1024px) {
    .testimonials-images-swiper {
        overflow: visible !important;
        padding: 60px 120px !important;
        width: 100% !important;
    }
    
    .testimonial-image-slide {
        width: 280px !important;
    }
}

/* Tablet: Coverflow slider */
@media (min-width: 768px) and (max-width: 1023px) {
    .testimonials-images-swiper {
        overflow: visible !important;
        padding: 55px 100px !important;
        width: 100% !important;
    }
    
    .testimonial-image-slide {
        width: 260px !important;
    }
}

/* Mobile: Coverflow slider - Optimized for smooth iOS/Android swiping */
@media (max-width: 767px) {
    .testimonials-images-swiper {
        overflow: visible !important;
        padding: 55px 70px !important;
        width: 100% !important;
        display: block !important;
        visibility: visible !important;
        touch-action: pan-x pan-y !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        -ms-touch-action: pan-x pan-y !important;
        -webkit-overflow-scrolling: touch !important;
        /* Force GPU acceleration */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }
    
    .testimonials-images-swiper .swiper-wrapper {
        display: flex !important;
        align-items: center !important;
        visibility: visible !important;
        touch-action: pan-x pan-y !important;
        -ms-touch-action: pan-x pan-y !important;
        /* Force GPU acceleration for smooth scrolling */
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
        will-change: transform;
        -webkit-overflow-scrolling: touch !important;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    .testimonial-image-slide {
        width: 265px !important;
        height: auto !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-shrink: 0 !important;
        touch-action: pan-x pan-y !important;
        -ms-touch-action: pan-x pan-y !important;
        /* Force GPU acceleration */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        will-change: transform;
        -webkit-tap-highlight-color: transparent;
    }
    
    .testimonial-image-wrapper {
        width: 100% !important;
        display: block !important;
        visibility: visible !important;
        touch-action: pan-x pan-y !important;
        -ms-touch-action: pan-x pan-y !important;
        /* Force GPU acceleration */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        -webkit-tap-highlight-color: transparent;
    }
    
    .testimonial-image {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        height: auto !important;
        pointer-events: none !important;
        -webkit-user-drag: none !important;
        user-select: none !important;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Ensure touch events work */
    .testimonials-images-swiper.swiper {
        touch-action: pan-y !important;
        -ms-touch-action: pan-y !important;
    }
    
    /* Navigation arrows on mobile */
    .testimonials-images-section .testimonials-nav-arrow {
        width: 40px !important;
        height: 40px !important;
    }
    
    .testimonials-images-section .testimonials-nav-prev {
        left: 5px !important;
    }
    
    .testimonials-images-section .testimonials-nav-next {
        right: 5px !important;
    }
}

/* Coverflow: Image Wrapper - Swiper coverflow handles transforms */
.testimonial-image-wrapper {
    width: 100% !important;
    border-radius: 20px;
    overflow: hidden;
    position: relative !important;
    background: #fff;
    display: block !important;
    visibility: visible !important;
    max-width: 100%;
    max-height: 100%;
    box-shadow: none !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    transition: none !important;
}

/* Remove Swiper coverflow shadows - this removes the black shadow on inactive slides */
.testimonials-images-swiper .swiper-slide::before,
.testimonials-images-swiper .swiper-slide::after {
    display: none !important;
    content: none !important;
    box-shadow: none !important;
}

.testimonials-images-swiper .swiper-slide {
    box-shadow: none !important;
}

.testimonials-images-swiper .swiper-slide-active .testimonial-image-wrapper {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Coverflow: Images and Videos with border-radius */
.testimonial-image-wrapper .testimonial-image,
.testimonial-image-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    object-fit: cover;
    max-width: 100%;
    max-height: 100%;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    -webkit-user-drag: none;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

/* Hide video controls in slider */
.testimonials-images-section video::-webkit-media-controls {
    display: none !important;
}

.testimonials-images-section video::-webkit-media-controls-enclosure {
    display: none !important;
}

.testimonials-images-section video::-webkit-media-controls-panel {
    display: none !important;
}

.testimonials-images-section video::-webkit-media-controls-play-button {
    display: none !important;
}

.testimonials-images-section video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

/* Video Icon Overlay */
.testimonial-image-wrapper .video-play-icon-overlay,
.video-play-icon-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    pointer-events: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity 0.3s ease;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

.testimonial-image-wrapper video:playing ~ .video-play-icon-overlay,
.testimonial-image-wrapper video[data-playing="true"] ~ .video-play-icon-overlay {
    opacity: 0;
    visibility: hidden;
}

.video-play-icon-overlay svg {
    display: block;
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Ensure video shows poster/thumbnail on iOS */
.testimonial-image-wrapper video {
    background: #000;
}

/* Mobile adjustments for video icon */
@media (max-width: 768px) {
    .video-play-icon-overlay svg {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .video-play-icon-overlay svg {
        width: 36px;
        height: 36px;
    }
}

/* Coverflow: Swiper handles all transforms via coverflowEffect */


.testimonial-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 3/4;
    border-radius: 30px;
}

/* ========================================
   MATERIAL YOU NAVIGATION ARROWS
   ======================================== */
.testimonials-images-section .testimonials-nav-arrow {
    width: 48px !important;
    height: 48px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 50% !important;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important; */
    margin-top: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #1a1a1a !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 10 !important;
    position: absolute !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.testimonials-images-section .testimonials-nav-arrow svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
}

.testimonials-images-section .testimonials-nav-arrow::after {
    display: none !important;
}

.testimonials-images-section .testimonials-nav-prev {
    left: -24px !important;
    right: auto !important;
}

.testimonials-images-section .testimonials-nav-next {
    right: -24px !important;
    left: auto !important;
}

.testimonials-images-section .testimonials-nav-arrow:hover {
    background: rgba(255, 255, 255, 1) !important;
    /* box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important; */
    transform: translateY(-50%) scale(1.05) !important;
}

.testimonials-images-section .testimonials-nav-arrow:active {
    transform: translateY(-50%) scale(0.95) !important;
}

.testimonials-images-section .testimonials-nav-arrow.swiper-button-disabled,
.testimonials-images-section .testimonials-nav-arrow:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
}

/* ========================================
   MATERIAL YOU PAGINATION DOTS
   ======================================== */
.testimonials-pagination-wrapper {
    margin-top: 10px;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    flex-shrink: 0;
    height: 32px;
    min-height: 32px;
}

.testimonials-pagination {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    display: flex !important;
    gap: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    transition: all 0.3s ease !important;
}

.testimonials-pagination .swiper-pagination-bullet {
    width: 8px !important;
    height: 8px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    opacity: 1 !important;
    margin: 0 4px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    position: relative !important;
}

.testimonials-pagination .swiper-pagination-bullet-active {
    background: #1a1a1a !important;
    width: 24px !important;
    height: 8px !important;
    border-radius: 4px !important;
    transform: scale(1) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.testimonials-pagination .swiper-pagination-bullet:hover {
    background: rgba(0, 0, 0, 0.4) !important;
    transform: scale(1.2) !important;
}

/* Hide video icons in pagination bullets */
.testimonials-pagination .swiper-pagination-bullet video,
.testimonials-pagination .swiper-pagination-bullet .video-play-button,
.testimonials-pagination .swiper-pagination-bullet .video-thumb-icon,
.testimonials-pagination .swiper-pagination-bullet::before,
.testimonials-pagination .swiper-pagination-bullet::after {
    display: none !important;
    visibility: hidden !important;
    content: none !important;
    opacity: 0 !important;
}

/* Ensure pagination bullets only show as dots */
.testimonials-pagination .swiper-pagination-bullet * {
    display: none !important;
}

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

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .testimonials-slider-container {
        padding: 0 15px;
        margin: 40px auto 0 auto;
    }

    .testimonials-layout-wrapper {
        gap: 20px; /* Reduced from 30px for better UX */
    }

    .testimonials-card-section {
        flex: 0 0 45%;
    }

    .testimonials-images-section {
        flex: 0 0 55%;
    }

    .testimonial-card {
        padding: 35px 30px;
        height: 350px;
        min-height: 300px;
        max-height: 350px;
    }
    
    .testimonials-content-section {
        height: 300px;
        min-height: 300px;
    }
    
    .testimonials-card-section {
        min-height: 500px;
    }

    .testimonial-quote-icon {
        font-size: 120px;
        top: 15px;
        left: 26px;
    }

    .testimonial-rating .star {
        font-size: 28px;
    }

    .testimonial-text {
        font-size: 18px;
    }
}

/* Desktop - Ensure side-by-side layout */
@media (min-width: 1025px) {
    .testimonials-layout-wrapper {
        flex-direction: column;
        gap: 20px; /* Reduced from 50px for better UX */
    }
    
    .testimonials-card-section {
        flex: 0 0 42%;
        order: 1;
    }
    
    .testimonials-images-section {
        flex: 0 0 58%;
        order: 2;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .testimonials-slider-container {
        margin: 40px auto 0 auto; /* No bottom margin on mobile */
    }
    
    .testimonials-layout-wrapper {
        flex-direction: column;
        gap: 20px; /* Reduced from 30px for better UX */
    }

    /* Image slider appears first on mobile */
    .testimonials-images-section {
        flex: 1 1 100%;
        order: 1;
        width: 100%;
    }

    /* Testimonial description appears below slider on mobile */
    .testimonials-card-section {
        flex: 1 1 100%;
        order: 2;
        min-height: 450px;
        width: 100%;
        margin-bottom: 0; /* No bottom margin on mobile */
        padding-bottom: 0; /* No bottom padding on mobile */
    }

    .testimonials-content-section {
        min-height: 300px;
        height: 300px;
    }

    .testimonial-content-panel {
        position: absolute;
        /* Remove transform to prevent distance changes */
        transform: none;
    }
    
    .testimonial-content-panel.active {
        transform: none;
    }
    
    .testimonial-card {
        height: 350px;
        min-height: 300px;
        max-height: 350px;
    }

    .testimonials-images-swiper {
        padding: 20px 50px 0 50px !important;
        overflow: visible !important;
        width: 100% !important;
    }
    
    .testimonials-images-swiper .swiper-wrapper {
        display: flex !important;
        align-items: center !important;
    }

    /* Material You: Mobile scaling */
    .testimonials-images-swiper .swiper-slide {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
    }
    
    /* Coverflow handles transforms automatically */
    
    .testimonial-image-wrapper {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
    }
    
    .testimonial-image {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        height: auto !important;
    }

    .testimonial-content-panel {
        position: absolute;
        transform: none;
    }

    .testimonial-card {
        padding: 34px 25px !important;
        border-radius: 20px;
        min-height: 300px;
    }

    .testimonial-quote-icon {
        font-size: 100px;
        top: 12px;
        left: 20px;
    }

    .testimonial-rating {
        gap: 4px;
        margin-bottom: 20px;
    }

    .testimonial-rating .star {
        font-size: 24px;
    }

    .testimonial-text {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 25px;
    }

    .author-name {
        font-size: 14px;
    }

    .author-checkmark {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }

    .testimonial-image {
        border-radius: 20px;
        aspect-ratio: 3/4;
    }

    .testimonials-images-section .testimonials-nav-arrow {
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        visibility: visible !important;
    }

    .testimonials-images-section .testimonials-nav-prev {
        left: 5px !important;
        right: auto !important;
    }

    .testimonials-images-section .testimonials-nav-next {
        right: 5px !important;
        left: auto !important;
    }
    
    .testimonials-images-section {
        position: relative !important;
        width: 100% !important;
        overflow: visible !important;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .testimonials-images-swiper {
        padding: 8px 40px 0 40px;
    }

    .testimonials-images-swiper .swiper-slide:not(.swiper-slide-active) .testimonial-image-wrapper {
        transform: scale(0.65);
        opacity: 0.4;
    }

    .testimonial-card {
        padding: 30px 20px;
        min-height: 300px;
        max-height: 350px;
    }

    .testimonial-quote-icon {
        font-size: 65px;
    }

    .testimonial-rating .star {
        font-size: 22px;
    }

    .testimonial-text {
        font-size: 15px;
    }
}

/* ========================================
    SMOOTH ANIMATIONS - Let Swiper handle transitions
    ======================================== */
/* Let Swiper handle slide transitions - don't override with CSS */
.testimonials-images-swiper .swiper-slide {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    /* Force GPU acceleration for smooth animations on iOS/Android */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    /* Prevent text selection during swipe */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Prevent touch callouts on iOS */
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    /* Don't add transitions - let Swiper handle all animations */
    transition: none !important;
    /* Optimize for smooth animations */
    -webkit-overflow-scrolling: touch;
}


/* Content panel transitions - smooth fade */
.testimonial-content-panel {
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Image wrappers - no transition override, let Swiper handle it */
.testimonial-image-wrapper {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}


/* Scoped to testimonials slider only - don't affect other swipers */
.testimonials-slider-container .swiper-wrapper {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    will-change: transform;
    /* Enable smooth scrolling on iOS */
    -webkit-overflow-scrolling: touch;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* iOS Safari specific optimizations for smoother slider */
@supports (-webkit-touch-callout: none) {
    .testimonials-images-swiper {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-perspective: 1000;
        perspective: 1000;
    }
    
    .testimonials-images-swiper .swiper-wrapper {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    .testimonials-images-swiper .swiper-slide {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
    }
}


/* Ensure smooth animations - prevent any layout shifts - Scoped to container */
.testimonials-slider-container .testimonials-images-section {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}
