/* =========================
   Variables y estilos base
   ========================= */
:root {
  --bg-pearl: #f4f4f7;        /* Gris/blanco perla suave */
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-soft: #e2e2ea;
  --primary: #e63946;         /* Rojo suave */
  --primary-soft: #ffe3e7;
  --text-main: #222222;
  --text-muted: #777777;
  --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.06);
  --radius-xl: 18px;
  --radius-full: 999px;
  --transition-fast: 150ms ease-out;
  --banner-width: 300px;
  --banner-width-mobile: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background: var(--bg-pearl);
}

/* Contenedor general de la página */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================
   Cabecera
   ========================= */
.main-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-pearl);
  border-bottom: 1px solid rgba(210, 210, 220, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2.5rem;
}

/* Logo / título */
.logo {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.logo-main {
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 1rem;
}

.logo-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Navegación / idiomas */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.lang-label {
  color: var(--text-muted);
  margin-right: 0.3rem;
}

.lang-btn {
  border: 0;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              transform var(--transition-fast);
}

.lang-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

.lang-btn-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

/* =========================
   Contenido principal y banners laterales
   ========================= */

.main-wrapper {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  position: relative;
  width: 100%;
}

/* BANNERS LATERALES */
.banner-left,
.banner-right {
  width: var(--banner-width);
  flex-shrink: 0;
  position: sticky;
  top: 70px;
  height: auto;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.banner-left {
  order: -1;
}

.banner-right {
  order: 1;
}

.ad-container {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  min-height: 300px;
  gap: 1rem;
}

.ad-unit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 57, 70, 0.03);
  border: 2px dashed var(--border-soft);
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  min-height: 250px;
}

.ad-container:empty::before {
  content: "Ad Space Available - 300x600px";
  display: block;
  padding: 1rem;
}

.main-content {
  flex: 1;
  padding: 2.5rem 2.5rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.main-content h1 {
  background: linear-gradient(135deg, var(--primary), #ff5252);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
  padding: 1rem 0 0.5rem;
}

/* =========================
   Cuadrícula de expansiones
   ========================= */
.expansions-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;      /* centra las filas cuando hay pocas cards */
}

/* Card de expansión */
.expansion-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, #fafbfc 100%);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-soft);
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.04);
  padding: 0.7rem;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 200ms ease-out,
              border-color 200ms ease-out,
              background-color 200ms ease-out;
  display: flex;
  align-items: center;
  justify-content: center;

  flex: 1 1 280px;  
  max-width: 360px;
  position: relative;
  overflow: hidden;
}

.expansion-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(230, 57, 70, 0.1) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease-out;
}

.expansion-card:hover::before {
  opacity: 1;
}

.expansion-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(230, 57, 70, 0.15);
  border-color: rgba(230, 57, 70, 0.6);
  background: linear-gradient(135deg, #fffcfe 0%, #fff9fb 100%);
}

/* Imagen de logo grande dentro de la card */
.expansion-card-img {
  width: 100%;
  max-height: 380px;        /* reducido de 420px */
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.expansion-card-img-grande {
  width: 70%;
  max-height: 420px;        /* ajusta según tus logos */
  object-fit: contain;     /* para que no se deforme */
  display: block;
  border-radius: 12px;     /* por si el logo no es transparente */
}


.expansion-abbr {
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Info de expansión */
.expansion-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.expansion-name {
  margin: 0;
  font-size: 1rem;
}

.expansion-meta {
  margin: 0;
  font-size: 0.83rem;
  color: var(--text-muted);
}


/* =========================
   Cartas
   ========================= */

.titulos {
  width: 25%;
}
.pokedex-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 0.5rem 0.5rem 0.75rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}

.pokedex-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.poke-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}




/* =========================
   Footer
   ========================= */
.main-footer {
  border-top: 1px solid rgba(210, 210, 220, 0.8);
  padding: 2rem 2.5rem 1.5rem;
  background: linear-gradient(to bottom, transparent, rgba(230, 57, 70, 0.02));
  margin-top: 1rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-title {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
  letter-spacing: 0.01em;
}

.footer-text {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-main);
  font-weight: 500;
}

.footer-subtext {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-weight: 400;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 150ms ease-out;
}

.footer-link:hover {
  color: #ff5252;
}

.footer-link-separator {
  color: rgba(210, 210, 220, 0.7);
}

