/* =========================
   GLOBAL – identidad visual y header
========================= */

:root {
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 76px;
}

/* Tipografía de títulos con identidad propia */
h1, h2, h3, h4,
.btn,
.nav a,
.pj-stat strong,
.hm-trust dt,
.ac-year,
.hm-float strong {
  font-family: var(--font-display);
}

h1, h2 {
  letter-spacing: -0.025em;
}

/* ---------- Header fijo ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.header.is-scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 6px 24px -12px rgba(17, 24, 39, 0.18);
}

.header-inner {
  height: var(--header-h);
}

.logo a {
  display: block;
  line-height: 0;
}

.logo img {
  display: block;
  height: 52px;
  width: auto;
}

/* ---------- Menú ---------- */

.nav {
  gap: 4px;
}

.nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-700);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover {
  color: var(--green-dark);
  background: #f0fdf4;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav a.is-active {
  color: var(--green-dark);
  font-weight: 600;
}

.nav a.is-active::after {
  transform: scaleX(1);
}

.mobile-menu a.is-active {
  color: var(--green);
  font-weight: 700;
}

.desktop-cta {
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 6px 16px -6px rgba(22, 163, 74, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.desktop-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -8px rgba(22, 163, 74, 0.6);
}

/* Barras fijas internas: quedan bajo el header
   (prefijo body para ganarle a los CSS de cada página, que cargan después) */
body .pj-toolbar {
  top: var(--header-h);
}

body .pj-facts {
  top: calc(var(--header-h) + 24px);
}

body .ac-table th {
  top: var(--header-h);
}

html {
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (max-width: 1100px) {
  .nav a {
    padding: 8px 8px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 68px;
  }

  .logo img {
    height: 46px;
  }
}

/* body con height:100% limita el header fijo a una pantalla de alto:
   min-height mantiene el footer abajo sin cortar el sticky */
body {
  height: auto;
  min-height: 100vh;
}
