/* === SECCIÓN CAMPEONES DEL MUNDO · CARTAS COLECCIONABLES RPG === */

.campeones-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

/* Header & Intro */
.campeones-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.campeones-hero h1 {
  font-size: 2.6rem;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.campeones-hero .hero-crown {
  font-size: 2.4rem;
  filter: drop-shadow(0 4px 8px rgba(244, 162, 97, 0.4));
}

.campeones-hero .hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted-color);
  max-width: 780px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

/* Martina Secret Note */
.martina-quote-box {
  background: var(--card-bg);
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
  padding: 1.25rem 1.75rem;
  max-width: 850px;
  margin: 0 auto 2.5rem;
  box-shadow: var(--shadow);
  position: relative;
  text-align: left;
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.martina-avatar-badge {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid var(--rose);
  overflow: hidden;
  background: var(--warm-white);
  box-shadow: 0 4px 10px rgba(231, 111, 81, 0.25);
}

.martina-avatar-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.martina-quote-content p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-color);
  line-height: 1.55;
  font-style: italic;
}

.martina-quote-author {
  display: block;
  font-size: 0.85rem;
  color: var(--rose);
  font-weight: 700;
  margin-top: 0.4rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Era Filters */
.era-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background: var(--card-bg);
  border: 2px solid var(--board-light);
  color: var(--text-color);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.55rem 1.1rem;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow);
}

.filter-btn:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  color: var(--rose);
}

.filter-btn.active {
  background: var(--magic-blue);
  color: #ffffff;
  border-color: var(--magic-blue);
  box-shadow: 0 6px 16px rgba(42, 111, 151, 0.35);
}

/* Champions Grid */
.champions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.8rem;
}

/* Champion Grid Item (Wrapper for Card + Outside Action) */
.champion-item {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Champion RPG Card (Flip Container) */
.champion-card {
  perspective: 1200px;
  height: 505px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  outline: none;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: block;
}

.champion-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

/* 3D Inner Wrapper */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: var(--radius);
}

/* Hover effect indicating it is interactive 3D */
.champion-card:hover .card-inner {
  transform: translateY(-8px) rotateY(-10deg) rotateX(4deg);
}

.champion-card:hover .card-face {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  border-color: var(--gold);
}

.champion-card.is-flipped .card-inner {
  transform: rotateY(180deg);
}

.champion-card.is-flipped:hover .card-inner {
  transform: rotateY(180deg) translateY(-8px) rotateY(10deg) rotateX(4deg);
}

/* Common Card Faces: COMPLETELY NO SCROLL ON CARD */
.card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  border: 3px solid var(--board-light);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Era Themes */
.champion-item[data-era="clasica"] .card-face {
  border-color: rgba(244, 162, 97, 0.5);
}
.champion-item[data-era="sovietica"] .card-face {
  border-color: rgba(231, 111, 81, 0.5);
}
.champion-item[data-era="moderna"] .card-face {
  border-color: rgba(94, 84, 142, 0.5);
}
.champion-item[data-era="digital"] .card-face {
  border-color: rgba(42, 157, 143, 0.5);
}

/* Featured Cards: Capablanca & Tal */
.champion-card.card-featured-capablanca .card-face {
  border: 3px solid var(--gold);
  box-shadow: 0 8px 24px rgba(244, 162, 97, 0.35);
}
.champion-card.card-featured-tal .card-face {
  border: 3px solid var(--magic-purple);
  box-shadow: 0 8px 24px rgba(123, 108, 176, 0.35);
}

/* Card Header (Front) - Compact and never overlapping */
.card-top {
  padding: 0.45rem 0.75rem 0.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--board-light);
  background: rgba(0, 0, 0, 0.02);
  flex-shrink: 0;
  gap: 0.4rem;
  white-space: nowrap;
}

.card-number-badge {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.76rem;
  background: var(--gold);
  color: #ffffff;
  padding: 0.12rem 0.45rem;
  border-radius: 8px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 5px rgba(244, 162, 97, 0.3);
  flex-shrink: 0;
}

.card-era-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted-color);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

/* Card Hero / Portrait Area */
.card-hero-area {
  padding: 0.3rem 0.75rem 0.1rem;
  text-align: center;
  flex-shrink: 0;
}

.card-title-group h2 {
  font-size: 1.18rem;
  margin: 0;
  color: var(--heading-color);
  line-height: 1.15;
}

.card-moniker {
  font-size: 0.72rem;
  color: var(--rose);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: block;
  margin: 0.05rem 0 0;
}

.card-meta-line {
  font-size: 0.68rem;
  color: var(--muted-color);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.05rem;
}

/* Card Visual Graphic / Frame */
.card-art-frame {
  margin: 0.25rem auto 0.15rem;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12), inset 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.champion-card:hover .card-art-frame {
  transform: scale(1.06);
  box-shadow: 0 6px 14px rgba(244, 162, 97, 0.35);
}

.card-art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-art-frame .card-art-fallback {
  font-size: 2rem;
  line-height: 1;
}

/* Superpower Box - Streamlined 1-line header */
.card-power-badge {
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.12), rgba(231, 111, 81, 0.12));
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  margin: 0.15rem 0.75rem 0.1rem;
  text-align: left;
  flex-shrink: 0;
}

