/*--------------------------------------------------------------
  # Navigation Menu
--------------------------------------------------------------*/

.navbar {
  padding: 0;
  position: static;
}

.navbar ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}

.navbar li {
  position: relative;
}

.navbar a,
.navbar a:focus {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  margin-left: 10px;
  font-family: "Raleway", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-default);
  white-space: nowrap;
  transition: background 0.3s;
}

.navbar a i,
.navbar a:focus i {
  font-size: 16px;
  line-height: 0;
  margin-left: 5px;
  margin-right: 5px;
}

.navbar a:hover,
.navbar .active,
.navbar .active:focus,
.navbar li:hover>a {
  background: rgba(255, 255, 255, 0.2);
}


/* ============================================================
   DESKTOP — STANDARD DROPDOWN  (level 2)
   ============================================================ */

.navbar .dropdown>ul {
  display: block;
  position: absolute;
  top: calc(100% + 30px);
  left: 10px;
  margin: 0;
  padding: 10px 0;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  background: #fff;
  box-shadow: 0 0 30px rgba(127, 137, 161, 0.25);
  transition: top 0.3s, opacity 0.3s;
}

.navbar .dropdown>ul li {
  min-width: 200px;
}

.navbar .dropdown>ul a {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #2f4d5a;
  white-space: nowrap;
  text-transform: none;
}

.navbar .dropdown>ul a i {
  font-size: 12px;
}

.navbar .dropdown>ul a:hover,
.navbar .dropdown>ul .active:hover,
.navbar .dropdown>ul li:hover>a {
  color: var(--color-secondary);
  background: none;
}

.navbar .dropdown:hover>ul {
  opacity: 1;
  top: 100%;
  visibility: visible;
}


/* ============================================================
   DESKTOP — NESTED DROPDOWN  (level 3)
   Targets .dropdown-submenu which is the class used in HTML
   ============================================================ */

.navbar .dropdown-submenu>ul {
  display: block;
  position: absolute;
  top: 0;
  left: calc(100% - 30px);
  margin: 0;
  padding: 10px 0;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  background: #fff;
  box-shadow: 0 0 30px rgba(127, 137, 161, 0.25);
  transition: left 0.3s, opacity 0.3s;
}

.navbar .dropdown-submenu>ul li {
  min-width: 200px;
}

.navbar .dropdown-submenu:hover>ul {
  opacity: 1;
  left: 100%;
  visibility: visible;
}

@media (max-width: 1366px) {
  .navbar .dropdown-submenu>ul {
    left: -90%;
  }

  .navbar .dropdown-submenu:hover>ul {
    left: -100%;
  }
}

/* ============================================================
DESKTOP — MEGAMENU
============================================================ */

.navbar .megamenu {
  position: static;
}

.megamenu {
  position: relative;
}

/* ============================================================
MEGAMENU PANEL
============================================================ */

.megamenu .multi-column {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  padding: 0px 20px;
  background: #ffffff;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease;
}

/* ============================================================
KEEP MENU OPEN
============================================================ */

.megamenu:hover .multi-column,
.megamenu .multi-column:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ============================================================
LEFT PANEL
============================================================ */

.more-left-panel {
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
}

.more-left-panel li {
  list-style: none;
}

.more-left-panel li a {
  display: flex;
  align-items: center;

  gap: 10px;

  padding: 12px 16px;

  color: var(--color-default-light);

  transition: all 0.2s ease;
}

.more-left-panel li svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ============================================================
LEFT PANEL HOVER
============================================================ */

.more-left-panel li:hover {
  background: var(--color-secondary-light);
}

.more-left-panel li:hover a {
  color: var(--color-secondary);
}

.more-left-panel li:hover svg {
  fill: var(--color-secondary);
}

/* ============================================================
RIGHT PANEL
============================================================ */

.more-right-panel {
  padding-left: 25px;
   padding-bottom: 20px;
}

.submenu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;

  padding: 0;
  margin: 0;
}

.submenu ul li {
  list-style: none;
  min-width: 220px;
  flex: 1;
}

.submenu ul li strong {
  display: block;

  padding-bottom: 12px;

  font-size: 15px;
  font-weight: 700;

  color: #111827;
}

.submenu ul li a {
  display: block;

  padding: 7px 0;

  color: var(--color-default-light);

  transition: color 0.2s ease;
}

.submenu ul li a:hover {
  color: var(--color-secondary);
}


/* ============================================================
   MOBILE TOGGLE BUTTON
   ============================================================ */

