.site-header {
  background: var(--color-primary-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 30px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 80px;
}

.logo a img {
  height: 50px;
}

.wrapper-nav {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 20px;
  width: 100%;
}

.hide-mobile {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 1.5rem;
  width: 100%;
}

.search-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 360px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--color-secondary-white);
  border-radius: 40px;
  padding: 0.5rem 1rem;
  width: 100%;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-henry);
  font-size: 16px;
  color: var(--color-primary-blue);
}

/* Fix autofill white background flash */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px var(--color-secondary-white) inset;
  -webkit-text-fill-color: var(--color-primary-blue);
  transition: background-color 5000s ease-in-out 0s;
}

.search-box input::placeholder {
  color: var(--color-primary-blue);
  opacity: 0.6;
}

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--color-primary-blue);
  padding: 0;
}

.search-results-dropdown {
  position: absolute;
  background: #f9faf3;
  border: 1px solid #ccc;
  max-height: 250px;
  overflow-y: auto;
  top: 84px;
  right: 320px;
  width: 520px;
  border-radius: 12px;
  padding: 10px 15px;
  z-index: 2001; /* ensure above header */
  animation: fadeIn 0.3s ease;
}

.search-results-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-suggestion-item a {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 8px 12px;
  text-decoration: none;
  color: #314233;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
  font-family: var(--font-henry);
}

.search-suggestion-item a:hover,
.search-suggestion-item a:focus {
  background-color: var(--color-secondary-blue);
  color: var(--color-primary-blue);
  font-family: var(--font-henry);
}

/* Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 40px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 40px;
  height: 4px;
  background-color: var(--color-tertiary-blue);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Unified Mobile Menu */
/* Backdrop (covers full screen when active) */
.menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 35, 73, 0.7); /* dim background */
  display: none; /* hidden by default */
  z-index: 1500;
}

/* Show backdrop when menu is active */
.menu-backdrop.active {
  display: block;
}

/* Sliding menu */
/* Sliding menu from RIGHT */
.menu-wrap {
  width: 100%;
  max-width: 460px;
  height: 100%;
  background-color: var(--color-tertiary-blue);
  position: absolute;
  top: 0;
  right: 0; /* menu anchored to the right */
  transform: translateX(100%); /* hidden to the right */
  padding: 100px 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  z-index: 2000;
  transition: transform 0.3s ease-in-out;
}

.menu-wrap.active {
  transform: translateX(0); /* slide in */
}

.sidebar-top {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.sidebar-bottom {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 55px;
}

.logo-sidebar a img {
  max-width: 380px;
  width: 100%;
}

.menu-links{
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.link-lists{
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.link-lists li a{
 color: var(--color-primary-white);
 font-family: var(--font-henry);
 text-decoration: none;
 font-size: 24px;
}

.link-lists li a span{
    color: var(--color-primary-white);
}

.menu-wrap a:hover{
 color: var(--color-secondary-blue);
}

/* Close button style */
.close-menu {
  position: absolute;
  top: 40px;
  right: 40px;
  font-size: 42px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.sidebar-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.contact-text{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}

.contact-text p{
  font-family: var(--font-montserrat);
  font-size: var(--p-bold-size);
  color: var(--color-primary-white);
}

.side-contact p, .side-contact a{
  font-family: var(--font-montserrat);
  font-size: var(--button-size);
  font-weight: var(--detail-weight);
  color: var(--color-primary-white);
}

.side-contact{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

body.menu-open {
  overflow: hidden;
  height: 100vh; /* optional: prevent layout shift */
}

/* ---------- TABLET (≤1024px) ---------- */
@media (max-width: 1024px) {
  /* Header container */
  .site-header .container {
    margin: 0 20px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  /* Logo smaller if needed */
  .logo a img {
    height: 45px;
  }

  /* Hide desktop nav */
  .hide-mobile {
    display: none;
  }

  /* Adjust search */
  .search-container {
    max-width: 250px;
    gap: 1rem;
  }

  .search-box input {
    font-size: 14px;
  }

  /* Mobile menu toggle visible */
  .menu-toggle {
    display: flex;
  }
}

/* ---------- MOBILE (≤768px) ---------- */
@media (max-width: 768px) {
  /* Header padding smaller */
  .site-header {
    padding: 10px 0;
  }

  /* Container adjustments */
  .site-header .container {
    margin: 0 20px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  /* Logo smaller */
  .logo a img {
    height: 40px;
  }

  /* Wrapper nav adjustments */
  .wrapper-nav {
    gap: 8px;
    width: auto;
  }

  /* Hide desktop-only elements */
  .hide-mobile {
    display: none;
  }

  /* Search adjustments */
  .search-container {
    max-width: 200px;
    gap: 0.5rem;
  }

  .search-box input {
    font-size: 12px;
  }

  /* Dropdown search results full width */
  .search-results-dropdown {
    width: calc(100% - 30px);
    left: 15px;
    top: 55px;
    max-height: 200px;
    padding: 8px 12px;
  }

  /* Hamburger menu */
  .menu-toggle {
    display: flex;
    width: 35px;
    height: 25px;
  }

  .menu-toggle span {
    height: 3px;
    border-radius: 1.5px;
  }

  /* Mobile sliding menu */
  .menu-wrap {
    max-width: 100%;
    padding: 80px 20px 20px;
  }

  .close-menu {
    top: 20px;
    right: 20px;
    font-size: 36px;
  }

  /* Sidebar elements spacing */
  .sidebar-top {
    gap: 40px;
  }
  .sidebar-bottom {
    gap: 35px;
  }

  /* Links smaller */
  .link-lists li a {
    font-size: 20px;
  }

  /* Sidebar icons smaller */
  .sidebar-icons {
    gap: 15px;
  }
  .contact-text p {
    font-size: 14px;
  }
  .side-contact p, .side-contact a {
    font-size: 12px;
  }
}