/* =============================================================
   CUSTOM REVIEWS DISPLAY — Blocksy Compatible
   ============================================================= */

/* Uses Blocksy's own CSS palette variables so it
   automatically matches whatever colors you set in the Customizer */
:root {
    --crs-accent:       var(--theme-palette-color-1,  #2563eb);
    --crs-bg:           var(--theme-palette-color-8,  #ffffff);
    --crs-surface:      var(--theme-palette-color-7,  #f8fafc);
    --crs-border:       var(--theme-palette-color-6,  #e2e8f0);
    --crs-text:         var(--theme-palette-color-3,  #1e293b);
    --crs-muted:        var(--theme-palette-color-5,  #64748b);
    --crs-star-on:      #f59e0b;
    --crs-star-off:     #e2e8f0;
    --crs-radius:       16px;
    --crs-shadow:       0 1px 4px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.07);
    --crs-shadow-hover: 0 4px 12px rgba(0,0,0,.10), 0 16px 40px rgba(0,0,0,.10);
}

/* ── Section ── */
.crs-section {
    padding: 2rem 0;
}

/* ── Grid ── */
.crs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 960px) {
    .crs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .crs-grid { grid-template-columns: 1fr; }
}

/* ── Card ── */
.crs-card {
    position: relative;
    background: var(--crs-bg);
    border: 1px solid var(--crs-border);
    border-radius: var(--crs-radius);
    padding: 1.75rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .875rem;
    box-shadow: var(--crs-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
    overflow: hidden;
}

.crs-card:hover {
    box-shadow: var(--crs-shadow-hover);
    transform: translateY(-4px);
}

/* ── Big decorative quote mark ── */
.crs-quote-mark {
    position: absolute;
    top: 8px;
    right: 18px;
    font-size: 72px;
    line-height: 1;
    font-family: Georgia, serif;
    color: var(--crs-accent);
    opacity: .08;
    pointer-events: none;
    user-select: none;
}

/* ── Card header ── */
.crs-card-header {
    display: flex;
    align-items: center;
    gap: .875rem;
}

/* ── Avatar ── */
.crs-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--crs-border);
    flex-shrink: 0;
}

.crs-avatar-initial {
    background: var(--crs-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
}

/* ── Name + branch ── */
.crs-meta {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.crs-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--crs-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crs-branch {
    font-size: .78rem;
    color: var(--crs-muted);
    display: flex;
    align-items: center;
    gap: .25rem;
}

/* ── Stars ── */
.crs-stars {
    display: flex;
    gap: 2px;
}

.crs-star {
    font-size: 1.15rem;
    line-height: 1;
}

.crs-star.on  { color: var(--crs-star-on);  }
.crs-star.off { color: var(--crs-star-off); }

/* ── Review text ── */
.crs-text {
    margin: 0;
    font-size: .9rem;
    line-height: 1.7;
    color: var(--crs-muted);
    flex: 1;

    /* Clamp to 5 lines max */
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Date ── */
.crs-date {
    font-size: .72rem;
    color: var(--crs-border);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: auto;
}

/* ── Empty state ── */
.crs-empty {
    text-align: center;
    color: var(--crs-muted);
    font-style: italic;
    padding: 2rem 0;
}