/* Keep every section, using compact labels and plain disclosure controls. */
.site-header .nav-chevron>span { display:none; }
.site-header .nav-chevron::after { content:'+'; font-size:20px; line-height:1; font-weight:400; }
.site-header .nav-chevron[aria-expanded="true"]::after { content:'−'; }

@media (min-width:1101px) and (hover:hover) {
  .site-header .nav-row { justify-content:center; gap:clamp(8px,.75vw,12px); }
  /* Hover and link focus already open the menu. Keep the separate control
     available to keyboard users without adding width to every label. */
  .site-header .nav-chevron {
    position:absolute; width:1px; min-width:0; height:1px; min-height:0;
    padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%);
    white-space:nowrap; border:0;
  }
  .site-header .nav-chevron:focus-visible {
    position:static; width:24px; min-width:24px; height:36px; min-height:36px;
    margin:0; overflow:visible; clip-path:none;
    outline:2px solid var(--cyan); outline-offset:2px;
  }
}
@media (min-width:1180px) {
  .site-header>.container { gap:clamp(14px,1.3vw,18px); }
  .site-header .nav-row { flex:0 1 auto; min-width:0; margin-inline:auto; gap:clamp(8px,.75vw,12px); }
}

/* Compact navigation and search also serve phones and tablets. */
@media (max-width: 1100px) {
  :root { --header-height: 72px; }

  .site-header > .container {
    display: block;
    min-height: 0;
    position: static;
  }
  .site-header .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    min-width: 0;
    gap: 12px;
  }
  .site-header .header-utility { display: none; }
  .site-header .mobile-toggle {
    display: flex;
    flex: 0 0 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 8px;
    border-radius: var(--ui-radius-button);
  }
  .site-header .mobile-toggle span {
    display: block;
    flex: none;
    width: 22px;
    height: 2px;
    margin: 0;
  }
  .site-header.mobile-open .mobile-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.mobile-open .mobile-toggle span:nth-child(2) { opacity: 0; }
  .site-header.mobile-open .mobile-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-header .nav-row { display: none; }
  .site-header.mobile-open .nav-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    position: absolute;
    inset: 72px 0 auto;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    padding: 8px max(20px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }
  .site-header .nav-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    position: static;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 54px;
    gap: 0;
    border-bottom: 1px solid var(--line);
  }
  .site-header .nav-item > a {
    flex: 1;
    height: auto;
    min-height: 54px;
    min-width: 0;
    padding: 12px 12px 12px 0;
    border: 0;
    font-size: 15px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .site-header .nav-item.open > a::after { content: none; }
  .site-header .nav-item > a[aria-current="page"] { color: var(--cyan); }
  .site-header .nav-chevron {
    display: flex;
    flex: 0 0 44px;
    justify-content: center;
    align-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 12px;
    border-radius: var(--ui-radius-button);
  }
  .site-header .nav-chevron[aria-expanded="true"] span { transform: rotate(225deg) translateY(-2px); }
  .site-header .mega-menu,
  .site-header .nav-item:nth-child(n) .mega-menu,
  .site-header .mega-menu.mega-professionals {
    display: none;
    position: static;
    inset: auto;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: none;
    padding: 0 0 18px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    animation: none;
  }
  .site-header .nav-item.open .mega-menu { display: block; }
  .site-header .mega-menu > .mega-menu-inner {
    display: block;
    width: 100%;
    max-width: none;
    padding: 0;
  }
  .site-header .mega-heading { display: none; }
  .site-header .mega-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }
  .site-header .mega-entry {
    min-width: 0;
    min-height: 48px;
    gap: 12px;
    padding: 8px 4px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 10px;
  }
  .site-header .mega-entry > span { overflow-wrap: anywhere; }
  .site-header .mega-entry-icon,
  .site-header .mega-house .mega-entry-icon { width: 28px; height: 30px; }
  .site-header .mega-secondary { margin-top: 12px; padding-top: 10px; }
  .site-header .mega-secondary h3 { font-size: 11px; }
  .site-header .mega-secondary > div { gap: 0 20px; }
  .site-header .mega-secondary a {
    min-height: 44px;
    padding: 8px 0;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .site-header .mega-menu-inner > .mega-extra {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 0 0;
    margin: 10px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
  }
  .site-header .mega-extra a.mega-shortcut {
    min-width: 0;
    min-height: 0;
    gap: 12px;
    padding: 14px;
    border-radius: var(--ui-radius-card);
  }
  .site-header .mega-extra .mega-shortcut-copy > strong { font-size: 13px; }
  .site-header .mega-shortcut-copy > span { font-size: 12px; line-height: 1.6; }
  .site-header .mega-shortcut-icon { width: 30px; height: 34px; }
  .site-header .mobile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 18px;
  }
  .site-header .mobile-actions > .btn { flex: 1; min-width: 0; min-height: 44px; }
  .site-header .mobile-actions > .text-link {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    font-size: 13px;
  }
  .nav-backdrop { display: none; }

  /* The same field layout on the homepage, land hub and professional results. */
  .hero-search,
  .home-hero .hero-search,
  .home-hero-reference .hero-search {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 6px 0;
    padding: 6px;
    border-radius: var(--ui-radius-search);
  }
  .hero-search > .search-slot,
  .hero-search > .search-location-slot { min-width: 0; }
  .hero-search .search-query-field,
  .hero-search .search-location-field {
    min-width: 0;
    min-height: 52px;
    border-radius: var(--ui-radius-field);
  }
  .hero-search .search-query-field > label {
    min-width: 0;
    padding: 10px 12px;
    border: 0;
  }
  .hero-search .search-location-field { gap: 4px; padding: 0 0 0 12px; }
  .hero-search input,
  .home-hero .hero-search input,
  .home-hero-reference .hero-search input,
  .hero-search .search-location-field > input:not([type="hidden"]) {
    min-width: 0;
    font-size: 16px;
    line-height: 1.5;
  }
  .hero-search .search-clear,
  .hero-search .location-clear,
  .hero-search .location-toggle {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .hero-search > .btn,
  .home-hero .hero-search > .btn,
  .home-hero-reference .hero-search > .btn {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0;
    min-width: 0;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: var(--ui-radius-button);
    font-size: 14px;
  }
  .hero-search .search-options,
  .hero-search .location-panel {
    max-width: calc(100vw - 32px);
    border-radius: var(--ui-radius-dropdown);
    overscroll-behavior: contain;
  }
  .hero-search .search-options button {
    min-width: 0;
    min-height: 48px;
    font-size: 14px;
  }
  .hero-search .search-options button > span { min-width: 0; overflow-wrap: anywhere; }
  .hero-search .search-options button strong { font-size: 14px; }
  .hero-search .search-options button small { font-size: 12px; }
  .hero-search .location-choice,
  .hero-search .location-children .location-choice { min-height: 48px; font-size: 14px; }
  .hero-search .location-city-copy > small { font-size: 12px; }
}

@media (max-width: 600px) {
  .site-header .mega-links,
  .site-header .mega-menu-inner > .mega-extra { grid-template-columns: minmax(0, 1fr); }
  .site-header .mega-entry { font-size: 14px; }
  .hero-search,
  .home-hero .hero-search,
  .home-hero-reference .hero-search { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-search > .search-location-slot { border-left: 0; border-top: 1px solid var(--line); }
  .hero-search > .btn,
  .home-hero .hero-search > .btn,
  .home-hero-reference .hero-search > .btn { margin-top: 6px; }
}
