.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 32px !important;
  cursor: pointer;
  color: #019147;
  text-align: left;
}


/* ============================================
   Header Navigation
   ============================================ */
.header {
  width: 100%;
  background: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: var(--spacing-header-y) var(--container-padding);
  position: relative;
}

.header-container {
  max-width: var(--container-max-width-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2xl);
  direction: ltr;
}

/* Left Side - Button */
.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-2xl);
  flex-shrink: 0;
}

.btn-ask-question {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: var(--color-button-primary);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-family: 'Questrial', sans-serif;
  font-size: 16px;
  font-weight: normal;
  line-height: 24px;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05);
  position: relative;
  flex-shrink: 0;
}

.btn-ask-question::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: 
    inset 0px 0px 0px 1px rgba(10, 13, 18, 0.18),
    inset 0px -2px 0px 0px rgba(10, 13, 18, 0.05);
  border-radius: 8px;
}

.btn-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-image: url('Icon_question.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.btn-text {
  padding: 0 2px;
}

.btn-text a{
  color: #fff !important;
  text-decoration: none;
}

/* Navigation (Center) */
.main-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
  direction: rtl;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-item {
  display: flex;
  align-items: left;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 44px;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 4px;
  color: #161c24;
  text-decoration: none;
  font-family: 'Questrial', 'Noto Sans Arabic', sans-serif;
  font-size: 16px;
  font-weight: normal;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background: #f5f5f5;
}

/* Logo (Right) */
.logo {
  flex-shrink: 0;
  text-align: right;
}

.logo-text {
  font-family: 'Questrial', sans-serif;
  font-size: 28px;
  font-weight: bold;
  line-height: normal;
  color: #019147;
  margin: 0;
  width: 199px;
  text-align: right;
}

.top-search-input-wrapper{
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border-primary, #d5d7da);
  border-radius: var(--radius-md, 8px);
  padding: 10px 7px;
  height: 51px;
  box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05);
}

.top-search-input-wrapper .hero-search-icon{
  margin-right: 10px !important;
}

.top-search-input{
  border: 0 !important;
}

/* ============================================
   Header Responsive Design
   ============================================ */
@media (max-width: 1640px) {
  .top-search-input-wrapper{
    width: 180px;
  }

  .top-search-input{
    width: 100%;
  }
}

@media (max-width: 1480px) {
  .logo img{
    width: 70px;
  }
}

@media (max-width: 1480px) {

  .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .header {
    padding: 16px;
  }

  .logo{
    order: 4;
    width: 100px;
  }

  .btn-ask-question {
    order: 3;
    display: inline-block !important;
  }

  .search-toggle-btn{
    order: 2;
  }

  .menu-toggle {
    display: block;
    order: 1;
  }

  .header-container {
    flex-wrap: wrap;
    gap: 12px;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    background: #ffffff;
    z-index: 1000;
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .main-nav.active {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    border-radius: 0;
  }

  .nav-link {
    width: 100%;
    padding: 14px 20px;
    justify-content: center; /* <-- Changed from flex-start to center */
    text-align: center;
  }

  .nav-item:last-child .nav-link {
    border-bottom: none;
  }

  /* Button */
  .btn-ask-question {
    font-size: 14px;
    padding: 10px 14px;
  }

  /* Logo */
  .logo-text {
    font-size: 22px;
    width: auto;
  }
}

@media (max-width: 660px) {
  .top-search-input-wrapper{
    width: 190px !important;
  }
}

@media (max-width: 550px) {
  .top-search-input-wrapper{
    width: 150px !important;
  }
}
/*
@media(max-width:500px){

  .logo{
    width: 22% !important;
  }

  .btn-ask-question{
    width: 36% !important;
  }

  .menu-toggle{
    width: 15% !important;
  }

  .search-toggle-btn{
    width: 15% !important;
  }
  
  .logo img{
    width: 70px !important;
    margin: 0 auto;
  }

  .btn-ask-question {
    padding: 7px 9px !important;
  }

  span.btn-text, span.btn-text a{
    font-size: 12px !important;
  }
}

@media(max-width:500px){

  .logo{
    width: 22% !important;
  }

  .btn-ask-question{
    width: 46% !important;
  }

  .menu-toggle{
    width: 10% !important;
  }

  .search-toggle-btn{
    width: 10% !important;
  }
  
  .logo img{
    width: 50px !important;
    margin: 0 auto;
  }
}
*/

@media (max-width: 500px) {
  .header-container {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    direction: rtl !important;
    gap: 10px 0 !important;
  }

  /* ===================================================
     ROW 1: Right -> Logo | Left -> Ask Button
     =================================================== */
  .logo {
    order: 1 !important;
    display: flex !important;
    align-items: center !important;
  }

  .logo a, 
  .logo img {
    display: block !important;
  }

  .btn-ask-question {
    order: 2 !important;
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
  }

  /* FORCED LINE BREAK: Creates Row 2 */
  .btn-ask-question::after {
    content: "" !important;
    display: block !important;
    width: 100% !important;
    height: 0 !important;
    order: 2 !important;
    flex-basis: 100% !important;
  }

  /* ===================================================
     ROW 2: Right -> Hamburger | Left -> Search
     =================================================== */
  .menu-toggle {
    order: 3 !important;
    display: block !important;
    width: 40px !important;
    margin: 0 !important;
    text-align: center !important;
  }

  .search-toggle-btn {
    order: 4 !important;
    flex: 1 1 calc(100% - 50px) !important; /* Forces search to take remaining space */
    width: calc(100% - 50px) !important;
    padding: 0 !important;
    margin-inline-start: 10px !important;
  }

  .search-toggle-btn form{
    width: 100% !important;
  }

  .top-search-input-wrapper {
    width: 100% !important; 
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* ===================================================
     ROW 3: Main Navigation Drawer
     =================================================== */
  .main-nav {
    order: 5 !important;
    width: 100% !important;
    flex-basis: 100% !important;
  }
}


