/* ================= HEADER ================= */

/* ===== TOP BAR ===== */
.top-bar {
  background-color: var(--black);
  font-size: 13px;
  padding: 6px 0;
}

.top-bar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--white);
  max-width: 450px;
  font-weight: bold;
  margin: 0 auto;
}

/* ===== MAIN HEADER ===== */

.site-header {
  background: var(--white);
  padding: 0 0 15px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* ===== CONTAINER FIX (IMPORTANT) ===== */
.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ===== HEADER LAYOUT ===== */
.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== LOGO ===== */
.logo img {
  max-height: 65px;
  display: block;
}

/* ===== RIGHT SIDE (MENU + BUTTONS) ===== */
.right-menu-list {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ================= MENU ================= */

.desktop-menu {
  display: flex;
  margin-left: 40px; /* spacing from logo */
}

/* MENU LIST */
.menu {
  display: flex;
  gap: 18px; /* reduced spacing */
  list-style: none;
  margin: 0;
  padding: 0;
}

/* MENU LINKS */
.menu li a {
  text-decoration: none;
  color: var(--heading-color);
  font-weight: 500;
  font-family: 'Raleway', sans-serif;
  white-space: nowrap; /* prevents wrapping */
  font-size: 15px;
}

/* HOVER */
.menu li a:hover,
.mobile-menu-list li a:hover {
  text-decoration: underline;
  color: var(--primary);
}

/* ACTIVE STATE */
.menu li.current-menu-item > a,
.menu li.current_page_item > a,
.menu li.current-menu-parent > a,
.menu li.current_page_parent > a,
.mobile-menu-list li.current-menu-item > a,
.mobile-menu-list li.current_page_item > a,
.mobile-menu-list li.current-menu-parent > a,
.mobile-menu-list li.current_page_parent > a {
  color: var(--primary);
  font-weight: 600;
}

.menu li.current-menu-item > a,
.mobile-menu-list li.current-menu-item > a {
  border-bottom: 2px solid var(--primary);
}

/* ================= BUTTONS ================= */

.header-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.header-actions .btn {
  display: inline-block;
  white-space: nowrap;
}

/* ================= HAMBURGER ================= */

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 3px;
  background: #000;
  border-radius: 2px;
}

/* ================= MOBILE MENU ================= */

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 999;
}

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

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100%;
  background: #fff;
  padding: 20px;
  transition: 0.3s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-menu {
  font-size: 28px;
  cursor: pointer;
}

/* MOBILE MENU LIST */
.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.mobile-menu-list li {
  margin-bottom: 14px;
}

.mobile-menu-list li a {
  text-decoration: none;
  font-size: 15px;
  color: #1a2a3a;
}

/* MOBILE BUTTONS */
.mobile-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

/* ================= RESPONSIVE ================= */

/* Tablet Fix (YOUR MAIN ISSUE RANGE) */
@media (max-width: 1024px) {

  .menu {
    gap: 14px;
  }

  .menu li a {
    font-size: 14px;
  }

  .header-actions .btn {
    padding: 6px 10px;
    font-size: 13px;
  }

  .desktop-menu {
    margin-left: 20px;
  }
}

/* Mobile */
@media (max-width: 768px) {

  .desktop-menu,
  .header-actions {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
}