/* Unified header (logo + 4 nav items) and footer (all pages) — use with Nicepage + custom pages */

.site-hf-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.site-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  text-decoration: none;
  color: #1a202c;
  line-height: 1.1;
}

.site-logo-text {
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
}

.site-logo-sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
}

/* Optional image logo (legacy); hidden when using text mark */
.site-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.site-logo:has(.site-logo-text) img {
  display: none;
}

.site-main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.site-main-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: #2d3748;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.site-main-nav a:hover,
.site-main-nav a:focus-visible {
  background: rgba(71, 138, 201, 0.14);
  color: #2b6cb0;
}

.site-main-nav a[aria-current="page"] {
  background: rgba(71, 138, 201, 0.22);
  color: #1a365d;
}

/* Nicepage pages with dark body (u-grey-80 / u-grey-90): readable header */
body.u-grey-80 .u-header,
body.u-grey-90 .u-header {
  background: rgba(15, 23, 42, 0.97);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

body.u-grey-80 .u-header .site-logo,
body.u-grey-90 .u-header .site-logo {
  color: #f8fafc;
}

body.u-grey-80 .u-header .site-logo-sub,
body.u-grey-90 .u-header .site-logo-sub {
  color: #cbd5e1;
  opacity: 0.9;
}

body.u-grey-80 .u-header .site-main-nav a,
body.u-grey-90 .u-header .site-main-nav a {
  color: rgba(248, 250, 252, 0.92);
}

body.u-grey-80 .u-header .site-main-nav a:hover,
body.u-grey-80 .u-header .site-main-nav a:focus-visible,
body.u-grey-90 .u-header .site-main-nav a:hover,
body.u-grey-90 .u-header .site-main-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body.u-grey-80 .u-header .site-main-nav a[aria-current="page"],
body.u-grey-90 .u-header .site-main-nav a[aria-current="page"] {
  background: rgba(56, 189, 248, 0.28);
  color: #fff;
}

/* Contact CTA strip before footer: always legible (works on dark themes) */
section.site-cta-strip {
  position: relative;
  z-index: 1;
  background: #334155 !important;
  color: #f8fafc !important;
}

section.site-cta-strip .u-text,
section.site-cta-strip h1,
section.site-cta-strip h2,
section.site-cta-strip h3,
section.site-cta-strip p {
  color: #f8fafc !important;
}

section.site-cta-strip .u-btn {
  color: #fff !important;
}

.site-footer-wrap {
  padding-top: 1rem;
  padding-bottom: 1.25rem;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  justify-content: center;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}

.site-footer-nav a {
  font-size: 0.78rem;
  color: #cbd5e0;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer-nav a:hover,
.site-footer-nav a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.site-footer-meta {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #a0aec0;
}

/* Custom pages: logo row inside sticky bar */
.x-top .x-inner.site-hf-row {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Shared dark footer strip (aligns with Nicepage u-grey-80) */
.x-foot-site {
  margin-top: 3rem;
  padding: 1.25rem 1rem 1.5rem;
  background: #4d4d4d;
}
.x-foot-site-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 0.75rem;
}
.x-foot-site-inner .site-footer-meta {
  text-align: center;
}

body.x-body.x-header-dark .site-logo {
  color: #f8fafc;
}
body.x-body.x-header-dark .site-logo-sub {
  color: #cbd5e1;
  opacity: 0.9;
}

/* Dark header bars (eventos, recursos): light nav links */
body.x-body.x-header-dark .site-main-nav a {
  color: rgba(248, 250, 252, 0.9);
}
body.x-body.x-header-dark .site-main-nav a:hover,
body.x-body.x-header-dark .site-main-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
body.x-body.x-header-dark.x-accent-cyan .site-main-nav a[aria-current="page"] {
  background: #22d3ee;
  color: #020617;
}
body.x-body.x-header-dark.x-accent-violet .site-main-nav a[aria-current="page"] {
  background: #a78bfa;
  color: #111827;
}

/* Privacy / terms: sticky top + nav on dark */
body.legal-shell > .x-top {
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
  background: #0f172a;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
body.legal-shell .x-inner.site-hf-row {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}
body.legal-shell .site-logo {
  color: #f8fafc;
}
body.legal-shell .site-logo-sub {
  color: #cbd5e1;
  opacity: 0.95;
}
body.legal-shell .site-main-nav a {
  color: rgba(248, 250, 252, 0.9);
}
body.legal-shell .site-main-nav a:hover,
body.legal-shell .site-main-nav a:focus-visible {
  background: rgba(56, 189, 248, 0.16);
  color: #fff;
}
body.legal-shell .site-main-nav a[aria-current="page"] {
  background: rgba(56, 189, 248, 0.24);
  color: #fff;
}

/* Home: quick links to hub sections (wraps under hero / in content columns) */
.site-home-hub-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 1.25rem;
  margin-bottom: 0;
  padding: 0 1rem 1.75rem;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.site-home-hub-row .u-btn {
  margin: 0;
  text-transform: none;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
}

.site-home-hub-row--left {
  justify-content: flex-start;
  padding-left: 0;
  padding-right: 0;
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

.site-home-hub-row--mid {
  margin-top: 1.75rem;
}

@media (max-width: 575px) {
  .site-home-hub-row .u-btn {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
    justify-content: center;
  }

  .site-home-hub-row--left .u-btn {
    flex: 1 1 auto;
  }
}
