/* =========================
   NAVBAR WRAPPER
========================= */

.navbar-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 19999;
  padding: 8px 0;
  background: white;
}

/* =========================
   SCROLL BUTTONS
========================= */

.scroll-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.scroll-btn:hover {
  background: #f5f5f5;
}

/* =========================
   HORIZONTAL SCROLL
========================= */

.navbar-scroll {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 90%;
  scroll-behavior: smooth;
  display: flex;
}

.navbar-scroll::-webkit-scrollbar {
  display: none;
}

.navbar-scroll {
  scrollbar-width: none;
}

/* =========================
   NAVBAR MENU
========================= */

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 12px 20px;
  white-space: nowrap;
  position: relative;
  font-family: Arial, Helvetica, sans-serif;
}

/* =========================
   NAV ITEMS
========================= */

.nav-item {
  cursor: pointer;
  font-weight: 600;
  color: #333;
  padding: 6px 4px;
}

.nav-item:hover {
  color: #2e8b57;
}

/* =========================
   MEGA PANEL
========================= */

.mega-panel {
  position: sticky;
  left: 0;
  top: 70;
  width: 100%;
  background: white;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.15);
  padding: 3% 8%;
  display: none;
  z-index: 19999;
}

/* =========================
   MEGA CONTENT GRID
========================= */

.mega-content {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.mega-content.active {
  display: grid;
}

/* =========================
   CATEGORY COLUMN
========================= */

.mega-column {
  display: flex;
  flex-direction: column;
}

/* CATEGORY TITLE */

.mega-column h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #2e8b57;
}

/* ARTICLE LINKS */

.mega-column a {
  text-decoration: none;
  padding: 4px 0;
  font-size: 14px;
  color: #444;
}

.mega-column a:hover {
  color: #2e8b57;
  text-decoration: underline;
}

#search_bar {
  top: 70;
  position: sticky;
  z-index: 19999;
  text-align: center;
  background: white;
  margin-bottom: 20px;
  padding-bottom: 10px;
}

#megaSearch {
  width: 90%;
  max-width: 900px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

#megaSearch:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 900px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e6e6e6;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: none;
  max-height: 350px;
  overflow-y: auto;
  z-index: 20000;
}

.search-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f2f2f2;
  font-size: 14px;
  transition: background 0.2s ease;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background: #f8fbf9;
}

.search-item span:first-child {
  font-weight: 500;
  color: #333;
}

.search-type {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.search-type.GRUP_ARTIKULL {
  background: #e6f4ea;
  color: #1e7f4f;
}

.search-type.ARTIKULL {
  background: #eef4ff;
  color: #2f5bd3;
}

.article-link {
  display: block;
  padding: 6px 0;
  text-decoration: none;
  color: #444;
  cursor: pointer;
}

.article-link:hover {
  color: #0a8f4d;
}

.force_visible {
  visibility: visible !important;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 900px) {
  .navbar-menu {
    gap: 18px;
    font-size: 14px;
  }

  .scroll-btn {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 600px) {
  .navbar-scroll {
    max-width: 80%;
  }

  .navbar-menu {
    gap: 15px;
    padding: 10px 10px;
  }
}

@media (max-width: 768px) {
  .navbar-wrapper {
    display: none;
  }

  #search_bar {
    top: 0;
    z-index: 100;
    position: relative;
  }
}
