/* ================================================================
   HEADER.CSS — GetOnData.io
   Ported from the React build's navbar.css. Class names are unchanged
   so this is a near 1:1 port; see inc/nav-walker.php for the PHP that
   emits this exact markup from a WordPress nav menu.
   ================================================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #FFFFFF;
  transition: background-color 0.3s ease-in-out;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.05);
}

.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 40px;
  height: 80px;
}

.header__logo { display: flex; align-items: center; justify-content: flex-start; text-decoration: none; flex-shrink: 0; }
.header__logo img { height: 39px; object-fit: contain; display: block; vertical-align: middle; }

.header__nav { display: flex; align-items: center; justify-content: center; gap: 48px; }

.header__nav-link {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  color: #131D4F;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
  transition: color 0.15s ease;
}

.header__nav-link:hover { color: #000000; text-decoration: none; }

.header__cta-wrap { display: flex; align-items: center; justify-content: flex-end; }

.header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #336CE6;
  color: #FFFFFF;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  padding: 13px 26px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
  line-height: 1;
}

.header__cta:hover { background-color: #2558CC; text-decoration: none; }

.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.header__burger:hover { background: rgba(19, 29, 79, 0.06); }

.header__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #131D4F;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.header__burger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger--open span:nth-child(2) { opacity: 0; }
.header__burger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile drawer ───────────────────────────────────────────── */
/* Always present in the DOM now (server-rendered), toggled via the
   `hidden` attribute in navigation.js rather than React conditional
   rendering — these two overrides make sure `hidden` actually wins. */
.header__mobile[hidden] { display: none; }
.mobile-services__panel[hidden] { display: none; }

.header__mobile {
  background-color: #F3F3F3;
  border-top: 1px solid rgba(19, 29, 79, 0.08);
  padding: 12px 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header__mobile-link,
.header__mobile .header__nav-link {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #131D4F;
  padding: 11px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.header__mobile-link:hover,
.header__mobile .header__nav-link:hover { background: rgba(19, 29, 79, 0.05); color: #000000; }

.header__mobile-cta { align-self: flex-start; margin-top: 10px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 1160px) {
  .header__nav { gap: 32px; }
  .header__nav-link { font-size: 16px; }
}

@media (max-width: 980px) {
  .header__nav { gap: 20px; }
  .header__nav-link { font-size: 15px; }
  .header__inner { padding: 0 24px; }
}

@media (max-width: 820px) {
  .header__inner { grid-template-columns: 1fr auto; gap: 0; }
  .header__nav { display: none; }
  .header__cta-wrap { display: flex; }
  .header__cta-wrap > .header__cta { display: none; }
  .header__burger { display: flex; }
}

@media (max-width: 480px) {
  .header__inner { padding: 0 20px; height: 68px; }
  .header__logo img { height: 38px; }
  .header__mobile { padding: 12px 20px 16px; }
}

/* ================================================================
   SERVICES MEGA MENU — Desktop hover dropdown
   ================================================================ */

.nav-services { position: relative; align-self: stretch; display: flex; align-items: center; }

.nav-services__trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  color: #131D4F;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.nav-services:hover .nav-services__trigger { color: #336CE6; }

.nav-services__trigger:focus-visible {
  outline: 2px solid #336CE6;
  outline-offset: 3px;
  border-radius: 4px;
}

.nav-services__chevron { width: 12px; height: 8px; flex-shrink: 0; transition: transform 0.2s ease; }
.nav-services:hover .nav-services__chevron { transform: rotate(180deg); }

.nav-services__panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 200;
}

.nav-services:hover .nav-services__panel { opacity: 1; visibility: visible; pointer-events: auto; }

.nav-services__sub-link {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #131D4F;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-services__sub-link:hover { background: rgba(51, 108, 230, 0.07); color: #336CE6; text-decoration: none; }

.nav-services__sub-link:focus-visible {
  outline: 2px solid #336CE6;
  outline-offset: -2px;
  border-radius: 6px;
}

@media (max-width: 1160px) { .nav-services__trigger { font-size: 16px; } }
@media (max-width: 980px)  { .nav-services__trigger { font-size: 15px; } }
@media (max-width: 820px)  { .nav-services { display: none; } }

/* ================================================================
   MOBILE SERVICES ACCORDION — inside the drawer
   ================================================================ */

.mobile-services { display: flex; flex-direction: column; }

.mobile-services__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.mobile-services__chevron { width: 12px; height: 8px; flex-shrink: 0; color: #131D4F; transition: transform 0.2s ease; }
.mobile-services__chevron--open { transform: rotate(180deg); }

.mobile-services__panel { display: flex; flex-direction: column; gap: 0; }

.mobile-services__child { padding-left: 40px; color: #336CE6; font-size: 15px; }
