/* --- PRESENTACIÓN ÉPICA Y MODERNA --- */
.presentacion-epica {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a2332;
  border-radius: 28px;
  box-shadow: 0 8px 40px rgba(45,127,249,0.15);
  overflow: hidden;
  margin-bottom: 2.5rem;
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.presentacion-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20,40,80,0.60) 0%, rgba(30,60,100,0.45) 50%, rgba(255,255,255,0.05) 100%);
  z-index: 1;
}
.presentacion-contenido {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 3rem 1.5rem 2.5rem 1.5rem;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}
.presentacion-logo {
  width: 140px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 3px 15px rgba(0,0,0,0.35));
}
.presentacion-contenido h1 {
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 3px 18px rgba(0,0,0,0.45), 0 1px 4px rgba(0,0,0,0.3);
  line-height: 1.2;
}
.presentacion-desc {
  font-size: 1.22rem;
  color: #f0f8ff;
  margin-bottom: 0.8rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.2);
  line-height: 1.5;
}
.presentacion-epico {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffd54f;
  letter-spacing: 0.03em;
  text-shadow: 0 3px 12px rgba(0,0,0,0.45), 0 1px 6px rgba(255,193,7,0.4);
  margin-top: 0.5rem;
}

.presentacion-grid-epica {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.presentacion-card {
  background: var(--bg-card);
  border-radius: 18px;
  box-shadow: 0 2px 16px var(--shadow-light);
  padding: 1.6rem 1.2rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow 0.3s, transform 0.3s;
}
.presentacion-card:hover {
  box-shadow: 0 8px 32px var(--shadow-dark);
  transform: translateY(-4px) scale(1.03);
}
.presentacion-img {
  width: 110px;
  height: 62px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 8px rgba(45,127,249,0.10));
}
.presentacion-card h2 {
  font-size: 1.25rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.presentacion-card p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.presentacion-mapa {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.2rem;
  background: var(--bg-card);
  border-radius: 22px;
  box-shadow: 0 4px 24px var(--shadow-light);
  padding: 2.2rem 1.2rem 2rem 1.2rem;
  margin-bottom: 2.5rem;
}
.presentacion-mapa-img img {
  width: 320px;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 12px var(--shadow-light);
}
.presentacion-mapa-desc {
  flex: 1 1 260px;
  min-width: 220px;
}
.presentacion-mapa-desc h2 {
  font-size: 1.3rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.presentacion-mapa-desc p {
  color: var(--text-secondary);
  font-size: 1.08rem;
}

.presentacion-video {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.2rem;
  background: var(--bg-card);
  border-radius: 22px;
  box-shadow: 0 4px 24px var(--shadow-light);
  padding: 2.2rem 1.2rem 2rem 1.2rem;
  margin-bottom: 2.5rem;
}
.presentacion-video-container video {
  width: 340px;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 12px var(--shadow-light);
  object-fit: cover;
  aspect-ratio: 16/7;
}
.presentacion-video-desc {
  flex: 1 1 260px;
  min-width: 220px;
}
.presentacion-video-desc h2 {
  font-size: 1.3rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.presentacion-video-desc p {
  color: var(--text-secondary);
  font-size: 1.08rem;
}

/* Presentación simple (título + banner + texto) */
.presentacion-simple .titulo-principal {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-color);
  text-align: center;
  margin: 0 0 1rem 0;
}
.banner-presentacion {
  margin: 0 auto 1rem auto;
}
.banner-presentacion img {
  width: 100%;
  display: block;
  border-radius: 16px;
  box-shadow: 0 6px 26px rgba(0,0,0,0.15);
  aspect-ratio: 16/5;
  object-fit: cover;
}
.presentacion-simple .presentacion-descripcion {
  max-width: 900px;
  margin: 0.5rem auto 0 auto;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .presentacion-simple .titulo-principal { font-size: 1.6rem; }
  .presentacion-simple .presentacion-descripcion { padding: 0 0.5rem; }
}
/* (mini banner eliminado) */
@media (max-width: 900px) {
  .presentacion-epica {
    padding: 1.5rem 0.5rem;
    height: 300px;
  }
  .presentacion-contenido h1 {
    font-size: 1.8rem;
  }
  .presentacion-desc {
    font-size: 1rem;
  }
  .presentacion-epico {
    font-size: 1.1rem;
  }
  .presentacion-grid-epica {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .presentacion-mapa, .presentacion-video {
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.2rem 0.5rem 1.2rem 0.5rem;
  }
  .presentacion-mapa-img img, .presentacion-video-container video {
    width: 100%;
    max-width: 100vw;
  }
}

@media (min-width: 1400px) {
  .presentacion-epica {
    height: 450px;
  }
}
/* --- NUEVA PRESENTACIÓN MODERNA --- */
.presentacion-nueva {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
  background: linear-gradient(120deg, #e3f0ff 0%, #f7fbff 100%);
  border-radius: 28px;
  box-shadow: 0 8px 40px rgba(45,127,249,0.08);
  padding: 2.5rem 2rem 2rem 2rem;
  margin-bottom: 2.5rem;
}
.hero-media {
  flex: 1 1 420px;
  min-width: 320px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.hero-media video {
  width: 100%;
  max-width: 480px;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(45,127,249,0.13);
  object-fit: cover;
  aspect-ratio: 16/7;
}
.hero-slider {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
}
.slider-img {
  width: 80px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  opacity: 0.7;
  box-shadow: 0 2px 8px rgba(45,127,249,0.08);
  transition: opacity 0.3s, box-shadow 0.3s;
}
.slider-img.active {
  opacity: 1;
  box-shadow: 0 4px 16px rgba(45,127,249,0.18);
}
.hero-titular {
  flex: 2 1 340px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}
.hero-logo {
  width: 120px;
  margin-bottom: 0.5rem;
}
.hero-titular h1 {
  font-size: 2.1rem;
  color: var(--accent-color);
  margin: 0 0 0.3em 0;
  font-weight: 800;
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 0.2em;
}

.presentacion-secciones {
  margin-bottom: 2.5rem;
}
.presentacion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.presentacion-card {
  background: var(--bg-card);
  border-radius: 18px;
  box-shadow: 0 2px 16px var(--shadow-light);
  padding: 1.6rem 1.2rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow 0.3s, transform 0.3s;
}
.presentacion-card:hover {
  box-shadow: 0 8px 32px var(--shadow-dark);
  transform: translateY(-4px) scale(1.03);
}
.presentacion-img {
  width: 110px;
  height: 62px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 8px rgba(45,127,249,0.10));
}
.presentacion-card h2 {
  font-size: 1.25rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.presentacion-card p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

@media (max-width: 900px) {
  .presentacion-nueva {
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 0.7rem 1.2rem 0.7rem;
  }
  .hero-media, .hero-titular {
    max-width: 100%;
  }
}
/* Variables CSS para temas claro y oscuro */
/* ACTUALIZADO: 2025-11-05 02:00 - Ajuste tarjetas wiki-secciones */
:root {
  /* Tema claro (default) */
  --bg-gradient-start: #e3eafc;
  --bg-gradient-end: #c2e9fb;
  --text-primary: #1a2332;
  --text-secondary: #34495e;
  --accent-color: #2d7ff9;
  --accent-light: #7fa7e6;
  --bg-card: #fff;
  --bg-sidebar: linear-gradient(135deg, #e3eafc 0%, #f7f7fa 100%);
  --border-color: #dbeafe;
  --shadow-light: rgba(219, 234, 254, 0.4);
  --shadow-medium: #b3c6e0;
  --shadow-dark: #7fa7e6;
  --footer-bg: #e3eafc;
  --sidebar-text: #5a6c7d;
}

[data-theme="dark"] {
  /* Tema oscuro */
  --bg-gradient-start: #1a1f2e;
  --bg-gradient-end: #0f1419;
  --text-primary: #e3e8ef;
  --text-secondary: #b8c1d3;
  --accent-color: #4d9fff;
  --accent-light: #6bb0ff;
  --bg-card: #242938;
  --bg-sidebar: linear-gradient(135deg, #1e2433 0%, #242938 100%);
  --border-color: #2d3548;
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.5);
  --shadow-dark: rgba(77, 159, 255, 0.3);
  --footer-bg: #1a1f2e;
  --sidebar-text: #8a95a8;
}

/* Estilos para el bloque de presentación */
.presentacion-block-moderno {
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.8;
  margin: 1.5rem 0 2rem 0;
}
.presentacion-block-moderno p {
  margin-bottom: 1.2rem;
}
.presentacion-block-moderno strong {
  color: var(--accent-color);
}

  .presentacion-descripcion.mejorada {
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: 0 2px 12px var(--shadow-light);
  padding: 2rem 2rem 1.5rem 2rem;
  margin: 2rem auto 2.5rem auto;
  max-width: 900px;
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.8;
}
.presentacion-descripcion.mejorada p {
  margin-bottom: 1.2rem;
}
.presentacion-descripcion.mejorada strong {
  color: var(--accent-color);
}
.main-block {
  background: var(--bg-card);
  border-radius: 22px;
  box-shadow: 0 8px 32px var(--shadow-medium);
  padding: 3rem 2.5rem 2.5rem 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  transition: box-shadow 0.3s;
}
.main-block:hover {
  box-shadow: 0 16px 48px var(--shadow-dark);
}
.main-actions {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.main-btn {
  background: linear-gradient(90deg, var(--accent-color) 0%, var(--accent-light) 100%);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.6rem;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px var(--shadow-light);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  gap: 0.7em;
}
.main-btn:hover {
  background: linear-gradient(90deg, var(--accent-light) 0%, var(--accent-color) 100%);
  transform: translateY(-2px) scale(1.04);
}
.main-actions {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.card-btn {
  background: var(--accent-color);
  color: #fff;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  box-shadow: 0 1px 6px var(--shadow-light);
  text-decoration: none;
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  transition: background 0.2s, transform 0.2s;
}
.card-btn:hover {
  background: var(--accent-light);
  color: #fff;
  transform: translateY(-1px) scale(1.04);
}
.guia-card h2 i {
  margin-right: 0.5em;
}
.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-menu > li {
  margin-bottom: 1.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 0.8rem 0.6rem;
  transition: all 0.3s ease;
}
.sidebar-menu > li:hover {
  box-shadow: 0 4px 16px var(--shadow-dark);
  transform: translateX(4px);
}
.sidebar-menu > li:last-child {
  border-bottom: none;
}
.sidebar-menu > li > span {
  font-weight: 700;
  color: var(--accent-color);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.3px;
  padding: 0.4rem 0.6rem;
  cursor: default; /* evitar cursor de texto en títulos no clicables */
  transition: all 0.2s;
  border-radius: 8px;
}
.sidebar-menu > li > span:hover {
  background: rgba(77, 159, 255, 0.08);
  padding-left: 0.8rem;
}
.sidebar-menu > li > span i {
  font-size: 1.1rem;
  color: var(--accent-color);
}
.sidebar-menu ul {
  list-style: none;
  padding-left: 1.5rem;
  margin: 0.3rem 0 0.5rem 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(.25,.8,.25,1);
}
.sidebar-menu ul.open {
  max-height: 500px;
  overflow: visible;
}
.sidebar-menu ul li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.8rem;
}
.sidebar-menu ul li::before {
  content: '\f105';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0.3em;
  font-size: 0.9rem;
  color: var(--accent-light);
  transition: all 0.2s;
}
.sidebar-menu ul li:hover::before {
  color: var(--accent-color);
  transform: translateX(3px);
}
.sidebar-menu a {
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
  font-weight: 500;
  display: inline-block;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
}
.sidebar-menu a:hover {
  color: var(--accent-color);
  background: rgba(77, 159, 255, 0.05);
  text-decoration: none;
  padding-left: 0.6rem;
}
.sidebar-menu a.active {
  color: var(--accent-color);
  background: rgba(77, 159, 255, 0.12);
  font-weight: 600;
  border-radius: 6px;
}
.sidebar-menu > li.active-parent > span {
  background: rgba(77, 159, 255, 0.08);
}
.sidebar-menu ul ul {
  padding-left: 1.2rem;
}
.presentacion-banner {
  width: 100%;
  margin: 0 0 1.5rem 0;
  overflow: hidden;
  border-radius: 16px;
}
.presentacion-banner img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  max-width: 100% !important;
  border-radius: 16px !important; /* esquinas redondeadas */
  box-shadow: 0 12px 36px rgba(45, 127, 249, 0.25), 0 6px 18px rgba(0, 0, 0, 0.08) !important; /* brillo suave */
  object-fit: cover !important;
  aspect-ratio: 16/5 !important;
  margin: 0 auto !important;
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease !important;
}
.presentacion-banner img:hover {
  transform: scale(1.015);
  box-shadow: 0 16px 48px rgba(45, 127, 249, 0.35), 0 10px 24px rgba(0, 0, 0, 0.1) !important;
  filter: brightness(1.03) saturate(1.05);
}
.presentacion-titulo {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 0.5px;
  margin-bottom: 2rem;
  text-shadow: 0 2px 8px var(--shadow-dark);
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  line-height: 1.2;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
}
.sidebar-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.2rem;
}
.sidebar-logo a {
  display: block;
  width: 100%;
}
.sidebar-logo img {
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px #dbeafe;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  cursor: pointer;
}
.sidebar-logo img:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px #b3c6e0;
  filter: brightness(1.05) saturate(1.02);
}

/* --- SERVER CLOCK --- */
.server-clock {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-primary) 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin: 0 0.8rem 1.5rem 0.8rem;
  text-align: center;
  box-shadow: 0 2px 12px var(--shadow-light);
  transition: all 0.3s ease;
}
.server-clock:hover {
  box-shadow: 0 4px 20px var(--shadow-dark);
  transform: translateY(-2px);
}
.clock-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.clock-label i {
  font-size: 1rem;
  color: var(--accent-color);
}
.clock-display {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.clock-time {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
  text-shadow: 0 1px 3px var(--shadow-light);
  transition: opacity 0.2s ease;
}
.clock-time.fade {
  opacity: 0.7;
}
.clock-date {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: capitalize;
}

#wiki-footer {
  background: var(--footer-bg);
  color: var(--text-secondary);
  text-align: center;
  padding: 1.2rem 2rem 1.5rem 2rem;
  font-size: 1rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 12px var(--shadow-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  transition: background 0.3s ease, color 0.3s ease;
}
#wiki-footer p {
  margin: 0;
  flex: 1;
  text-align: center;
}
.language-selector {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
  margin-right: 68px; /* separa de botón flotante back-to-top */
}

/* Botón de cambio de tema */
.theme-toggle {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--accent-color);
  font-size: 1.2rem;
  box-shadow: 0 2px 8px var(--shadow-light);
  position: relative;
}
.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px var(--shadow-dark);
}
.theme-toggle:active {
  transform: scale(0.95);
}
.theme-toggle i {
  transition: transform 0.3s ease;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
}
.lang-option:hover {
  background: var(--bg-card);
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-dark);
}
.lang-option.active {
  background: var(--bg-card);
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px var(--shadow-light);
}
.lang-option img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}
.lang-option span {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Buscador del sidebar */
.sidebar-search {
  margin: 0.8rem 0 1rem 0;
}
.sidebar-search input[type="text"] {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sidebar-search input[type="text"]:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(77, 159, 255, 0.15);
}

/* Ocultación genérica para filtro */
.hidden { display: none !important; }

/* Botón Back-to-Top */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--shadow-light);
  color: var(--accent-color);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 1000;
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}
#wiki-content .wiki-secciones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: stretch; /* fuerza altura uniforme por fila */
}