.footer-copy {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* =========================
   Responsivo
   ========================= */

/* TABLETS Y MONITORES MEDIANOS */
@media (max-width: 1200px) {
  .main-content {
    max-width: 100%;
    padding: 2rem 2rem 2rem;
  }
}

/* TABLETS (OCULTAR BANNERS) */
@media (max-width: 1024px) {
  :root {
    --banner-width: 0px;
  }

  .banner-left,
  .banner-right {
    display: none;
  }

  .main-wrapper {
    gap: 0;
  }

  .main-content {
    padding: 2rem 2rem 2rem;
    max-width: 100%;
  }

  .expansions-section {
    gap: 1rem;
  }
}

/* TABLETS PEQUEÑOS */
@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem 1.25rem;
  }

  .main-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .main-content {
    padding: 1.5rem 1.25rem 2rem;
  }

  .main-content h1 {
    font-size: 1.5rem;
  }

  .expansions-section {
    gap: 0.8rem;
  }

  .expansion-card {
    flex: 1 1 220px;
    max-width: 280px;
  }
}

/* MÓVILES MEDIANOS */
@media (max-width: 640px) {
  .main-header {
    padding: 0.8rem 1rem;
  }

  .logo {
    gap: 0.1rem;
  }

  .logo-main {
    font-size: 0.9rem;
  }

  .logo-sub {
    font-size: 0.7rem;
  }

  .main-nav {
    font-size: 0.7rem;
    gap: 0.15rem;
  }

  .lang-label {
    display: none;
  }

  .lang-btn {
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
  }

  .expansion-card {
    flex: 1 1 200px;
    max-width: 100%;
  }

  .expansion-card:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .main-content {
    padding: 1rem 1rem 1.5rem;
  }

  .main-content h1 {
    font-size: 1.3rem;
    padding: 0.8rem 0 0.3rem;
  }

  .footer-links {
    gap: 0.3rem;
    font-size: 0.75rem;
  }
}

/* MÓVILES PEQUEÑOS */
@media (max-width: 480px) {
  .main-header {
    padding: 0.6rem 0.8rem;
    gap: 0.5rem;
  }

  .logo-main {
    font-size: 0.8rem;
  }

  .logo-sub {
    font-size: 0.6rem;
  }

  .main-nav {
    font-size: 0.65rem;
    gap: 0.1rem;
  }

  .lang-btn {
    padding: 0.08rem 0.3rem;
    font-size: 0.65rem;
  }

  .expansion-card {
    flex: 1 1 160px;
    padding: 0.5rem;
  }

  .expansion-card-img {
    max-height: 300px;
  }

  .main-content {
    padding: 0.8rem 0.8rem 1rem;
  }

  .main-content h1 {
    font-size: 1.1rem;
    padding: 0.5rem 0 0.2rem;
    margin: 0 0 0.3rem;
  }

  .footer-title {
    font-size: 1.1rem;
  }

  .footer-text {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .footer-copy {
    font-size: 0.65rem;
  }
}

/* ULTRA MÓVILES (< 360px) */
@media (max-width: 360px) {
  .logo-main {
    font-size: 0.7rem;
  }

  .expansion-card {
    flex: 1 1 140px;
  }

  .main-content h1 {
    font-size: 1rem;
  }
}


/* =========================
   Modal carta a pantalla casi completa
   ========================= */

/* Que el diálogo ocupe toda la ventana */
#cardModal .modal-dialog {
  max-width: 100vw !important;
  width: 100vw !important;
  margin: 0 !important;
  height: 100vh;
}

/* Que el contenido sea transparente y centrado */
#cardModal .modal-content {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  position: relative;
}

/* La carta en grande, pero no tanto */
.card-modal-img {
  height: 55vh;        /* antes 80vh → ahora algo más pequeña */
  max-height: 60vh;
  max-width: 90vw;
  width: auto;         /* mantiene la proporción */
  border-radius: 12px;
}

/* Ajuste para pantallas medianas */
@media (max-width: 1200px) {
  .card-modal-img {
    height: 65vh;      /* un pelín más grande en portátiles / pantallas medias */
  }
}

/* Ajuste para móviles */
@media (max-width: 768px) {
  .card-modal-img {
    height: 70vh;      /* que aproveche más la pantalla en móvil */
  }
}


/* Botón de cierre en la esquina */
.card-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  filter: invert(1);
  z-index: 2;
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  display: block;
}

#btnTop {
  position: fixed;
  right: 20px;
  bottom: 75px;
  z-index: 999;
  background: #ffcb05;
  color: #2a75bb;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 20px;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#btnTop:hover {
  transform: scale(1.1);
}

#btnBottom {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999;
  background: #ffcb05;
  color: #2a75bb;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 20px;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#btnBottom:hover {
  transform: scale(1.1);
}

.lang-btn a {
  text-decoration: none;   /* quita subrayado */
  color: inherit;          /* usa el color del botón */
}

.lang-btn a:hover {
  color: inherit;          /* evita que cambie al pasar el ratón */
}

.logo-expansion {
  max-width: 30%;
  height: auto;
  display: block;
  margin: 0 auto;
}

