/* ==============================================
   TESTIMONIALS CSS - Testimonial Slider Styles
   ============================================== */

/* Slider Container and Track */
.testimonial-slider {
    overflow: hidden;
    background: transparent;
    padding: 10px 0;
    border-radius: 20px;
    position: relative;
}

.testimonial-track {
    position: relative;
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
}

/* Slide Item Styles */
.testimonial-slide {
    flex: 0 0 40vw;
    max-width: 40vw;
    max-height: 400px;
    opacity: 0.4;
    transform: scale(0.5);
    transition: transform 0.4s ease, opacity 0.4s ease;
    box-sizing: border-box;
    overflow: hidden;
}

.testimonial-slide.active {
    flex: 0 0 65vw;
    max-width: 65vw;
    max-height: 400px;
    opacity: 1;
    transform: scale(1);
}

.view-all-link {
    font-size: 9px;
    font-family: var(--font-secondary);
    color: #555;
    text-decoration: italic;
    font-weight: 200;
    cursor: pointer;
    margin-left: 6px;
    display: inline;
    white-space: nowrap;
}

/* Wide‐screen adjustments */
@media (min-width: 1301px) {
    .testimonial-slide {
        flex: 0 0 30vw;
        max-width: 30vw;
    }

    .testimonial-slide.active {
        flex: 0 0 35vw;
        max-width: 35vw;
    }

    .testimonial-track {
        padding: 0 5vw;
    }
}

/* Inner Content Styles */
.testimonial-inner {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    padding: 20px;
}

.testimonial-inner p {
    font-size: 0.9rem;
    font-family: var(--font-secondary);
    font-weight: 300;
    line-height: 1.2em;
    color: #2c2c2c;
    margin-bottom: 10px;
    max-height: 6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.author {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-family: var(--font-secondary);
}

.testimonial-slide.expanded p {
    -webkit-line-clamp: unset;
    max-height: none;
    overflow: visible;
}

/* Badges and Preview Images */
.badge {
    margin-left: 0px;
    margin-bottom: 12px;
    height: 26px;
    cursor: pointer;
}

.review-images {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.preview-crop img {
    height: 72px;
    width: auto;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
}

/* Lightbox Overlay */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    text-align: center;
    z-index: 9999;
    overflow-y: auto;
    padding-top: 7vh;
}

.lightbox-overlay.active {
    display: block;
}

.lightbox-content {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Lightbox navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 10000;
    opacity: 0.6;
    max-width: 40px;
    transition: opacity 0.25s ease;
}

.lightbox-nav img {
    width: 100%;
    max-width: 20px;
    pointer-events: none;
    user-select: none;
    transition: transform 0.15s ease;
}

.lightbox-prev {
    left: -50px;
}

.lightbox-next {
    right: -50px;
}

.lightbox-prev:hover img,
.lightbox-next:hover img {
    transform: scale(1.14);
}

.lightbox-close-icon {
    position: fixed;
    top: 20px;
    right: 24px;
    font-size: 2.5rem;
    font-weight: 400;
    color: white;
    opacity: 0.7;
    z-index: 10001;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.25s ease;
}

.lightbox-close-icon:hover {
    opacity: 1;
}

@media (max-width: 900px) {
    .lightbox-nav {
        max-width: 50px;
        width: 50px;
        height: 50px;
        background-color: #1B1B18;
        opacity: 0.9;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-nav img {
        max-width: 24px;
    }
}

/* Slider Arrows */
.testimonial-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto 0;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    padding: 0 10px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* When hovering over the slider section */
.testimonial-slider:hover .testimonial-arrow {
    opacity: 0.6;
}

.prev-arrow {
    left: 24px;
}

.next-arrow {
    right: 24px;
}

.testimonial-arrow img {
    width: 100%;
    max-width: 30px;
    pointer-events: none;
    user-select: none;
    transition: transform 0.2s ease;
}

/* Zoom the arrow icon on hover */
.testimonial-arrow:hover img {
    transform: scale(1.2);
}

/* When hovering directly over the arrow */
.testimonial-slider:hover .testimonial-arrow:hover {
    opacity: 0.95;
}

/* Arrow hover zones for better UX */
.arrow-hover-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 5;
    cursor: pointer;
}

.left-hover-zone {
    left: 0;
}

.right-hover-zone {
    right: 0;
}

/* No scroll class for body when lightbox is open */
body.no-scroll {
    overflow: hidden;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .testimonial-slide {
        flex: 0 0 80vw;
        max-width: 80vw;
    }
    
    .testimonial-slide.active {
        flex: 0 0 90vw;
        max-width: 90vw;
    }
    
    .testimonial-arrow {
        display: none;
    }
    
    .arrow-hover-zone {
        display: none;
    }
}
