/* =========================================================
   RANKINGS PODIUM — Players / Clan (Top 3 con avatares)
   Mismo lenguaje visual que changelogs.css / info-basica.css /
   community.css: header centrado con líneas doradas, Cinzel,
   hairlines doradas. Clases con prefijo "podium-" para no
   pisar nada de style.min.css (ranking-box, rank-item, etc.
   siguen siendo del listado viejo de rankings.php).
   Requiere las variables de :root definidas en style.min.css
   (--gold, --gold-light, --gold-dark, --gold-glow).
   ========================================================= */

.podium-section {
  background: #000;
  padding: 80px 0;
}

/* ---------- encabezado (centrado) ---------- */

.podium-header {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
  text-align: center;
}

.podium-eyebrow {
  color: var(--gold);
  font-family: Cinzel, serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.podium-title-row {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: center;
  width: 100%;
}

.podium-title-row:before,
.podium-title-row:after {
  background: linear-gradient(90deg, transparent, var(--gold-glow));
  content: "";
  height: 1px;
  max-width: 100px;
  width: 100%;
}

.podium-title-row:after {
  background: linear-gradient(270deg, transparent, var(--gold-glow));
}

.podium-title {
  color: #f8f9fa;
  font-family: Cinzel, serif;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 4px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- tabs ---------- */

.podium-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}

.podium-tab {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(221, 171, 94, .25);
  border-radius: 30px;
  color: #888;
  cursor: pointer;
  display: inline-flex;
  font-family: Cinzel, serif;
  font-size: .78rem;
  font-weight: 700;
  gap: 9px;
  letter-spacing: 1.6px;
  padding: 11px 26px;
  text-transform: uppercase;
  transition: all .25s ease;
}

.podium-tab i {
  font-size: .82rem;
  opacity: .7;
  transition: opacity .25s ease;
}

.podium-tab:hover {
  border-color: rgba(221, 171, 94, .5);
  color: var(--gold-light);
}

.podium-tab.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-color: var(--gold);
  box-shadow: 0 0 18px var(--gold-glow);
  color: #1a1400;
}

.podium-tab.active i {
  opacity: 1;
}

/* ---------- panels ---------- */

.podium-panel {
  display: none;
}

.podium-panel.is-active {
  animation: podiumFadeIn .4s ease;
  display: block;
}

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

/* ---------- sub-tabs (Top Level/Top Hunt, Top Castle Siege/Top Hunt) ---------- */

.podium-subtabs {
  border-bottom: 1px solid rgba(221, 171, 94, .12);
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 28px;
}

.podium-subtab {
  align-items: center;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #777;
  cursor: pointer;
  display: inline-flex;
  font-family: Cinzel, serif;
  font-size: .78rem;
  font-weight: 700;
  gap: 8px;
  letter-spacing: 1.4px;
  padding: 12px 20px;
  text-transform: uppercase;
  transition: color .25s ease, border-color .25s ease;
}

.podium-subtab i {
  color: var(--gold);
  font-size: .82rem;
  opacity: .55;
  transition: opacity .25s ease;
}

.podium-subtab:hover {
  color: #ccc;
}

.podium-subtab.active {
  border-bottom-color: var(--gold);
  color: var(--gold-light);
}

.podium-subtab.active i {
  opacity: 1;
}

.podium-subpanel {
  display: none;
}

.podium-subpanel.is-active {
  animation: podiumFadeIn .35s ease;
  display: block;
}

/* ---------- stage / podio ---------- */

.podium-stage {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
}

.podium-place {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
  width: 160px;
}

.podium-place.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.podium-place--1 { transition-delay: .05s; width: 200px; z-index: 2; }
.podium-place--3 { transition-delay: 0s; }
.podium-place--2 { transition-delay: .1s; }

/* ---------- avatar ---------- */

.podium-avatar-wrap {
  align-items: flex-end;
  aspect-ratio: 1 / 1.1;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  overflow: visible;
  position: relative;
  width: 100%;
}

.podium-avatar-wrap:before {
  background: radial-gradient(circle, rgba(221, 171, 94, .16), transparent 70%);
  border-radius: 50%;
  content: "";
  inset: -10%;
  position: absolute;
  z-index: 0;
}

.podium-avatar {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .6));
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  position: relative;
  width: 100%;
  z-index: 1;
}

.podium-avatar--hidden,
.podium-avatar-wrap--empty {
  align-items: center;
  background: rgba(255, 255, 255, .02);
  border: 1px dashed rgba(255, 255, 255, .1);
  border-radius: 12px;
  display: flex;
  justify-content: center;
}

