/* ============================================================
   NAVIGATION STYLES
   ============================================================ */

/* ROOT VARIABLES */
:root {
  --text: #0f172a;
  --muted: #5f6b7a;
  --line: rgba(15, 23, 42, 0.12);
  --line-strong: rgba(15, 23, 42, 0.2);
  --soft: #eef5fc;
  --primary: #0069c6;
  --primary-hover: #00529b;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

/* Light theme variables (default) */
:root {
  --text: #0f172a;
  --muted: #5f6b7a;
  --line: rgba(15, 23, 42, 0.12);
  --line-strong: rgba(15, 23, 42, 0.2);
  --soft: #eef5fc;
  --primary: #0069c6;
  --primary-hover: #00529b;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

/* Dark theme variables */
:root.light-theme {
  /* Keep light theme for navigation */
  --text: #0f172a;
  --muted: #5f6b7a;
  --line: rgba(15, 23, 42, 0.12);
  --line-strong: rgba(15, 23, 42, 0.2);
  --soft: #eef5fc;
  --primary: #0069c6;
  --primary-hover: #00529b;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

/* GLOBAL RESETS */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* LAYOUT */
.section-container {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
}

/* NAVIGATION HEADER */
.navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  background: transparent;
  backdrop-filter: blur(0px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: stretch;
}

.navigation.is-scrolled {
  background: rgba(248, 250, 252, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Navigation collapse toggle button */
.navigation-collapse-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 1001;
}

.navigation-collapse-toggle svg {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navigation.is-scrolled .navigation-collapse-toggle {
  color: var(--text);
}

.navigation-collapse-toggle:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.navigation-content.collapsed .navigation-collapse-toggle svg {
  transform: rotate(180deg);
}

/* Navigation content wrapper */
.navigation-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 400px;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 1;
}

.navigation-content.collapsed {
  max-height: 0;
  opacity: 0;
}

.brand-icon {
  width: 50%;
  height: 100%;
  min-width: 190px;
  filter: brightness(1);
  transition: filter 0.3s ease;
}

/* UTILITY BAR */
.navigation-utility {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}

.navigation-utility-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.navigation-utility a {
  transition: color 0.24s ease;
}

.navigation-utility a:hover {
  color: var(--primary);
}

/* NAVIGATION MENU */
.hds-navigation-menu {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

/* BRAND/LOGO */
.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-weight: 800;
}

.brand-copy {
  display: grid;
  gap: 2px;
  font-size: 13px;
  color: var(--muted);
}

.brand-copy strong {
  color: var(--text);
  font-size: 16px;
}

/* SOCIAL LINKS FLOATING */
.social-links-floating {
  position: absolute;
  bottom: -50px;
  left: 0;
  display: flex;
  flex-direction: row;
  gap: 8px;
  transform: translateY(-10px);
  transition: transform 0.3s ease;
  z-index: 50;
  pointer-events: auto;
}

.brand:hover .social-links-floating {
  transform: translateY(0);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  transition: all 0.24s ease;
}

.social-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--soft);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 105, 198, 0.14);
}

.navigation-menu-content {
  justify-self: center;
  width: min(100%, 640px);
}

.navigation-menu-list,
.navigation-buttons {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.navigation-menu-list {
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.82);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.navigation:not(.is-scrolled) .navigation-menu-list {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
}

.navigation-item {
  position: relative;
}

/* NAVIGATION STATUS */
.nav-status {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.nav-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fafc;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.3s ease;
}

.navigation:not(.is-scrolled) .nav-status-chip {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.nav-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(0, 105, 198, 0.12);
  animation: pulseDot 2.6s ease-in-out infinite;
}

.nav-status strong {
  font-size: 13px;
}

/* BUTTONS & LINKS */
.hds-button,
.hds-link {
  transition: color 0.24s ease, transform 0.24s ease, background-color 0.24s ease, border-color 0.24s ease, opacity 0.24s ease;
}

.hds-button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
}

.hds-button:hover,
.hds-link:hover {
  color: var(--primary);
}

.hds-button--primary,
.hds-button--secondary-on-quiet {
  border: 1px solid var(--line);
}

.hds-button--primary {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  padding: 13px 18px;
  font-weight: 600;
  box-shadow: 0 14px 30px rgba(0, 105, 198, 0.18);
}

.hds-button--primary:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-2px);
}

