/* =========================================================
   niblok · Sistema tipográfico global
   Interfaz completa: Archivo
   Misma familia en lectura, títulos, acciones y datos
   ========================================================= */

:root {
  --font-body: "Archivo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Archivo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  font-family: var(--font-body) !important;
  font-optical-sizing: auto;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Normalización fuerte: evita que Bootstrap o estilos heredados cambien la familia. */
body :where(
  main, section, article, aside, header, footer, nav, div, span, p, small, strong,
  label, legend, summary, details, a, button, input, select, textarea, option,
  table, thead, tbody, tfoot, tr, th, td, ul, ol, li, dl, dt, dd
) {
  font-family: var(--font-body) !important;
}

::placeholder {
  font-family: var(--font-body) !important;
}

/* Texto funcional y datos */
input,
select,
textarea,
option,
table,
td,
.form-control,
.form-select,
.input-group-text,
.dropdown-menu,
.dropdown-item,
.modal-body,
.card-body,
.alert,
.badge,
.tooltip,
.popover {
  font-family: var(--font-body) !important;
}

/* Identidad de títulos, navegación y acciones */
h1,
h2,
h3,
h4,
h5,
h6,
.btn,
button:not(.navbar-toggler),
.nav-link,
.navbar-brand,
.brand,
.dropdown-header,
.card-title,
.modal-title,
.offcanvas-title,
.stat-number,
.stat-label,
.metric-value,
.metric-label,
.club-title,
.club-title h1,
.club-title h2,
.club-card-title,
.club-card-subtitle,
.club-kicker,
.kpi-value,
.kpi-label,
.section-title,
.page-title,
.panel-title,
.table-title,
.mobile-label,
.role-badge,
.invite-badge,
.btn-action,
.btn-round,
.page-link,
.page-round {
  font-family: var(--font-display) !important;
  font-stretch: normal;
}

/* Títulos principales: más aire y anchura visual */
h1,
h2,
h3,
.page-title,
.panel-title,
.club-title h1,
.club-title h2,
.club-card-title,
.section-title {
  font-weight: 800;
  letter-spacing: -0.018em;
  line-height: 1.08;
}

/* Titulares muy grandes */
.club-title h1,
.hero-title,
.display-1,
.display-2 {
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.02;
}

/* Títulos secundarios */
h4,
h5,
h6,
.card-title,
.modal-title,
.table-title,
.club-card-subtitle {
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

/* Botones, navegación y etiquetas técnicas */
.btn,
button,
.nav-link,
.btn-action,
.btn-round,
.page-link,
.page-round,
.stat-label,
.metric-label,
.kpi-label,
.mobile-label,
.role-badge,
.invite-badge,
.club-kicker {
  font-weight: 700;
  letter-spacing: .045em;
  line-height: 1.15;
}

/* Cifras de panel */
.stat-number,
.metric-value,
.kpi-value {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Valores y números alineados */
table,
input[type="number"],
input[type="date"],
input[type="time"],
.data-value,
.cell-text,
.pagination-text {
  font-variant-numeric: tabular-nums;
}

/* Evita mayúsculas excesivamente artificiales en títulos */
.club-card-title,
.card-title,
.section-title,
.page-title,
.panel-title {
  text-transform: none;
}

/* Archivo también para textos largos y descriptivos */
p,
li,
small,
.help-text,
.form-text,
.club-subtitle,
.person-sub,
.data-value,
.mobile-value,
.pagination-text {
  font-family: var(--font-body) !important;
  letter-spacing: normal;
}

/* Mejora del espaciado en etiquetas en mayúsculas */
.club-kicker,
.stat-label,
.metric-label,
.kpi-label,
.mobile-label {
  word-spacing: .08em;
}

@media (max-width: 767.98px) {
  h1,
  .page-title,
  .panel-title,
  .club-title h1 {
    letter-spacing: -0.012em;
  }

  .btn,
  button,
  .nav-link,
  .btn-action,
  .club-kicker,
  .stat-label {
    letter-spacing: .035em;
  }
}


/* =========================================================
   Títulos H1 principales del panel · formato Planificador
   ========================================================= */
.site-main h1.text-white,
.site-main .sessions-club-header h1,
.site-main .players-page-header h1,
.site-main .live-title,
.site-main .club-title h1 {
  color: #ffffff !important;
  font-family: var(--font-display) !important;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 500 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.025em !important;
  text-shadow: none !important;
  text-transform: none !important;
}

form.is-filtering {
  opacity: .72;
  transition: opacity .12s ease;
}
form.is-filtering :is(input, select, button) { cursor: progress; }

@media (max-width: 767.98px) {
  .site-main h1.text-white,
  .site-main .sessions-club-header h1,
  .site-main .players-page-header h1,
  .site-main .live-title,
  .site-main .club-title h1 {
    font-size: 2rem;
    letter-spacing: -0.015em !important;
  }
}


/* Título principal normalizado: misma escala que Planificador y Sesiones. */
.niblok-main-title {
  margin-top: 0 !important;
  margin-bottom: .25rem !important;
  color: #fff !important;
  font-family: var(--font-display) !important;
  font-size: calc(1.375rem + 1.5vw) !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  text-shadow: none !important;
  text-transform: none !important;
}
@media (min-width:1200px) {
  .niblok-main-title { font-size:2.5rem !important; }
}
@media (max-width:575.98px) {
  .niblok-main-title { font-size:2rem !important; }
}


/* =========================================================
   Acción PDF global · misma presencia que PDF semanal
   ========================================================= */
.pdf-action,
.btn-action--pdf {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:.45rem !important;
  min-height:40px;
  padding:.52rem .92rem !important;
  border:1px solid rgba(255,82,112,.82) !important;
  border-radius:999px !important;
  color:#fff !important;
  background:linear-gradient(135deg,rgba(255,67,99,.96),rgba(150,20,56,.94)) !important;
  box-shadow:0 10px 24px rgba(255,52,88,.24),inset 0 1px rgba(255,255,255,.18) !important;
  font-family:var(--font-display) !important;
  font-size:.76rem !important;
  font-weight:850 !important;
  line-height:1 !important;
  letter-spacing:.035em !important;
  text-decoration:none !important;
  text-transform:none !important;
  white-space:nowrap;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease !important;
}
.pdf-action:hover,
.pdf-action:focus-visible,
.btn-action--pdf:hover,
.btn-action--pdf:focus-visible {
  color:#fff !important;
  border-color:#ffb0c0 !important;
  transform:translateY(-1px);
  box-shadow:0 14px 30px rgba(255,52,88,.36),0 0 0 3px rgba(255,82,112,.11) !important;
}
.pdf-action i,
.btn-action--pdf i { font-size:1rem !important; }

@media(max-width:575.98px){
  .pdf-action,.btn-action--pdf{min-height:42px;padding:.58rem .82rem !important;font-size:.72rem !important}
}
