/* ==========================================================================
   Planet Security & Data: site header
   --------------------------------------------------------------------------
   Loaded on every page straight after style.css (render-blocking), so the
   header is laid out correctly from the very first paint on every device.

   Layouts
     Desktop  1024px and up   Info strip / brand bar / navigation row.
                              A slim sticky navigation bar appears on scroll.
     Tablet   768 to 1023px   Info strip + compact brand bar
                              (logo, call action, menu button).
     Mobile   up to 767px     One compact bar (logo, call action, menu button).

   Brand palette: #04040b dark, #66c14b green, #0a82ef blue, #1e9687 teal.
   ========================================================================== */

.main-header {
  position: relative;
  z-index: 999;
  width: 100%;
}

.main-header ul,
.main-header li,
.main-header figure {
  margin: 0;
}

/* --------------------------------------------------------------------------
   1. Info strip (green)
   -------------------------------------------------------------------------- */

.header-top {
  position: relative;
  background-color: #66c14b;
  padding: 8px 0;
}

.header-top .top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-top .info {
  display: flex;
  align-items: center;
}

.header-top .info li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  font-family: "Montserrat Alternates", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  white-space: nowrap;
  color: #04040b;
}

.header-top .info li:first-child {
  padding-left: 0;
}

.header-top .info li:last-child {
  padding-right: 0;
}

.header-top .info li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 16px;
  margin-top: -8px;
  background-color: rgba(4, 4, 11, 0.28);
}

.header-top .info li i {
  display: inline-block;
  width: 16px;
  font-size: 16px;
  line-height: 1;
  text-align: center;
}

/* --------------------------------------------------------------------------
   2. Brand bar (dark): logo and contact details
   -------------------------------------------------------------------------- */

.header-upper {
  position: relative;
  background-color: #04040b;
}

.header-upper .upper-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 96px;
}

.main-header .logo {
  flex: 0 0 auto;
  line-height: 0;
}

.main-header .logo a {
  display: inline-block;
}

.main-header .logo img {
  display: block;
  width: 162px;
  height: auto;
}

.header-upper .info-list {
  display: flex;
  align-items: center;
}

.header-upper .info-list li {
  position: relative;
  padding-left: 32px;
  margin-left: 32px;
}

.header-upper .info-list li:first-child {
  padding-left: 0;
  margin-left: 0;
}

.header-upper .info-list li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 44px;
  margin-top: -22px;
  background-color: rgba(255, 255, 255, 0.16);
}

.header-upper .info-list a {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "icon label"
    "icon value";
  align-items: center;
  column-gap: 14px;
  color: #ffffff;
}

.header-upper .info-list i {
  grid-area: icon;
  display: block;
  width: 36px;
  height: 36px;
  font-size: 36px;
  line-height: 1;
  text-align: center;
  color: #0a82ef;
  transition: color 300ms ease;
}

.header-upper .info-label {
  grid-area: label;
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.68);
}

.header-upper .info-value {
  grid-area: value;
  font-family: "Montserrat Alternates", sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  color: #ffffff;
  transition: color 300ms ease;
}

.header-upper .info-list a:hover .info-value,
.header-upper .info-list a:focus-visible .info-value {
  color: #66c14b;
}

.header-upper .info-list a:hover i,
.header-upper .info-list a:focus-visible i {
  color: #66c14b;
}

/* Short "Call" label: only used by the compact mobile call button */
.header-upper .info-short {
  display: none;
}

/* Menu button: only shown on tablet and mobile */
.main-header .mobile-nav-toggler {
  display: none;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition: border-color 300ms ease, background-color 300ms ease;
}

.main-header .mobile-nav-toggler .icon-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background-color: #ffffff;
}

.main-header .mobile-nav-toggler:hover {
  border-color: #66c14b;
  background-color: rgba(102, 193, 75, 0.1);
}

/* --------------------------------------------------------------------------
   3. Navigation row (white) and sticky navigation bar
   -------------------------------------------------------------------------- */

.header-lower {
  position: relative;
  background-color: #ffffff;
  border-bottom: 1px solid #ececec;
  box-shadow: 0 8px 20px rgba(4, 4, 11, 0.04);
}

.header-lower .outer-box,
.sticky-header .outer-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.main-header .menu-area {
  flex: 1 1 auto;
  min-width: 0;
}

