/* Testimonial Section */
.testimonial {
    overflow: hidden;
}

.testimonial__star {
    color: #d1d5db;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.3s cubic-bezier(0.68, -0.3, 0.265, 1.3),
                color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (min-width: 768px) {
    .testimonial__star {
        font-size: 1.25rem;
    }
}

.testimonial__star.active {
    color: #fbbf24;
}

.testimonial__rating:hover .testimonial__star.active {
    animation: starWiggle 0.5s ease-in-out;
}

@keyframes starWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.testimonial__text {
    line-height: 1.7;
}

@media (min-width: 768px) {
    .testimonial__text {
        line-height: 1.8;
    }
}

.testimonial__author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .testimonial__author {
        gap: 1rem;
    }
}

.testimonial__author-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary-color-100);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (min-width: 768px) {
    .testimonial__author-image {
        width: 60px;
        height: 60px;
    }
}

.testimonial__author:hover .testimonial__author-image {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(187, 154, 101, 0.3);
}

/* Swiper pagination customization */
.testimonial__slider .swiper-pagination {
    position: relative;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .testimonial__slider .swiper-pagination {
        margin-top: 2rem;
    }
}

.testimonial__slider .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #d1d5db;
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (min-width: 768px) {
    .testimonial__slider .swiper-pagination-bullet {
        width: 12px;
        height: 12px;
    }
}

.testimonial__slider .swiper-pagination-bullet:hover {
    background: var(--secondary-color-100);
    transform: scale(1.2);
}

.testimonial__slider .swiper-pagination-bullet-active {
    background: var(--primary-color-100);
    transform: scale(1.2);
}

/* Media Styles - Fixed aspect ratio to prevent layout shift */
.testimonial__media {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    /* 4:3 aspect ratio on mobile, 16:9 on larger screens */
    padding-bottom: 75%;
    height: 0;
    box-shadow: 0 8px 25px rgba(64, 50, 38, 0.12);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (min-width: 768px) {
    .testimonial__media {
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        border-radius: 16px;
    }
}

@media (min-width: 1024px) {
    .testimonial__media {
        border-radius: 20px;
    }
}

.testimonial__media:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(64, 50, 38, 0.18);
}

.testimonial__media--image {
    position: relative;
}

.testimonial__media-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (min-width: 768px) {
    .testimonial__media-image {
        border-radius: 16px;
    }
}

@media (min-width: 1024px) {
    .testimonial__media-image {
        border-radius: 20px;
    }
}

.testimonial__media:hover .testimonial__media-image {
    transform: scale(1.05);
}

.testimonial__media--video {
    position: relative;
}

.testimonial__video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.testimonial__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

@media (min-width: 768px) {
    .testimonial__video {
        border-radius: 16px;
    }
}

@media (min-width: 1024px) {
    .testimonial__video {
        border-radius: 20px;
    }
}

/* Slide transition effects */
.testimonial__slider .swiper-slide {
    opacity: 0.4;
    transform: scale(0.95);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial__slider .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .testimonial__star,
    .testimonial__author-image,
    .testimonial__media,
    .testimonial__media-image,
    .testimonial__slider .swiper-slide,
    .testimonial__slider .swiper-pagination-bullet {
        transition: none;
    }
    
    .testimonial__rating:hover .testimonial__star.active {
        animation: none;
    }
}