.guia-card {
  background: var(--bg-card);
  border-radius: 18px;
  box-shadow: 0 4px 24px var(--shadow-light);
  padding: 1.8rem 1.4rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.3s, transform 0.3s;
}
.guia-card:hover {
  box-shadow: 0 8px 32px var(--shadow-dark);
  transform: translateY(-4px) scale(1.02);
}
.guia-card h2 {
  font-size: 1.35rem;
  color: var(--accent-color);
  margin-bottom: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.guia-card h2 i {
  font-size: 1.2rem;
}
.guia-contenido {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
}
.guia-contenido p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
  line-height: 1.6;
}
.guia-contenido ul {
  padding-left: 1.2rem;
  margin: 0 0 1rem 0;
}
.guia-contenido li {
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.5;
}
.guia-contenido .card-btn {
  margin-top: auto;
  align-self: flex-start;
}
.guia-izquierda {
  align-self: flex-start;
}
.guia-centro {
  align-self: center;
}
.guia-derecha {
  align-self: flex-end;
}

@media (max-width: 1100px) {
  #wiki-content .wiki-secciones {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  #wiki-content .wiki-secciones {
    grid-template-columns: 1fr;
  }
}
/* Estilos base tipo GitBook para la wiki */
body {
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(120deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--text-primary);
  margin: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Page fade-in */
body {
  opacity: 0;
}
body.page-loaded {
  opacity: 1;
  transition: opacity 350ms ease;
}

html {
  scroll-behavior: smooth;
}

#presentacion {
  margin-bottom: 2rem;
  text-align: center;
}
#presentacion h1 {
  font-size: 2.5rem;
  margin-bottom: 1.2rem;
  font-weight: 700;
  color: #2d7ff9;
  letter-spacing: 1px;
}

