/* =========================================================================
   SECCIONES DEL SITIO CON EL ESTILO DE LA PORTADA
   Toda tarjeta de página (.card con .card-header) se ve como la portada:
   el título va afuera, en blanco sobre el fondo oscuro con la barrita
   celeste, y el contenido (.card-body) en una superficie clara sin la
   franja azul. Se hace aquí, en un solo lugar, sin tocar cada plantilla.

   No se tocan las cabeceras que son un diseño propio: el banner del perfil
   (.profile-header), el encabezado de la ficha de grupo (.group-hero) y las
   tarjetas de cada vestíbulo (.lobby-header).
   ========================================================================= */
.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}

/* ---- título afuera ---- */
.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header {
  position: relative;
  margin: 0 0 0.6rem;
  padding: 0 0.2rem 0 0.95rem;
  border: 0;
  border-radius: 0;
  background: none;
  color: #fff;
  font-family: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  border-radius: 4px;
  background: #38bdf8;
}

.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header .bi {
  color: #38bdf8;
  font-size: 1.1rem;
}

/* textos secundarios y enlaces dentro del título, legibles sobre oscuro */
.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header .text-muted {
  color: #94a3b8 !important;
  font-family: var(--font-sans, system-ui);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header a:not(.btn) {
  color: #93c5fd;
}

.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header a:not(.btn):hover {
  color: #fff;
}

/* botones y etiquetas del título: tamaño y fuente normales */
.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header .btn,
.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header .ranking-tag {
  font-family: var(--font-sans, system-ui);
  letter-spacing: 0.02em;
}

.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header .btn {
  font-size: 0.78rem;
  text-transform: none;
}

/* ---- contenido en superficie clara ---- */
.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-body,
.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .list-group,
.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .table-responsive {
  overflow: hidden;
  border: 1px solid rgba(148, 197, 255, 0.14);
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

@media (max-width: 575.98px) {
  .card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header {
    font-size: 1.25rem;
  }
}

/* Descargas traía su propio marco y franja de color con !important */
.downloads-page .downloads-shell {
  overflow: visible;
  border: 0;
  background: transparent !important;
  box-shadow: none;
}

.downloads-page .downloads-shell > .card-header {
  padding: 0 0.2rem 0 0.95rem;
  border-bottom: 0;
  background: none !important;
  color: #fff !important;
  font-weight: 800;
}

/* ---- títulos de página: grandes, en minúscula normal, sin barrita ---- */
.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header,
.downloads-page .downloads-shell > .card-header {
  padding: 0 0.1rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  text-transform: none;
}

.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header::before { content: none; }

.card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header .bi {
  font-size: 1.4rem;
}

@media (max-width: 575.98px) {
  .card:has(> .card-header:not(.profile-header):not(.group-hero):not(.lobby-header)) > .card-header,
  .downloads-page .downloads-shell > .card-header { font-size: 1.6rem; }
}

/* secciones dentro de una ficha: un escalón más chicas que el título de página */
.group-page .card:has(> .card-header) > .card-header { font-size: 1.5rem !important; }
