/* ===== Skip Navigation ===== */

.skip-nav {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 8px 16px;
  background: #0f172a;
  color: #fff;
  border-radius: 0 0 4px 4px;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-nav:focus {
  top: 0;
}

/* ===== Site Navigation ===== */

.site-nav {
  background: #0f172a;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
}

.site-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-nav-brand:hover {
  opacity: 0.9;
}

.site-nav-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.site-nav-name {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.3px;
}

.site-nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

.site-nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.site-nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.site-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.8);
  padding: 8px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s;
  background: none;
  border: none;
  font: inherit;
}

.site-nav-toggle:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* Desktop nav */
@media (min-width: 768px) {
  .site-nav-links {
    display: flex;
  }
  .site-nav-toggle {
    display: none;
  }
}

/* Hamburger / X icon toggle */
.nav-icon-close {
  display: none;
}
#myTopnav.responsive .nav-icon-hamburger {
  display: none;
}
#myTopnav.responsive .nav-icon-close {
  display: block;
}

/* Mobile responsive menu */
#myTopnav.responsive .site-nav-inner {
  flex-wrap: wrap;
  height: auto;
  min-height: 56px;
  padding-bottom: 0;
}
#myTopnav.responsive .site-nav-brand,
#myTopnav.responsive .site-nav-actions {
  align-self: center;
  height: 56px;
  display: flex;
  align-items: center;
}
#myTopnav.responsive .site-nav-links {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 4px 0 12px;
  gap: 0;
  order: 10;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 0;
}
#myTopnav.responsive .site-nav-links a {
  padding: 12px 24px;
  border-radius: 0;
  width: 100%;
  font-size: 15px;
  color: rgba(255,255,255,0.85);
}
#myTopnav.responsive .site-nav-links a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

/* Legacy overrides — make old topnav classes point to new */
.topnav { background-color: #0f172a; }
.topnav .header-logo:hover { background-color: transparent; }

/* ===== Nav Actions (search + mobile toggle) ===== */
.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav-search {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.site-nav-search:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* ===== Search Overlay ===== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-inner {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.05);
  overflow: hidden;
  transform: translateY(-10px);
  transition: transform 0.2s;
}

.search-overlay.active .search-overlay-inner {
  transform: translateY(0);
}

.search-box {
  position: relative;
  border-bottom: 1px solid #e5e7eb;
}

.search-input {
  width: 100%;
  padding: 18px 20px 18px 48px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #1a1a2e;
  border: none;
  outline: none;
  background: transparent;
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-box-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Sections: Popular searches & Tools */
.search-sections {
  padding: 8px 0;
  max-height: 400px;
  overflow-y: auto;
}

.search-section {
  padding: 8px 0;
}

.search-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
}

.search-suggestion {
  display: block;
  padding: 10px 20px 10px 44px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
  text-decoration: none;
  transition: background 0.1s;
}

.search-suggestion:hover {
  background: #f3f4f6;
}

/* Search results */
.search-results {
  padding: 8px 0;
  max-height: 400px;
  overflow-y: auto;
}

.search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  text-decoration: none;
  transition: background 0.1s;
}

.search-result:hover {
  background: #f3f4f6;
}

.search-result-title {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
}

.search-result-section {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  background: #f3f4f6;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-left: 12px;
}

.search-no-results {
  padding: 24px 20px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #6b7280;
}