/* ===== RANKING PAGE STYLES ===== */

/* ── Hero ── */
.ranking-main { padding-top: 90px; }

.ranking-hero {
  background: linear-gradient(135deg, #b5726e 0%, #c9918d 40%, #e8c3b8 100%);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.ranking-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 50%, rgba(255,215,0,.15), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(255,255,255,.12), transparent 35%);
  pointer-events: none;
}
.ranking-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 1;
}
.ranking-hero-text { max-width: 600px; }

.ranking-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.ranking-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 2.6rem;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.ranking-subtitle {
  color: rgba(255,255,255,.9);
  font-size: 1.1rem;
  line-height: 1.6;
}
.ranking-hero-stats {
  display: flex;
  gap: 24px;
}
.rh-stat {
  text-align: center;
  background: transparent;
  padding: 0;
  border: none;
  min-width: 96px;
}
.rh-stat-label {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(255, 250, 245, 0.96);
  color: #3e5131;
  font-family: 'Poppins', sans-serif;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 10px rgba(62, 81, 49, 0.18);
}

/* ── Hero slot machines (LoChloe — round) ── */
.slot-machine {
  display: flex;
  justify-content: center;
  min-height: 4.2rem;
}
.slot-frame {
  position: relative;
  background: linear-gradient(145deg, #c9918d 0%, #b5726e 45%, #9c5855 100%);
  border: 3px solid #ede3cf;
  border-radius: 999px;
  padding: 7px 12px;
  box-shadow:
    0 6px 20px rgba(62, 81, 49, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 5px rgba(0, 0, 0, 0.1);
}
.slot-lights {
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(circle at 6% 50%, #ffe082 3px, transparent 3.5px),
    radial-gradient(circle at 94% 50%, #ffe082 3px, transparent 3.5px),
    radial-gradient(circle at 20% 18%, #ede3cf 2px, transparent 2.5px),
    radial-gradient(circle at 80% 18%, #ede3cf 2px, transparent 2.5px),
    radial-gradient(circle at 20% 82%, #ede3cf 2px, transparent 2.5px),
    radial-gradient(circle at 80% 82%, #ede3cf 2px, transparent 2.5px);
  animation: slotLightsBlink 1.4s ease-in-out infinite alternate;
}
@keyframes slotLightsBlink {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}
.slot-window {
  display: flex;
  gap: 6px;
  align-items: center;
  background: linear-gradient(180deg, #3e5131 0%, #4b7462 50%, #3e5131 100%);
  border: 2px solid #66725a;
  border-radius: 999px;
  padding: 5px 10px;
  position: relative;
  z-index: 1;
}
.slot-reel {
  --slot-digit-h: 2.45rem;
  box-sizing: border-box;
  width: var(--slot-digit-h);
  height: var(--slot-digit-h);
  overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #fffaf5 55%, #f0e8dc 100%);
  border-radius: 50%;
  box-shadow:
    inset 0 2px 6px rgba(62, 81, 49, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.08);
  border: 2px solid rgba(237, 227, 207, 0.9);
  flex-shrink: 0;
}
.slot-reel-strip {
  display: flex;
  flex-direction: column;
  width: 100%;
  will-change: transform;
}
.slot-reel-strip.spinning {
  animation: slotSpin 0.5s steps(10, end) infinite;
}
@keyframes slotSpin {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, calc(var(--slot-digit-h) * -10), 0); }
}
.slot-reel-strip:not(.spinning) {
  transition: none;
}
.slot-digit {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--slot-digit-h);
  min-height: var(--slot-digit-h);
  line-height: 1;
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: #4b7462;
  text-shadow: none;
  flex-shrink: 0;
  transform: none;
  padding: 0;
  margin: 0;
}
.slot-reel-stop {
  animation: slotReelPop 0.35s ease-out;
}
@keyframes slotReelPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.slot-star-burst {
  position: absolute;
  inset: -4px;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
}
.slot-star-burst.active {
  opacity: 1;
}
.slot-star {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -0.55rem 0 0 -0.55rem;
  font-size: 1rem;
  line-height: 1;
  filter: drop-shadow(0 0 4px rgba(255, 193, 7, 0.8));
  opacity: 0;
  transform: rotate(var(--angle)) translateY(0) scale(0.2);
  animation: starBurstOut 1s ease-out forwards;
}
@keyframes starBurstOut {
  0% {
    opacity: 0;
    transform: rotate(var(--angle)) translateY(0) scale(0.2);
  }
  15% {
    opacity: 1;
    transform: rotate(var(--angle)) translateY(-6px) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translateY(-48px) scale(0.7);
  }
}
.slot-stopped .slot-lights {
  animation: none;
  opacity: 1;
}
.slot-stopped .slot-frame {
  box-shadow:
    0 6px 22px rgba(62, 81, 49, 0.22),
    0 0 18px rgba(255, 224, 130, 0.45),
    inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

/* ── Section Headers ── */
.ranking-section {
  padding: 56px 0;
}
.ranking-section-header {
  text-align: center;
  margin-bottom: 36px;
}
.ranking-section-header h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 8px;
}
.ranking-section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Provider of the Month ── */
.potm-card {
  background: linear-gradient(135deg, #fffaf5 0%, #fff5ed 50%, #fef0e8 100%);
  border: 2px solid rgba(181,114,110,.18);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 30px rgba(181,114,110,.12);
  animation: potmGlow 4s ease-in-out infinite alternate;
}
@keyframes potmGlow {
  0% { box-shadow: 0 8px 30px rgba(181,114,110,.12); }
  100% { box-shadow: 0 12px 40px rgba(181,114,110,.22), 0 0 60px rgba(255,215,0,.06); }
}
.potm-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px 36px;
  position: relative;
}
.potm-trophy {
  font-size: 3rem;
  animation: trophyBounce 2s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(255,215,0,.35));
}
@keyframes trophyBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(-4deg); }
  75% { transform: translateY(-3px) rotate(3deg); }
}
.potm-avatar-wrap {
  flex-shrink: 0;
}
.potm-avatar-wrap img,
.potm-avatar-wrap .rank-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(181,114,110,.2);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.potm-info {
  flex: 1;
  min-width: 0;
}
.potm-rubro {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #b5726e;
  background: rgba(181,114,110,.1);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.potm-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  margin-bottom: 2px;
}
.potm-city {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.potm-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 600;
}
.potm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.potm-tag {
  background: var(--primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}
.potm-btn {
  flex-shrink: 0;
  padding: 12px 24px;
  font-weight: 700;
}
.potm-empty, .potm-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ── Búsqueda por nombre (directorio completo) ── */
.ranking-name-search {
  max-width: 560px;
  margin: 0 auto 28px;
  text-align: center;
}
.ranking-name-search-label {
  display: block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.ranking-name-search-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.45;
}
.ranking-name-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px;
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ranking-name-search-input:focus {
  outline: none;
  border-color: rgba(181, 114, 110, 0.55);
  box-shadow: 0 0 0 3px rgba(181, 114, 110, 0.12);
}
.ranking-name-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}
.ranking-name-results {
  margin-top: 18px;
  text-align: left;
}
.ranking-name-empty {
  margin: 14px 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.rank-row-search {
  padding-left: 18px;
}

/* ── Tabs ── */
.ranking-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.ranking-tab {
  border: none;
  cursor: pointer;
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  transition: all .2s ease;
  border: 1.5px solid var(--border-light);
}
.ranking-tab:hover {
  background: rgba(181,114,110,.08);
  border-color: rgba(181,114,110,.2);
  color: #b5726e;
}
.ranking-tab.active {
  background: linear-gradient(135deg, #b5726e, #c9918d);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(181,114,110,.25);
}

/* ── Ranking List ── */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rank-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  padding: 14px 20px;
  transition: all .22s ease;
  text-decoration: none;
  color: var(--text);
}
.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  border-color: rgba(181,114,110,.2);
}
.rank-top {
  background: linear-gradient(135deg, #fffaf5, #fff8f2);
  border-color: rgba(181,114,110,.15);
}
.rank-medal {
  font-size: 1.5rem;
  min-width: 36px;
  text-align: center;
}
.rank-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-alt);
  font-size: .8rem;
  font-weight: 800;
  color: var(--text-muted);
}
.rank-avatar-wrap {
  flex-shrink: 0;
}
.rank-avatar-wrap img,
.rank-avatar-wrap .rank-avatar,
.rank-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.rank-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}
.rank-info {
  flex: 1;
  min-width: 0;
}
.rank-name {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-meta {
  display: block;
  font-size: .8rem;
  color: var(--text-muted);
}
.rank-metrics {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.rank-stars {
  font-size: .85rem;
  font-weight: 700;
  color: #d4930a;
}
.rank-metric {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Hall of Fame ── */
.ranking-hall {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.hall-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.hall-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}
.hall-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 16px 16px 0 0;
}
.hall-reviews::before { background: linear-gradient(90deg, #b5726e, #e8c3b8); }
.hall-contacts::before { background: linear-gradient(90deg, #4b7462, #a4af91); }
.hall-views::before { background: linear-gradient(90deg, #9c5855, #c9918d); }
.hall-new::before { background: linear-gradient(90deg, #d4930a, #f5d76e); }

.hall-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.07);
}
.hall-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  animation: hallPulse 3s ease-in-out infinite;
}
@keyframes hallPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.hall-card h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: .95rem;
  color: var(--text);
  margin-bottom: 6px;
}
.hall-desc {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}
.hall-winner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hall-winner-link {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: var(--primary);
  text-decoration: none;
  transition: opacity .2s;
}
.hall-winner-link:hover { opacity: .8; }
.hall-winner-link img,
.hall-winner-link .rank-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* ── CTA ── */
.ranking-cta {
  padding: 64px 0;
}
.ranking-cta-inner {
  text-align: center;
  background: linear-gradient(135deg, #b5726e, #c9918d 60%, #e8c3b8);
  padding: 56px 40px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.ranking-cta-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255,215,0,.1), transparent 50%);
  pointer-events: none;
}
.ranking-cta-inner h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 12px;
  position: relative;
}
.ranking-cta-inner p {
  color: rgba(255,255,255,.9);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 24px;
  position: relative;
}
.ranking-cta-inner .btn {
  background: #fff;
  color: #b5726e;
  font-weight: 800;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: all .25s ease;
  position: relative;
  display: inline-block;
  text-decoration: none;
}
.ranking-cta-inner .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

/* ── Nav active ── */
.nav-active {
  background: linear-gradient(135deg, #b5726e, #c9918d) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* ── Confetti-like decorative particles (CSS-only) ── */
.ranking-hero::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  background: url('assets/hedgehog-icon.png') no-repeat center / contain;
  opacity: .08;
  right: 40px;
  bottom: 10px;
  animation: pawDrift 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pawDrift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-15px, -10px) rotate(12deg); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .ranking-hero-inner {
    flex-direction: column;
    text-align: center;
  }
  .ranking-hero-stats { justify-content: center; }
  .hall-grid { grid-template-columns: repeat(2, 1fr); }
  .potm-inner { flex-direction: column; text-align: center; }
  .potm-metrics { justify-content: center; }
  .potm-tags { justify-content: center; }
}
@media (max-width: 768px) {
  .ranking-main { padding-top: 72px; }
  .ranking-hero { padding: 36px 0; }
  .ranking-title { font-size: 1.6rem; }
  .ranking-subtitle { font-size: .92rem; }
  .ranking-hero-stats { gap: 12px; flex-wrap: wrap; }
  .rh-stat { min-width: 88px; }
  .rh-stat-label { font-size: .8rem; padding: 4px 10px; }
  .slot-reel { --slot-digit-h: 2.1rem; }
  .slot-digit { font-size: 1.05rem; }
  .ranking-section { padding: 32px 0; }
  .ranking-section-header h2 { font-size: 1.3rem; }
  .ranking-section-header p { font-size: .88rem; }
  .hall-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hall-card { padding: 20px 14px; }
  .hall-icon { font-size: 1.8rem; }
  .rank-row { padding: 12px 14px; gap: 10px; }
  .rank-name { font-size: .9rem; }
  .rank-metrics { gap: 8px; }
  .rank-metric { font-size: .72rem; }
  .rank-stars { font-size: .78rem; }
  .potm-inner { padding: 24px 20px; gap: 16px; }
  .potm-name { font-size: 1.15rem; }
  .potm-trophy { font-size: 2.2rem; }
  .potm-avatar-wrap img,
  .potm-avatar-wrap .rank-avatar { width: 64px; height: 64px; }
  .potm-btn { padding: 10px 20px; font-size: .88rem; }
  .ranking-tabs { gap: 5px; }
  .ranking-tab { font-size: .78rem; padding: 6px 12px; }
  .ranking-cta { padding: 40px 0; }
  .ranking-cta-inner { padding: 32px 20px; border-radius: 14px; }
  .ranking-cta-inner h2 { font-size: 1.3rem; }
  .ranking-cta-inner p { font-size: .9rem; }
}
@media (max-width: 420px) {
  .ranking-title { font-size: 1.3rem; }
  .rh-stat-label { font-size: .75rem; margin-top: 10px; }
  .slot-frame { padding: 6px 8px 8px; }
  .hall-grid { grid-template-columns: 1fr; }
  .rank-row { flex-wrap: wrap; }
  .rank-metrics { width: 100%; justify-content: flex-start; padding-left: 52px; }
  .ranking-tab { font-size: .7rem; padding: 5px 10px; }
  .ranking-cta-inner h2 { font-size: 1.1rem; }
  .potm-metrics { font-size: .78rem; gap: 8px; }
}