.mobile-nav-toggle {
  display: none;
  font-size: 28px;
  line-height: 0;
  cursor: pointer;
  color: var(--color-default);
  transition: color 0.5s;
}

@media (max-width: 991px) {
  .mobile-nav-toggle {
    display: block;
  }

  .navbar ul {
    display: none;
  }
}


/* ============================================================
   MOBILE — NAVBAR OPEN STATE
   Uses .navbar.navbar-mobile (double-class) to beat specificity
   of .navbar ul { display: flex } declared above
   ============================================================ */

.navbar.navbar-mobile {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  background: rgba(43, 111, 142, 0.9);
  z-index: 9999;
  transition: background 0.3s;
}

.navbar.navbar-mobile .mobile-nav-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
}

.navbar.navbar-mobile ul {
  display: block;
  position: absolute;
  top: 55px;
  right: 15px;
  bottom: 15px;
  left: 15px;
  padding: 10px 0;
  overflow-y: auto;
  background: #fff;
  transition: background 0.3s;
}

.navbar.navbar-mobile a,
.navbar.navbar-mobile a:focus {
  padding: 10px 20px;
  font-size: 15px;
  color: var(--color-primary-dark);
}

.navbar.navbar-mobile a:hover,
.navbar.navbar-mobile .active,
.navbar.navbar-mobile li:hover>a {
  color: var(--color-secondary);
  background: none;
}


/* ============================================================
   MOBILE — STANDARD DROPDOWN  (level 2)
   ============================================================ */

.navbar.navbar-mobile .dropdown>ul {
  position: static;
  display: none;
  margin: 10px 20px;
  padding: 10px 0;
  z-index: 99;
  opacity: 1;
  visibility: visible;
  background: #fff;
  box-shadow: 0 0 30px rgba(127, 137, 161, 0.25);
}

.navbar.navbar-mobile .dropdown>ul li {
  min-width: 200px;
}

.navbar.navbar-mobile .dropdown>ul a {
  padding: 10px 20px;
}

.navbar.navbar-mobile .dropdown>ul a:hover,
.navbar.navbar-mobile .dropdown>ul .active:hover,
.navbar.navbar-mobile .dropdown>ul li:hover>a {
  color: var(--color-secondary);
}

.navbar.navbar-mobile .dropdown>.dropdown-active {
  display: block;
}


/* ============================================================
   MOBILE — NESTED DROPDOWN  (level 3)
   ============================================================ */

.navbar.navbar-mobile .dropdown-submenu>ul {
  position: static;
  display: none;
  margin: 10px 20px;
  padding: 10px 0;
  opacity: 1;
  visibility: visible;
  background: #fff;
  box-shadow: 0 0 30px rgba(127, 137, 161, 0.25);
}

.navbar.navbar-mobile .dropdown-submenu>.dropdown-active {
  display: block;
}


/* ============================================================
   MOBILE — MEGAMENU
   ============================================================ */

.navbar.navbar-mobile .megamenu .multi-column {
  position: static;
  display: none;
  opacity: 1;
  visibility: visible;
  flex-direction: column;
  box-shadow: none;
  padding: 10px 0;
  background: #fff;
}

.navbar.navbar-mobile .megamenu>.dropdown-active {
  display: flex;
}

.navbar.navbar-mobile .megamenu ul li a,
.navbar.navbar-mobile .megamenu ul li:hover>a {
  color: var(--color-default-light);
  background: none;
}

.navbar.navbar-mobile .megamenu ul li a:hover,
.navbar.navbar-mobile .megamenu ul li .active,
.navbar.navbar-mobile .megamenu ul li .active:hover {
  color: var(--color-secondary);
}




/* =========================================
USER DROPDOWN BUTTON
========================================= */

#user-dropdown {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  transition: 0.3s ease;
}

/* HOVER */

#user-dropdown:hover {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

/* =========================================
PROFILE IMAGE
========================================= */

.header-profile-user {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;

}

/* =========================================
NO IMAGE USER ICON
========================================= */

.header-profile-user.no-image {
  width: 38px;
  height: 38px;

  border-radius: 50%;

  background: var(--color-primary-light);
  color: var(--color-primary);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 16px;
  font-weight: 600;

  text-transform: uppercase;

  border: 2px solid var(--color-primary);
}

/* =========================================
USERNAME
========================================= */

#user-dropdown span {
  font-size: 14px;
  font-weight: 600;

  color: var(--color-primary);

  white-space: nowrap;
}

/* =========================================
DROPDOWN ICON
========================================= */

