/* --- Page Transition (Smooth Crossfade) --- */
@view-transition {
  navigation: auto;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

body {
  animation: pageFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- Global Floating Navigation (IDA Style) --- */
.nav-pill-wrapper {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 1200px; z-index: 100;
  display: flex; justify-content: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.nav-pill {
  background: var(--bg-white, #ffffff); border-radius: 999px;
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between;
  width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,0.06);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  gap: 8px;
}
.nav-pill-wrapper.scrolled {
  top: 0; width: 100%; max-width: 100%;
}
.nav-pill-wrapper.scrolled .nav-pill {
  border-radius: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  padding: 14px 40px;
}
.nav-pill .brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 800; color: #121212; text-decoration: none; letter-spacing: -0.5px;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap; flex-shrink: 0;
}
.nav-pill .brand-icon {
  width: 30px; height: 30px; background: #121212; color: #ffffff;
  border-radius: 8px; display: grid; place-items: center; font-size: 13px;
  flex-shrink: 0;
}
.nav-pill .nav-links {
  display: flex; gap: 24px; align-items: center;
  flex-shrink: 1; min-width: 0;
}
.nav-pill .nav-links a {
  text-decoration: none; color: #121212; font-weight: 500; font-size: 14px;
  transition: color 0.2s; font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.nav-pill .nav-links a:hover { color: #3b50df; text-decoration: underline; text-underline-offset: 4px; }
.nav-pill .nav-right {
  display: flex; align-items: center; gap: 16px;
  flex-shrink: 0; white-space: nowrap;
}
.nav-pill .btn-text {
  text-decoration: none; color: #121212; font-weight: 600; font-size: 14px;
  font-family: 'Inter', sans-serif;
}
.nav-pill .btn-dark-nav {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 18px; border-radius: 20px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  background: #121212; color: #ffffff; transition: all 0.2s ease; border: none;
  font-family: 'Inter', sans-serif;
}
.nav-pill .btn-dark-nav:hover { background: #333333; transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.15); }

/* Language Switcher */
.nav-pill .lang-switcher {
  background: none; border: none; color: #555555; font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 0; font-family: 'Inter', sans-serif; transition: color 0.2s;
}
.nav-pill .lang-switcher:hover { color: #121212; }

/* ========== Responsive: Tablet ========== */
@media (max-width: 1024px) {
  .nav-pill .nav-links { gap: 16px; }
  .nav-pill .nav-links a { font-size: 13px; }
  .nav-pill .nav-right { gap: 10px; }
  .nav-pill .btn-text { font-size: 13px; }
}

/* ========== Responsive: Mobile ========== */
@media (max-width: 768px) {
  .nav-pill-wrapper {
    top: 12px;
    width: calc(100% - 24px);
  }
  .nav-pill {
    padding: 10px 16px;
    gap: 0;
  }
  .nav-pill-wrapper.scrolled .nav-pill {
    padding: 10px 16px;
  }
  /* Hide center nav-links on mobile */
  .nav-pill .nav-links {
    display: none;
  }
  /* Hide login text link, keep only CTA button */
  .nav-pill .btn-text {
    display: none;
  }
  .nav-pill .brand {
    font-size: 16px; gap: 8px;
  }
  .nav-pill .brand-icon {
    width: 28px; height: 28px; font-size: 12px;
  }
  .nav-pill .nav-right { gap: 8px; }
  .nav-pill .btn-dark-nav {
    height: 34px; padding: 0 14px; font-size: 12px;
  }
  .nav-pill .lang-switcher { font-size: 12px; }
}

/* ========== Responsive: Very small ========== */
@media (max-width: 420px) {
  .nav-pill-wrapper {
    top: 8px;
    width: calc(100% - 16px);
  }
  .nav-pill {
    padding: 8px 12px;
  }
  .nav-pill .brand span { display: none; }
  .nav-pill .btn-dark-nav {
    height: 32px; padding: 0 12px; font-size: 11px;
  }
}
