.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

nav .max-w-7xl {
  width: min(100%, 92rem);
  max-width: 92rem;
  gap: clamp(0.85rem, 2vw, 2rem);
  justify-content: center;
}

nav .max-w-7xl > a:first-child {
  flex: 0 0 auto;
  margin-right: clamp(0.35rem, 1vw, 0.9rem);
}

nav .max-w-7xl > a:first-child img {
  display: block;
  width: clamp(88px, 7vw, 106px);
  height: auto;
}

nav .site-nav-links {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
  column-gap: clamp(0.25rem, 0.55vw, 0.5rem);
  justify-content: flex-end;
  row-gap: 0.5rem;
}

nav .site-nav-links > a:not(.text-xs),
nav .site-nav-links .nav-dropdown > a {
  flex: 0 0 auto;
  white-space: nowrap;
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 230px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(35, 31, 32, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .22s ease;
  z-index: 999;
}

.nav-submenu a {
  display: block;
  padding: 11px 13px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-submenu a:hover {
  background: #FF5900;
}

.nav-dropdown:hover .nav-submenu,
.nav-dropdown:focus-within .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 0.85rem;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.site-search-trigger:hover,
.site-search-trigger:focus-visible {
  background: #ff5900;
  border-color: #ff5900;
  color: #fff;
  outline: none;
}

.site-search-mobile-action {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0 1rem;
  text-align: left;
  cursor: pointer;
}

.site-search-mobile-action:hover,
.site-search-mobile-action:focus-visible {
  background: #ff5900;
  border-color: #ff5900;
  outline: none;
}

.site-search-is-open {
  overflow: hidden;
}

.site-search-modal[hidden] {
  display: none;
}

.site-search-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: start center;
  padding: 86px 1rem 1rem;
}

.site-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 31, 32, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.site-search-panel {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: min(100%, 760px);
  max-height: min(720px, calc(100vh - 112px));
  overflow: hidden;
  border: 1px solid rgba(35, 31, 32, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.26);
}

.site-search-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.35rem 1rem;
  border-bottom: 1px solid rgba(35, 31, 32, 0.08);
}

.site-search-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: #997747;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-search-header h2 {
  margin: 0;
  color: #231f20;
  font-family: 'Zilla Slab', serif;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 700;
  line-height: 1.05;
}

.site-search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(35, 31, 32, 0.1);
  border-radius: 8px;
  background: #f7f4ef;
  color: #231f20;
  cursor: pointer;
}

.site-search-close:hover,
.site-search-close:focus-visible {
  background: #ff5900;
  border-color: #ff5900;
  color: #fff;
  outline: none;
}

.site-search-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 1.35rem 0;
  padding: 0 1rem;
  min-height: 56px;
  border: 2px solid rgba(35, 31, 32, 0.1);
  border-radius: 8px;
  background: #fff;
  color: #8b682f;
}

.site-search-field:focus-within {
  border-color: #ff5900;
  box-shadow: 0 0 0 4px rgba(255, 89, 0, 0.11);
}

.site-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #231f20;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
}

.site-search-field input::placeholder {
  color: #858585;
  font-weight: 500;
}

.site-search-meta {
  margin: 0;
  padding: 0.8rem 1.35rem;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 700;
}

.site-search-results {
  display: grid;
  overflow: auto;
  border-top: 1px solid rgba(35, 31, 32, 0.08);
}

.site-search-result {
  position: relative;
  display: grid;
  gap: 0.45rem;
  padding: 1rem 3.5rem 1rem 1.35rem;
  color: #231f20;
  text-decoration: none;
  border-bottom: 1px solid rgba(35, 31, 32, 0.08);
  transition: background-color 0.2s ease;
}

.site-search-result:hover,
.site-search-result:focus-visible {
  background: #fff4ed;
  outline: none;
}

.site-search-result__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.site-search-result__title {
  color: #231f20;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.site-search-result__group {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #f7f4ef;
  color: #8b682f;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0 0.6rem;
}

.site-search-result__description {
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
}

.site-search-result__icon {
  position: absolute;
  top: 1.05rem;
  right: 1.2rem;
  width: 1rem;
  height: 1rem;
  color: #ff5900;
}

.site-search-empty {
  margin: 0;
  padding: 1.3rem 1.35rem 1.5rem;
  color: #6b7280;
  font-weight: 700;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .site-search-modal {
    padding: 72px 0.75rem 0.75rem;
  }

  .site-search-panel {
    max-height: calc(100vh - 88px);
  }

  .site-search-header,
  .site-search-meta,
  .site-search-result,
  .site-search-empty {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-search-field {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

@media (min-width: 1281px) and (max-width: 1400px) {
  nav .site-nav-links > a:not(.text-xs),
  nav .site-nav-links .nav-dropdown > a {
    padding-left: 0.58rem;
    padding-right: 0.58rem;
    font-size: 0.82rem;
  }

  nav .site-search-trigger {
    width: 40px;
    padding: 0;
  }

  nav .site-search-trigger span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 1280px) {
  nav .max-w-7xl {
    justify-content: space-between;
  }

  nav .max-w-7xl > a:first-child {
    margin-right: 0;
  }

  nav .site-nav-links {
    display: none !important;
  }

  nav .site-mobile-toggle {
    display: inline-flex !important;
  }

  nav .site-mobile-menu:not(.hidden) {
    display: block !important;
  }
}
