/* ==========================================================================
   KROTAR — Reviews / Reseñas section
   Sober and credible: dark background, dim lighting, clean cards, minimal
   depth, no waves, no particles, no carousel, no constant motion, no
   dominant blue wash.
   ========================================================================== */

.reviews-section {
    background: var(--color-bg);
}

.reviews-section .section-subtitle {
    max-width: 60ch;
    margin: 0 auto;
}

/* Heading introducing the reviews block within the Delivery section — same
   type scale as the card titles (.service-title), just centered and with
   room above it to separate it from the placeholder card grid. */
.reviews-subheading {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--color-text);
    text-align: center;
    margin: var(--space-7) 0 var(--space-5) 0;
}

/* Discreet loading indicator shown while the Supabase reviews request is in
   flight — reviews.js removes this element as soon as the request settles,
   whether it succeeds or fails. */
.reviews-loading {
    margin: 0 0 var(--space-4) 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-dim);
    animation: reviewsLoadingPulse 1.6s ease-in-out infinite;
}

/* Shown instead of an empty grid when there are no published reviews yet,
   or the Supabase request fails — see reviews.js. */
.reviews-empty {
    margin: 0 0 var(--space-4) 0;
    text-align: center;
    font-size: 0.92rem;
    color: var(--color-text-dim);
}

@keyframes reviewsLoadingPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Star rating — monochrome to match the section's sober palette; no new
   accent hue introduced. */
.review-rating {
    display: flex;
    gap: 0.15rem;
    font-size: 0.95rem;
    line-height: 1;
}

.review-rating .star {
    color: var(--color-text-dim);
}

.review-rating .star--filled {
    color: var(--color-text);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

.review-card {
    padding: var(--space-6) var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
    transition: border-color var(--duration-base) ease;
}

.review-card:hover {
    border-color: var(--color-border-light);
}

.review-text {
    font-size: 0.94rem;
    line-height: 1.7;
    color: var(--color-text-body);
}

.review-author {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
}

.review-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--color-text);
}

/* Balanced column count for the live Supabase cards — reviews.js sets
   [data-count] to the exact number of real cards rendered. */
@media (min-width: 981px) {
    .reviews-grid[data-count="1"] {
        grid-template-columns: minmax(0, 420px);
        justify-content: center;
    }

    .reviews-grid[data-count="2"] {
        grid-template-columns: repeat(2, 1fr);
    }

    .reviews-grid[data-count="4"] {
        grid-template-columns: repeat(2, 1fr);
    }

    .reviews-grid[data-count="5"] {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Odd one out on its own row — centered the same way a single review
       is, instead of left-aligned under an empty second column. */
    .reviews-grid[data-count="5"] .review-card:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: 100%;
        max-width: 420px;
    }
}

@media (max-width: 980px) {
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}