.podium-avatar--hidden {
  display: none;
}

.podium-place--1 .podium-avatar-wrap:before {
  background: radial-gradient(circle, rgba(221, 171, 94, .3), transparent 70%);
}

.podium-place--2 .podium-avatar-wrap:before {
  background: radial-gradient(circle, rgba(200, 200, 210, .22), transparent 70%);
}

.podium-place--3 .podium-avatar-wrap:before {
  background: radial-gradient(circle, rgba(205, 127, 50, .22), transparent 70%);
}

/* ---------- guildmark (clan) ---------- */
/* returnGuildLogo() imprime un <img> con width/height propios (via
   api/guildmark.php), así que se estiliza el contenedor en vez del <img>. */

.podium-avatar-wrap--guild {
  align-items: center;
  aspect-ratio: auto;
  justify-content: center;
}

.podium-guildmark {
  align-items: center;
  background: #0a0a0a;
  border: 2px solid rgba(221, 171, 94, .35);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .03);
  display: inline-flex;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  position: relative;
  z-index: 1;
}

.podium-place--1 .podium-guildmark {
  border-color: var(--gold);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .55), 0 0 22px var(--gold-glow);
}

.podium-place--2 .podium-guildmark {
  border-color: rgba(200, 200, 210, .5);
}

.podium-place--3 .podium-guildmark {
  border-color: rgba(205, 127, 50, .5);
}

.podium-guildmark img {
  display: block;
  image-rendering: pixelated;
}

/* ---------- badge / nombre / valor ---------- */

.podium-rank-badge {
  background: rgba(221, 171, 94, .1);
  border: 1px solid rgba(221, 171, 94, .35);
  border-radius: 20px;
  color: var(--gold-light);
  font-family: Cinzel, serif;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 1.6px;
  padding: 4px 14px;
}

.podium-place--1 .podium-rank-badge {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border-color: var(--gold);
  box-shadow: 0 0 14px var(--gold-glow);
  color: #1a1400;
}

.podium-place--2 .podium-rank-badge {
  border-color: rgba(200, 200, 210, .5);
  color: #cfcfd6;
}

.podium-place--3 .podium-rank-badge {
  border-color: rgba(205, 127, 50, .5);
  color: #d99a63;
}

.podium-name {
  color: #e4e4e7;
  font-size: .88rem;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-name a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}

.podium-name a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

.podium-name--empty {
  color: #555;
  font-style: italic;
}

.podium-value {
  align-items: baseline;
  color: var(--gold-light);
  display: inline-flex;
  font-size: .95rem;
  font-weight: 800;
  gap: 5px;
}

.podium-value small {
  color: #8b95a5;
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* ---------- base / pedestal ---------- */

.podium-base {
  background: linear-gradient(180deg, rgba(221, 171, 94, .16), rgba(221, 171, 94, .02));
  border-radius: 6px 6px 0 0;
  border-top: 2px solid rgba(221, 171, 94, .4);
  margin-top: 4px;
  width: 100%;
}

.podium-place--1 .podium-base { height: 46px; }
.podium-place--2 .podium-base { height: 30px; }
.podium-place--3 .podium-base { height: 22px; }

.podium-place--2 .podium-base,
.podium-place--3 .podium-base {
  border-top-color: rgba(255, 255, 255, .12);
}

/* ---------- responsive ---------- */

@media (max-width: 767px) {
  .podium-place { width: 108px; }
  .podium-place--1 { width: 132px; }
}

@media (max-width: 576px) {
  .podium-section {
    padding: 56px 0;
  }

  .podium-title {
    font-size: 1.5rem;
    letter-spacing: 3px;
  }

  .podium-title-row {
    gap: 12px;
  }

  .podium-title-row:before,
  .podium-title-row:after {
    max-width: 36px;
  }

  .podium-tabs {
    gap: 8px;
  }

  .podium-tab {
    flex: 1 1 auto;
    justify-content: center;
    padding: 10px 14px;
  }

  .podium-subtabs {
    flex-wrap: wrap;
    gap: 4px;
  }

  .podium-subtab {
    flex: 1 1 auto;
    font-size: .68rem;
    justify-content: center;
    letter-spacing: 1px;
    padding: 10px 10px;
  }

  .podium-stage {
    gap: 10px;
  }

  .podium-place { width: 92px; }
  .podium-place--1 { width: 112px; }

  .podium-name { font-size: .76rem; }
  .podium-value { font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .podium-place {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .podium-panel.is-active {
    animation: none;
  }
}