/* Shared site chrome: topbar, header, footer, back-to-top (all pages) */

:root {
  --radius: 16px;
  --shadow-sm: 0 6px 18px rgba(16, 43, 84, 0.08);
  --shadow-md: 0 18px 45px rgba(16, 43, 84, 0.14);
  --grad: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  --font-head: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
}

/* ---------- Bootstrap compatibility ---------- */
h3 {
  font-weight: 700;
}
body:not(.home) h1 {
  margin-bottom: 0.67em;
}
body:not(.home) h2 {
  margin-bottom: 0.83em;
}
body:not(.home) h3 {
  margin-bottom: 1em;
}
body:not(.home) .card {
  display: block;
  border-radius: 0;
  background: transparent;
}
@media (max-width: 575.98px) {
  .container {
    --bs-gutter-x: 2.5rem;
  }
}

/* ---------- Topbar ---------- */
.topbar,
header,
footer {
  font-family: var(--font-head);
}
.topbar {
  background: #0b1d39;
  padding-inline: 0;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

/* ---------- Header base (layout details in the transparent-header block below) ---------- */
header {
  z-index: 50;
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand img {
  transition: width 0.3s;
}
nav > a:not(.nav-cta),
nav summary {
  position: relative;
  padding-block: 6px;
}
nav > a.active,
nav details a.active {
  color: var(--blue);
}
nav details a.active {
  background: var(--pale);
}

/* Font Awesome chevron for dropdowns */
nav summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
nav summary::-webkit-details-marker {
  display: none;
}
nav summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 10px;
  margin-left: 0;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.25s, color 0.25s;
}
nav summary:hover::after,
nav details[open] > summary::after,
nav details.active > summary::after {
  color: var(--blue);
}
nav details[open] > summary,
nav details.active > summary {
  color: var(--blue);
}
nav details[open] > summary::after {
  transform: rotate(180deg);
}
nav details div {
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  animation: dropIn 0.2s ease-out;
}
nav details a {
  border-radius: 8px;
  transition: background 0.2s, padding 0.2s;
}
nav details a:hover {
  background: var(--pale);
  padding-left: 16px;
}
.nav-cta {
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(36, 77, 226, 0.3);
  transition: background 0.25s, transform 0.25s;
}
.nav-cta:hover {
  transform: translateY(-1px);
}
.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
}
@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ---------- Header: transparent over the hero / page banner (all pages) ---------- */
/* Top of page: no background — outlined nav pill + call link + CTA.
   On scroll / mobile menu open: the bar floats as a frosted rounded card. */
header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: auto;
  padding: 18px 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  transition: padding 0.35s;
}
header.scrolled {
  height: auto;
  padding: 10px 0;
  box-shadow: none;
}
.header-inner {
  gap: 24px;
  padding-block: 8px;
  border-radius: 20px;
  transition: background 0.35s, box-shadow 0.35s, padding 0.35s;
}
header.scrolled .header-inner,
header:has(nav.open) .header-inner {
  padding: 8px 10px 8px 22px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(16, 43, 84, 0.16);
}
.brand img {
  width: 250px;
}
header.scrolled .brand img {
  width: 250px;
}
header:not(.scrolled):not(:has(nav.open)) .brand img {
  filter: brightness(0) invert(1);
}

