.top-transition {
    position: relative;
    height: 200px;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0) 0%, 
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0.7) 100% 
    );
    z-index: 10;
}

.testimonials {
    padding: 150px 20px 200px 20px;
    background: linear-gradient(180deg, 
        rgba(25, 25, 35, 1) 0%,
        rgba(15, 15, 25, 1) 100%
    );
    position: relative;
    overflow: hidden;
}

/* Bottom transition overlay */
.bottom-transition {
    position: relative;
    height: 200px;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.7) 0%, 
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0) 100% 
    );
    z-index: 10;
}

/* Next section simulation */
.next-section {
    height: 100vh;
    background: linear-gradient(135deg, #ff7f50, #ffd700, #48d1cc, #ff7f50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.testimonials-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.testimonials h2 {
    font-size: 6rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffd700, #ffb6c1, #c0c0c0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
    0% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.4)); }
    100% { filter: drop-shadow(0 0 40px rgba(255, 182, 193, 0.6)); }
}

.testimonials h2 span {
    font-size: 4.5rem;
    display: block;
    margin-top: 15px;
}

.title-underline {
    width: 300px;
    height: 6px;
    margin: 30px auto 80px;
    background: linear-gradient(90deg, #ffd700, #ffb6c1, #ffd700);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.title-underline::before {
    content: "";
    position: absolute;
    top: 0; left: -50%;
    width: 50%; height: 100%;
    background: rgba(255,255,255,0.8);
    animation: underline-shine 2.5s infinite linear;
}

@keyframes underline-shine {
    0% { left: -50%; }
    100% { left: 120%; }
}

.testimonial-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Removed fixed height to allow cards to expand */
    height: auto; /* Changed from 450px */
    min-height: 450px; /* Added a min-height to maintain some structure */
    position: relative;
    overflow: hidden;
    perspective: 1200px;
    padding: 20px 0; /* Added vertical padding to give space for cards to expand */
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.08);
    border: 3px solid rgba(255, 215, 0, 0.4);
    border-radius: 30px;
    /* Further reduced padding */
    padding: 30px 40px; /* Adjusted from 40px 50px */
    max-width: 900px;
    width: 90%;
    position: absolute;
    backdrop-filter: blur(15px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    min-height: auto; /* Ensures card can grow with content */
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateX(-200%) scale(0.7) rotateY(-20deg);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active state */
.testimonial-card.active {
    opacity: 1;
    transform: translateX(0) scale(1) rotateY(0deg);
}

/* Exit state */
.testimonial-card.exiting {
    opacity: 0;
    transform: translateX(200%) scale(0.7) rotateY(20deg);
}

.testimonial-card p {
    /* Further reduced font size */
    font-size: 1.3rem; /* Adjusted from 1.5rem */
    font-style: italic;
    color: #f5f5f5;
    margin-bottom: 20px; /* Slightly reduced margin-bottom */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    line-height: 1.6; /* Maintained for readability */
}

.testimonial-card h4 {
    background: linear-gradient(135deg, #ffd700, #ffb6c1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 1.4rem; /* Slightly reduced for consistency */
}

.cta-btn {
    display: inline-block;
    margin-top: 80px;
    padding: 25px 70px;
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    background: linear-gradient(135deg, #ffd700, #ffb6c1);
    border-radius: 60px;
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.4);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.cta-btn:hover::before {
    left: 100%;
}

.cta-btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 20px 60px rgba(255, 182, 193, 0.5);
}

/* Progress indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
}

.indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.3);
    cursor: pointer;
    transition: all 0.4s ease;
}

.indicator.active {
    background: linear-gradient(45deg, #ffd700, #ffb6c1);
    transform: scale(1.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .testimonials {
        padding: 100px 15px 150px 15px;
    }
    
    .testimonials h2 { 
        font-size: 3.5rem; 
    }
    
    .testimonials h2 span { 
        font-size: 2.8rem; 
    }
    
    .title-underline {
        width: 200px;
        height: 4px;
        margin: 20px auto 50px;
    }
    
    .testimonial-carousel {
        height: auto; /* Also auto on mobile */
        min-height: 350px; /* Adjusted min-height for mobile */
        margin: 0 10px;
        overflow: visible;
        padding: 15px 0; /* Adjusted padding for mobile */
    }
    
    .testimonial-card { 
        padding: 25px 25px; /* Adjusted padding for mobile */
        width: 95%;
        min-height: auto;
        transform: translateX(-100%) scale(0.9);
        transition: all 0.8s ease;
    }
    
    .testimonial-card.active {
        transform: translateX(0) scale(1);
    }
    
    .testimonial-card.exiting {
        transform: translateX(100%) scale(0.9);
    }
    
    .testimonial-card p {
        font-size: 1rem; /* Further reduced mobile font size */
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    .testimonial-card h4 {
        font-size: 1.2rem; /* Adjusted for mobile */
    }
    
    .cta-btn { 
        font-size: 1.4rem; 
        padding: 18px 45px;
        margin-top: 50px;
    }
    
    .carousel-indicators {
        margin-top: 30px;
        gap: 12px;
    }
    
    .indicator {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .testimonials h2 { 
        font-size: 2.8rem; 
    }
    
    .testimonials h2 span { 
        font-size: 2.2rem; 
    }
    
    .testimonial-card { 
        padding: 20px 15px; /* Further reduced padding for very small screens */
    }
    
    .testimonial-card p {
        font-size: 0.9rem; /* Further reduced font size for very small screens */
        line-height: 1.5;
    }
    
    .testimonial-card h4 {
        font-size: 1rem; /* Further reduced for very small screens */
    }
    
    .cta-btn { 
        font-size: 1.2rem; 
        padding: 15px 35px;
    }
}