/*
 * Frontend styles for rls/testimonials.
 * Mirrors the antigravity theme look using CSS variables with safe fallbacks
 * so the carousel still renders sensibly outside that theme.
 */

#testimonials {
    background-color: var(--primary-dark, #112d4e);
    color: #fff;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    position: relative;
}

#testimonials > header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 var(--space-md, 1.5rem);
}

#testimonials h2 {
    color: #fff;
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

#testimonials h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    width: 60px;
    background-color: var(--accent-color, #e5a200);
}

.carousel-container {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2rem;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    padding: 0 5vw;
}

.testimonial-slide {
    background: #fff;
    color: var(--text-main, #222);
    border-radius: 8px;
    padding: 2.5rem;
    flex: 0 0 400px;
    max-width: 80vw;
    scroll-snap-align: center;
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.1));
    margin: 0;
    display: flex;
    flex-direction: column;
}

.testimonial-slide blockquote {
    margin: 0 0 1.5rem 0;
    font-size: 1.125rem;
    font-style: italic;
    line-height: 1.6;
    flex-grow: 1;
}

.testimonial-slide .rating {
    color: var(--accent-color, #e5a200);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-slide figcaption {
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
}

.testimonial-slide figcaption strong {
    color: var(--primary-dark, #112d4e);
    font-size: 1.125rem;
}

.testimonial-slide figcaption .source {
    font-size: 0.875rem;
    color: var(--text-light, #666);
    font-weight: 600;
}

.testimonial-slide figcaption .source a {
    color: inherit;
}

.testimonial-slide figcaption time {
    font-size: 0.875rem;
    color: var(--text-light, #666);
    margin-top: 0.25rem;
}

.see-more-reviews {
    text-align: center;
    margin: 2rem 0 0 0;
    padding: 0 var(--space-md, 1.5rem);
}

.see-more-reviews a {
    color: var(--accent-color, #e5a200);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/*
 * Widget rendering: shares slide markup with the block.
 * Tones things down for sidebar use (no carousel scrolling, single-column).
 */
.testimonial_widget .carousel-container {
    overflow: visible;
    padding-bottom: 0;
}

.testimonial_widget .carousel-track {
    flex-direction: column;
    gap: 1rem;
    padding: 0;
}

.testimonial_widget .testimonial-slide {
    flex: 1 1 auto;
    max-width: 100%;
    padding: 1.25rem;
}

.testimonial_widget .testimonial-slide blockquote {
    font-size: 1rem;
    margin-bottom: 1rem;
}