#presentacion .presentacion-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

#presentacion img {
  max-width: 50%;
  min-width: 220px;
  border-radius: 18px;
  box-shadow: 0 6px 24px #b3c6e0;
  object-fit: cover;
  aspect-ratio: 16/9;
  margin: 0 auto;
  transition: box-shadow 0.3s;
}

#presentacion img:hover {
  box-shadow: 0 8px 32px #7fa7e6;
}

#presentacion p {
  flex: 1;
  min-width: 220px;
  font-size: 1.2rem;
  line-height: 1.8;
  color: #34495e;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
  margin: 0 0 0 1rem;
}

@media (max-width: 900px) {
  #presentacion .presentacion-flex {
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
  }
  #presentacion img {
    max-width: 90vw;
    aspect-ratio: 16/9;
    margin: 0 auto;
  }
}

#wiki-container {
  display: flex;
  min-height: 100vh;
  gap: 1.5rem;
}

#wiki-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 2px solid var(--border-color);
  padding: 2.5rem 1.5rem 2rem 1.5rem;
  box-shadow: 2px 0 16px var(--shadow-light);
  border-radius: 18px 0 0 18px;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}
#wiki-sidebar * {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#wiki-content {
  flex: 1;
  padding: 2rem;
  min-width: 0; /* permite que flex funcione correctamente */
}

