:root {    
    --gold-light: #e5c365;
    --text-white: #f3f4f6;
    --text-muted: #9ca3af;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
}

.testimonials-section {
    width: 100%;
    background: radial-gradient(circle at center, #111c2e 0%, #080d17 100%);
    padding: clamp(3rem, 8vw, 6.25rem) 0;
    box-sizing: border-box;
}

/* Header */
.section-header {
    text-align: center;
    margin-bottom: clamp(2rem, 5vw, 3rem);
    padding: 0 1rem;
}

.section-tag {
    font-family: 'Cormorant Garamond', serif;
    color: var(--gold-light);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 400;
    color: var(--text-white);
    line-height: 1.2;
}

.section-title .highlight {
    color: var(--gold-light);
    border-bottom: 2px solid var(--gold);
    padding-bottom: 2px;
}

/* Carousel Outer Container */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    overflow: hidden;
    /* Strict clipping of non-active slides */
    padding: 0;
    /* Padding moved to slide level to prevent width displacement */
    box-sizing: border-box;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
}

/* Slide Grid Layout */
.testimonial-slide {
    min-width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    /* Prevents track compression causing side peeking */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0.5rem 1rem;
    /* Keeps outer gutter margins safe on mobile */
    box-sizing: border-box;
}

/* Center single remaining card in 3-column layout (Desktop) */
.testimonial-slide>.testimonial-card:last-child:nth-child(3n + 1) {
    grid-column: 2;
}

/* Testimonial Card Styles */
.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.5rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

@media (hover: hover) {
    .testimonial-card:hover {
        border-color: rgba(212, 175, 55, 0.4);
        background: rgba(255, 255, 255, 0.05);
        transform: translateY(-5px);
    }
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.quote-icon {
    font-family: Georgia, serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--gold);
    line-height: 0.8;
    opacity: 0.8;
}

/* Rating Stars */
.star-rating {
    display: flex;
    gap: 3px;
}

.star-rating svg {
    width: 17px;
    height: 17px;
    fill: var(--gold);
}

.testimonial-text {
    color: var(--text-muted);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.25rem;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    object-fit: cover;
    flex-shrink: 0;
}

.client-details h4 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--gold-light);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 400;
    margin-bottom: 0.1rem;
    line-height: 1.2;
}

.client-details p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Controls & Dots */
.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.nav-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--gold-light);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

@media (hover: hover) {
    .nav-btn:hover {
        border-color: var(--gold);
        background: rgba(212, 175, 55, 0.1);
        transform: scale(1.05);
    }
}

.nav-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--gold-light);
}

.dots-container {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--gold);
    width: 24px;
    border-radius: 10px;
}

/* Bottom Section */
.bottom-section {
    padding: 2rem 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.badges-container {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.badge svg {
    width: 12px;
    height: 12px;
    fill: var(--gold);
}

/* Responsive Breakpoints */

/* Tablet (2 Columns) */
@media (max-width: 992px) {
    .testimonial-slide {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    /* Reset desktop override */
    .testimonial-slide>.testimonial-card:last-child:nth-child(3n + 1) {
        grid-column: auto;
    }

    /* Center an odd single card across 2 columns on tablet */
    .testimonial-slide>.testimonial-card:last-child:nth-child(2n + 1) {
        grid-column: 1 / -1;
        max-width: 500px;
        justify-self: center;
        width: 100%;
    }
}

/* Mobile (1 Column) */
@media (max-width: 650px) {
    .testimonial-slide {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Reset tablet alignment */
    .testimonial-slide>.testimonial-card:last-child:nth-child(2n + 1) {
        grid-column: auto;
        max-width: 100%;
    }

    .client-avatar {
        width: 45px;
        height: 45px;
    }

    .carousel-nav {
        gap: 1rem;
    }
}

/* Ultra-Small Mobile Screens */
@media (max-width: 380px) {
    .badges-container {
        flex-direction: column;
        align-items: center;
    }

    .badge {
        width: 100%;
        max-width: 240px;
        justify-content: center;
    }
}