/* ============================================================
   Header — réplica visual de la referencia
   Mobile First: logo + CTA; navegación completa desde desktop.
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 70px;
  color: #08283e;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(4, 65, 78, 0.05);
  box-shadow: 0 1px 0 rgba(5, 44, 61, 0.02);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header__inner {
  width: min(100%, 1180px);
  height: 100%;
  margin-inline: auto;
  padding-inline: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand__image {
  width: 122px;
  height: auto;
  object-fit: contain;
}

.site-nav {
  display: none;
}

.header-cta {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  color: var(--color-navy);
  background: linear-gradient(180deg, #ffc51b 0%, #ffb700 100%);
  box-shadow: 0 7px 18px rgba(255, 183, 0, 0.22);
  font-family: var(--font-heading);
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.header-cta__icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(8, 45, 69, 0.35);
  border-radius: 50%;
  font-size: 0.95rem;
  line-height: 1;
}

.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(255, 183, 0, 0.28);
}

@media (min-width: 640px) {
  .site-header {
    height: 82px;
  }

  .site-header__inner {
    padding-inline: 28px;
  }

  .brand__image {
    width: 140px;
  }

  .header-cta {
    min-height: 44px;
    padding-inline: 20px 14px;
    font-size: 0.84rem;
  }
}

@media (min-width: 960px) {
  .site-header {
    height: 96px;
  }

  .site-header__inner {
    padding-inline: 28px;
  }

  .brand__image {
    width: 150px;
  }

  .site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(26px, 3.25vw, 43px);
    margin-inline: auto;
  }

  .site-nav a {
    position: relative;
    color: #0a2d46;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
  }

  .site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    border-radius: 99px;
    background: #00aaa5;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.16s ease;
  }

  .site-nav a:hover::after,
  .site-nav a:focus-visible::after {
    transform: scaleX(1);
  }

  .header-cta {
    min-width: 166px;
    min-height: 46px;
    padding-inline: 20px 12px;
    font-size: 0.86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-cta,
  .site-nav a::after {
    transition: none;
  }
}

/* ============================================================
   Ajuste exclusivo móvil (<640px)
   Replica el encabezado compacto de la referencia sin modificar
   los breakpoints de tablet/desktop existentes.
   ============================================================ */
@media (max-width: 639px) {
  .site-header {
    height: 58px;
    border-bottom: 1px solid rgba(8,45,69,.05);
    box-shadow: 0 2px 10px rgba(8,45,69,.04);
  }

  .site-header__inner {
    padding-inline: 14px;
    gap: 10px;
  }

  .brand {
    margin-right: auto;
  }

  .brand__image {
    width: 96px;
  }

  .header-cta {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    box-shadow: none;
    font-size: .64rem;
  }

  .header-cta__icon {
    display: none;
  }

}

/* Mobile final: margen lateral uniforme y sin desbordes. */
@media (max-width: 639px) {
  .site-header,
  .site-header__inner {
    max-width: 100%;
  }

  .site-header__inner {
    padding-inline: 18px;
    gap: 8px;
    overflow: visible;
  }

  .brand__image {
    width: 92px;
  }

  .header-cta {
    min-height: 30px;
    padding-inline: 11px;
    font-size: .6rem;
  }

}