/* Right-hand actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.header-call {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  transition: color 0.25s;
}
.call-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--blue);
  font-size: 15px;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.header-call:hover .call-icon {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.call-text {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.call-text small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 22px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(36, 77, 226, 0.35);
  transition: background 0.25s, transform 0.25s;
}
.header-cta span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  transition: transform 0.3s;
}
.header-cta:hover {
  color: #fff;
  background: var(--navy);
  transform: translateY(-1px);
}
.header-cta:hover span {
  transform: rotate(-45deg);
}

@media (min-width: 951px) {
  /* Outlined nav pill — no fill, just a hairline and blur */
  nav {
    margin-inline: auto;
    gap: 2px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--line);
    transition: border-color 0.35s;
  }
  nav > a:not(.nav-cta),
  nav summary {
    padding: 9px 16px;
    border-radius: 999px;
    transition: background 0.25s, color 0.25s;
  }
  nav > a:not(.nav-cta):hover,
  nav summary:hover,
  nav details[open] > summary {
    background: var(--pale);
    color: var(--blue);
  }
  nav > .nav-cta {
    display: none;
  }
  /* No underline/dot — the active link gets a soft pill instead */
  nav > a:not(.nav-cta)::after {
    display: none;
  }
  nav > a.active {
    background: var(--pale);
    color: var(--blue);
  }
  nav details div {
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%);
    animation: none;
  }
  nav details div::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    background: #fff;
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    transform: rotate(45deg);
  }

  /* Light-on-dark colours while sitting on the hero */
  header:not(.scrolled) nav {
    border-color: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  header:not(.scrolled) nav > a:not(.nav-cta),
  header:not(.scrolled) nav summary,
  header:not(.scrolled) .header-call {
    color: #fff;
  }
  header:not(.scrolled) nav > a:not(.nav-cta):hover,
  header:not(.scrolled) nav summary:hover,
  header:not(.scrolled) nav details[open] > summary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }
  header:not(.scrolled) nav summary::after {
    color: rgba(255, 255, 255, 0.75);
  }
  header:not(.scrolled) nav > a.active,
  header:not(.scrolled) details.active > summary {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
  }
  header:not(.scrolled) .call-icon {
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
  }
  header:not(.scrolled) .call-text small {
    color: #b5ccff;
  }
}
/* Laptop widths: let the header use the full width and tighten spacing */
@media (min-width: 951px) and (max-width: 1399.98px) {
  .call-text {
    display: none;
  }
}
@media (min-width: 951px) and (max-width: 1199.98px) {
  header .container {
    max-width: 100%;
  }
  .brand img {
    width: 250px;
  }
  .header-inner {
    gap: 14px;
  }
  nav > a:not(.nav-cta),
  nav summary {
    padding: 8px 11px;
  }
  .header-cta {
    padding-left: 16px;
  }
  .header-call {
    display: none;
  }
}

/* Mobile: brand · call icon · menu button, dropdown panel as a card */
@media (max-width: 950px) {
  .brand {
    order: 0;
  }
  .header-actions {
    order: 1;
    margin-left: auto;
  }
  .menu-toggle {
    order: 2;
    height: 44px;
    border-radius: 999px;
    padding: 0 18px;
  }
  .call-text,
  .header-cta {
    display: none;
  }
  .brand img,
  header.scrolled .brand img {
    width: 250px;
  }
  header nav,
  header.scrolled nav {
    top: calc(100% - 4px);
    left: 12px;
    right: 12px;
    padding: 12px 22px 20px;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(16, 43, 84, 0.18);
  }
  header:not(.scrolled):not(:has(nav.open)) .menu-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
  }
  header:not(.scrolled):not(:has(nav.open)) .call-icon {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
  }
}

/* Inner pages: the dark banner sits under the overlaid header */
.pagehead {
  padding-top: calc(72px + 120px);
}
@media (max-width: 650px) {
  .pagehead {
    padding-top: calc(50px + 110px);
  }
}

