/* ASCII only */
/* Reset basico */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Tipografia y color base */
body {
  font-family: Montserrat, Helvetica, sans-serif;
  color: #272626;
  background: #ffffff;
  line-height: 1.5;
}

/* Utils */
.hide { display: none !important; }

/* Spacer para header fijo: usa las vars definidas en header.css */
.header-spacer { height: calc(var(--topbar-h) + var(--bar-h)); }

/* Anclas: evita que el header tape los titulos al hacer scroll a #id */
section[id]{
  scroll-margin-top: calc(var(--topbar-h) + var(--bar-h) + 12px);
}
/* ===== PARCHE: soporta anclaje directo a los H2 ===== */
h2[id]{
  scroll-margin-top: calc(var(--topbar-h) + var(--bar-h) + 12px);
}

/* ----------------- BOTONES GLOBALES ----------------- */
.btn {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition:
    background-color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .02s ease,
    color .15s ease;
}
.btn:active { transform: translateY(1px); }

/* === PRIMARIO (azul corporativo) ===
   → para TODOS los botones del sitio
   → excepto: hero del index y botones del header (esos ya tienen su propio CSS) */
.btn-primary {
  background: #3969b5;
  color: #fff;
  border-color: #3969b5;
  box-shadow: 0 2px 6px rgba(57, 105, 181, 0.24);
}
.btn-primary:hover,
.btn-primary:focus {
  background: #305a9b;
  border-color: #305a9b;
  box-shadow: 0 3px 8px rgba(48, 90, 155, 0.28);
}
.btn-primary:active {
  background: #274a82;
  border-color: #274a82;
  box-shadow: 0 1px 4px rgba(39, 74, 130, 0.25);
}

/* === SECUNDARIO (neutro) ===
   → úsalo SOLO en dashboard.html */
.btn-secondary {
  background: #f3f4f6;
  color: #111827;
  border-color: #5c5c5c;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.btn-secondary:hover,
.btn-secondary:focus {
  background: #e9eaee;
  border-color: #5c5c5c; /* fix ; */
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.btn-secondary:active {
  background: #dee0e6;
  border-color: #cfd3db;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* --------- COMPATIBILIDAD hacia atrás --------- */
.btn.admin-sub,
#sub-paywall-cta .btn.subscribe,
.sub-actions-wrap #subActions .btn.admin-sub {
  padding: 12px 18px;
  font-size: 16px;  
  background: #3969b5;
  color: #fff;
  border-color: #3969b5;
  box-shadow: 0 2px 6px rgba(57, 105, 181, 0.24);
}
.btn.admin-sub:hover,
.btn.admin-sub:focus,
#sub-paywall-cta .btn.subscribe:hover,
#sub-paywall-cta .btn.subscribe:focus,
.sub-actions-wrap #subActions .btn.admin-sub:hover,
.sub-actions-wrap #subActions .btn.admin-sub:focus {
  background: #305a9b;
  border-color: #305a9b;
  box-shadow: 0 3px 8px rgba(48, 90, 155, 0.28);
}
.btn.admin-sub:active,
#sub-paywall-cta .btn.subscribe:active,
.sub-actions-wrap #subActions .btn.admin-sub:active {
  background: #274a82;
  border-color: #274a82;
  box-shadow: 0 1px 4px rgba(39, 74, 130, 0.25);
  transform: translateY(1px);
}

/* Secciones genericas */
.section { padding: 48px 16px; }
.section h2 { margin: 0 0 16px; }
.feature-list { margin: 0; padding-left: 18px; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.card h3 { margin-top: 0; }

/* ===== CTA centralizado en subscription.html ===== */
.sub-actions-wrap #subActions,
#sub-paywall-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 64px;
  padding: 16px 0;
}

/* Responsive generico (reserva) */
@media (max-width: 880px) {
  /* reglas responsivas globales si se necesitan */
}

/* ========= Centrar .wrap-85 también en móvil/tablet ========= */
.wrap-85{
  width: min(1100px, 92vw);
  margin-left: auto;
  margin-right: auto;
}

/* ===== Desktop-only 85% layout ===== */
@media (min-width: 1024px) {
  .wrap-85 {
    width: 85%;
    max-width: 85vw;
    margin-left: auto;
    margin-right: auto;
  }
  .hero.hero-dark {
    width: 100%;
    max-width: none;
    margin: 0;
  }
}

/* ===== PRELOAD SPACER (anti-hueco al llegar con #hash desde otra página) ===== */
.preload-spacer{
  height: calc(var(--topbar-h) + var(--bar-h));
}

/* Oculta el spacer temporal cuando el header real ya está presente */
[data-include="header"]:has(.site-header) + .preload-spacer{
  display: none !important;
}
