/* Layout */
.hac-mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  height: 60px;
}

.hac-mobile-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-light-gray);
}

.hac-mobile-header-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.hac-mobile-logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* Mobile Menu Toggle Button */
.hac-mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 56px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  overflow: visible;
  transition: transform 0.3s ease;
}

.hac-mobile-menu-toggle.active {
  transform: translateX(6px);
}

.hac-mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-navy);
  margin: 2px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
  position: relative;
  transform-origin: center;
}

.hac-mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(0.5px, 8px);
}

.hac-mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.hac-mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(0.5px, -8px);
}

/* Mobile Navigation Menu */
.hac-mobile-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999998;
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  height: calc(100vh - 60px);
}


/* Prevent body scrolling when mobile menu is open */
body:has(.hac-mobile-nav.open) {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

.hac-mobile-nav.open {
  transform: translateY(0);
}

.hac-mobile-nav-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-white);
  z-index: 1;
}

.hac-mobile-nav-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 1rem 0;
}

.hac-mobile-nav-menu {
  margin-bottom: 1rem;
  overflow: visible;
}

.hac-mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hac-mobile-menu-list > li {
  border-bottom: 1px solid var(--color-light-gray);
}

.hac-mobile-menu-link {
  display: block;
  color: var(--color-navy);
  text-decoration: none;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-headline);
  transition: color 0.2s ease;
}

.hac-mobile-menu-link:hover {
  color: #0073aa;
  text-decoration: none;
}

/* Mobile Search */
.hac-mobile-search {
  margin-top: 0.5rem;
  padding: 1rem;
  padding-top: 1rem;
}

.hac-mobile-search-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.hac-mobile-search-field {
  flex: 0 1 auto;
  width: calc(100% - 150px);
  max-width: 300px;
  padding: calc(0.75rem + 5px) 1rem;
  border: 1px solid var(--color-light-gray);
  border-radius: var(--border-radius-small);
  background: var(--color-white);
  color: var(--color-navy);
  font-size: 1.125rem;
  line-height: 1.5;
  box-sizing: border-box;
  outline: none;
  font-family: var(--font-body);
}

.hac-mobile-search-field:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 0.2rem rgba(0, 115, 170, 0.25);
}

.hac-mobile-search-field::placeholder {
  color: var(--color-medium-gray);
}

.hac-mobile-search-submit {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-white);
  color: var(--color-black);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.125rem;
  border: 1px solid var(--color-light-green);
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: var(--font-body);
  margin-top: -7px;
}

.hac-mobile-search-submit::before {
  content: '';
  position: absolute;
  bottom: -10px;
  height: 10px;
  width: 100%;
  left: 4px;
  transform: skewX(45deg);
  background-color: var(--color-light-green);
  transition: all 0.2s ease;
}

.hac-mobile-search-submit::after {
  content: '';
  position: absolute;
  right: -10px;
  height: 105%;
  width: 10px;
  bottom: -6px;
  transform: skewY(45deg);
  background-color: var(--color-light-green);
  transition: all 0.2s ease;
}

.hac-mobile-search-submit:hover {
  transform: translate(4px, 4px);
}

.hac-mobile-search-submit:hover::before {
  bottom: -4px;
  height: 4px;
  left: 1px;
}

.hac-mobile-search-submit:hover::after {
  right: -4px;
  width: 4px;
  bottom: -3px;
  height: 104%;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===================================
   MEDIA QUERIES - TABLET BREAKPOINT (1080px)
   =================================== */

@media screen and (max-width: 1080px) {
  /* Show mobile header, hide desktop navigation */
  .hac-mobile-header {
    display: block;
  }
  
  .hac-mobile-nav {
    display: block;
  }
  
  /* Hide desktop navigation wrapper on mobile */
  .site-navigation-wrapper {
    display: none;
  }
  
  /* Add padding to body to account for fixed mobile header */
  body {
    padding-top: 60px !important;
  }
  
  /* Ensure mobile nav container scrolls properly */
  .hac-mobile-nav-container {
    max-height: calc(100vh - 60px);
  }
}