/* ---------- Footer ---------- */
footer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(
      circle at 85% 0%,
      rgba(36, 77, 226, 0.25),
      transparent 45%
    ),
    #0b1d39;
  padding: 80px 0 0;
}
footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  z-index: 2;
  background: linear-gradient(90deg, var(--blue), #6f8fff, var(--blue));
}
/* Client-country map (generated from our-clientele.html) */
footer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("../img/footer-map.svg") 60% 40% / cover no-repeat;
  opacity: 0.42;
  -webkit-mask-image: linear-gradient(90deg, transparent 5%, #000 45%);
  mask-image: linear-gradient(90deg, transparent 5%, #000 45%);
}
/* Footer logo: no white box, rendered in white */
footer img {
  background: none;
  padding: 0;
  border-radius: 0;
  filter: brightness(0) invert(1);
}
footer h3 {
  position: relative;
  padding-bottom: 12px;
  color: #fff;
  letter-spacing: 0;
  margin-bottom: 20px;
}
footer h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--blue);
}
footer a {
  transition: color 0.2s, transform 0.2s;
}
footer a:hover {
  text-decoration: none;
  transform: translateX(4px);
}
.copyright {
  text-align: center;
  font-size: 13.5px;
}
/* Footer type: all white, 1–2px larger than style.css */
footer,
footer p,
footer a,
footer .copyright {
  color: #fff;
}
footer p,
footer a {
  font-size: 16px;
}
footer h3 {
  font-size: 19px;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(36, 77, 226, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, background 0.2s;
}
.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover {
  background: var(--navy);
}

/* ---------- Responsive ---------- */
@media (max-width: 950px) {
  .menu-toggle {
    display: inline-flex;
  }
  nav summary {
    display: flex;
    justify-content: space-between;
    padding-block: 0;
  }
  nav > a:not(.nav-cta) {
    padding-block: 12px;
  }
  nav summary::after {
    font-size: 12px;
  }
  nav details div {
    border-radius: 0;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--line);
  }
}
@media (max-width: 650px) {
  .topbar a {
    display: none;
  }
  .footgrid {
    grid-template-columns: 1fr;
  }
  footer::after {
    background-size: 230% auto;
    background-position: 80% 100%;
    opacity: 0.5;
    -webkit-mask-image: linear-gradient(180deg, transparent 45%, #000 80%);
    mask-image: linear-gradient(180deg, transparent 45%, #000 80%);
  }
  .to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

/* ---------- Floating WhatsApp + Call ---------- */
.float-contact {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--font-head);
}
.float-contact a {
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 10px 24px rgba(11, 29, 57, 0.28);
  transition: transform 0.25s, box-shadow 0.25s;
}
.float-contact a:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 30px rgba(11, 29, 57, 0.35);
}
.fc-whatsapp {
  background: #25d366;
  font-size: 28px !important;
}
.fc-call {
  background: var(--blue);
}
/* Pulse ring on WhatsApp */
.fc-whatsapp::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  z-index: -1;
  animation: fcPulse 2s ease-out infinite;
}
@keyframes fcPulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}
/* Hover label (desktop) */
.float-contact a span {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translate(8px, -50%);
  padding: 7px 12px;
  border-radius: 8px;
  background: #0b1d39;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.float-contact a:hover span,
.float-contact a:focus-visible span {
  opacity: 1;
  transform: translate(0, -50%);
}
/* Back-to-top sits above the floating buttons */
.to-top {
  bottom: 158px;
  right: 26px;
}

/* Mobile: full-width 50/50 bar fixed to the bottom */
@media (max-width: 767.98px) {
  .float-contact {
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: row;
    gap: 0;
    padding-bottom: env(safe-area-inset-bottom);
    background: #0b1d39;
    box-shadow: 0 -8px 24px rgba(11, 29, 57, 0.18);
  }
  .float-contact a,
  .float-contact a:hover {
    flex: 1 1 50%;
    width: auto;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 0;
    font-size: 20px;
    box-shadow: none;
    transform: none;
  }
  .fc-whatsapp {
    font-size: 24px !important;
  }
  .fc-whatsapp::before {
    display: none;
  }
  .float-contact a span {
    position: static;
    transform: none;
    opacity: 1;
    padding: 0;
    background: none;
    font-size: 15px;
    font-weight: 700;
  }
  body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }
  .to-top {
    right: 16px;
    bottom: calc(72px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  .fc-whatsapp::before {
    animation: none;
  }
}

/* Logo: 250px everywhere, except very narrow phones where it would crowd the menu button */
@media (max-width: 420px) {
  .brand img,
  header.scrolled .brand img {
    width: 190px;
  }
}