/* =========================================================
   Shared site header + footer support for standalone pages
   (industry pages) that do not load index.css.
   NAVBAR block is a copy of the NAVBAR START..END section of index.css —
   keep the two in sync when the navbar changes.
   ========================================================= */
/* ===== NAVBAR START ===== */

#header {
  --blue: #074b88;
  --orange: #fca918;
  --line: #dce9f3;
}

/* Zero-specificity reset so it never overrides the rules below */
:where(#header, #header *) {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------- Skip link ---------- */
.skip {
  position: fixed;
  top: -80px;
  left: 20px;
  background: #074b88;
  color: #fff;
  padding: 10px 16px;
  z-index: 10001;
  text-decoration: none;
}

.skip:focus {
  top: 20px;
}

/* ---------- Header bar ---------- */
#header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: 0.3s;
  line-height: 1.65;
}

#header.scrolled {
  border-color: var(--line);
  box-shadow: 0 10px 30px rgba(7, 75, 136, 0.07);
}

/* Mobile landscape: hide header on scroll down, show on scroll up */
@media (orientation: landscape) and (max-height: 500px) {
  #header.landscape-header-hidden {
    transform: translateY(-100%);
  }
}

#header a {
  text-decoration: none;
  color: inherit;
}

#header .wrap {
  width: min(1298px, calc(100% - 40px));
  margin: auto;
}

#header .nav {
  position: relative;
  height: 80px;
  display: flex;
  align-items: center;
  gap: 28px;
}

/* ---------- Logo ---------- */
#header .logo {
  display: inline-flex;
  align-items: center;
}

#header .logo img {
  display: block;
  width: 150px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Font Awesome may load async: reserve icon width so the nav doesn't shift */
#header i[class*="fa-"] {
  display: inline-block;
  min-width: 1em;
}

/* ---------- Desktop nav ---------- */
#header #nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 30px;
}

#header #nav a {
  font-family: "Poppins", "Poppins Fallback", sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #111111;
}

#header #nav a:hover {
  color: var(--blue);
}

#header .drop-btn i {
  font-size: 10px;
  margin-left: 4px;
}

#header .nav-cta,
#header .mobile-demo {
  background: var(--blue);
  color: #fff;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

#header #nav a.mobile-demo {
  color: #fff;
}

#header .menu,
#header .mobile-demo {
  display: none;
}

/* ---------- Dropdowns (Solutions / Resources) ---------- */
#header .dropdown {
  position: relative;
}

#header .dropdown-content {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  width: 700px;
  max-width: 90vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s,
    visibility 0.2s;
}

/* Invisible bridge so the menu stays open while the cursor moves down */
#header .dropdown-content::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

#header .dropdown-content.resources-dropdown {
  width: 220px;
  grid-template-columns: 1fr;
  padding: 12px;
}

#header .dropdown.show > .dropdown-content,
#header .dropdown:focus-within > .dropdown-content {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (min-width: 993px) and (hover: hover) {
  #header .dropdown:hover > .dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

#header .menu-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#header .menu-column a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
}

#header .menu-column a:hover {
  background: #f1f6fb;
}

#header .menu-column a img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Font Awesome icons inside the dropdown (e.g. Asset Management, Blogs) */
#header .menu-column a i {
  width: 22px;
  text-align: center;
  color: var(--blue);
  flex-shrink: 0;
}

#header .resources-dropdown .menu-column a {
  white-space: nowrap;
}

/* Industries: items two per row (2 x 2) on desktop, one column on mobile */
#header .dropdown-content.industries-dropdown {
  width: 440px;
}

#header .industries-dropdown .menu-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

@media (max-width: 992px) {
  #header .dropdown-content.industries-dropdown {
    width: 100%;
  }

  #header .industries-dropdown .menu-column {
    grid-template-columns: 1fr;
  }
}

/* ---------- Tablet & mobile (<= 992px) ---------- */
@media (max-width: 992px) {
  #header .menu {
    display: grid;
    place-items: center;
    margin-left: auto;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 9px;
    color: var(--blue);
    font: inherit;
    cursor: pointer;
  }

  #header .nav-cta {
    display: none;
  }

  /* Collapsed menu panel - JS toggles the "open" class */
  #header #nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    width: 100%;
    margin-left: 0;
    padding: 20px;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 14px 30px rgba(7, 75, 136, 0.1);
  }

  #header #nav.open {
    display: flex;
  }

  #header .mobile-demo {
    display: block;
    text-align: center;
  }

  /* Dropdowns become inline accordions */
  #header .dropdown-content,
  #header .dropdown-content.resources-dropdown {
    display: none;
    position: static;
    transform: none;
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    border-radius: 10px;
    box-shadow: none;
  }

  #header .dropdown-content::before {
    display: none;
  }

  #header .dropdown.show > .dropdown-content {
    display: grid;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 600px) {
  #header .wrap {
    width: min(100% - 28px, 1298px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #header,
  #header * {
    transition: none !important;
  }
}

/* ===== NAVBAR END ===== */

/* Header is position: fixed — keep in-page anchors clear of it */
html {
  scroll-padding-top: 96px;
}

/* Footer reset: other pages get this from index.css (* { margin: 0; padding: 0 }).
   Zero specificity, so footer.css spacing still wins — e.g. keeps the copyright
   and Privacy Policy on one line instead of the <p> keeping its default margin. */
:where(.footer, .footer *) {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Footer mobile rules (same as responsive.css; footer.css has none) */
@media (max-width: 992px) {
  .footer .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

/* WhatsApp floating button (copy of the .scroll-top / #whatsappChat rules in index.css) */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 8px 24px #0b1e2e40;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  text-decoration: none;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  animation: whatsapp-bounce 2.6s ease-in-out infinite;
}

/* Always visible — some page stylesheets (asset-management.css) hide .scroll-top
   until a back-to-top script adds .show, which never happens for this button. */
#whatsappChat {
  opacity: 1;
  visibility: visible;
}

.scroll-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #25d366;
  z-index: -1;
  animation: whatsapp-pulse 2.2s ease-out infinite;
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px #0b1e2e4d;
  animation-play-state: paused;
}

.scroll-top i {
  color: #fff;
  font-size: 28px;
}

@keyframes whatsapp-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}

@keyframes whatsapp-bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-8px);
  }

  60% {
    transform: translateY(-4px);
  }
}