.hds-button--secondary-on-quiet {
  background: rgba(246, 249, 252, 0.9);
  padding: 13px 18px;
  transition: all 0.3s ease;
}

.navigation:not(.is-scrolled) .hds-button--secondary-on-quiet {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.navigation:not(.is-scrolled) .hds-button,
.navigation:not(.is-scrolled) .hds-link {
  color: #fff;
}

.navigation:not(.is-scrolled) .navigation-utility {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

/* DROPDOWN MENU */
.navigation-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 290px;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fafc;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 10px, 0) scale(0.98);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}

.navigation-item.is-open .navigation-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
}

.navigation-dropdown a {
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 14px;
}

.navigation-dropdown a:hover {
  background: var(--soft);
  color: var(--text);
}

/* CHEVRON ICON */
.navigation__chevron-down-icon {
  transition: transform 0.24s ease;
}

.navigation-item.is-open .navigation__chevron-down-icon {
  transform: rotate(180deg);
}

/* HAMBURGER MENU */
.navigation-hamburger-button {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
}

.navigation-hamburger__line {
  fill: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.navigation-hamburger-button[aria-expanded="true"] .line-1,
.navigation-hamburger-button[aria-expanded="true"] .line-4 {
  opacity: 0;
}

.navigation-hamburger-button[aria-expanded="true"] .line-2 {
  transform: translateY(10px) rotate(45deg);
}

.navigation-hamburger-button[aria-expanded="true"] .line-3 {
  transform: translateY(-10px) rotate(-45deg);
}

/* HOVER ARROW ICON */
.hds-icon-hover-arrow {
  transition: transform 0.28s ease;
}

.hds-button:hover .hds-icon-hover-arrow,
.hds-link:hover .hds-icon-hover-arrow {
  transform: translateX(2px);
}

/* ANIMATIONS */
@keyframes pulseDot {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* THEME TOGGLE BUTTON */
.theme-toggle-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.24s ease;
  color: var(--text);
}

.theme-toggle-nav .theme-icon {
  transition: transform 300ms ease, stroke 300ms ease;
  width: 20px;
  height: 20px;
}

.theme-toggle-nav:hover .theme-icon {
  transform: rotate(20deg);
}

.theme-toggle-nav:active .theme-icon {
  transform: rotate(-20deg);
}

.theme-toggle-nav:hover {
  border-color: var(--primary);
  background: var(--soft);
  color: var(--primary);
  transform: scale(1.05);
}

.theme-toggle-nav:active {
  transform: scale(0.95);
}

/* === MOBILE NAVIGATION (NEW) === */

.navigation-mobile {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0 16px;
    transition: all 0.3s ease;
}

.light-theme .navigation-mobile {
    background: rgba(250, 251, 253, 0.92);
    border-bottom-color: var(--color-border);
}

:root:not(.light-theme) .navigation-mobile {
    background: rgba(10, 12, 16, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nav-mobile-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-mobile-logo img {
    height: 36px;
    width: auto;
}

.nav-mobile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle-mobile {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

:root:not(.light-theme) .theme-toggle-mobile {
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-mobile-hamburger {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 24px;
    position: relative;
    padding: 0;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    position: absolute;
    transition: all 0.3s ease;
}

:root:not(.light-theme) .hamburger-line {
    background: #fff;
}

.hamburger-line:nth-child(1) { top: 0; }
.hamburger-line:nth-child(2) { top: 11px; }
.hamburger-line:nth-child(3) { top: 22px; }

/* Overlay & Menu */
.nav-mobile-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: var(--color-bg);
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.nav-mobile-overlay.is-active {
    transform: translateX(0);
}

.nav-mobile-menu {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.nav-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.nav-overlay-logo {
    height: 40px;
}

.nav-mobile-close {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
}

:root:not(.light-theme) .nav-mobile-close {
    color: #fff;
}

.nav-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nav-mobile-link {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

:root:not(.light-theme) .nav-mobile-link {
    color: #fff;
}

.nav-mobile-overlay.is-active .nav-mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.nav-mobile-overlay.is-active .nav-mobile-link:nth-child(1) { transition-delay: 0.1s; }
.nav-mobile-overlay.is-active .nav-mobile-link:nth-child(2) { transition-delay: 0.15s; }
.nav-mobile-overlay.is-active .nav-mobile-link:nth-child(3) { transition-delay: 0.2s; }
.nav-mobile-overlay.is-active .nav-mobile-link:nth-child(4) { transition-delay: 0.25s; }
.nav-mobile-overlay.is-active .nav-mobile-link:nth-child(5) { transition-delay: 0.3s; }

.nav-mobile-link.active {
    color: var(--primary);
}

.nav-mobile-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.nav-mobile-social {
    display: flex;
    gap: 20px;
}

.social-icon {
    color: var(--muted);
}

:root:not(.light-theme) .social-icon {
    color: rgba(255, 255, 255, 0.6);
}

.nav-mobile-cta {
    display: block;
    width: 100%;
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 10px 20px rgba(0, 105, 198, 0.15);
}

/* Responsive visibility */
@media (min-width: 993px) {
    .navigation-mobile {
        display: none;
    }
}

@media (max-width: 992px) {
    .navigation {
        display: none !important;
    }
}

/* === RESPONSIVE DESIGN REFINEMENT === */
@media (max-width: 980px) {
    .navigation-buttons,
    .navigation-utility,
    .nav-status {
        display: none !important;
    }
}

  .social-links-floating {
    gap: 3px;
    margin-top: 4px;
  }

  .social-link {
    width: 24px;
    height: 24px;
    border-radius: 50%;
  }

  .social-link svg {
    width: 12px;
    height: 12px;
  }

  .navigation-hamburger-button {
    width: 36px;
    height: 36px;
  }

  .navigation-hamburger__line {
    width: 18px;
  }

  .navigation-menu-content {
    top: calc(100% + 4px);
    left: 8px;
    right: 8px;
  }

  .navigation-menu-content .navigation-menu-list {
    padding: 8px;
    gap: 4px;
    border-radius: 14px;
  }

  .navigation-item > .hds-button,
  .navigation-item > a {
    padding: 6px 8px;
    font-size: 12px;
    gap: 4px;
  }

  .navigation-dropdown {
    padding: 6px;
    margin-top: 4px;
  }

  .navigation-dropdown a {
    padding: 6px 8px;
    font-size: 12px;
  }

  .navigation-menu-content {
    max-width: calc(100vw - 16px);
  }

/* ============================================================
   LIGHT THEME — Navigation Overrides
   ============================================================ */

/* Transparent nav (not scrolled): keep dark text in light mode */
:root.light-theme .navigation:not(.is-scrolled) .navigation-menu-list {
  background: rgba(226, 232, 240, 0.82);
  border-color: var(--line);
  backdrop-filter: none;
}

:root.light-theme .navigation:not(.is-scrolled) .hds-button,
:root.light-theme .navigation:not(.is-scrolled) .hds-link {
  color: var(--text);
}

:root.light-theme .navigation:not(.is-scrolled) .hds-button:hover,
:root.light-theme .navigation:not(.is-scrolled) .hds-link:hover {
  color: var(--primary);
}

:root.light-theme .navigation:not(.is-scrolled) .navigation-utility {
  color: var(--muted);
  border-color: var(--line);
}

:root.light-theme .navigation:not(.is-scrolled) .nav-status-chip {
  background: #f8fafc;
  border-color: var(--line);
  color: var(--muted);
}

:root.light-theme .navigation:not(.is-scrolled) .hds-button--secondary-on-quiet {
  background: rgba(246, 249, 252, 0.9);
  border-color: var(--line);
  color: var(--text);
}

/* Scrolled state in light mode — refine */
:root.light-theme .navigation.is-scrolled {
  background: rgba(250, 251, 253, 0.96);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
