* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

header {
    display: flex;
    align-items: center;
    flex-direction: column;
    background-color: #e2dad1;
    padding: 8px 16px;
    transition: max-height 0.4s ease-in-out;  /* changed from all properties */
    max-height: 62px;
    height: 100%;
    overflow: hidden;
    z-index: 10000;           /* increased a bit */
    position: relative;      /* ← important: creates a stacking context */
}

header.menu-opened {
    max-height: 150vh;
    overflow-y: auto;
    position: fixed;          /* ← make it fixed on mobile when opened */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;                /* covers the whole screen */
    z-index: 9999;            /* extremely high */
}

  header .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  header .header-top img {
    cursor: pointer;
  }

  header #btn-close {
    display: none;
  }

  header .header-logo {
    display: flex;
    align-items: center;
    color: rgba(0, 0, 0, 0.9);
    font-weight: 700;
    text-decoration: none;
    font-size: 30px;
    text-wrap-mode: nowrap;
    user-select: none;
    height: 46px;
    font-family: poppins300;
  }

  header .header-logo span {
    color: darkgreen;
  }

  header nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    /* background-color: red; */
  }

  header nav a,
  header nav button {
    font-size: 20px;
    color: rgba(40, 51, 136, 0.8);
    text-decoration: none;
    border: none;
    background-color: transparent;
    padding: 8px 0;
    line-height: 30px;
    font-family: inherit;
    cursor: pointer;
    user-select: none;
    font-family: 'artifika';
  }

  #logo-lang{
    color:darkgreen;
    margin-left:15px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
  }

  header nav a:hover,
  header nav button:hover {
    color: rgba(0, 0, 0, 0.7);
  }

  header nav.active {
    color: rgba(0, 0, 0, 0.9);
  }

  header .dropbtn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
  }

  header .dropbtn img {
    filter: brightness(0) saturate(100%) invert(20%) sepia(45%)
      saturate(2476%) hue-rotate(211deg) brightness(89%) contrast(91%);
  }

  header .dropbtn:hover img {
    filter: brightness(0) saturate(100%) invert(0%) sepia(0%) saturate(0%)
      hue-rotate(0deg) brightness(100%) contrast(100%);
  }

header .dropdown-content {
    display: none;
    flex-direction: column;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.15);
    width: 100%;
    padding: 8px 0;
    margin-top: 8px;
    border-radius: 5px;
    position: relative;       /* mobile: stays in flow */
    z-index: 10000;
}

header .dropdown-content.active {
    display: flex;
}

  header .dropdown-content a {
    font-size: 16px;
    color: rgb(33, 37, 41);
    padding: 4px 24px;
    text-wrap-mode: nowrap;
    line-height: 1.5;
    font-family: Arial, Helvetica, sans-serif;
  }

  header .dropdown-content a:hover {
    background-color: #e9eaeb;
  }

  header .dropdown {
    position: relative;       /* needed for absolute positioning of content */
}

body.menu-open {
    overflow: hidden;   /* prevents scrolling the page behind the menu */
}


  @media screen and (min-width: 991px) {
    header {
      flex-direction: row;
      gap: 20px;
      overflow: unset;
    }

    header .header-top {
      width: auto;
    }

    header .header-top img {
      display: none !important;
    }

    header nav {
      flex-direction: row;
      gap: 20px;
    }

    header .dropdown {
      position: relative;
    }

    header .dropdown-content {
      position: absolute;
      top: 100%;
      margin-top: 5px;
      min-width: 230px;
    }
  }

/* Desktop rules – improved */


