/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
.site-header {
  background-color: var(--color-main) !important;
  padding: 1.7em 2em;
}

.site-branding {
  display: flex;
  align-items: center;
}

.site-title,
.site-description {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute;
}

.site-title a,
.site-description {
  color: var(--color-white);
  text-decoration: none;
}

.custom-logo {
  max-height: 50px;
  max-width: 210px;
  width: auto;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: end;
}

.main-navigation ul li {
  margin: 0 1em;
  position: relative;
}

.main-navigation ul li a {
  color: var(--color-white);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.main-navigation ul li a:hover {
  color: var(--main-yellow-400);
}

.main-navigation ul li.menu-item-has-children > a::after {
  content: "▾";
  font-size: 1.2em;
  margin-left: 0.5em;
  color: var(--color-gold);
}

.main-navigation ul ul {
  display: none;
  position: absolute;
  background-color: var(--color-navy);
  padding: 1em;
  border-radius: 4px;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 200px;
}

.main-navigation ul li:hover > ul {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.header-actions .search-form {
  position: relative;
}

.header-actions .search-form .search-field {
  background-color: var(--color-white);
  border: none;
  border-radius: 8px;
  padding: 0.5em 2.5em 0.5em 1em;
  color: var(--main-blue-950);
  width: 300px;
  height: 44px;
}

.header-actions .search-form .search-field::placeholder {
  color: var(--main-blue-950);
}

.header-actions .search-form .search-submit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.header-actions .search-form .search-submit::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  background-image: url("../images/search.svg");
  background-repeat: no-repeat;
  background-position: center;
}

/*--------------------------------------------------------------
  # Secondary Navigation Header
  --------------------------------------------------------------*/

.secondary-header-menu-container-wrapper {
  background-color: var(--color-navy-light) !important;
}

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

.secondary-header-navigation ul li {
  margin-right: 2em;
  margin-bottom: 0;
}

.secondary-header-navigation ul li a {
  color: var(--color-white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.secondary-header-navigation ul li a:hover {
  color: var(--main-yellow-400);
}

.secondary-header-social-icons {
  display: flex;
  align-items: center;
}

.secondary-header-social-icons a {
  margin-left: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.secondary-header-social-icons img {
  height: 24px;
  width: auto;
}

/*--------------------------------------------------------------
# Mobile Menu
--------------------------------------------------------------*/

/* Mobile Menu Toggle Button (Hamburger) */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-white);
  transition: all 0.3s ease;
}

/* Mobile Search Toggle Button */
.mobile-search-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
}

.mobile-search-toggle img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  max-width: 375px;
  height: 100%;
  background-color: var(--color-white);
  z-index: 1999;
  overflow-y: auto;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-drawer.active {
  left: 0;
}

/* Mobile Drawer Header */
.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: var(--color-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-drawer-logo {
  max-height: 40px;
  width: auto;
}

.mobile-drawer-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
}

/* Mobile Drawer Search */
.mobile-drawer-search {
  padding: 20px;
  background-color: var(--color-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-drawer-search .search-form {
  position: relative;
}

.mobile-drawer-search label {
  width: 100%;
}

.mobile-drawer-search .search-field {
  width: 100%;
  background-color: var(--color-white);
  border: none;
  border-radius: 8px;
  padding: 12px 40px 12px 16px;
  font-size: 14px;
  color: var(--color-navy);
}

.mobile-drawer-search .search-submit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mobile-drawer-search .search-submit::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background-image: url("../images/search.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Mobile Drawer Navigation */
.mobile-drawer-nav {
  flex: 1;
  padding: 0;
  overflow-y: auto;
}

.mobile-drawer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-drawer-nav > ul {
  border-bottom: 1px solid #e5e5e5;
}

.mobile-drawer-nav li {
  border-bottom: 1px solid #e5e5e5;
  margin: 0;
}

.mobile-drawer-nav li:last-child {
  border-bottom: none;
}

.mobile-drawer-nav > ul > li > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  color: var(--color-navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: background-color 0.2s ease;
}

.mobile-drawer-nav > ul > li > a:hover {
  background-color: #f5f5f5;
}

/* Submenu Styles */
.mobile-drawer-nav .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%231a2643' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.mobile-drawer-nav .menu-item-has-children.submenu-open > a::after {
  transform: rotate(180deg);
}

.mobile-drawer-nav .sub-menu {
  display: none;
  background-color: #f9f9f9;
  padding: 0;
}

.mobile-drawer-nav .submenu-open > .sub-menu {
  display: block;
}

.mobile-drawer-nav .sub-menu li {
  border-bottom: 1px solid #e5e5e5;
}

.mobile-drawer-nav .sub-menu li:last-child {
  border-bottom: none;
}

.mobile-drawer-nav .sub-menu a {
  display: block;
  padding: 12px 20px 12px 40px;
  color: var(--color-navy);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: background-color 0.2s ease;
}

.mobile-drawer-nav .sub-menu a:hover {
  background-color: #efefef;
}

/* Mobile Drawer Footer (Social Icons) */
.mobile-drawer-footer {
  padding: 24px 20px;
  background-color: var(--color-white);
  border-top: 1px solid #e5e5e5;
}

.mobile-drawer-footer h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-navy);
  margin: 0 0 16px 0;
}

.mobile-drawer-social {
  display: flex;
  gap: 16px;
}

.mobile-drawer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.mobile-drawer-social img {
  width: 24px;
  height: 24px;
}

/*--------------------------------------------------------------
# Mobile Responsive Styles
--------------------------------------------------------------*/

@media screen and (max-width: 991px) {
  /* Show mobile menu toggle and hide desktop menu */
  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-search-toggle {
    display: block;
  }

  /* Hide desktop navigation */
  .main-navigation,
  .secondary-header-menu-container-wrapper {
    display: none !important;
  }

  /* Hide desktop search */
  .header-actions .search-form {
    display: none;
  }

  /* Center logo on mobile */
  .site-header .container {
    position: relative;
  }

  .site-branding {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .custom-logo {
    max-height: 40px;
  }

  /* Adjust header padding for mobile */
  .site-header {
    padding: 1em 1.5em;
  }
}

@media screen and (max-width: 767px) {
  .mobile-drawer {
    max-width: 100%;
  }

  .site-header {
    padding: 1em 1em;
  }

  .custom-logo {
    max-height: 40px;
  }
}

@media screen and (min-width: 992px) {
  /* Hide mobile elements on desktop */
  .mobile-drawer,
  .mobile-drawer-overlay,
  .mobile-menu-toggle,
  .mobile-search-toggle {
    display: none !important;
  }
}
