/* ============================================================
   RATING CARDS — Clean Light / Amber Edition
   White cards on warm bg, amber CTA, slate type
   Staggered entrance + hover animations
   ============================================================ */

/* ── Keyframes ───────────────────────────────────────────── */

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

@keyframes shimmerLight {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(200%); }
}

@keyframes amberPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(245,158,11,0.30); }
  50%       { box-shadow: 0 8px 32px rgba(245,158,11,0.55); }
}

@keyframes rankBounceIn {
  0%   { transform: scale(0.6); opacity: 0; }
  70%  { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes topCardGlow {
  0%, 100% { box-shadow: 0 4px 24px rgba(245,158,11,0.16), 0 1px 4px rgba(30,41,59,0.07); }
  50%       { box-shadow: 0 8px 36px rgba(245,158,11,0.28), 0 1px 4px rgba(30,41,59,0.07); }
}

/* ── Wrap ────────────────────────────────────────────────── */

.rating-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 44px;
}

/* ── Card ────────────────────────────────────────────────── */

.rating-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 190px;
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #e8e3db;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(30,41,59,0.06), 0 1px 3px rgba(30,41,59,0.04);

  animation: cardSlideUp 0.48s cubic-bezier(0.34,1.06,0.64,1) both;
  transition:
    transform 0.24s cubic-bezier(0.4,0,0.2,1),
    box-shadow 0.24s,
    border-color 0.24s;
}

/* Stagger delays */
.rating-card:nth-child(1)  { animation-delay: 0.04s; }
.rating-card:nth-child(2)  { animation-delay: 0.10s; }
.rating-card:nth-child(3)  { animation-delay: 0.16s; }
.rating-card:nth-child(4)  { animation-delay: 0.22s; }
.rating-card:nth-child(5)  { animation-delay: 0.28s; }
.rating-card:nth-child(6)  { animation-delay: 0.34s; }
.rating-card:nth-child(7)  { animation-delay: 0.40s; }
.rating-card:nth-child(8)  { animation-delay: 0.46s; }
.rating-card:nth-child(9)  { animation-delay: 0.52s; }
.rating-card:nth-child(10) { animation-delay: 0.58s; }

/* Light shimmer pass on hover */
.rating-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.65) 50%,
    transparent 70%
  );
  transform: translateX(-150%);
  pointer-events: none;
  z-index: 2;
}

.rating-card:hover::before {
  animation: shimmerLight 0.55s ease forwards;
}

.rating-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 36px rgba(30,41,59,0.12),
    0 3px 8px rgba(30,41,59,0.06),
    0 0 0 1px rgba(245,158,11,0.22);
  border-color: rgba(245,158,11,0.30);
}

/* ── Top card (#1) — amber featured ─────────────────────── */

.rating-card.is-top {
  background: linear-gradient(135deg, #fffbf0 0%, #ffffff 60%);
  border-color: rgba(245,158,11,0.38);
  animation:
    cardSlideUp 0.48s cubic-bezier(0.34,1.06,0.64,1) 0.04s both,
    topCardGlow 3s ease-in-out 1s infinite;
}

/* Amber top stripe */
.rating-card.is-top::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--amber, #f59e0b), #fbbf24, var(--amber, #f59e0b));
  border-radius: 18px 18px 0 0;
  z-index: 1;
}

/* ── Rank ────────────────────────────────────────────────── */

.rating-card__rank {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #c4b8a8;
  border-right: 1px solid #ede8e1;
  font-family: 'Rubik', sans-serif;
  transition: color 0.22s, transform 0.22s;
}

