/* ==========================================================================
   Student Reviews - Sri Yoga Ashram
   Real, verbatim Google reviews from course graduates.
   Uses the existing theme tokens (--course-*) with safe fallbacks so this
   file can be dropped onto any page without depending on load order.
   ========================================================================== */

.sya-reviews {
    --rv-earth: var(--course-earth, #7b6d61);
    --rv-earth-dark: var(--course-earth-dark, #62564d);
    --rv-gold: var(--course-gold, #c79c66);
    --rv-cream: var(--course-cream, #fbf7f1);
    --rv-ink: var(--course-ink, #3f3832);
    --rv-card: var(--course-card, #ffffff);
    --rv-line: var(--course-line, rgba(123, 109, 97, 0.22));
    --rv-shadow: var(--course-shadow, 0 10px 24px rgba(63, 56, 50, 0.06));
    --rv-star: #e8a33d;

    /* Flat cream so this section takes its turn in the page's white/cream
       alternation instead of fading into the band above or below it. */
    background: var(--rv-cream);
    padding: 72px 0 80px;
}

/* Band overrides, matching the sya-band-* vocabulary used elsewhere on the site.
   Defined here rather than in site-ui.css because that file gets replaced by an
   external sync. A page adds one of these when its own section order would put
   two identical bands next to each other. */
.sya-reviews.sya-band-white {
    background: var(--course-card, #fff);
}

.sya-reviews.sya-band-cream {
    background: var(--rv-cream);
}

.sya-reviews * {
    box-sizing: border-box;
}

.sya-reviews-inner {
    margin: 0 auto;
    max-width: 1180px;
    padding: 0 16px;
}

/* ---------- Heading ---------- */
.sya-rv-head {
    margin-bottom: 36px;
    text-align: center;
}

.sya-rv-eyebrow {
    color: var(--rv-gold);
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.sya-rv-head h2 {
    color: var(--rv-ink);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.2;
    margin: 0 0 12px;
}

.sya-rv-head h2 span {
    color: var(--rv-gold);
}

.sya-rv-sub {
    color: var(--rv-earth);
    font-size: 16px;
    margin: 0 auto;
    max-width: 640px;
}

/* ---------- Aggregate summary bar ---------- */
.sya-rv-summary {
    align-items: center;
    background: var(--rv-card);
    border: 1px solid var(--rv-line);
    border-radius: 16px;
    box-shadow: var(--rv-shadow);
    display: flex;
    flex-wrap: wrap;
    gap: 20px 34px;
    justify-content: center;
    margin: 0 auto 40px;
    max-width: 760px;
    padding: 22px 28px;
}

.sya-rv-score {
    align-items: baseline;
    display: flex;
    gap: 6px;
}

.sya-rv-score-num {
    color: var(--rv-ink);
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

.sya-rv-score-out {
    color: var(--rv-earth);
    font-size: 15px;
}

.sya-rv-summary-meta {
    border-left: 1px solid var(--rv-line);
    padding-left: 34px;
}

.sya-rv-summary-meta .sya-rv-stars {
    margin-bottom: 4px;
}

.sya-rv-count {
    color: var(--rv-earth);
    font-size: 14px;
    margin: 0;
}

.sya-rv-source {
    align-items: center;
    color: var(--rv-earth);
    display: flex;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
}

.sya-rv-source svg {
    flex: 0 0 20px;
    height: 20px;
    width: 20px;
}

/* ---------- Stars ---------- */
.sya-rv-stars {
    align-items: center;
    display: flex;
    gap: 2px;
    line-height: 1;
}

.sya-rv-stars svg {
    flex: 0 0 17px;
    height: 17px;
    width: 17px;
}

.sya-rv-stars .s-on {
    fill: var(--rv-star);
}

.sya-rv-stars .s-off {
    fill: rgba(123, 109, 97, 0.25);
}

/* ---------- Grid ---------- */
.sya-rv-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* ---------- Card ---------- */
.sya-rv-card {
    background: var(--rv-card);
    border: 1px solid var(--rv-line);
    border-radius: 16px;
    box-shadow: var(--rv-shadow);
    display: flex;
    flex-direction: column;
    padding: 26px 24px 20px;
    position: relative;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.sya-rv-card:hover {
    box-shadow: 0 16px 34px rgba(63, 56, 50, 0.12);
    transform: translateY(-3px);
}

.sya-rv-card::before {
    color: var(--rv-gold);
    content: "\201C";
    font-family: Georgia, "Times New Roman", serif;
    font-size: 66px;
    line-height: 1;
    opacity: 0.28;
    position: absolute;
    right: 20px;
    top: 10px;
}

.sya-rv-card-top {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.sya-rv-avatar {
    align-items: center;
    background: linear-gradient(135deg, var(--rv-gold), var(--rv-earth));
    border-radius: 50%;
    color: #fff;
    display: flex;
    flex: 0 0 44px;
    font-size: 18px;
    font-weight: 700;
    height: 44px;
    justify-content: center;
    text-transform: uppercase;
    width: 44px;
}

/* Real reviewer photo, cropped from the Google review screenshot. Sits on top
   of the gradient initial, so the initial shows through if the file is missing. */
.sya-rv-avatar img {
    border-radius: 50%;
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.sya-rv-who {
    min-width: 0;
}

.sya-rv-name {
    color: var(--rv-ink);
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sya-rv-date {
    color: var(--rv-earth);
    font-size: 13px;
    margin: 2px 0 0;
}

.sya-rv-card .sya-rv-stars {
    margin-bottom: 12px;
}

/* ---------- Body text with clamp ---------- */
.sya-rv-text {
    color: var(--rv-ink);
    flex: 1 1 auto;
    font-size: 15px;
    line-height: 1.68;
    margin: 0 0 14px;
    white-space: pre-line;
}

.sya-rv-text.is-clamped {
    -webkit-box-orient: vertical;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    line-clamp: 8;
    overflow: hidden;
}

.sya-rv-more {
    align-self: flex-start;
    background: none;
    border: 0;
    color: var(--rv-gold);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sya-rv-more:hover,
.sya-rv-more:focus-visible {
    color: var(--rv-earth-dark);
}

/* ---------- Card footer ---------- */
.sya-rv-card-foot {
    align-items: center;
    border-top: 1px solid var(--rv-line);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
}

.sya-rv-badge {
    align-items: center;
    color: var(--rv-earth);
    display: inline-flex;
    font-size: 12.5px;
    font-weight: 600;
    gap: 6px;
}

.sya-rv-badge svg {
    flex: 0 0 15px;
    height: 15px;
    width: 15px;
}

.sya-rv-proof {
    align-items: center;
    color: var(--rv-earth);
    display: inline-flex;
    font-size: 12.5px;
    gap: 5px;
    opacity: 0.85;
    text-decoration: none;
}

.sya-rv-proof:hover,
.sya-rv-proof:focus-visible {
    color: var(--rv-gold);
    opacity: 1;
    text-decoration: underline;
}

.sya-rv-proof svg {
    flex: 0 0 14px;
    height: 14px;
    width: 14px;
}

/* ---------- Show-more control ---------- */
.sya-rv-actions {
    margin-top: 36px;
    text-align: center;
}

.sya-rv-showmore {
    background: var(--rv-earth);
    border: 1px solid var(--rv-earth);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    padding: 13px 34px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.sya-rv-showmore:hover,
.sya-rv-showmore:focus-visible {
    background: var(--rv-earth-dark);
    color: #fff;
}

.sya-rv-card.is-hidden {
    display: none;
}

/* ---------- Lightbox for review screenshots ---------- */
.sya-rv-lightbox {
    align-items: center;
    background: rgba(35, 30, 26, 0.86);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 99999;
}

.sya-rv-lightbox.is-open {
    display: flex;
}

.sya-rv-lightbox img {
    border-radius: 10px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    max-height: 88vh;
    max-width: 92vw;
    object-fit: contain;
}

.sya-rv-lightbox-close {
    background: #fff;
    border: 0;
    border-radius: 50%;
    color: var(--course-ink, #3f3832);
    cursor: pointer;
    font-size: 24px;
    height: 44px;
    line-height: 44px;
    position: absolute;
    right: 22px;
    top: 22px;
    width: 44px;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .sya-reviews {
        padding: 52px 0 58px;
    }

    .sya-rv-grid {
        gap: 18px;
        grid-template-columns: 1fr;
    }

    .sya-rv-summary {
        gap: 16px;
        padding: 20px;
    }

    /* Stack the summary cleanly, the divider makes no sense once wrapped */
    .sya-rv-summary-meta {
        border-left: 0;
        border-top: 1px solid var(--rv-line);
        padding-left: 0;
        padding-top: 16px;
        text-align: center;
        width: 100%;
    }

    .sya-rv-summary-meta .sya-rv-stars {
        justify-content: center;
    }

    .sya-rv-card {
        padding: 22px 18px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sya-rv-card {
        transition: none;
    }

    .sya-rv-card:hover {
        transform: none;
    }
}
