:root {
  /* Paleta AFA */
  --afa-azul-1: #025993;
  --afa-azul-2: #003666;
  --afa-azul-3: #003259;
  --afa-azul-acento: #0082cf;
  --afa-cyan: #40e9e5;
  --afa-blanco: #ffffff;

  --afa-naranja-1: #ff8826;
  --afa-naranja-2: #ff9f57;
  --afa-rojo-1: #fd5459;
  --afa-rojo-2: #ff7b80;

  --afa-cyan-soft: #8bd7e2;
  --afa-cyan-extra-soft: #c8fafd;

  --afa-focus: rgba(64, 233, 229, 0.7);

  --afa-sans: "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --btn-h: 44px;
  --btn-fz: 0.95rem;
  --btn-pad-x: 20px;
}

/* Reset básico para consistencia */
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--afa-sans);
}

/* Link "saltar al contenido" accesible */
.afa-skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.afa-skip:focus-visible {
  left: 16px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: var(--afa-blanco);
  color: var(--afa-azul-3);
  border-radius: 8px;
  box-shadow: 0 0 0 3px var(--afa-focus);
  z-index: 10002;
}

/* Barra principal */
.afa-barra {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 10000;
  background: linear-gradient(
    135deg,
    var(--afa-azul-2) 0%,
    var(--afa-azul-1) 40%,
    var(--afa-azul-3) 100%
  );
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

/* Layout del header */
.afa-header {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 10px 22px;
  color: var(--afa-blanco);
}

/* Logo */
.afa-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.afa-logo {
  padding: 0 10px;
  max-height: 60px;
  max-width: 260px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Navegación */
.afa-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  margin-left: auto;
  flex: 1 1 auto;
}

.afa-menu {
  display: block;
}

.afa-menu-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.afa-menu-list > li {
  display: flex;
  align-items: center;
}

.afa-menu-list a {
  display: block;
  color: var(--afa-blanco);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 18px;
  border-radius: 999px;
  position: relative;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    transform 0.18s ease;
}

.afa-menu-list a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  width: 0;
  background: var(--afa-cyan);
  transition: width 0.22s ease;
}

.afa-menu-list a:hover {
  color: var(--afa-cyan-soft);
  transform: translateY(-1px);
  background-color: rgba(64, 233, 229, 0.09);
}

.afa-menu-list a:hover::after {
  width: calc(100% - 32px);
}

/* Estado activo */
.afa-menu-list a[aria-current="page"],
.afa-menu-list .current-menu-item > a {
  color: var(--afa-cyan-extra-soft);
  background-color: rgba(0, 130, 207, 0.35);
}
.afa-menu-list a[aria-current="page"]::after,
.afa-menu-list .current-menu-item > a::after {
  width: calc(100% - 32px);
}

/* Foco accesible */
.afa-menu-list a:focus-visible,
.afa-toggle:focus-visible,
.afa-btn-donar:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--afa-focus);
}

/* Toggle menú (móvil) */
.afa-toggle {
  display: none;
  font-size: 26px;
  color: var(--afa-blanco);
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

/* CTA Donar (desktop) */
.afa-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Botón Donar — versión limpia, corporativa */
.afa-cta > .afa-btn-donar {
  all: unset;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: var(--btn-h) !important;
  padding: 0 var(--btn-pad-x) !important;
  font-family: var(--afa-sans) !important;
  font-size: var(--btn-fz) !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  text-decoration: none !important;

  background: linear-gradient(
    135deg,
    var(--afa-azul-1),
    var(--afa-azul-2)
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25) !important;

  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    filter 0.2s ease !important;
}

.afa-cta > .afa-btn-donar:hover {
  transform: translateY(-1px) !important;
  background: linear-gradient(
    135deg,
    var(--afa-azul-acento),
    var(--afa-azul-2)
  ) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28) !important;
  filter: saturate(1.02) !important;
}

/* CTA móvil dentro del menú */
.afa-menu-cta {
  display: none;
  margin-top: 18px;
}

.afa-menu-cta .afa-btn-donar {
  all: unset;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--btn-h) !important;
  padding: 0 var(--btn-pad-x) !important;
  font-family: var(--afa-sans) !important;
  font-size: var(--btn-fz) !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  text-decoration: none !important;

  background: linear-gradient(
    135deg,
    var(--afa-azul-1),
    var(--afa-azul-2)
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2) !important;

  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    filter 0.2s ease !important;
}

.afa-menu-cta .afa-btn-donar:hover {
  transform: translateY(-1px) !important;
  background: linear-gradient(
    135deg,
    var(--afa-azul-acento),
    var(--afa-azul-2)
  ) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25) !important;
  filter: saturate(1.02) !important;
}

/* Overlay para menú móvil */
.afa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}
.afa-overlay.show {
  opacity: 1;
  visibility: visible;
}
.afa-overlay[hidden] {
  display: none;
}

/* Ancla para "saltar al contenido" */
.afa-anchor {
  position: relative;
  scroll-margin-top: 90px;
}

/* Responsive */
@media (max-width: 1024px) {
  .afa-menu-list a {
    padding: 10px 14px;
  }
}

@media (max-width: 768px) {
  .afa-toggle {
    display: block;
  }

  .afa-cta {
    display: none;
  }

  .afa-menu-cta {
    display: block;
  }

  .afa-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 290px;
    max-width: 82%;
    height: 100vh;
    background: linear-gradient(
      180deg,
      var(--afa-azul-3),
      #001b33
    );
    padding: 80px 22px 24px;
    transition: right 0.28s ease;
    z-index: 10001;
    box-shadow: -10px 0 22px rgba(0, 0, 0, 0.35);
  }

  .afa-menu.open {
    right: 0;
  }

  .afa-menu-list {
    flex-direction: column;
    gap: 6px;
  }

  .afa-menu-list a {
    border-radius: 10px;
    width: 100%;
  }
}

/* Preferencias de sistema */
@media (prefers-color-scheme: dark) {
  .afa-barra {
    background: linear-gradient(
      140deg,
      #003259,
      #001d36
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
