/* =====================================================================
   EEPL Classroom — Google Reviews Section Styles
   Compatible with light & dark mode via CSS custom properties.
   ===================================================================== */

/* ── Section wrapper ─────────────────────────────────────────────── */
.reviews-section {
  padding: 80px 0;
  background: var(--light-bg, #f8fafc);
  position: relative;
  overflow: hidden;
}

/* Subtle decorative gradient blob behind the section */
.reviews-section::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(99,102,241,.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ── Section header ──────────────────────────────────────────────── */
.reviews-header {
  text-align: center;
  margin-bottom: 48px;
}

.reviews-header .badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99,102,241,.1);
  color: #6366f1;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.reviews-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--text-dark, #0f172a);
  margin: 0 0 12px;
  line-height: 1.2;
}

/* ── Overall rating summary bar ──────────────────────────────────── */
.rating-summary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 16px;
  padding: 14px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
  margin-top: 8px;
}

.rating-summary .rating-big {
  font-size: 2.8rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.rating-summary .rating-right small {
  display: block;
  color: #64748b;
  font-size: .82rem;
  margin-top: 2px;
}

/* ── Star rendering ──────────────────────────────────────────────── */
.stars {
  display: inline-flex;
  gap: 2px;
}
.stars i {
  font-size: .9rem;
  color: #fbbf24; /* amber */
}
.stars i.empty { color: #d1d5db; }

/* ── Carousel track ──────────────────────────────────────────────── */
.reviews-carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.reviews-track {
  display: flex;
  gap: 24px;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* ── Individual review card ──────────────────────────────────────── */
.review-card {
  flex: 0 0 calc(33.333% - 16px);
  min-width: 280px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .25s, box-shadow .25s;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
}

/* Google branding accent */
.review-card::before {
  content: '"';
  font-size: 5rem;
  font-family: Georgia, serif;
  color: rgba(99,102,241,.12);
  line-height: 0;
  position: absolute;
  top: 28px;
  right: 20px;
}
.review-card { position: relative; }

/* Reviewer info row */
.reviewer-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reviewer-photo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(99,102,241,.2);
  flex-shrink: 0;
}

.reviewer-photo-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg,#6366f1,#8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.reviewer-name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text-dark, #0f172a);
  margin: 0;
}

.reviewer-time {
  font-size: .78rem;
  color: #94a3b8;
  margin: 2px 0 0;
}

.review-text {
  font-size: .88rem;
  color: #475569;
  line-height: 1.7;
  flex-grow: 1;
  /* Clamp to 5 lines with "read more" JS toggling */
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: -webkit-line-clamp .3s;
}

.review-text.expanded {
  -webkit-line-clamp: unset;
}

.review-read-more {
  font-size: .8rem;
  color: #6366f1;
  cursor: pointer;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}

/* Google logo badge */
.review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.google-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  color: #94a3b8;
  font-weight: 500;
}

.google-badge img {
  height: 16px;
  width: auto;
}

/* ── Navigation controls ─────────────────────────────────────────── */
.reviews-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.reviews-nav button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(99,102,241,.25);
  background: #fff;
  color: #6366f1;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reviews-nav button:hover {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
  transform: scale(1.08);
}

.reviews-nav button:disabled {
  opacity: .35;
  cursor: not-allowed;
  transform: none;
}

/* ── Dot indicators ──────────────────────────────────────────────── */
.reviews-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.reviews-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: background .2s, width .2s;
  display: block;
}

.reviews-dots span.active {
  background: #6366f1;
  width: 24px;
  border-radius: 100px;
}

/* ── Google CTA button ───────────────────────────────────────────── */
.reviews-cta {
  text-align: center;
  margin-top: 40px;
}

.btn-google-review {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #0f172a;
  border: 1.5px solid rgba(0,0,0,.1);
  border-radius: 100px;
  padding: 12px 28px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  transition: box-shadow .2s, transform .2s;
}

.btn-google-review:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,.14);
  transform: translateY(-2px);
  text-decoration: none;
  color: #0f172a;
}

.btn-google-review img {
  height: 20px;
}

/* ── Skeleton loader ─────────────────────────────────────────────── */
.review-skeleton {
  flex: 0 0 calc(33.333% - 16px);
  min-width: 280px;
  background: #f1f5f9;
  border-radius: 20px;
  padding: 28px;
  animation: shimmer 1.4s infinite linear;
  background-image: linear-gradient(90deg,#f1f5f9 25%,#e2e8f0 50%,#f1f5f9 75%);
  background-size: 200% 100%;
}
.skeleton-circle { width:50px;height:50px;border-radius:50%;background:#e2e8f0;margin-bottom:12px; }
.skeleton-line   { height:12px;border-radius:6px;background:#e2e8f0;margin-bottom:8px; }
.skeleton-line.w60{ width:60%; }
.skeleton-line.w80{ width:80%; }
.skeleton-line.w40{ width:40%; }

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ── Error / empty state ─────────────────────────────────────────── */
.reviews-error {
  text-align: center;
  padding: 48px 24px;
  color: #94a3b8;
}
.reviews-error i { font-size: 2.5rem; margin-bottom: 12px; display: block; }

/* ── Dark-mode overrides ─────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .reviews-section { background: #0f172a; }
  .review-card     { background: #1e293b; border-color: rgba(255,255,255,.06); }
  .reviewer-name   { color: #f1f5f9; }
  .review-text     { color: #94a3b8; }
  .reviews-header h2 { color: #f1f5f9; }
  .rating-summary  { background: #1e293b; border-color: rgba(255,255,255,.08); }
  .rating-summary .rating-big { color: #f1f5f9; }
  .reviews-nav button { background: #1e293b; }
  .btn-google-review  { background: #1e293b; color: #f1f5f9; border-color: rgba(255,255,255,.1); }
  .review-skeleton { background-color: #1e293b; background-image: linear-gradient(90deg,#1e293b 25%,#334155 50%,#1e293b 75%); }
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .review-card { flex: 0 0 calc(50% - 12px); }
  .review-skeleton { flex: 0 0 calc(50% - 12px); }
}

@media (max-width: 640px) {
  .reviews-section { padding: 56px 0; }
  .review-card { flex: 0 0 calc(100% - 0px); }
  .review-skeleton { flex: 0 0 calc(100% - 0px); }
  .rating-summary { flex-direction: column; text-align: center; gap: 8px; padding: 16px 20px; }
}