#user-dropdown i {
  font-size: 14px;
  color: var(--color-primary);
}

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

.dropdown-menu {
  min-width: 200px;

  border: none;
  border-radius: 12px;

  padding: 10px 0;

  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

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

.dropdown-menu .dropdown-item {
  padding: 10px 18px;

  font-size: 14px;
  font-weight: 500;

  color: var(--color-primary);

  transition: 0.2s ease;
}

/* =========================================
HOVER
========================================= */

.dropdown-menu .dropdown-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-secondary);
}

/* =========================================
LOGOUT
========================================= */

.dropdown-menu .dropdown-item.text-danger:hover {
  background: rgba(220, 53, 69, 0.08);
  color: var(--color-secondary) !important;
}

/* =========================================
MOBILE VIEW
ONLY IMAGE SHOW
========================================= */

@media (max-width: 991px) {

  #user-dropdown {
    padding: 4px;
    gap: 0;
  }

  /* HIDE NAME */

  #user-dropdown span,
  #user-dropdown i {
    display: none !important;
  }

  .header-profile-user,
  .header-profile-user.no-image {
    width: 36px;
    height: 36px;
  }

  .dropdown-menu {
    min-width: 180px;
  }

}
/* =========================================================
HEADER SEARCH
========================================================= */

.header-search {
  position: relative;
}

/* =========================================================
SEARCH WRAPPER
========================================================= */

.header-search-wrapper {
  position: relative;
  z-index: 99;
}

/* =========================================================
SEARCH FORM
========================================================= */

.header-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  transition: all 0.25s ease;
}

.header-search-form:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.08);
}

/* =========================================================
SEARCH ICON
========================================================= */

.header-search-icon {
  width: 50px;
  height: 46px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-search-icon i {
  font-size: 18px;
  color: #6b7280;
}

/* =========================================================
SEARCH INPUT
========================================================= */

.header-search-form input {
  flex: 1;
  height: 46px;
  border: none;
  outline: none;
  background: transparent;
  padding-right: 14px;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

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

/* =========================================================
SEARCH CLOSE
========================================================= */

.header-search-close {
  width: 46px;
  height: 46px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-search-close i {
  font-size: 16px;
  color: #111827;
}

/* =========================================================
SEARCH RESULTS
========================================================= */

.header-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.08);
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 9999;
  display: none;
}

/* =========================================================
RESULT ITEM
========================================================= */

.header-search-results .list-group-item {
  border: none;
  background: transparent;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.header-search-results .list-group-item:hover {
  background: #f8fafc;
}

/* =========================================================
RESULT TEXT
========================================================= */

.header-search-results .list-group-item span:first-child {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
RESULT CATEGORY
========================================================= */

.result-category {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 30px;
  background: rgba(59,130,246,0.08);
  color: var(--color-primary);
  white-space: nowrap;
}

/* =========================================================
HEADER SEARCH BUTTON
========================================================= */

.header-icon-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: transparent;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.header-icon-btn:hover {
  background: rgba(0,0,0,0.05);
}

.header-icon-btn i {
  font-size: 20px;
  color: var(--color-primary);
}

/* =========================================================
DESKTOP
========================================================= */

@media (min-width: 992px) {

  .header-search-wrapper {
    display: flex !important;
    align-items: center;
    margin-left: 24px;
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent !important;
    height: auto !important;
  }

  .header-search-form {
    width: 420px;
    height: 46px;
    overflow: visible;
  }

  .header-search-close {
    display: none;
  }

  .header-icon-btn {
    display: none !important;
  }

  .header-search-results {
    display: none;
  }
}

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

@media (max-width: 991px) {

  .header-search-wrapper {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2100;
  }

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

  .header-search-form {
    width: 100%;
    padding: 14px;
    border-radius: 0;
    border: none;
    background: #ffffff;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
  }

  .header-search-wrapper.active .header-search-form {
    transform: translateY(0);
  }

  .header-search-icon,
  .header-search-close {
    width: 46px;
    height: 46px;
    background: #f3f4f6;
  }

  .header-search-icon {
    border-radius: 12px 0 0 12px;
  }

  .header-search-close {
    border-radius: 0 12px 12px 0;
  }

  .header-search-form input {
    height: 46px;
    padding: 0 14px;
    background: #f3f4f6;
    font-size: 15px;
  }

  .header-search-results {
    top: 76px;
    left: 14px;
    width: calc(100% - 28px);
    border-radius: 14px;
  }

  .header-icon-btn {
    display: flex;
  }
}