/* ============================================================
   Site navigation  (EWW-13)

   Moved, in original order, out of index.html's inline <style> so
   the homepage and the service landing pages share one header.
   Small teal text and the white-on-teal CTAs use --teal-text /
   the darker gradient for WCAG AA (as in contact-form.css). Order matters: e.g. .mobile-nav a must stay after
   .mobile-language-switch a, and .reference-dropdown a after
   .nav-links a (same specificity, later rule wins).

   Markup: core/templates/core/_site_nav.html
   Script: core/static/core/js/site-nav.js
   The nav is position: fixed (92px, 78px under 760px), so pages
   must leave that much space at the top.
   ============================================================ */

    /* NAV */
    nav {
      position: fixed;
      top: 0; left: 0; right: 0;
      z-index: 999;
      background: rgba(255,255,255,0.97);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--border);
      padding: 0;
      height: 92px;
    }
    .nav-inner {
      width: 100%;
      height: 92px;
      max-width: 1300px;
      margin: 0 auto;
      padding: 0 6%;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .nav-logo-img {
      display: flex;
      align-items: center;
      height: 92px;
      flex-shrink: 0;
    }

    .nav-logo-img img {
      height: 124px;
      width: auto;
      max-width: 530px;
      object-fit: contain;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 1.55rem;
      list-style: none;
    }

    .nav-links a {
      font-size: 0.86rem;
      font-weight: 600;
      color: var(--muted);
      text-decoration: none;
      transition: color 0.2s;
      position: relative;
      white-space: nowrap;
    }

    .nav-links a::after {
      content: '';
      position: absolute;
      left: 0; bottom: -4px;
      width: 0; height: 2px;
      border-radius: 999px;
      background: var(--accent-gradient);
      transition: width 0.2s ease-out;
    }

    .nav-links a:hover { color: var(--navy); }
    .nav-links a:hover::after { width: 100%; }

    .nav-btn {
      background: var(--navy) !important;
      color: #fff !important;
      padding: 0.58rem 1.25rem !important;
      border-radius: 999px;
      font-weight: 800 !important;
      font-size: 0.82rem !important;
      box-shadow: 0 8px 20px rgba(13,31,78,0.18);
      transition: background 0.2s, transform 0.15s !important;
    }

    .nav-btn:hover { background: var(--teal-text, #0f766e) !important; transform: translateY(-1px); }
    .nav-btn::after { display: none !important; }

    .nav-burger {
      display: none;
      flex-direction: column;
      gap: 5px;
      cursor: pointer;
      padding: 6px;
      border: none;
      background: none;
      z-index: 1001;
    }

    .nav-burger span {
      display: block;
      width: 24px;
      height: 2px;
      background: var(--navy);
      border-radius: 999px;
      transition: transform 0.3s, opacity 0.3s, width 0.3s;
      transform-origin: center;
    }

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

    .mobile-nav {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(255,255,255,0.98);
      backdrop-filter: blur(20px);
      z-index: 1000;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2rem;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s;
    }
.mobile-language-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg2);
}

.mobile-language-switch a {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--muted);
  text-decoration: none;
}

.mobile-language-switch a.active {
  color: var(--teal-text, #0f766e);
}

.mobile-language-switch a:hover {
  color: var(--teal-text, #0f766e);
}

.mobile-language-divider {
  color: var(--border);
}
    .mobile-nav.open { opacity: 1; pointer-events: all; }

    .mobile-nav a {
      font-size: 1.4rem;
      font-weight: 800;
      color: var(--navy);
      text-decoration: none;
    }

    .mobile-nav .mobile-cta {
      margin-top: 0.5rem;
      background: linear-gradient(135deg, #0f766e, #0d827b);
      color: #fff !important;
      padding: 0.9rem 2.2rem;
      border-radius: 999px;
      font-size: 1rem !important;
      box-shadow: 0 8px 22px rgba(15,118,110,0.32);
    }

.language-menu {
  position: relative;
}

.reference-menu { position: relative; }
.reference-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  padding: 0;
}
.reference-button:hover,
.reference-menu.open .reference-button { color: var(--navy); }
.reference-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%);
  width: 310px;
  padding: .55rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 1100;
}
.reference-menu.open .reference-dropdown { display: grid; }
.reference-dropdown a {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  padding: .68rem .75rem;
  border-radius: 10px;
  color: var(--navy);
  font-size: .76rem;
  font-weight: 700;
}
.reference-dropdown a:hover { background: var(--teal-bg); color: var(--teal-text, #0f766e); }
.reference-dropdown a::after { display: none; }
.reference-dropdown small { color: var(--muted); font-size: .62rem; font-weight: 600; }
.mobile-reference-details { text-align: center; }
.mobile-reference-details summary { color: var(--navy); font-size: 1.4rem; font-weight: 800; cursor: pointer; }
.mobile-reference-links { display: grid; gap: .55rem; margin-top: .8rem; }
.mobile-reference-links a { font-size: .85rem; }

.language-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  padding: 0.52rem 0.75rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.language-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transform: translateY(-2px);
}

.language-button:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 14px rgba(13, 31, 78, 0.08);
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  min-width: 150px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 0.45rem;
  display: none;
  z-index: 1100;
}

.language-menu.open .language-dropdown {
  display: block;
}

.language-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.language-dropdown a:hover {
  background: var(--teal-bg);
  color: var(--teal-text, #0f766e);
}

.language-dropdown a.active {
  background: var(--teal-bg);
  color: var(--teal-text, #0f766e);
}
.language-dropdown form {
  display: grid;
  gap: 0.25rem;
}

.language-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--navy);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.language-option:hover,
.language-option.active {
  background: var(--teal-bg);
  color: var(--teal-text, #0f766e);
}
.language-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.9rem;
  transform: translateY(-1px);
}

@media (max-width: 1020px) {
  .nav-links { gap: 1.1rem; }
}

@media (max-width: 760px) {
  nav { height: 78px; }
  .nav-inner {
    height: 78px;
    padding: 0 5%;
  }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .mobile-nav { display: flex; }
  .nav-logo-img { height: 78px; }
  .nav-logo-img img { height: 104px; max-width: 550px; }
}