.main-header .main-menu {
  float: none;
}

.main-header .main-menu .navbar-collapse {
  display: block !important;
  padding: 0;
}

.main-header .main-menu .navigation {
  display: flex;
  align-items: center;
  margin: 0;
}

.main-header .main-menu .navigation > li {
  position: relative;
  float: none;
  margin: 0;
  padding: 0;
}

.main-header .main-menu .navigation > li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 20px;
  margin-top: -10px;
  background-color: #e3e3e3;
}

.main-header .main-menu .navigation > li > a {
  position: relative;
  display: block;
  padding: 20px 20px;
  font-family: "Montserrat Alternates", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  white-space: nowrap;
  color: #111111;
  transition: color 300ms ease;
}

.main-header .main-menu .navigation > li:first-child > a {
  padding-left: 0;
}

/* Current page: green bar under the item, text stays dark for legibility */
.main-header .main-menu .navigation > li > a::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background-color: #66c14b;
  transform: scaleX(0);
  transition: transform 300ms ease;
}

.main-header .main-menu .navigation > li:first-child > a::after {
  left: 0;
}

.main-header .main-menu .navigation > li.dropdown > a::after {
  right: 34px;
}

.main-header .main-menu .navigation > li.current > a::after {
  transform: scaleX(1);
}

.main-header .main-menu .navigation > li.is-open > a,
.main-header .main-menu .navigation > li > a:focus-visible {
  color: #4fa335;
}

@media (hover: hover) {
  .main-header .main-menu .navigation > li:hover > a {
    color: #4fa335;
  }
}

/* Dropdown arrow */
.main-header .main-menu .navigation > li.dropdown > a {
  padding-right: 34px;
}

.main-header .main-menu .navigation > li.dropdown > a::before {
  content: "\e94f";
  position: absolute;
  right: 16px;
  top: 50%;
  margin-top: -6px;
  font-family: "icomoon";
  font-size: 11px;
  font-weight: 400;
  line-height: 12px;
  transition: transform 300ms ease;
}

.main-header .main-menu .navigation > li.dropdown.is-open > a::before {
  transform: rotate(180deg);
}

.main-header .main-menu .navigation > li.dropdown:has(:focus-visible):not(.is-dismissed) > a::before {
  transform: rotate(180deg);
}

@media (hover: hover) {
  .main-header .main-menu .navigation > li.dropdown:hover:not(.is-dismissed) > a::before {
    transform: rotate(180deg);
  }
}

/* Dropdown panel position (panel styling itself stays in style.css) */
.main-header .main-menu .navigation > li > ul {
  left: 0;
  top: 100%;
  box-shadow: 0 16px 34px rgba(4, 4, 11, 0.12);
}

.main-header .main-menu .navigation > li:first-child > ul {
  left: -20px;
}

.main-header .header-lower .btn-box,
.main-header .sticky-header .btn-box {
  flex: 0 0 auto;
}

.main-header .header-lower .theme-btn,
.main-header .sticky-header .theme-btn {
  padding: 11px 26px;
  font-size: 15px;
  line-height: 24px;
}

/* Sticky navigation bar (shown by script.js after 180px of scrolling) */
.sticky-header {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 0;
  opacity: 0;
  visibility: hidden;
  background-color: #ffffff;
  border-bottom: 1px solid #ececec;
  box-shadow: 0 10px 30px rgba(4, 4, 11, 0.08);
  transition: opacity 300ms ease, visibility 300ms ease;
}

.fixed-header .sticky-header {
  z-index: 999;
  opacity: 1;
  visibility: visible;
  animation: site-header-drop 400ms ease-out 1;
}

.sticky-header .logo img {
  width: 118px;
}

.sticky-header .main-menu .navigation > li > a {
  padding-top: 18px;
  padding-bottom: 18px;
}

.sticky-header .main-menu .navigation > li:first-child > a {
  padding-left: 20px;
}

.sticky-header .main-menu .navigation > li:first-child > a::after {
  left: 20px;
}

.sticky-header .main-menu .navigation > li:first-child > ul {
  left: 0;
}

.sticky-header .menu-area {
  display: flex;
  justify-content: center;
}

