/* Testimonials carousel styles (clean, flat CSS) */

.reviews-carousel{
    max-width: 900px;
    margin: 0 auto 2rem;
    padding: 28px 36px 40px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15,30,60,0.06);
    position: relative;
}

.carousel-container{
    position: relative;
    overflow: hidden;
    padding-bottom: 12px; /* room for progress bar */
    min-height: 140px; /* reserve height so absolutely positioned slides have room */
    transition: height 300ms ease;
}

.carousel-slide{
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    text-align: left;
    /* Reserve horizontal space so the circular nav buttons don't cover the text */
    padding: 20px 72px;
    pointer-events: none;
        opacity: 0;
        /* No animation: switch slides instantly */
}

.carousel-slide.active{
    z-index: 2;
    pointer-events: auto;
    opacity: 1;
    /* No transform for instant switch */
}

.carousel-slide:not(.active){
    z-index: 1;
}

/* Progress bar shown at the bottom of the carousel to indicate time until next slide */
.carousel-progress{
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px; /* thinner and less prominent */
    background: rgba(0,0,0,0.04);
    overflow: hidden;
    z-index: 8;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    opacity: 0.9;
}

.carousel-progress .bar{
    width: 0%;
    height: 100%;
    /* subtle gradient; use theme-aware colors where possible */
    background: linear-gradient(90deg, rgba(30,60,110,0.95), rgba(244,195,41,0.95));
    transition: width linear;
    opacity: 0.9;
}

.carousel-container:hover .carousel-progress{ opacity: 1; }

.carousel-slide .review-text{
    line-height: 1.7;
    font-size: 16px;
    color: #233;
}

.reviewer{
    font-size: 14px;
    color: #1e3c6e;
    font-weight: 700;
    margin-top: 10px;
}

.stars{
    font-size: 18px;
    margin: 12px 0 8px 0;
}

.carousel-container .carousel-button{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--accent-color, #1e3c6e);
    color: var(--accent-contrast, #fff);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    box-shadow: 0 6px 14px rgba(15,30,60,0.10);
    transition: transform 180ms ease, background-color 180ms ease, opacity 160ms ease;
    z-index: 40;
    opacity: 1;
}

.carousel-container .carousel-button:hover{ transform: translateY(-50%) scale(1.04); background-color: rgba(0,0,0,0.06); }

.carousel-container .carousel-button.prev{ left: 12px; }
.carousel-container .carousel-button.next{ right: 12px; }

/* SVG icons inside the buttons inherit the button color */
.carousel-button svg{ width:18px; height:18px; display:block; }
.carousel-button svg path{ fill: currentColor; }

/* On small screens make buttons slightly smaller and inside the card */
@media (max-width: 520px){
    .carousel-container .carousel-button{ width:40px; height:40px; }
    /* on small screens reduce slide horizontal padding so content still fits */
    .reviews-carousel{ padding-left: 18px; padding-right: 18px; }
    .carousel-slide{ padding: 12px 46px; }
}

/* Dark mode overrides */
.dark-mode .reviews-carousel{
    background-color: var(--card-bg);
    color: var(--text-color);
}
.dark-mode .review-text{ color: var(--text-color); }
.dark-mode .reviewer{ color: var(--accent-color); }
.dark-mode .carousel-button{ background-color: var(--accent-color); color: var(--bg-color); }
.dark-mode .carousel-slide{ color: var(--text-color); }
