/* Testimonial Section - Clean Rebuild */
.testimonials {
    padding: 100px 0;
    position: relative;
    height: 750px;
    display: flex;
    align-items: center;
}

.testimonials .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-title {
    text-align: center;
    font-size: 36px;
    color: #111827;
    margin: 0 0 60px 0;
    font-weight: 700;
    flex-shrink: 0;
}

.testimonial-wrapper {
    position: relative;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.testimonial-slides {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
}

.testimonial-slide {
    opacity: 0;
    visibility: hidden;
    text-align: center;
    padding: 0 60px;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1;
}

.testimonial-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quote {
    font-size: 24px;
    line-height: 1.6;
    color: #2d3748;
    font-style: italic;
    margin-bottom: 50px;
    position: relative;
    flex: 0 0 auto;
    min-height: 280px;
    max-height: 280px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.author {
    text-align: center;
    flex: 0 0 auto;
    margin-top: auto;
}

.author strong {
    display: block;
    font-size: 16px;
    color: #111827;
    margin-bottom: 8px;
    font-weight: 600;
}

.author span {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 15px;
}

.stars {
    color: #1e7ca8;
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 40px;
}

/* Navigation Arrows */
.nav-prev,
.nav-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(30, 124, 168, 0.2);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    padding: 0;
    z-index: 1000;
}

.nav-prev {
    left: 20px;
}

.nav-next {
    right: 20px;
}

.nav-prev:hover,
.nav-next:hover {
    opacity: 1;
    background: white;
    border-color: #1e7ca8;
}

.nav-prev::after,
.nav-next::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-top: 2px solid #1e7ca8;
    border-right: 2px solid #1e7ca8;
    top: 50%;
    left: 50%;
}

.nav-prev::after {
    transform: translate(-40%, -50%) rotate(-135deg);
}

.nav-next::after {
    transform: translate(-60%, -50%) rotate(45deg);
}

/* Dots Navigation */
.dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    margin: 50px 0 0 0;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e7eb;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: all 0.3s ease;
}

.dot:hover {
    background: #9ca3af;
}

.dot.active {
    background: #6b7280;
    width: 10px;
    height: 10px;
}

/* CTA Button */
.cta-btn {
    display: block;
    margin: 50px auto 0 auto;
    padding: 14px 40px;
    background: #1e7ca8;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    width: fit-content;
    flex-shrink: 0;
}

.cta-btn:hover {
    background: #166590;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(30, 124, 168, 0.2);
}

/* Gallery Page Testimonial Carousel */
.testimonials-carousel {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(30, 124, 168, 0.03), rgba(0, 188, 212, 0.02));
    position: relative;
}

.testimonials-carousel .section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #111827;
    margin-bottom: 60px;
    font-weight: 700;
}

.testimonials-carousel .carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

.testimonials-carousel .carousel-wrapper {
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    padding: 10px 0;
}

/* Fade edges to prevent shadow clipping */
.testimonials-carousel .carousel-wrapper::before,
.testimonials-carousel .carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
}

.testimonials-carousel .carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.7) 30%,
        rgba(255, 255, 255, 0) 100%);
}

.testimonials-carousel .carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.7) 30%,
        rgba(255, 255, 255, 0) 100%);
}

/* Adjust background for home page */
.home-testimonials {
    background: linear-gradient(135deg, rgba(30, 124, 168, 0.02), rgba(0, 188, 212, 0.01));
}

.home-testimonials .carousel-wrapper::before,
.home-testimonials .carousel-wrapper::after {
    width: 30px;
}

.home-testimonials .carousel-wrapper::before {
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.5) 40%,
        rgba(255, 255, 255, 0) 100%);
}

.home-testimonials .carousel-wrapper::after {
    background: linear-gradient(to left, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.5) 40%,
        rgba(255, 255, 255, 0) 100%);
}

.testimonials-carousel .carousel-track {
    display: flex;
    transition: none;
    will-change: transform;
}

.testimonials-carousel .testimonial-card {
    flex: 0 0 400px;
    padding: 0 15px;
    min-width: 400px;
}

.testimonials-carousel .testimonial-card-inner {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(30, 124, 168, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonials-carousel .testimonial-quote {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3748;
    font-style: italic;
    margin-bottom: 30px;
    flex-grow: 1;
    position: relative;
}

.testimonials-carousel .testimonial-quote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 3rem;
    color: rgba(30, 124, 168, 0.2);
    font-family: Georgia, serif;
}

.testimonials-carousel .testimonial-author {
    border-top: 1px solid rgba(30, 124, 168, 0.1);
    padding-top: 20px;
}

.testimonials-carousel .testimonial-author-name {
    font-weight: 600;
    color: #111827;
    font-size: 1rem;
    margin-bottom: 5px;
}

.testimonials-carousel .testimonial-author-title {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.testimonials-carousel .testimonial-stars {
    color: #1e7ca8;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* Carousel Navigation */
.testimonials-carousel .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid rgba(30, 124, 168, 0.2);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.testimonials-carousel .carousel-prev {
    left: 0;
}

.testimonials-carousel .carousel-next {
    right: 0;
}

.testimonials-carousel .carousel-btn:hover {
    background: #1e7ca8;
    border-color: #1e7ca8;
    transform: translateY(-50%) scale(1.1);
}

.testimonials-carousel .carousel-btn:hover svg {
    stroke: white;
}

.testimonials-carousel .carousel-btn svg {
    stroke: #1e7ca8;
    transition: stroke 0.3s ease;
}

/* Carousel Dots */
.testimonials-carousel .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.testimonials-carousel .carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e5e7eb;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonials-carousel .carousel-dot:hover {
    background: #9ca3af;
}

.testimonials-carousel .carousel-dot.active {
    background: #1e7ca8;
    width: 30px;
    border-radius: 5px;
}

/* Card hover effect */
.testimonials-carousel .testimonial-card-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #1e7ca8;
}

/* Mobile Responsive for Gallery Carousel */
@media (max-width: 480px) {
    .testimonials-carousel .testimonial-card {
        flex: 0 0 280px;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .testimonials-carousel {
        padding: 60px 0;
    }
    
    .testimonials-carousel .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    .testimonials-carousel .carousel-container {
        padding: 0 50px;
    }
    
    .testimonials-carousel .testimonial-card {
        flex: 0 0 320px;
        min-width: 320px;
    }
    
    .testimonials-carousel .testimonial-card-inner {
        padding: 30px 25px;
        min-height: 240px;
    }
    
    .testimonials-carousel .testimonial-quote {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .testimonials-carousel .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .testimonials-carousel .carousel-prev {
        left: 5px;
    }
    
    .testimonials-carousel .carousel-next {
        right: 5px;
    }
}

/* Mobile Responsive for Homepage */
@media (max-width: 768px) {
    .testimonials {
        padding: 80px 0;
        height: 650px;
    }
    
    .testimonial-title {
        font-size: 28px;
        margin: 0 0 40px 0;
    }
    
    .testimonial-wrapper {
        height: 400px;
    }
    
    .testimonial-slide {
        padding: 0 30px;
    }
    
    .quote {
        font-size: 18px;
        line-height: 1.6;
        min-height: 240px;
        max-height: 240px;
        margin-bottom: 40px;
    }
    
    .stars {
        margin-bottom: 30px;
    }
    
    .dots {
        margin: 40px 0 0 0;
    }
    
    .cta-btn {
        margin: 40px auto 0 auto;
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .nav-prev,
    .nav-next {
        width: 36px;
        height: 36px;
    }
    
    .nav-prev {
        left: 10px;
    }
    
    .nav-next {
        right: 10px;
    }
}