.testimonials {
    padding: 80px calc(var(--container-padding) * 2) 100px;
    background-color: #FDFBF8;
    overflow: hidden; /* Hide any overflow */
    position: relative; /* Establish positioning context */
}

.testimonials .container {
    position: relative;
    overflow: visible;
}

.testimonials-header {
    text-align: center;
    margin-bottom: 60px;
}

.testimonials-header span {
    font-family: 'Exo 2', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #FF5555;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 16px;
}

/* Using global h2 styles from styles.css with specific color override */
.testimonials-header .section-title {
    color: #1D1D1C !important;
    margin-top: 10px;
    padding-top: 0;
}

/* Remove old testimonials-content styles as we're using the new structure */
.testimonials-content {
    display: none;
}

/* New testimonials wrapper structure */
.testimonials-wrapper {
    position: relative;
    width: 100%;
    margin-top: 60px;
    min-height: 400px;
}

.testimonials-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 60px;
}

/* Special styling for the third card */
.testimonial-card[data-position="third"] {
    width: 45%;
    margin: 0 auto;
}

.testimonial-card {
    background-color: #F8F4EE;
    border-radius: 16px;
    padding: 32px;
    min-width: 300px;
    z-index: 2;
    width: 45%; /* Width as percentage for better responsiveness */
    color: #FFFFFF;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-card h3 {
    font-family: 'Exo 2', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #1D1D1C;
    margin-bottom: 16px;
    line-height: 1.2;
}

.testimonial-card p {
    font-family: 'Exo 2', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1D1D1C;
}

.quote-icon {
    width: 400px;
    height: 400px;
    background: url('../assets/images/testimonials_illustration.svg') no-repeat center;
    background-size: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0.8;
    pointer-events: none;
}

.testimonial-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 1024px) { /* Tablet and mobile styles */
    .testimonials {
        padding: 60px calc(var(--container-padding) * 2) 80px;
    }
    
    /* Using global h2 styles with responsive font size */
    
    /* Responsive layout for testimonials */
    .testimonials-wrapper {
        margin-top: 40px;
        min-height: auto;
    }
    
    .testimonials-row {
        flex-direction: column;
        margin-bottom: 0;
    }
    
    .testimonial-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 30px 0 !important;
        box-sizing: border-box;
    }
    
    /* Special styling for the third card on mobile */
    .testimonial-card[data-position="third"] {
        width: 100%;
        margin: 0 0 0 0 !important;
    }
    
    /* Hide the quote icon on tablet/mobile */
    .quote-icon {
        display: none;
    }
}