/* Sidebar derecho */
#wiki-sidebar-right {
  width: 300px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-left: 2px solid var(--border-color);
  padding: 2rem 1.5rem;
  box-shadow: -2px 0 16px var(--shadow-light);
  border-radius: 0 18px 18px 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.widget-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.widget {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 1.2rem 1rem;
  box-shadow: 0 2px 12px var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-medium);
}

.widget h3 {
  font-size: 1.1rem;
  color: var(--accent-color);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.widget h3 i {
  font-size: 1rem;
}

.widget-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Widget Discord */
.discord-widget .widget-btn {
  display: block;
  background: #5865f2;
  color: #fff;
  text-align: center;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin: 0.8rem 0;
  transition: background 0.2s, transform 0.2s;
}

.discord-widget .widget-btn:hover {
  background: #4752c4;
  transform: scale(1.03);
}

.discord-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Widget Estadísticas */
.server-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.6rem;
  background: rgba(67, 181, 129, 0.1);
  border-radius: 8px;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-indicator.online {
  background: #43b581;
  box-shadow: 0 0 8px #43b581;
}

.status-text {
  font-weight: 600;
  color: #43b581;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.stat-box {
  background: rgba(77, 159, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.8rem;
  text-align: center;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Widget Publicidad */
.ad-widget {
  background: var(--bg-card) !important;
  overflow: visible !important;
}

.ad-content {
  text-align: center;
  overflow: visible !important;
  padding: 0 !important;
  min-height: 50px;
}

.ad-link {
  display: inline-block !important;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  line-height: 0;
}

.ad-link:hover {
  opacity: 0.95;
}

.ad-banner {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  border-radius: 10px;
  box-shadow: 0 2px 8px var(--shadow-light);
  transition: transform 0.3s;
  margin: 0 auto;
  position: relative !important;
  z-index: 1 !important;
}

.ad-banner:hover {
  transform: scale(1.02);
}

.ad-text {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.5rem 0;
}

/* Enlaces Rápidos */
.quick-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quick-links li {
  margin-bottom: 0.6rem;
}

.quick-links a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.quick-links a:hover {
  background: rgba(77, 159, 255, 0.1);
  color: var(--accent-color);
  padding-left: 1rem;
}

.quick-links i {
  color: var(--accent-light);
  font-size: 0.95rem;
}

/* Widget Redes Sociales */
.social-links {
  display: flex;
  justify-content: space-around;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(77, 159, 255, 0.1);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  color: var(--accent-color);
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s;
}

.social-links a:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateY(-3px) scale(1.1);
  border-color: var(--accent-color);
}

.widget-btn {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  text-align: center;
}

.widget-btn:hover {
  background: var(--accent-light);
  transform: scale(1.04);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

#wiki-sidebar h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.8rem;
}

#wiki-sidebar ul {
  list-style: none;
  padding: 0;
}

#wiki-sidebar li {
  margin-bottom: 0.7rem;
}

#wiki-sidebar a {
  color: #2d7ff9;
  text-decoration: none;
  font-weight: 500;
}

#wiki-sidebar a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  #wiki-container {
    flex-direction: column;
  }
  #wiki-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem;
  }
  #wiki-content {
    padding: 1rem;
  }
  #wiki-sidebar-right {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
  }
}

@media (max-width: 1200px) {
  #wiki-sidebar-right {
    width: 250px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  #wiki-container {
    flex-wrap: wrap;
  }
  #wiki-sidebar-right {
    order: 3;
    width: 100%;
    border-left: none;
    border-top: 2px solid var(--border-color);
    border-radius: 0;
    margin-top: 1.5rem;
  }
}
