/* ================================
   Testimonials Section
   ================================ */

.testimonials-section {
    padding: 5rem 3vw;
    background-color: #f8f9fa;
    width: 100%;
    margin: 0;
}

.testimonials-section .section-title {
    text-align: center;
    margin-bottom: 3.5rem;
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    font-size: 2.5rem;
}

/* Mobile compression */
@media (max-width: 767.98px) {
    .testimonials-section {
        padding: 1rem 0.75rem;
    }

    .testimonials-section .section-title {
        margin-bottom: 1rem;
        font-size: 1.6rem;
    }

    .testimonial-card {
        padding: 1rem;
    }

    .quote-icon {
        margin-bottom: 0.75rem;
        width: 24px;
        height: 24px;
    }

    .testimonial-text {
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }
}

.testimonials-wrapper {
    position: relative;
    width: 100%;
}

/* GRID / SLIDER LOGIC */

/* Default: Desktop (>1200px) -> Grid 1x4 */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: stretch;
    width: 100%;
    transition: all 0.3s ease;
}

/* LAPTOP (992px - 1199px) -> SLIDER (3 cards) */
@media (max-width: 1199.98px) and (min-width: 992px) {
    .testimonials-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 10px;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .testimonials-grid::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .testimonial-card {
        flex: 0 0 calc(33.333% - 16px);
        scroll-snap-align: start;
        min-width: 300px;
    }
}

/* TABLET (768px - 991px) -> GRID 2x2 */
@media (max-width: 991.98px) and (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        overflow-x: visible;
    }
}

/* MOBILE (<768px) -> SLIDER (85vw + peek) */
@media (max-width: 767.98px) {
    .testimonials-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-right: 15%;
        /* Peek effect */
        scrollbar-width: none;
    }

    .testimonials-grid::-webkit-scrollbar {
        display: none;
    }

    .testimonial-card {
        flex: 0 0 85vw;
        scroll-snap-align: center;
        margin-right: 15px;
    }
}

/* CARD STYLES */
.testimonial-card {
    background: white;
    padding: 2.5rem;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.quote-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 1.5rem;
    fill: #d4af37;
    opacity: 0.8;
}

.testimonial-text {
    font-style: italic;
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.6;
    flex-grow: 1;
    font-size: 1.05rem;
}

.testimonial-author {
    margin-top: auto;
}

.author-name {
    display: block;
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
}

.author-role {
    display: block;
    font-size: 0.9rem;
    color: #888;
    margin-top: 0.2rem;
}

.testimonial-rating {
    margin-top: 0.8rem;
    color: #d4af37;
    font-size: 1.2rem;
}

/* NAVIGATION ARROWS (Unified Glassy Look) - Isolated with .testimonials-wrapper */
.testimonials-wrapper .nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 1.2rem;
    color: #111;
}

.testimonials-wrapper .nav-arrow:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Show arrows on hover over the wrapper */
.testimonials-wrapper:hover .nav-arrow {
    opacity: 1;
    pointer-events: auto;
}

.testimonials-wrapper .nav-prev {
    left: 20px;
}

.testimonials-wrapper .nav-next {
    right: 20px;
}

/* Responsive Arrow Visibility - Isolated with .testimonials-wrapper */
/* Hide arrows on Desktop (>1200px) and Tablet (768px-991px) */
@media (min-width: 1200px),
(min-width: 768px) and (max-width: 991.98px) {
    .testimonials-wrapper .nav-arrow {
        display: none !important;
    }
}

/* Adjust arrow position for very wide screens to keep them near content */
@media (min-width: 1600px) {
    .testimonials-wrapper .nav-prev {
        left: -20px;
    }

    .testimonials-wrapper .nav-next {
        right: -20px;
    }
}