.power-header-line {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.05rem;
}

.power-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--rose);
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.power-name {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.84rem;
  color: var(--heading-color);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.power-desc {
  font-size: 0.72rem;
  color: var(--text-color);
  line-height: 1.25;
  margin: 0;
}

/* Pokemon Radar Chart Section - Perfectly Sized & Never Clipped */
.card-radar-wrapper {
  padding: 0.05rem 0.25rem 0.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 130px;
}

.radar-chart-svg {
  width: 100%;
  max-width: 220px;
  height: 132px;
  overflow: visible;
}

.radar-grid-poly {
  fill: rgba(0, 0, 0, 0.02);
  stroke: var(--board-light);
  stroke-width: 1;
}

.radar-axis-line {
  stroke: var(--board-light);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}

.radar-value-poly {
  stroke: var(--rose);
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(231, 111, 81, 0.25));
  transition: all 0.4s ease;
}

.radar-dot {
  fill: var(--rose);
  stroke: #ffffff;
  stroke-width: 1.5;
}

.radar-label {
  font-family: 'Nunito', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  fill: var(--text-color);
}

.radar-val {
  font-weight: 800;
  fill: var(--magic-blue);
}

/* Card Back (Reverse Side) */
.card-face.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, var(--card-bg) 0%, var(--paper) 100%);
}

.card-back-header {
  padding: 0.45rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--board-light);
  background: rgba(0, 0, 0, 0.02);
  flex-shrink: 0;
  gap: 0.5rem;
}

.card-number-badge-mini {
  background: var(--gold);
  color: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.76rem;
  padding: 0.12rem 0.45rem;
  border-radius: 8px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.card-back-title-wrap {
  text-align: left;
  flex: 1;
}

.card-back-name {
  font-size: 1.02rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  color: var(--heading-color);
  margin: 0;
  line-height: 1.15;
}

.card-back-moniker {
  font-size: 0.68rem;
  color: var(--rose);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
  margin-top: 0.05rem;
}

.card-back-era {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted-color);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-back-content {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem;
  flex: 1;
  overflow: hidden;
  justify-content: space-between;
  gap: 0.35rem;
}

/* Tactical Style Box */
.card-tactics-brief {
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--text-color);
  border-bottom: 1px dashed var(--board-light);
  padding-bottom: 0.35rem;
  flex-shrink: 0;
}

.tactics-item {
  margin-bottom: 0.2rem;
}

.tactics-item strong {
  color: var(--magic-blue);
  font-weight: 700;
}

/* Martina's Story Snippet - Scrollable if long, no card scroll! */
.card-martina-story {
  margin: 0;
  background: var(--paper);
  border-left: 3px solid var(--rose);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.76rem;
  line-height: 1.38;
  color: var(--text-color);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
  flex: 1;
  max-height: 195px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rose) transparent;
}

.card-martina-story::-webkit-scrollbar {
  width: 4px;
}
.card-martina-story::-webkit-scrollbar-thumb {
  background: var(--rose);
  border-radius: 4px;
}

.martina-story-header {
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-martina-story p {
  margin: 0;
}

/* External Champion Card Action (Below Card) */
.champion-card-action {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Homogeneous Action Buttons */
.btn-card-action,
.btn-download-book,
.btn-book-preview {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

/* 1. Available Book Style (Steinitz, Lasker, Capablanca) */
.btn-card-action.is-available,
.btn-download-book {
  background: linear-gradient(135deg, #2a6f97, #5e548e);
  color: #ffffff !important;
  border: 1.5px solid transparent;
  box-shadow: 0 4px 12px rgba(42, 111, 151, 0.25);
}

.btn-card-action.is-available:hover,
.btn-download-book:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(42, 111, 151, 0.4);
  filter: brightness(1.06);
}

/* 2. In Production / Upcoming Style (Homogeneous dimensions & feedback) */
.btn-card-action.is-upcoming,
.btn-book-preview {
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.12), rgba(231, 111, 81, 0.08));
  border: 1.5px solid var(--gold);
  color: var(--heading-color) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-card-action.is-upcoming:hover,
.btn-book-preview:hover {
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.22), rgba(231, 111, 81, 0.16));
  border-color: var(--rose);
  color: var(--rose) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(244, 162, 97, 0.3);
}

/* Sample pill buttons inside modal */
.btn-sample-download {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--paper);
  border: 1.5px solid var(--gold);
  color: var(--heading-color);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-sample-download:hover {
  background: var(--gold);
  color: #ffffff !important;
  border-color: var(--gold);
  transform: translateY(-1px);
}

/* Modal for Book Preview / Details */
.champion-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(1, 42, 74, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.champion-modal.active {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--radius);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border: 3px solid var(--gold);
  padding: 2rem;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--muted-color);
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--rose);
}

/* Responsive */
@media (max-width: 768px) {
  .campeones-hero h1 {
    font-size: 2rem;
  }
  .champions-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .champion-item {
    max-width: 350px;
    margin: 0 auto;
    width: 100%;
  }
  .champion-card {
    height: 505px;
    width: 100%;
  }
  .martina-quote-box {
    flex-direction: column;
    text-align: center;
  }
}