.rating-card:hover .rating-card__rank { color: #6b7280; }

.rating-card.is-top .rating-card__rank {
  color: #f59e0b;
  font-size: 24px;
  animation: rankBounceIn 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.5s both;
}

.rating-card:nth-child(2) .rating-card__rank { color: #9ca3af; }
.rating-card:nth-child(3) .rating-card__rank { color: #cd7f32; opacity: 0.7; }

/* ── Main ────────────────────────────────────────────────── */

.rating-card__main {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
}

.rating-card__logo-wrap {
  flex: 0 0 auto;
  width: 170px;
}

.rating-card__logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.24s, filter 0.24s;
}

.rating-card:hover .rating-card__logo-link {
  transform: scale(1.04);
  filter: brightness(1.05);
}

.rating-card__logo {
  display: block;
  max-width: 100%;
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* ── Content ─────────────────────────────────────────────── */

.rating-card__content {
  flex: 1 1 auto;
  min-width: 0;
}

.rating-card__top-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f59e0b;
  color: #1e293b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s;
}

.rating-card:hover .rating-card__top-badge { background: #d97706; }

.rating-card__bonus {
  font-size: 20px;
  line-height: 1.32;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.rating-card__bonus strong,
.rating-card__bonus b {
  font-weight: 800;
  color: #b45309;
}

.rating-card:hover .rating-card__bonus { color: #111827; }

.rating-card__feature-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: #f9f7f3;
  border: 1px solid #e5ddd3;
  color: #6b7280;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  transition: background 0.2s, border-color 0.2s;
}

.rating-card:hover .rating-card__feature-pill {
  background: #fef3c7;
  border-color: rgba(245,158,11,0.30);
  color: #4b5563;
}

.rating-card__feature-pill p,
.rating-card__feature-pill span,
.rating-card__feature-pill strong {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* ── CTA ─────────────────────────────────────────────────── */

.rating-card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border-left: 1px solid #ede8e1;
}

.rating-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  min-height: 68px;
  padding: 16px 26px;
  border-radius: 14px;
  background: #1e293b;
  color: #fff !important;
  font-family: 'Rubik', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none !important;
  box-shadow: 0 4px 18px rgba(30,41,59,0.22);
  position: relative;
  overflow: hidden;
  transition:
    background 0.22s,
    box-shadow 0.22s,
    transform 0.22s,
    gap 0.2s;
  gap: 8px;
}

/* Amber accent on hover */
.rating-card__button:hover {
  background: #f59e0b;
  color: #1e293b !important;
  box-shadow: 0 8px 28px rgba(245,158,11,0.40);
  transform: translateY(-2px) scale(1.02);
  gap: 12px;
}

/* Top card CTA — amber immediately */
.rating-card.is-top .rating-card__button {
  background: #f59e0b;
  color: #1e293b !important;
  box-shadow: 0 4px 18px rgba(245,158,11,0.35);
  animation: amberPulse 2.8s ease-in-out 1s infinite;
}

.rating-card.is-top .rating-card__button:hover {
  background: #d97706;
  box-shadow: 0 10px 30px rgba(217,119,6,0.45);
  animation: none;
}

.rating-card__button span {
  transition: transform 0.2s;
  display: inline-block;
}

.rating-card__button:hover span { transform: translateX(3px); }

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 991.98px) {
  .rating-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .rating-card__cta {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid #ede8e1;
    padding: 0 16px 18px;
  }

  .rating-card__main {
    gap: 16px;
    padding: 18px 18px 14px;
  }

  .rating-card__logo-wrap { width: 140px; }
  .rating-card__logo { height: 52px; }
  .rating-card__bonus { font-size: 18px; }

  .rating-card__button {
    width: 100%;
    min-width: 0;
    min-height: 56px;
    font-size: 14px;
  }
}

@media (max-width: 767.98px) {
  .rating-card {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .rating-card:hover { transform: none; }

  .rating-card__rank {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    min-height: auto;
    border-right: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #f9f7f3;
    border: 1.5px solid #e5ddd3;
    color: #9ca3af;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
  }

  .rating-card.is-top .rating-card__rank {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
    animation: none;
  }

  .rating-card__main {
    display: block;
    padding: 16px 16px 12px;
  }

  .rating-card__logo-wrap {
    width: 100%;
    margin-bottom: 12px;
    padding-left: 44px;
  }

  .rating-card__logo { height: 40px; }
  .rating-card__bonus { font-size: 17px; line-height: 1.4; margin-bottom: 10px; }

  .rating-card__feature-pill {
    display: flex;
    width: 100%;
    font-size: 13px;
    padding: 9px 12px;
  }

  .rating-card__cta {
    padding: 0 14px 14px;
    border-top: none;
  }

  .rating-card__button {
    width: 100%;
    min-height: 52px;
    border-radius: 12px;
    font-size: 14px;
  }

  /* Disable continuous animation on mobile */
  .rating-card.is-top { animation: cardSlideUp 0.48s cubic-bezier(0.34,1.06,0.64,1) 0.04s both; }
  .rating-card.is-top .rating-card__button { animation: none; }
}

/* ── Reduced motion ──────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .rating-card,
  .rating-card.is-top,
  .rating-card.is-top .rating-card__rank,
  .rating-card.is-top .rating-card__button {
    animation: none !important;
  }
  .rating-card:hover { transform: none; }
}
