/**
 * Module: Testimonials Variant Composition Layer
 * Target: src/core_apps/frontend/static/frontend/themes/_shared/sections/testimonials/testimonials-variants.css
 *
 * Variant Identity Rules:
 *   default      → Card grid with star ratings, hover lift, brand star color
 *   masonry-grid → Multi-column social proof wall, quotation decorations
 *   editorial    → Large pull-quote typography, brand underline accent
 *
 * Specifications (HMS-Grade):
 * - Rule A: Zero sibling positional dependence
 * - Rule B: Rigid Static Weight Budget (Limit: 10 KB uncompressed)
 * - Rule C: Absolute scoping containment
 */


/* =============================================================================
   0. SHARED BASE
   ============================================================================= */

.page-home .home-composer .section-testimonials {
    position: relative;
    padding: clamp(3rem, 6vw, 5rem) 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg, 2.5rem);
}


/* =============================================================================
   1. VARIANT: DEFAULT — Card Grid with Star Ratings
   
   Design: Responsive card grid, star ratings with brand color,
   hover lift effect, clean card borders.
   ============================================================================= */

.page-home .home-composer .section-testimonials--default .testimonials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1rem, 2vw, 1.5rem);
    padding: 0 var(--spacing-md, 1rem);
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .page-home .home-composer .section-testimonials--default .testimonials__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .page-home .home-composer .section-testimonials--default .testimonials__grid {
        grid-template-columns: 1fr;
    }
}

.page-home .home-composer .section-testimonials--default .testimonial-card {
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--background-tertiary, #ffffff);
    border-radius: var(--border-radius-secondary, 0.75rem);
    transition: transform var(--transition-smooth, 0.35s ease), box-shadow var(--transition-smooth, 0.35s ease);
}

.page-home .home-composer .section-testimonials--default .testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-elevated, 0 10px 15px -3px rgba(0, 0, 0, 0.08));
}

/* Star ratings — brand colored */
.page-home .home-composer .section-testimonials--default .testimonial-card__stars .fa-star {
    color: var(--brand-primary-color);
    font-size: 0.85rem;
}

.page-home .home-composer .section-testimonials--default .testimonial-card__stars .fa-regular.fa-star {
    color: rgba(0, 0, 0, 0.15);
}

/* Review text */
.page-home .home-composer .section-testimonials--default .testimonial-card__text {
    font-family: var(--font-family-primary);
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    color: var(--text-primary, #555);
    line-height: 1.7;
    font-style: italic;
    margin: clamp(0.75rem, 1.5vw, 1rem) 0;
    border: none;
    padding: 0;
}

/* Author */
.page-home .home-composer .section-testimonials--default .testimonial-card__name {
    font-family: var(--font-family-primary);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-secondary, #111);
}

.page-home .home-composer .section-testimonials--default .testimonial-card__date {
    font-family: var(--font-family-primary);
    font-size: 0.8rem;
    color: var(--text-secondary, #999);
    margin-left: 0.5rem;
}


/* =============================================================================
   2. VARIANT: MASONRY GRID — Multi-Column Social Proof
   
   Design: Vertical masonry with overlapping staggered items (CSS columns).
   ============================================================================= */

/* Ensure the max-width wrapper inherits the vertical flex gap */
.page-home .home-composer .section-testimonials--masonry-grid .container-default {
    display: flex;
    flex-direction: column;
    gap: inherit;
    width: 100%;
}

.page-home .home-composer .section-testimonials--masonry-grid .testimonial-wall {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 2vw, 1.75rem);
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    align-items: stretch; /* Forces equal height for all cards in the row */
}

@media (min-width: 640px) {
    .page-home .home-composer .section-testimonials--masonry-grid .testimonial-wall {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Card */
.page-home .home-composer .section-testimonials--masonry-grid .testimonial-bubble {
    width: 100%;
    padding: clamp(1.5rem, 2.5vw, 2rem);
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: var(--background-secondary, #ffffff);
    border-radius: var(--border-radius-secondary, 0.75rem);
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-home .home-composer .section-testimonials--masonry-grid .testimonial-bubble:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.10);
}

/* Quotation Mark Decoration */
.page-home .home-composer .section-testimonials--masonry-grid .testimonial-bubble::before {
    content: "\201C";
    font-family: var(--font-family-secondary, serif);
    font-size: 3rem;
    color: var(--brand-primary-color);
    opacity: 0.15;
    position: absolute;
    top: 0.25rem;
    left: 0.75rem;
    line-height: 1;
    pointer-events: none;
}

.page-home .home-composer .section-testimonials--masonry-grid .testimonial-quote {
    font-family: var(--font-family-primary);
    font-style: italic;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    color: var(--text-primary, #555);
    line-height: 1.7;
    margin-bottom: clamp(0.75rem, 1.5vw, 1rem);
    flex-grow: 1; /* Pushes the footer to the bottom */
}


/* =============================================================================
   3. VARIANT: EDITORIAL — Large Typography Pull Quotes
   
   Design: Single featured testimonial with large display typography,
   centered layout, brand-colored underline accent under quote.
   ============================================================================= */

.page-home .home-composer .section-testimonials--editorial .editorial-wrapper {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    position: relative;
}

/* Slide visibility — fade transition */
.page-home .home-composer .section-testimonials--editorial .editorial-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.page-home .home-composer .section-testimonials--editorial .editorial-slide--active {
    display: block;
    opacity: 1;
}

.page-home .home-composer .section-testimonials--editorial blockquote {
    font-family: var(--font-family-secondary, serif);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    line-height: 1.5;
    color: var(--color-secondary, #111);
    margin: 0 0 clamp(1.5rem, 3vw, 2rem) 0;
    position: relative;
    border-left: none;
    padding: 0;
}

/* Decorative quotation mark */
.page-home .home-composer .section-testimonials--editorial blockquote::before {
    content: "\201C";
    font-size: 4.5rem;
    color: var(--brand-primary-color);
    opacity: 0.15;
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1;
    pointer-events: none;
}

/* Brand Underline Accent — below the quote */
.page-home .home-composer .section-testimonials--editorial blockquote::after {
    content: '';
    display: block;
    width: 3rem;
    height: 2px;
    background: var(--brand-primary-color);
    margin: clamp(1rem, 2vw, 1.5rem) auto 0 auto;
    opacity: 0.4;
    border-radius: 1px;
}

.page-home .home-composer .section-testimonials--editorial cite {
    font-family: var(--font-family-primary);
    font-style: normal;
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary, #666);
}

/* Dot Indicators */
.page-home .home-composer .section-testimonials--editorial .editorial-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: clamp(1.5rem, 3vw, 2rem);
}

.page-home .home-composer .section-testimonials--editorial .editorial-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    border: none;
    background: var(--text-tertiary, #ccc);
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, transform 0.3s ease;
}

.page-home .home-composer .section-testimonials--editorial .editorial-dot--active {
    background: var(--brand-primary-color);
    transform: scale(1.3);
}

/* Star ratings — brand colored (mirrors default variant pattern) */
.page-home .home-composer .section-testimonials--editorial .editorial-stars .fa-star {
    color: var(--brand-primary-color);
    font-size: 1rem;
}

.page-home .home-composer .section-testimonials--editorial .editorial-stars .fa-regular.fa-star {
    color: rgba(0, 0, 0, 0.15);
}