/* --- RATINGS SECTION CONTAINER --- */
.ratings-section {
  /* Breakout technique to reach 100% viewport width */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;

  background-color: #f9fbfc;
  padding: 1.5rem 0;
  /* Compact vertical padding */
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.ratings-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 0 1.5rem;
}

.ratings-title {
  margin: 0;
  font-size: 1.25rem;
  /* Slightly larger for the "hook" */
  color: var(--primary);
  line-height: 1.3;
}

.ratings-subtitle {
  display: block;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.stars-container {
  color: #ffb400;
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

/* --- CAROUSEL ENGINE --- */
.carousel-viewport {
  width: 100%;
  overflow: hidden;
  /* Visual fade effect on sides */
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  padding: 0.5rem 0;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scroll-left 45s linear infinite;
  cursor: pointer;

  /* This removes the blue highlight on tap */
  -webkit-tap-highlight-color: transparent;

  /* This prevents text selection while interacting with the carousel */
  user-select: none;
  -webkit-user-select: none;
}

.carousel-track.is-paused {
  animation-play-state: paused !important;
}

.carousel-track .card {
  width: 280px;
  /* Slimmer cards for PC */
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(192, 214, 223, 0.4);
  flex-shrink: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

/* --- STATS FOOTER (HORIZONTAL) --- */
.ratings-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.stat-value {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

.stat-label {
  font-size: 0.75rem;
  color: #666;
}

.stat-separator {
  width: 1px;
  height: 12px;
  background: rgba(0, 0, 0, 0.1);
}

/* --- CARD INTERNAL STRUCTURE --- */

.card-category {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
  opacity: 0.6;
}

.card-text {
  font-size: 0.9rem;
  font-style: italic;
  color: #444;
  margin: 0;
}

.card-author {
  display: block;
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.8rem;
  font-weight: 500;
  text-align: right;
  width: 100%;
  margin-top: 1rem;
  font-style: normal;
}

/* --- COMPACT FOOTER QUOTE --- */
.ratings-footer {
  text-align: center;
  padding: 1rem 1.5rem 0;
  margin-top: 1.5rem;
}

.closing-quote {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
  text-wrap: balance;
  /* Prevents awkward line breaks on mobile */
}

.closing-quote strong {
  color: var(--primary);
  display: block;
  margin-top: 0.3rem;
  font-weight: 600;
}

/* --- ANIMATION KEYFRAMES --- */
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-50% - 0.75rem));
  }
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
  .ratings-title {
    font-size: 1.15rem;
  }

  .ratings-subtitle {
    font-size: 0.85rem;
  }

  .ratings-stats {
    gap: 0.5rem;
  }

  .stat-separator {
    display: none;
  }

  .carousel-track {
    animation-duration: 70s;
  }

  .closing-quote {
    font-size: 0.95rem;
  }
}