/* ===== SITE-HEADER ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: transform 0.35s var(--ease-out);
}

.site-header--contacts-hidden {
  transform: translateY(var(--bar-offset, 0px));
}

/* -- Contact bar (light theme — see interactions.css for glass override) -- */
.contact-bar {
  background: linear-gradient(180deg, rgba(241,246,255,.92), rgba(241,246,255,.74));
  border-bottom: 1px solid rgba(37, 99, 235, 0.10);
}

.contact-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  gap: 24px;
}

.contact-bar__group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.contact-bar__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-bar__phone {
  color: var(--c-text);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.contact-bar__phone:hover {
  color: var(--c-primary);
  text-decoration: none;
}

.contact-bar__label {
  color: #94a3b8;
  font-size: 11px;
}

/* -- Socials -- */
.socials {
  display: flex;
  gap: 6px;
  align-items: center;
}

.socials__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  transition: transform 0.2s ease;
}

.socials__link:hover {
  transform: scale(1.15);
  text-decoration: none;
}

.socials__link--wa {
  background: #25d366;
}

.socials__link--wa:hover {
  background: #20bd5a;
}

.socials__link--tg {
  background: #2aabee;
}

.socials__link--tg:hover {
  background: #229ed9;
}

/* -- Navbar -- */
.navbar {
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  gap: 16px;
}

.logo {
  flex-shrink: 0;
}

.logo a,
.logo .custom-logo-link,
.logo .logo__default-link {
  display: block;
  align-items: center;
}

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

.logo a:hover {
  text-decoration: none;
}

/* WordPress Dynamic Menu */
.nav-menu {
  display: flex;
  gap: 4px;
  align-items: center;
  list-style: none;
}

.nav-menu li {
  list-style: none;
  position: relative;
}

.nav-menu a,
.nav-menu li a {
  color: var(--c-text);
  font-weight: 500;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu li a:hover {
  background: rgba(37, 99, 235, 0.06);
  color: var(--c-primary);
  text-decoration: none;
}

.nav-menu .current-menu-item>a,
.nav-menu .current_page_item>a {
  color: var(--c-primary);
  background: rgba(37, 99, 235, 0.08);
}

/* Sub-menu: desktop rules in interactions.css, mobile in @media below */
.nav-menu .sub-menu {
  display: none;
  list-style: none;
}

.nav-menu .sub-menu li {
  position: relative;
}

.submenu-toggle {
  display: none;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle__bar {
  display: block;
  position: absolute;
  left: 8px;
  width: 24px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.nav-toggle__bar:nth-child(1) { top: 12px; }
.nav-toggle__bar:nth-child(2) { top: 19px; }
.nav-toggle__bar:nth-child(3) { top: 26px; }

.nav-toggle.is-active .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.is-active .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* WP admin bar fix */
body.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .site-header {
    display: flex;
    flex-direction: column;
    background: #fff;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
  }

  /* Force Contact Bar to be on top of content but under menu */
  .contact-bar {
    order: -1;
    background: #f8fafc;
    border-bottom: 1px solid var(--c-border);
    position: static;
  }

  .navbar {
    order: 0;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    position: static;
  }

  .contact-bar__inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
    padding: 12px 16px;
  }

  .contact-bar__group {
    align-items: center;
    text-align: center;
  }

  .contact-bar__group:last-of-type {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .site-header .btn--consult {
    display: flex;
    width: 100%;
    margin: 8px 0;
    justify-content: center;
    background: var(--c-primary);
    color: #fff !important;
  }

  /* ── Mobile drawer menu ── */
  ul#nav-menu.nav-menu {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: min(420px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    background: #fff !important;
    padding: 100px 24px 40px !important;
    border-left: 1px solid var(--c-border) !important;
    border-radius: 24px 0 0 24px !important;
    box-shadow: -24px 0 56px rgba(15, 23, 42, 0.16) !important;
    overflow-y: auto !important;
    z-index: 99999 !important;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    visibility: hidden;
  }

  ul#nav-menu.nav-menu.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  ul#nav-menu.nav-menu>li {
    display: block;
    position: static;
    margin-bottom: 2px;
  }

  ul#nav-menu.nav-menu .menu-item-has-children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  ul#nav-menu.nav-menu .menu-item-has-children>a {
    flex: 1;
    min-width: 0;
  }

  ul#nav-menu.nav-menu .menu-item-has-children>.sub-menu {
    flex-basis: 100%;
  }

  ul#nav-menu.nav-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
  }

  /* Close button inside drawer */
  .nav-drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--c-surface);
    border-radius: 50%;
    cursor: pointer;
    color: var(--c-text);
    transition: background 0.2s, color 0.2s;
    z-index: 1;
  }

  .nav-drawer-close:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--c-primary);
  }

  /* Overlay behind drawer */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
  }

  .nav-overlay.is-active {
    display: block;
  }

  /* Prevent body scroll when drawer open — use fixed to prevent layout shift */
  body.menu-open {
    position: fixed;
    width: 100%;
    overflow-y: scroll;
    /* keep scrollbar visible to prevent shift */
  }

  /* Mobile submenus: open inline below parent */
  .nav-menu .sub-menu,
  .nav-menu li:hover>.sub-menu {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    padding: 2px 0 2px 14px;
    min-width: 0;
    background: transparent;
  }

  .nav-menu .sub-menu.is-open,
  .nav-menu li:hover>.sub-menu.is-open {
    display: block;
  }

  .nav-menu .sub-menu .sub-menu {
    position: static;
    top: auto;
    left: auto;
    padding-left: 14px;
  }

  .nav-menu .sub-menu a {
    white-space: normal;
    font-size: 13px;
    padding: 8px 12px;
  }

  /* Submenu toggle arrow */
  .nav-menu .submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.25s, background 0.2s;
    margin-left: 6px;
  }

  .nav-menu .submenu-toggle.is-open {
    transform: rotate(180deg);
    background: rgba(37, 99, 235, 0.06);
    border-color: var(--c-primary);
  }

  /* Show burger icon on mobile */
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
