/**
 * IO4ALL Header & Menu - frontend styles.
 *
 * Scoped under `.io4all-header-menu` to avoid collisions with theme styles. Colors
 * come from the settings via CSS custom properties set inline on the wrapper.
 */

.io4all-header-menu {
  --io4all-navy-950: #0a2036;
  --io4all-navy-900: #0e2c4a;
  --io4all-navy-800: #153a5e;
  --io4all-ink-soft: #57677a;
  --io4all-line: #e3e8ed;
  --io4all-white: #ffffff;
  --io4all-red-600: #c8102e;
  --io4all-red-700: #a50c25;
  --io4all-gold-500: #e8b93a;
  --io4all-whats-hover: #176e46;
  --io4all-shadow-sm: 0 1px 2px rgba(14, 27, 38, 0.06), 0 1px 1px rgba(14, 27, 38, 0.04);
  --io4all-shadow-md: 0 8px 24px rgba(14, 27, 38, 0.08);
  --io4all-maxw: 1200px;
  --io4all-ff-display: "Plus Jakarta Sans", sans-serif;
  --io4all-ff-body: "Inter", sans-serif;

  --io4all-topbar-bg: #0a2036;
  --io4all-header-bg: #ffffff;
  --io4all-nav-text: #153a5e;
  --io4all-accent: #c8102e;
  --io4all-accent-dark: #a50c25;
  --io4all-whats-bg: #1e8e5a;
  --io4all-drawer-bg: #ffffff;

  font-family: var(--io4all-ff-body);
  box-sizing: border-box;
}

.io4all-header-menu *,
.io4all-header-menu *::before,
.io4all-header-menu *::after {
  box-sizing: border-box;
}

.io4all-header-menu a {
  color: inherit;
  text-decoration: none;
}

.io4all-header-menu .container {
  max-width: var(--io4all-maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.io4all-header-menu .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--io4all-ff-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
  white-space: nowrap;
  line-height: 1.2;
}
.io4all-header-menu .btn:hover {
  transform: translateY(-1px);
}
.io4all-header-menu .btn-primary {
  background: var(--io4all-accent);
  color: #fff;
  box-shadow: var(--io4all-shadow-sm);
}
.io4all-header-menu .btn-primary:hover {
  background: var(--io4all-accent-dark);
  box-shadow: var(--io4all-shadow-md);
}
.io4all-header-menu .btn-outline {
  background: transparent;
  border-color: var(--io4all-navy-900);
  color: var(--io4all-navy-900);
}
.io4all-header-menu .btn-outline:hover {
  background: var(--io4all-navy-950);
  color: #fff;
}
.io4all-header-menu .btn-whats {
  background: var(--io4all-whats-bg);
  color: #fff;
}
.io4all-header-menu .btn-whats:hover {
  background: var(--io4all-whats-hover);
}
.io4all-header-menu .btn-sm {
  padding: 9px 18px;
  font-size: 13px;
  border-radius: 999px;
}

/* ---------- Topbar ---------- */
.io4all-header-menu .topbar {
  background: var(--io4all-topbar-bg);
  color: #cfd9e3;
  font-size: 12px;
}
.io4all-header-menu .topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
}
.io4all-header-menu .brflag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--io4all-white);
}
.io4all-header-menu .brflag svg {
  flex: none;
}
.io4all-header-menu .topbar .topbar-contact {
  color: #cfd9e3;
}

/* ---------- Header ---------- */
.io4all-header-menu header.site {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--io4all-header-bg);
  border-bottom: 1px solid transparent;
  transition:
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.io4all-header-menu header.site.scrolled {
  box-shadow: var(--io4all-shadow-md);
  border-color: var(--io4all-line);
}
.io4all-header-menu--static header.site {
  position: relative;
  top: auto;
}
.io4all-header-menu .nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.io4all-header-menu .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--io4all-ff-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--io4all-navy-950);
}
.io4all-header-menu .logo img {
  max-width: 200px;
  height: 48px;
  width: auto;
  display: block;
}
.io4all-header-menu .logo .logo-text {
  font-size: 1em;
  line-height: 1.2;
  white-space: nowrap;
}

/* ---------- Desktop nav ---------- */
.io4all-header-menu .main-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.io4all-header-menu .main-menu > li {
  margin: 0;
}
.io4all-header-menu .main-menu a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--io4all-nav-text);
  position: relative;
  padding: 6px 0;
  display: inline-block;
}
.io4all-header-menu .main-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--io4all-accent);
  transition: width 0.2s ease;
}
.io4all-header-menu .main-menu a:hover::after {
  width: 100%;
}

/* ---------- Nav actions ---------- */
.io4all-header-menu .nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.io4all-header-menu .icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--io4all-line);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--io4all-navy-900);
  cursor: pointer;
  padding: 0;
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s;
}
.io4all-header-menu .icon-btn:hover {
  background: var(--io4all-navy-950);
  color: #fff;
  border-color: var(--io4all-navy-950);
}
.io4all-header-menu .burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--io4all-line);
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: var(--io4all-navy-900);
}
@media (max-width: 980px) {
  .io4all-header-menu .main-menu {
    display: none;
  }
  .io4all-header-menu .nav-actions .hide-mobile {
    display: none;
  }
  .io4all-header-menu .burger {
    display: flex;
  }
}

/* ---------- Mobile drawer ---------- */
.io4all-header-menu .drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 32, 54, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 150;
}
.io4all-header-menu .drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}
.io4all-header-menu .drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 82%;
  max-width: 340px;
  background: var(--io4all-drawer-bg);
  z-index: 151;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 28px 26px;
  overflow-y: auto;
}
.io4all-header-menu .drawer.open {
  transform: translateX(0);
}
.io4all-header-menu .drawer-close {
  float: right;
}
.io4all-header-menu .drawer nav {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  clear: both;
}
.io4all-header-menu .drawer nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.io4all-header-menu .drawer nav a {
  font-size: 18px;
  font-weight: 700;
  color: var(--io4all-navy-950);
}
.io4all-header-menu .drawer .drawer-actions {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Fixed header spacer ---------- */
.io4all-header-menu .io4all-header-menu-spacer {
  display: none;
}
.io4all-header-menu--fixed .io4all-header-menu-spacer {
  display: block;
  height: 110px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .io4all-header-menu *,
  .io4all-header-menu *::before,
  .io4all-header-menu *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
