/* ========================================
   TechGyan360 Tools - Header Styles
   Mirrors the main techgyan360.com navbar + ticker
   ======================================== */

/* ===== NAVBAR ===== */
#siteNav {
  position: relative; top: 0; z-index: 1000;
  background: rgba(11,30,61,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 68px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem; font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo span { color: var(--teal); }

.nav-links {
  display: flex; align-items: center; gap: 2rem;
  list-style: none;
  margin: 0; padding: 0;
  flex: 1;
}

.nav-links a {
  font-size: 0.875rem; font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--teal); }

.nav-cta {
  background: var(--teal);
  color: var(--navy) !important;
  font-weight: 600 !important;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  transition: background 0.2s, transform 0.15s !important;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-cta:hover { background: #00e0bc !important; transform: translateY(-1px); }

/* Search Toggle Button */
.search-toggle {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.search-toggle:hover {
  background: rgba(0,201,167,0.15);
  border-color: var(--teal);
  transform: scale(1.05);
}

.mobile-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  color: white; font-size: 1.5rem;
  padding: 4px 8px; line-height: 1;
  flex-shrink: 0;
}

.desktop-only { display: inline-flex; }

/* Mobile slide-down menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.5rem 0 1rem;
  position: relative; z-index: 99;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 0.85rem 5%;
  font-size: 0.95rem; font-weight: 500;
  color: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--teal); background: rgba(255,255,255,0.03); }
.mobile-menu .mobile-cta {
  margin: 0.75rem 5% 0;
  background: var(--teal); color: var(--navy) !important;
  font-weight: 700; text-align: center;
  border-radius: 50px; border-bottom: none;
}

/* ===== TICKER ===== */
.ticker-wrap {
  background: var(--teal);
  padding: 10px 0;
  overflow: hidden;
}

.ticker-track {
  display: flex; gap: 0;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-item {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 0 2.5rem;
  font-size: 0.82rem; font-weight: 600;
  color: var(--navy);
}

.ticker-sep { color: rgba(11,30,61,0.4); }

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== RESPONSIVE NAV ===== */
@media (max-width: 900px) {
  .nav-links { display: none !important; }
  .desktop-only { display: none !important; }
  .mobile-toggle { display: block; }
}

/* ===== SEARCH MODAL ===== */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(11, 30, 61, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  transition: opacity 0.3s;
}

.search-overlay.open {
  display: flex;
  opacity: 1;
}

.search-modal {
  width: 90%;
  max-width: 600px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.3s;
}

.search-overlay.open .search-modal {
  transform: translateY(0);
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--color-border);
}

.search-modal-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.search-modal-input:focus {
  border-color: var(--teal);
}

.search-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--off-white);
  color: var(--color-text-dark);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.search-close:hover {
  background: var(--color-border);
  transform: rotate(90deg);
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  opacity: 0;
  max-height: 0;
  transition: opacity 0.3s, max-height 0.3s;
}

.search-results.show {
  opacity: 1;
  max-height: 400px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-dark);
  text-decoration: none;
  transition: background 0.15s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--off-white); }

.search-result-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(0, 201, 167, 0.12);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.search-result-text { flex: 1; min-width: 0; }

.search-result-title {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  color: var(--color-text-dark);
  margin-bottom: 2px;
}

.search-result-category {
  font-size: 0.75rem;
  color: var(--color-text-gray);
}

.search-no-results {
  padding: 40px 20px;
  text-align: center;
  color: var(--color-text-gray);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .search-overlay { padding-top: 60px; }
  .search-modal { width: 95%; }
  .search-modal-header { padding: 16px; }
  .search-modal-input { font-size: 0.95rem; padding: 10px 14px; }
  .search-close { width: 36px; height: 36px; font-size: 1.2rem; }
}
