/* General Header Styles */
.header {
  width: 100%;
  background-color: white;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: background-color 0.3s, padding 0.3s;
  padding: 10px 20px;
}

.header.scrolled {
  background-color: #67b5fb;
}

/* Header Container */
.header .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Navigation Styles */
.header nav {
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: flex-end; /* Align nav items to the right */
}

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

.header nav ul li {
  margin: 0 10px;
  position: relative;
  display: flex;
  align-items: center;
}

.header nav ul li a {
  color: #38648e;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.header.scrolled nav ul li a {
  color: white;
}

.header nav ul li a:hover {
  color: #67b5fb;
}

/* Dropdown Button Styles */
.dropdown-btn {
  background: none;
  border: none;
  color: #38648e;
  cursor: pointer;
  font-size: 12px;
  transition: color 0.3s, transform 0.3s;
  display: flex;
  align-items: center;
}

.dropdown-btn .arrow-icon {
  margin-left: 5px;
  transition: transform 0.3s;
}

.header nav ul li:hover > .dropdown-btn .arrow-icon {
  transform: rotate(180deg); /* Rotate arrow on hover */
}

.header.scrolled .dropdown-btn {
  color: white;
}

.header.scrolled .dropdown-btn:hover {
  color: #38648e;
}

/* Dropdown Menu Styles */
.header nav ul .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  padding: 10px 0;
  list-style: none;
  margin: 0;
  margin-top: 0px;
  text-align: left;
  border-radius: 5px;
  min-width: 260px;
  min-height: 100px;
  font-size: 16px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.header nav ul li:hover > .dropdown {
  display: block; /* Show dropdown on hover */
  opacity: 1;
  transform: translateY(0); /* Dropdown comes into view */
}

/* Add space between the items */
.header nav ul .dropdown li {
  padding: 7px 0; /* Add padding between list items */
}

/* Specific dropdowns with different sizes */
.header nav ul .aus {
  min-width: 160px;
  min-height: 60px;
}

.header nav ul .ret {
  min-width: 240px;
  min-height: 130px;
}

/* Landing page bold style */
.header nav ul li > a {
  font-weight: bold; /* Landing page links are bold */
}

/* Subpage indentation */
.header nav ul li > .dropdown li > a {
  font-weight: normal; /* Subpage links are normal weight */
  padding-left: 20px; /* Indent subpages */
}

/* Dropdown styles when the header is scrolled */
.header.scrolled nav ul .dropdown {
  background-color: #67b5fb;
}

.header.scrolled nav ul .dropdown li a {
  color: white;
}

.header.scrolled nav ul .dropdown li a:hover {
  color: #38648e;
}