@keyframes site-header-drop {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   4. Focus styles (the theme removes default outlines on buttons)
   -------------------------------------------------------------------------- */

.main-header a:focus-visible,
.main-header button:focus-visible,
.mobile-menu a:focus-visible,
.mobile-menu button:focus-visible {
  outline: 2px solid #0a82ef;
  outline-offset: 2px;
}

.header-upper a:focus-visible,
.header-upper button:focus-visible,
.mobile-menu a:focus-visible,
.mobile-menu button:focus-visible {
  outline-color: #ffffff;
}

/* --------------------------------------------------------------------------
   5. Mobile menu drawer (theme drawer, with real buttons for accessibility)
   -------------------------------------------------------------------------- */

.mobile-menu .close-btn {
  width: 44px;
  height: 44px;
  right: 12px;
  top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 44px;
}

.mobile-menu .navigation li.dropdown .dropdown-btn {
  border: 0;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 16px;
}

.mobile-menu .nav-logo img {
  width: 150px;
  height: auto;
}

/* --------------------------------------------------------------------------
   6. Large laptop range: tighter navigation spacing so everything fits
   -------------------------------------------------------------------------- */

@media only screen and (min-width: 1024px) and (max-width: 1199.98px) {
  .header-top .info li {
    padding: 0 14px;
    font-size: 13px;
  }

  .header-upper .info-list li {
    padding-left: 26px;
    margin-left: 26px;
  }

  .main-header .main-menu .navigation > li > a {
    padding-left: 14px;
    padding-right: 14px;
    font-size: 15px;
  }

  .main-header .main-menu .navigation > li.dropdown > a {
    padding-right: 28px;
  }

  .main-header .main-menu .navigation > li.dropdown > a::before {
    right: 11px;
  }

  .main-header .main-menu .navigation > li > a::after {
    left: 14px;
    right: 14px;
  }

  .main-header .main-menu .navigation > li.dropdown > a::after {
    right: 28px;
  }

  .sticky-header .main-menu .navigation > li:first-child > a {
    padding-left: 14px;
  }

  .sticky-header .main-menu .navigation > li:first-child > a::after {
    left: 14px;
  }

  .sticky-header .logo {
    display: none;
  }

  .sticky-header .menu-area {
    justify-content: flex-start;
  }
}

/* --------------------------------------------------------------------------
   7. Tablet and mobile: one compact brand bar
   -------------------------------------------------------------------------- */

@media only screen and (max-width: 1023.98px) {
  /* Desktop-only rows: navigation lives in the menu drawer here */
  .header-lower,
  .sticky-header {
    display: none;
  }

  .header-top .top-inner {
    justify-content: center;
  }

  .header-top .info-audience {
    display: none;
  }

  .header-upper .upper-inner {
    gap: 16px;
    min-height: 80px;
  }

  .main-header .logo img {
    width: 144px;
  }

  .header-upper .info-list {
    margin-left: auto;
  }

  .header-upper .info-list .info-email {
    display: none;
  }

  .header-upper .info-list li.info-phone {
    padding-left: 0;
    margin-left: 0;
  }

  .header-upper .info-list li + li::before {
    display: none;
  }

  .header-upper .info-list i {
    width: 30px;
    height: 30px;
    font-size: 30px;
  }

  .main-header .mobile-nav-toggler {
    display: inline-flex;
  }
}

@media only screen and (max-width: 767.98px) {
  .header-top {
    display: none;
  }

  .header-upper .upper-inner {
    gap: 10px;
    min-height: 64px;
  }

  .main-header .logo img {
    width: 128px;
  }

  /* Call action becomes a compact outlined button */
  .header-upper .info-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px 0 13px;
    border: 1px solid rgba(102, 193, 75, 0.7);
    border-radius: 4px;
    transition: background-color 300ms ease, border-color 300ms ease;
  }

  .header-upper .info-list a:hover {
    border-color: #66c14b;
    background-color: rgba(102, 193, 75, 0.12);
  }

  .header-upper .info-list i {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: #66c14b;
  }

  .header-upper .info-label,
  .header-upper .info-value {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .header-upper .info-short {
    display: inline;
    font-family: "Montserrat Alternates", sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    color: #ffffff;
  }
}

/* --------------------------------------------------------------------------
   8. Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .fixed-header .sticky-header {
    animation: none;
  }

  .main-header *,
  .mobile-menu,
  .mobile-menu * {
    transition-duration: 0.01ms !important;
  }
}
