/* =========================
   VARIABLES
========================= */
:root {
  --gold: #D4AF37;
  --navy: #0b1d3a;
  --navy-dark: #07152b;
  --muted: #6b7280;
  --shadow: 0 10px 25px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.08);
}

/* =========================
   RATING BAR
========================= */
.rating-bar {
  background: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

#avgStars {
  color: #f59e0b;
  letter-spacing: 3px;
  font-size: 18px;
}

#avgValue {
  font-weight: 800;
  font-size: 18px;
  color: var(--navy);
}

#avgCount {
  color: var(--muted);
}

/* =========================
   TOP REVIEW BADGE
========================= */
.review.top {
  border: 2px solid var(--gold);
  position: relative;
}

.review.top::after {
  content: "Top Review";
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gold);
  color: #000;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
}

/* =========================
   ANIMATION
========================= */
.fade-in {
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   HERO SECTION
========================= */
.reviews-hero {
  background: #ffffff;
  padding: 20px 0 10px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.reviews-title {
  color: var(--gold);
  font-size: 36px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

/* =========================
   BUTTON SMALL
========================= */
.btn.small {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), #f5d76e);
  color: #000;
  font-weight: 600;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

/* =========================
   SECTION SPACING
========================= */
.reviews-page.section {
  padding-top: 10px !important;
  padding-bottom: 0 !important;
}

.reviews-form-section.section {
  padding-top: 0 !important;
}

.gold-divider {
  margin: 15px 0 !important;
}

/* =========================
   REVIEW CARD
========================= */
.review {
  background: #ffffff;
  padding: 26px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
  transition: all 0.25s ease;
  margin-bottom: 10px;
}

.review::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--gold), #f5d76e);
  border-radius: 18px 18px 0 0;
}

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

/* =========================
   REVIEW HEADER
========================= */
.review-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.review-top strong {
  font-size: 18px;
  font-weight: 700;
  color: #0E1A2B;
}

.review-top .stars {
  color: #f59e0b;
  font-size: 14px;
}

/* =========================
   REVIEW TEXT
========================= */
.review p {
  color: #333;
  margin-bottom: 10px;
}

.review .meta {
  margin-top: 14px;
  font-size: 12px;
  color: #8a8f99;
  letter-spacing: 0.8px;
  font-weight: 600;
  text-transform: uppercase;
}

/* =========================
   FORM SECTION WRAPPER
========================= */
.reviews-form-section,
.review-section {
  background: linear-gradient(180deg, #f6f7f9 0%, #f1f3f6 100%);
  padding: 80px 20px;
}

/* =========================
   FORM CONTAINER
========================= */
.review-container {
  max-width: 900px;
  margin: auto;
  padding: 45px;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--navy), var(--navy-dark));
  box-shadow:
    0 20px 60px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.05);
  border: 1px solid rgba(212,175,55,0.20);
  position: relative;
  overflow: hidden;
}

.review-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(212,175,55,0.12), transparent 34%),
    radial-gradient(circle at bottom left, rgba(255,255,255,0.04), transparent 28%);
  pointer-events: none;
}

.review-container > * {
  position: relative;
  z-index: 1;
}

/* =========================
   FORM HEADER
========================= */
.review-container h2 {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.review-container p,
.review-container .lead {
  color: rgba(255,255,255,0.78);
  font-size: 15px;
  margin-bottom: 30px;
  line-height: 1.7;
}

/* =========================
   FORM LAYOUT
========================= */
.review-form {
  display: grid;
  gap: 20px;
}

.review-form .row,
.review-form .form-row {
  display: flex;
  gap: 20px;
}

.review-form .row > div,
.review-form .form-row > div,
.review-form .form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* =========================
   LABELS
========================= */
.review-form label,
.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

/* =========================
   INPUTS
========================= */
.review-form input,
.review-form select,
.review-form textarea {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(212,175,55,0.18);
  font-size: 14px;
  color: #1f2937;
  background: rgba(255,255,255,0.96);
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.review-form input::placeholder,
.review-form textarea::placeholder {
  color: #8b8f97;
}

.review-form input:focus,
.review-form select:focus,
.review-form textarea:focus {
  border-color: var(--gold);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(212,175,55,0.18);
  outline: none;
}

/* =========================
   TEXTAREA
========================= */
.review-form textarea {
  min-height: 150px;
  resize: vertical;
}

/* =========================
   SUBMIT BUTTON
========================= */
.submit-btn,
.review-form .btn.primary {
  margin-top: 10px;
  padding: 16px 24px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.18);
  font-weight: 800;
  font-size: 16px;
  color: var(--navy);
  background: linear-gradient(135deg, #f5d06f, #d4af37);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 12px 28px rgba(0,0,0,0.20);
}

.submit-btn:hover,
.review-form .btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0,0,0,0.24);
}

/* =========================
   THANK YOU MESSAGE
========================= */
.thanks-message {
  margin-top: 15px;
  font-size: 14px;
  color: #d7f7dd;
  font-weight: 600;
}

/* =========================
   USER REVIEWS GRID
========================= */
.reviews,
#userReviews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

#userReviews {
  margin-top: 22px;
}

#userReviews .review {
  width: 100%;
  margin-bottom: 0;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1000px) {
  .reviews,
  #userReviews {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .hero-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .reviews-title {
    font-size: 22px;
    max-width: 65%;
  }

  .btn.small {
    font-size: 12px;
    padding: 6px 10px;
  }
}

@media (max-width: 700px) {
  .review-form .row,
  .review-form .form-row {
    flex-direction: column;
  }

  .reviews,
  #userReviews {
    grid-template-columns: 1fr;
  }

  .review-container {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .review-container h2 {
    font-size: 24px;
  }
}

.reviews-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 18px 20px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.05);
  color: #6b7280;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}