/* Additional Dropdown Item Styles */
.header nav ul .reform-dropdown li a,
.header nav ul .ati-dropdown li a,
.header nav ul .about-dropdown li a {
  color: #38648e;
  text-decoration: none;
  padding: 10px 20px;
  display: block;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.header nav ul .reform-dropdown li a:hover,
.header nav ul .ati-dropdown li a:hover,
.header nav ul .about-dropdown li a:hover {
  color: #67b5fb;
  transition: all 0.3s;
}

/* Burger Menu Styles */
.header nav .burger {
  display: none;
  cursor: pointer;
  color: #38648e;
}

.header.scrolled nav .burger {
  color: white;
}

.burger-menu {
  display: none;
}

/* Responsive Styles */
@media (max-width: 1299px) {
  .header nav ul .ret,
  .header nav ul .ati,
  .header nav ul .aus {
    font-size: 15px;
  }
}

@media (max-width: 1199px) {
  .header nav ul {
    display: none;
  }
  
  .header-right {
    display: none !important;
  }

  .header nav .burger {
    display: block;
  }

  .burger-menu {
    display: none;
    flex-direction: column;
    background-color: white;
    position: fixed;
    top: 60px;
    right: 0;
    width: 30%;
    height: calc(100% - 350px);
    z-index: 999;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    box-shadow: -10px 10px 20px rgba(0, 0, 0, 0.1);
  }

  .burger-menu.show {
    display: flex;
  }

  .burger-menu .header-top-right,
  .burger-menu .nav-list,
  .burger-menu .btn-typ1 {
    width: 100%;
    margin: 10px 0;
  }

  .burger-menu .header-top-right li,
  .burger-menu .nav-list li {
    width: 100%;
    margin: 10px 0;
  }

  .burger-menu .header-top-right li a,
  .burger-menu .nav-list li a {
    width: 100%;
    padding: 15px 20px;
    box-sizing: border-box;
    color: #38648e;
    background-color: white;
    border-bottom: 1px solid #ccc;
    transition: background-color 0.3s;
    display: block;
    text-align: left;
  }

  .burger-menu .header-top-right li a:hover,
  .burger-menu .nav-list li a:hover {
    background-color: #f0f0f0;
  }

  .burger-menu .header-top-right li select {
    width: 100%;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    color: #38648e;
  }

  .burger-menu .btn-typ1 {
    text-align: center;
    background-color: #38648e;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s;
  }

  .burger-menu .btn-typ1:hover {
    background-color: #67b5fb;
  }

  .burger-menu .dropdown {
    display: none;
    flex-direction: column;
    background-color: #f9f9f9;
    padding: 10px 20px;
    margin-top: 10px;
    border-radius: 5px;
  }

  .burger-menu .nav-list li {
    position: relative;
  }

  .burger-menu .nav-list li .dropdown {
    background-color: #f9f9f9;
    padding-left: 20px;
  }

  .burger-menu .nav-list li.active .dropdown {
    display: flex;
  }

  .burger-menu .nav-list li .dropdown-btn {
    cursor: pointer;
    font-size: 16px;
    padding: 10px;
    color: #38648e;
    background-color: white;
    border: none;
    outline: none;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .burger-menu .nav-list li .dropdown-btn:after {
    content: '\25BC'; /* Down arrow */
    font-size: 12px;
    transition: transform 0.3s;
  }

  .burger-menu .nav-list li.active .dropdown-btn:after {
    transform: rotate(180deg); /* Up arrow */
  }

  .burger-menu .nav-list li .dropdown a {
    text-decoration: none;
    list-style: none; /* Remove the dot before the subpage titles */
  }

  .burger-menu .nav-list li .dropdown li {
    list-style: none; /* Remove the dot before the subpage titles */
  }

  .burger-menu .btn-typ1:hover {
    background-color: #67b5fb;
    color: white; /* Ensure text stays white */
  }

  /* High specificity for color change when header is scrolled */
  .header.scrolled .burger-menu .nav-list li a,
  .header.scrolled .burger-menu .nav-list li .dropdown-btn,
  .header.scrolled .burger-menu .header-top-right li a,
  .header.scrolled .burger-menu .header-top-right li select {
    color: #67b5fb !important;
  }

  .header.scrolled .burger-menu .nav-list li a:hover,
  .header.scrolled .burger-menu .nav-list li .dropdown-btn:hover,
  .header.scrolled .burger-menu .header-top-right li a:hover {
    color: #38648e !important;
  }
}

/* Hover effect to open dropdown */
.header nav ul li:hover > .dropdown {
  display: block;
}

@media (max-width: 999px) {
  .burger-menu {
    display: none;
    flex-direction: column;
    background-color: white;
    position: fixed;
    top: 60px;
    right: 0;
    width: 40%;
    height: calc(100% - 350px);
    z-index: 999;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    border-radius: 0px 0px 20px 20px;
  }

  .burger-menu .header-top-right li a,
  .burger-menu .nav-list li a {
    width: 100%;
    padding: 15px 20px;
    box-sizing: border-box;
    color: #38648e;
    background-color: white;
    border-bottom: 1px solid #ccc;
    transition: background-color 0.3s;
    display: block;
    text-align: left;
    font-size: 14px;
  }

  .header-top-right .search-bar .search-icon {
    display: none;
  }
}

@media (max-width: 799px) {
  .burger-menu {
    display: none;
    flex-direction: column;
    background-color: white;
    position: fixed;
    top: 60px;
    right: 0;
    width: 50%;
    height: calc(100% - 350px);
    z-index: 999;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    border-radius: 0px 0px 20px 20px;
  }

  .burger-menu .header-top-right li a,
  .burger-menu .nav-list li a {
    width: 100%;
    padding: 15px 20px;
    box-sizing: border-box;
    color: #38648e;
    background-color: white;
    border-bottom: 1px solid #ccc;
    transition: background-color 0.3s;
    display: block;
    text-align: left;
    font-size: 14px;
  }
}

@media (max-width: 599px) {
  .burger-menu {
    display: none;
    flex-direction: column;
    background-color: white;
    position: fixed;
    top: 60px;
    right: 0;
    width: 60%;
    height: calc(100% - 350px);
    z-index: 999;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    border-radius: 0px 0px 20px 20px;
  }

  .burger-menu .header-top-right li a,
  .burger-menu .nav-list li a {
    width: 100%;
    padding: 15px 20px;
    box-sizing: border-box;
    color: #38648e;
    background-color: white;
    border-bottom: 1px solid #ccc;
    transition: background-color 0.3s;
    display: block;
    text-align: left;
    font-size: 14px;
  }
}

@media (max-width: 499px) {
  .burger-menu {
    display: none;
    flex-direction: column;
    background-color: white;
    position: fixed;
    top: 60px;
    right: 0;
    width: 80%;
    height: calc(100% - 350px);
    z-index: 999;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    border-radius: 0 0 20px 20px;
    box-shadow: -10px 10px 20px rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 399px) {
  .burger-menu {
    display: none;
    flex-direction: column;
    background-color: white;
    position: fixed;
    top: 60px;
    right: 0;
    width: 80%;
    height: calc(100% - 190px);
    z-index: 999;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    border-radius: 0 0 20px 20px;
    box-shadow: -10px 10px 20px rgba(0, 0, 0, 0.1);
  }
}

.dropdown-menu .dropdown-item a {
  color: #38648e !important;
}

/* Header Right Section */
.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Align header-right items to the right */
}

.header-right .header-top-right {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.header-right .header-top-right li {
  margin: 0 10px;
}

.header-right .header-top-right li a {
  color: #38648e;
  text-decoration: none;
  transition: color 0.3s;
}

.header-right .header-top-right li a:hover {
  color: #67b5fb;
}

/* Sign-in Button */
.header-right .btn-typ1 {
  background-color: #38648e;
  color: white;
  padding: 5px 15px;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

.header-right .btn-typ1:hover {
  background-color: #67b5fb;
  color: white;
}

/* Change background and text color when the header is scrolled */
.header.scrolled .header-right .btn-typ1 {
  background-color: white;
  color: #67b5fb;
}

.header.scrolled .header-right .btn-typ1:hover {
  background-color: #67b5fb;
  color: white;
}

.header.scrolled .header-right .header-top-right li a,
.header.scrolled .header-right .btn-typ1 {
  color: white;
}

.header.scrolled .header-right .header-top-right li a:hover,
.header.scrolled .header-right .btn-typ1:hover {
  color: #67b5fb;
  background-color: white;
}

/* Search Form Area */
.search-form-area {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1001;
  justify-content: center;
  align-items: center;
}

.search-form-centered {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

#search-box {
  background: #fff;
  padding: 20px;
  border-radius: 5px;
  text-align: center;
}

#close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
}

.search-form .form-control {
  margin-bottom: 10px;
}

.search-form button {
  background-color: #2766DA;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.search-form button:hover {
  background-color: #38648e;
}

/* Responsive styles */
@media (max-width: 768px) {
  .search-field {
    width: 80%;
  }
}

.burger-sign-in-btn {
  background-color: #38648e;
  color: white;
  padding: 5px 15px;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

.burger-sign-in-btn:hover {
  background-color: #67b5fb;
  color: white;
}

.burger-sign-in-btn.scrolled {
  background-color: white;
  color: #67b5fb;
}

.burger-sign-in-btn.scrolled:hover {
  background-color: #67b5fb;
  color: white;
}

/* Header Right Styles */
.header-right {
  display: flex;
  align-items: center;
}

.header-top-right {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.header-top-right .languages,
.header-top-right .search-bar,
.header-top-right .profile {
  display: flex;
  align-items: center;
  margin-left: 10px;
  margin-right: 10px;
}

.header-top-right .languages .dropdown-content {
  display: none;
}

.header-top-right .languages .dropdown-content.show {
  display: block;
}

/* Dropdown Styles */
.header-top-right .languages .dropdown-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

.header-top-right .languages .flag-icon {
  width: 20px;
  height: 20px;
  margin-right: 5px;
  border-radius: 50%;
}

.header-top-right .languages .arrow-icon {
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.header-top-right .languages .dropdown-content {
  display: none;
  border-radius: 0 0 10px 10px;
  top: 60px;
  position: absolute;
  background-color: white;
  min-width: 120px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.header-top-right .languages .dropdown-content.show {
  display: block;
}

.header-top-right .languages .dropdown-content li {
  display: flex;
  justify-content: left;
}

.header-top-right .languages .dropdown-content a {
  color: black !important;
  margin-right: 0px;
  padding: 8px 10px;
  text-decoration: none;
  display: flex;
  align-items: start;
  justify-content: start;
  width: 100%;
}

/* Search Bar Styles */
.header-top-right .search-bar {
  display: flex;
  align-items: center;
  background-color: white;
  border: 2px solid #38648e;
  border-radius: 20px;
  overflow: hidden;
  width: 150px;
}

.header-top-right .search-bar input {
  padding: 5px;
  border: none;
  outline: none;
  border-radius: 20px 0 0 20px;
  width: 100px;
}

.header-top-right .search-bar .search-icon {
  margin-left: 15px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 0 20px 20px 0;
}

.header-top-right .search-bar .fa-search {
  color: #38648e;
}

/* Profile Styles */
.header-top-right .profile {
  display: flex;
  align-items: center;
}

.header-top-right .profile-img {
  margin-left: 5px;
  border: 2px solid #38648e;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 5px;
}

/* Page Header and Search Container */
.page-header {
  text-align: center;
  margin: 30px 0;
  color: #38648e;
  font-weight: bold;
}

.search-container {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}

.search-field {
  width: 50%;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* Logos Grid */
.logos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.logo-box {
  width: 300px;
  text-align: center;
  margin-bottom: 10px;
}

.logo-box img {
  width: 100%;
  height: auto;
}

.header-right {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.header nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.header-right .header-top-right {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.header-right .header-top-right li {
  margin: 0 10px;
}

.header-right .header-top-right li a {
  color: #38648e;
  text-decoration: none;
  transition: color 0.3s;
}

.header-right .header-top-right li a:hover {
  color: #67b5fb;
}

/* Language Dropdown Styles */
.header-top-right .languages .dropdown-btn {
  color: #38648e;
}

.header.scrolled .header-top-right .languages .dropdown-btn {
  color: white;
}

.header-top-right .languages .dropdown-content a {
  color: #38648e;
}

.header.scrolled .header-top-right .languages .dropdown-content a {
  color: white;
}

.header.scrolled .header-top-right .search-bar {
  border-color: #67b5fb;
}

.header.scrolled .header-top-right .fa-search {
  color: #67b5fb;
}

.header.scrolled .header-top-right .profile-img {
  border-color: white;
}

/* General Header Styles */
.header-right .header-top-right span {
  color: #38648e;
}

.header.scrolled .header-right .header-top-right span {
  color: white !important;
}

/* Guest name and En word */
.header-right .languages .dropdown-btn {
  color: #38648e;
}

.header-right .profile span {
  color: gray;
}

/* When scrolled */
.header.scrolled .header-right .languages .dropdown-btn {
  color: white !important;
}

.header.scrolled .header-right .profile span {
  color: white !important;
}

.header.scrolled .header-right .languages .dropdown-btn,
.header.scrolled .header-right .languages .dropdown-btn img,
.header.scrolled .header-right .languages .dropdown-btn i {
  color: white;
}

.header.scrolled .header-right .profile span {
  color: white;
}

/* Search Bar Icon */
.header.scrolled .header-right .search-bar .search-icon .fa-search {
  color: white;
}

.header.scrolled .header-right .languages {
  color: white !important;
}

.header-right .header-top-right span:nth-of-type(2) {
  font-size: 30px;
  color: #38648e !important;
}

.header.scrolled .header-right .header-top-right span:nth-of-type(2) {
  color: white !important;
}

.header.scrolled nav ul li a:hover {
  color: #38648e !important;
}

/* Active link styles */
.nav-list li a.active,
.nav-list li .dropdown-btn.active {
  color: #1f328d;
  font-weight: bold;
}

/* Active submenu item */
.nav-list .dropdown li a.active {
  color: #1f328d;
  padding-left: 25px;
}

/* Active dropdown button with open menu */
.nav-list li .dropdown-btn.active .arrow-icon {
  transform: rotate(180deg);
  color: #1f328d;
}

/* Active link styles when scrolled */
.header.scrolled .nav-list li a.active,
.header.scrolled .nav-list li .dropdown-btn.active {
  color: #1f328d !important;
}

/* Active submenu item when scrolled */
.header.scrolled .nav-list .dropdown li a.active {
  color: #1f328d !important;
}

/* Active dropdown button with open menu when scrolled */
.header.scrolled .nav-list li .dropdown-btn.active .arrow-icon {
  transform: rotate(180deg);
  color: #1f328d !important;
}

.nav-list li .dropdown-btn.active {
  color: #1f328d;
}

.header.scrolled .nav-list li .dropdown-btn.active {
  color: #1f328d !important;
}

/* Custom styles for the dropdown */
.dropdown-menu {
  background-color: white !important;
}

.dropdown-item {
  color: #38648e !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: #fff !important;
  background-color: #38648e !important;
}

.dropdown-item.active,
.dropdown-item:active {
  color: #fff !important;
  background-color: #38648e !important;
}

.dropdown-item.disabled,
.dropdown-item:disabled {
  color: #adb5bd !important;
  background-color: transparent !important;
}
