.header {
  width: 100%;
  padding: 30px 0;
  position: absolute;
  top: 0;
  z-index: 9;
  transition: background var(--time) ease-in-out,
    padding var(--time) ease-in-out;
}

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

.header .container > a {
  position: relative;
  z-index: 9999;
}

.header-iverted .menu-icon:not(.open) span {
  background: #090909;
}

body:not(.media-news-page) .site-logo .color-logo {
  display: none;
}

.media-news-page .site-logo .white-logo {
  display: none;
}

/* ------------------------------------------------------------ */

.menu-ul {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  column-gap: 45px;
}

body:not(.media-news-page) .menu-link {
  color: #ffffff;
}

.menu-link {
  /* font-size: 24px; */
  font-weight: 500;
  padding-block: 12px;
  transition: color var(--time) ease-in-out, background var(--time) ease-in-out;
}

.menu-li:last-child .menu-link {
  padding-inline: 26px;
  display: flex;
  align-items: center;
  column-gap: 11px;
  color: #ffffff;
  background: var(--color-primary);
  border-radius: 9px;
}

.menu-li:last-child .menu-link:hover {
  background: var(--color-primary-hover);
}

.active .menu-link,
li:not(:last-child) .menu-link:hover,
.sub-menu a:hover {
  color: var(--color-secondary) !important;
}

/* ------------------------------------------------------------ */

.has-dropdown {
  position: relative;
}

.sub-menu {
  padding: 20px 26px;
  width: fit-content;
  background: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.sub-menu li:not(:first-child) {
  margin-top: 15px;
}

.sub-menu a {
  display: block;
  color: #ffffff;
  white-space: nowrap;
}

.has-dropdown .arrow {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 2px;
  position: relative;
  background: url(../images/menu-arrow.png) no-repeat center;
  background-size: contain;
  transition: transform var(--time) ease-in-out;
  top: 0;
}

.has-dropdown:hover .arrow {
  transform: rotate(180deg); /* Flip arrow on hover */
}

.media-news-page .has-dropdown .arrow {
  filter: invert();
}

.patient-login-page .menu-ul > li:last-child .menu-link {
  border: 1px solid #ffffff;
}

/* ------------------------------------------------------------ */

.menu-icon {
  height: 15px;
  width: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-transform: rotate(0);
  transform: rotate(0);
  -webkit-transition: all var(--time) ease-in-out;
  transition: all var(--time) ease-in-out;
  border-radius: 0 4px 4px 0;
  display: none;
  position: relative;
  z-index: 8;
}

.menu-icon span {
  display: block;
  position: absolute;
  height: 2px;
  width: 27px;
  background: #ffffff;
  border-radius: 4px;
  opacity: 1;
  left: 0;
  -webkit-transform: rotate(0);
  transform: rotate(0);
  -webkit-transition: all var(--time) ease-in-out;
  transition: all var(--time) ease-in-out;
}

.media-news-page .menu-icon span {
  background: #090909;
}

.menu-icon span:nth-child(1) {
  top: 0;
}

.menu-icon span:nth-child(2),
.menu-icon span:nth-child(3) {
  top: 7px;
}

.menu-icon span:nth-child(4) {
  top: 14px;
}

.menu-icon.open span:nth-child(1) {
  top: 10px;
  width: 0;
  left: 50%;
}

.menu-icon.open span:nth-child(2) {
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

.menu-icon.open span:nth-child(3) {
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.menu-icon.open span:nth-child(4) {
  top: 10px;
  width: 0;
  left: 50%;
}

.menu-icon.open span {
  color: var(--color-primary);
  background: var(--color-primary);
}

/* ------------------------------------------------------------  */

@media (min-width: 993px) {
  .header-iverted .menu-link {
    color: #090909;
  }
  .sub-menu {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: fit-content;
    top: 100%;
    transform: translateY(100px);
    left: 0;
    background: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(100px);
    border-radius: 15px;
    z-index: 3;
  }
  .has-dropdown:hover .sub-menu {
    transform: translateY(8px);
    visibility: visible;
    opacity: 1;
  }
}
@media (max-width: 767px) {
  .menu-icon {
    display: block;
  }
}

@media (max-width: 1600px) {
  .header {
    padding: 20px 0;
  }
}
@media (max-width: 1200px) {
  .menu-ul {
    column-gap: 25px;
  }
  .menu-li:last-child .menu-link {
    padding-inline: 15px;
    column-gap: 9px;
  }
}

@media (max-width: 992px) {
  .menu-icon {
    display: block;
  }
  .navbar {
    position: fixed;
    width: 100%;
    z-index: 8;
    background: rgba(0, 0, 0, 0.878);
    background-size: cover;
    top: 0;
    height: 100%;
    left: -100%;
    right: 0;
    overflow: hidden;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    -webkit-transition: all var(--time) ease-in-out;
    transition: all var(--time) ease-in-out;
  }

  .has-dropdown:hover .sub-menu {
    transform: translateY(12px);
    visibility: visible;
    opacity: 1;
  }
  .header .slow {
    left: 0;
  }

  .menu-ul {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
    flex-direction: column;
    text-align: center;
    padding: 0 20px;
  }

  .menu-ul li {
    padding: 0;
  }

  .menu-ul li + li {
    margin-top: 14px;
  }

  .menu-ul > a {
    font-size: 15px;
    line-height: 30px;
    font-weight: 400;
    color: #ffffff;
    padding-block: 6px;
  }
  .sub-menu {
    padding: 15px;
  }

  .sub-menu li:not(:first-child) {
    margin-top: 8px;
  }
  .has-dropdown > a {
    display: none;
  }
  .menu-link {
    color: #ffffff;
  }
  .header .container > .site-logo {
    width: 130px;
  }
  .header {
    padding: 15px 0;
  }
}
