/**
 * THF editorial-style directory archive hero.
 * Shared across location, cuisine, tag and city+filter pages.
 * Keeps images, map, dynamic counters and existing filter mechanics intact.
 */
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top {
  --thf-top-bg: #0e1a23;
  --thf-top-panel: #14222c;
  --thf-top-green: #35d486;
  --thf-top-line: #2b353c;
  border-color: #2b353c !important;
  background-color: #0e1a23 !important;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(0,0,0,.18) 0px,
    rgba(0,0,0,.18) 2px,
    transparent 2px,
    transparent 10px
  ) !important;
  border-radius: 18px;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__content {
  padding: clamp(28px,2.35vw,44px) 10% clamp(28px,2.35vw,44px) clamp(26px,2.35vw,44px);
  background-color: #0e1a23 !important;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(0,0,0,.18) 0px,
    rgba(0,0,0,.18) 2px,
    transparent 2px,
    transparent 10px
  ) !important;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__breadcrumb {
  max-width: 620px;
  margin-bottom: 22px;
  color: #aebbc4;
  font-size: 12px;
  line-height: 1.65;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__breadcrumb a {
  color: #35d486 !important;
  text-decoration-color: rgba(53,212,134,.62);
  text-underline-offset: 3px;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top h1 {
  max-width: 645px;
  margin: 0 0 20px !important;
  color: #fff !important;
  font-size: clamp(30px,2.15vw,43px) !important;
  line-height: 1.13 !important;
  letter-spacing: -.035em !important;
  font-weight: 800;
  text-wrap: balance;
  overflow-wrap: break-word;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__title-main,
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__title-place {
  display: block;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__title-place {
  color: #35d486;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__metrics {
  max-width: 630px;
  margin-bottom: 21px;
  gap: 8px;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__count,
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__metrics .thf-view-summary {
  border-color: #334b46 !important;
  background: rgba(11,26,30,.62) !important;
  color: #c7d5d7 !important;
  border-radius: 999px;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__count i,
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__count strong,
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__metrics .thf-view-stats i {
  color: #35d486 !important;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__intro {
  max-width: 610px;
  margin-bottom: 22px !important;
  color: #cbd7dd !important;
  font-size: clamp(14px,.92vw,16px) !important;
  line-height: 1.65 !important;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters {
  width: 100%;
  max-width: 640px;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(148px,168px);
  align-items: end;
  gap: 10px;
  margin: 0;
  padding-top: 21px;
  border-top: 1px solid rgba(177,197,204,.19);
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters label {
  min-width: 0;
  gap: 8px;
  color: #b8cbc5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .005em;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters select {
  width: 100%;
  min-height: 44px;
  padding: 10px 30px 10px 12px;
  border: 1px solid #39564f !important;
  border-radius: 9px;
  background-color: #14232c !important;
  color: #eef7f5 !important;
  font-size: 13px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters select:hover,
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters select:focus {
  border-color: #35d486 !important;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters button {
  grid-column: auto;
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 19px;
  border: 1px solid #35d486;
  border-radius: 9px;
  background: #35d486 !important;
  color: #0d2020 !important;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(53,212,134,.09);
  transition: background-color .18s ease, transform .18s ease;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters button:hover {
  background: #66e7a8 !important;
  transform: translateY(-1px);
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__cuisines a {
  color: #b2f1ce !important;
  border-color: #33594a !important;
  background: rgba(17,37,38,.8) !important;
}
body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__map-panel {
  border-color: #2b353c !important;
}

/* Tablet layout: photo and content remain side-by-side, map below. */
@media (min-width: 601px) and (max-width: 1150px) {
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__content {
    padding: 26px 7% 26px 26px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top h1 {
    font-size: clamp(27px,3vw,35px) !important;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters {
    max-width: 640px;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(132px,150px);
    gap: 8px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters button {
    grid-column: auto;
    width: 100%;
  }
}

/* On narrow tablets, protect readable controls instead of squeezing them. */
@media (min-width: 601px) and (max-width: 760px) {
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters button {
    grid-column: 1 / -1;
    justify-self: start;
    width: 180px;
  }
}

/* Preserve the compact image/title arrangement on phones. */
@media (max-width: 600px) {
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top {
    border-radius: 13px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__content {
    display: contents;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__breadcrumb {
    margin-bottom: 0;
    padding-left: 14px;
    padding-right: 14px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top h1 {
    max-width: none;
    font-size: clamp(20px,5.4vw,25px) !important;
    line-height: 1.18 !important;
    letter-spacing: -.025em !important;
    margin: 0 !important;
    text-wrap: pretty;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__title-main,
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__title-place {
    display: inline;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__title-main::after {
    content: ' ';
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__metrics {
    margin: 12px 16px 15px;
    max-width: none;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__intro {
    max-width: none;
    margin: 0 16px 17px !important;
    font-size: 13px !important;
  }
  /* The form spans the hero's grid. A 100% width plus 16px side
     margins overflowed its grid area and clipped the right-hand controls. */
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters {
    grid-column: 1 / -1;
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    max-width: none;
    justify-self: stretch;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
    margin: 0 16px 18px;
    padding-top: 16px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters > label,
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters select,
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters button {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters select {
    min-height: 44px;
    font-size: 12px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
  }
}
/* Compact mobile archive hero: larger photo, introduction beside the title,
   and city / cuisine / search on one unclipped row. */
@media (max-width: 600px) {
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top {
    grid-template-columns: clamp(116px, 36.9vw, 144px) minmax(0, 1fr);
    grid-auto-flow: row;
    align-items: start;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__breadcrumb {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__visual {
    grid-column: 1;
    grid-row: 2 / 4;
    align-self: stretch;
    min-width: 0;
    min-height: 190px;
    margin: 7px 0 13px 16px !important;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top h1 {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    min-width: 0;
    padding: 9px 14px 4px 12px !important;
    font-size: clamp(20px, 5.2vw, 23px) !important;
    line-height: 1.15 !important;
    overflow-wrap: break-word;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__intro {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
    min-width: 0;
    max-width: none;
    margin: 0 !important;
    padding: 0 14px 13px 12px !important;
    font-size: 12.5px !important;
    line-height: 1.48 !important;
    overflow-wrap: break-word;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__metrics {
    grid-column: 1 / -1;
    grid-row: 4;
    margin: 8px 16px 16px;
    max-width: none;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters {
    grid-column: 1 / -1;
    grid-row: 5;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 78px;
    align-items: end;
    gap: 7px;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0 16px 18px;
    padding-top: 14px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters > label {
    min-width: 0;
    gap: 5px;
    font-size: 11px;
    line-height: 1.3;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters > label > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 20px 8px 8px;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters button {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 5px;
    gap: 4px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters button .thf-archive-top__submit-detail {
    display: none;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__cuisines {
    grid-column: 1 / -1;
    grid-row: 6;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top--no-photo {
    grid-template-columns: minmax(0, 1fr);
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top--no-photo h1 {
    grid-column: 1;
    grid-row: 2;
    padding: 14px 16px 6px !important;
    align-self: start;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top--no-photo .thf-archive-top__intro {
    grid-column: 1;
    grid-row: 3;
    padding: 0 16px 12px !important;
  }
}
/* Screenshot-matched mobile proportions, vertical rhythm and control styling.
   Shared by category, city, tag and city + category / tag archives. */
@media (max-width: 600px) {
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__visual {
    min-height: 156px;
    margin-top: 7px !important;
    margin-bottom: 9px !important;
    margin-left: 14px !important;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top h1 {
    padding: 6px 14px 3px 12px !important;
    font-size: clamp(22px, 6.4vw, 27px) !important;
    line-height: 1.14 !important;
    letter-spacing: -.032em !important;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__intro {
    padding: 0 14px 10px 12px !important;
    font-size: 12px !important;
    line-height: 1.44 !important;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__metrics {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin: 10px 14px 14px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__count {
    flex: 0 1 auto;
    gap: 6px;
    min-height: 28px;
    margin: 0;
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__metrics .thf-view-stats {
    flex: 0 1 auto;
    min-width: 0;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__metrics .thf-view-summary {
    min-height: 28px;
    gap: 5px;
    padding: 0 8px;
    font-size: 11px;
    white-space: nowrap;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__metrics .thf-view-summary strong {
    font-size: 12px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__metrics .thf-view-summary em {
    font-size: 11px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 72px;
    align-items: end;
    gap: 7px;
    margin: 0 14px 16px;
    padding-top: 14px;
  }
  /* Keep native label text for assistive tech; visual reference uses no captions. */
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters > label > span {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters > label {
    gap: 0;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters select {
    height: 40px;
    min-height: 40px;
    padding: 7px 28px 7px 10px;
    border-radius: 9px;
    appearance: none;
    -webkit-appearance: none;
    background-color: #08181e !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23f2fbf7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 9px center !important;
    background-size: 12px 8px !important;
    color: #f2fbf7 !important;
    font-size: 12px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters button {
    grid-column: auto;
    height: 40px;
    min-height: 40px;
    padding: 7px 6px;
    border-radius: 9px;
    background: #35d486 !important;
    font-size: 12px;
    gap: 5px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__map-toggle {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 44px;
    padding: 10px 20px;
    color: #edf7f2 !important;
    background: #08191e !important;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 800;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__map-toggle i {
    color: #35d486 !important;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__map-toggle .fa-chevron-down {
    margin-left: auto;
  }
}
@media (max-width: 380px) {
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__metrics {
    flex-wrap: wrap;
    gap: 6px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 64px;
    gap: 5px;
    margin-right: 12px;
    margin-left: 12px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters select {
    padding-left: 6px;
    padding-right: 18px;
    font-size: 11px;
  }
  body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters button {
    font-size: 11px;
    gap: 3px;
  }
}


/* Mobile archive flow repair: prevent implicit grid columns and stacked crumbs. */
@media (max-width: 600px) {
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top { display: block !important; }
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__content { display: block !important; padding: 0 !important; min-width: 0; }
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__breadcrumb { display: flex !important; flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 4px 8px; max-width: none; padding: 15px 16px 0; margin: 0; }
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__breadcrumb > * { flex: 0 0 auto; width: auto; margin: 0; }
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top h1,
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top:not(.thf-archive-top--no-photo) h1,
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top--no-photo h1 { display: block; width: auto; max-width: none; padding: 18px 16px 12px !important; margin: 0 !important; overflow-wrap: normal; word-break: normal; }
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__title-main,
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__title-place { display: block; }
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__intro,
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top--no-photo .thf-archive-top__intro { width: auto; padding: 0 !important; margin: 0 16px 17px !important; }
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__metrics { flex-wrap: wrap; margin: 0 16px 14px; }
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__filters { margin: 0 16px 18px; }
 body :is(.thf-directory-page, .thf-location-hub) .thf-archive-top__visual { display: block; width: auto; aspect-ratio: 16 / 9; min-height: 0; margin: 14px 16px 0 !important; }
}

/* Close fractional-pixel seams between Google's raster tiles; keep controls and markers intact. */
body :is(.thf-directory-page, .thf-location-hub) .listing-map .gm-style img[src*="maps.googleapis.com/maps/vt"] {
  display: block !important;
  max-width: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  transform: scale(1.006) !important;
  transform-origin: center center;
}
