/* Networn discovery refresh — scoped to search and category result pages. */
.tpl-discovery-modern {
  --nw-ink: #14253d;
  --nw-muted: #627188;
  --nw-brand: #087f8c;
  --nw-brand-dark: #075b66;
  --nw-line: #e3eaf0;
  --nw-surface: #f5f8fa;
  background: #f7f9fb;
  color: var(--nw-ink);
}
.tpl-discovery-modern #header-nav {
  background: #fff;
  border-bottom: 1px solid var(--nw-line);
  box-shadow: 0 3px 18px rgba(20,37,61,.05);
}
.tpl-discovery-modern #header-nav .navbar-brand img {
  max-height: 42px;
  width: auto;
}
.tpl-discovery-modern .networn-discovery-page {
  padding-top: 1.25rem;
  background: #f7f9fb;
}
.tpl-discovery-modern #the-sidebar.networn-sidebar {
  padding: 1.25rem;
  border: 1px solid var(--nw-line);
  border-radius: 16px;
  background: #fff !important;
  box-shadow: 0 8px 28px rgba(20,37,61,.045);
}
.tpl-discovery-modern .networn-sidebar-section {
  padding: .25rem 0 1rem;
}
.tpl-discovery-modern .networn-sidebar-title {
  margin-bottom: .8rem;
  color: var(--nw-ink);
  font-size: .98rem;
}
.tpl-discovery-modern .networn-sidebar-section hr,
.tpl-discovery-modern .networn-sidebar-form hr {
  margin: .65rem 0;
  border-color: var(--nw-line);
}
.tpl-discovery-modern .networn-sidebar-section a {
  display: inline-block;
  padding: .25rem 0;
  color: #40536a;
  font-size: .91rem;
  line-height: 1.45;
  text-decoration: none;
}
.tpl-discovery-modern .networn-sidebar-section a:hover,
.tpl-discovery-modern .networn-sidebar-section strong > a {
  color: var(--nw-brand-dark);
}
.tpl-discovery-modern .networn-sidebar-form {
  padding-top: .75rem;
  border-top: 1px solid var(--nw-line);
}
.tpl-discovery-modern .networn-sidebar-form h6,
.tpl-discovery-modern .networn-sidebar-form p strong {
  color: var(--nw-ink);
}
.tpl-discovery-modern .networn-sidebar-form .form-control {
  min-height: 42px;
  border-color: #d7e1e8;
  border-radius: 9px;
  box-shadow: none;
  font-size: .92rem;
}
.tpl-discovery-modern .networn-sidebar-form .form-control:focus {
  border-color: var(--nw-brand);
  box-shadow: 0 0 0 3px rgba(8,127,140,.12);
}
.tpl-discovery-modern .networn-sidebar-form .btn-primary {
  padding: .7rem 1rem;
  border-color: var(--nw-brand);
  border-radius: 9px;
  background: var(--nw-brand);
  font-weight: 750;
}
.tpl-discovery-modern .networn-sidebar-form .btn-primary:hover {
  border-color: var(--nw-brand-dark);
  background: var(--nw-brand-dark);
}
.tpl-discovery-modern .networn-results-column {
  padding-bottom: 2rem;
}
.tpl-discovery-modern .networn-results-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem 0 1.2rem;
  border-bottom: 1px solid var(--nw-line);
}
.tpl-discovery-modern .networn-results-title {
  color: var(--nw-ink) !important;
  font-size: clamp(1.55rem, 2.3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.035em;
}
.tpl-discovery-modern .networn-results-topbar .breadcrumbs,
.tpl-discovery-modern .networn-results-topbar .breadcrumbs a {
  color: var(--nw-muted);
  font-size: .82rem;
}
.tpl-discovery-modern .networn-results-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}
.tpl-discovery-modern .networn-results-actions .btn {
  min-height: 38px;
  padding: .45rem .75rem;
  border: 1px solid var(--nw-line);
  border-radius: 9px;
  color: #31445d;
  background: #fff;
  font-weight: 650;
}
.tpl-discovery-modern .networn-results-actions .btn:hover {
  border-color: #b8d8dc;
  color: var(--nw-brand-dark);
  background: #f1fbfa;
}
.tpl-discovery-modern .item-list {
  padding-top: 1.25rem;
}
.tpl-discovery-modern .networn-results-subtitle {
  color: var(--nw-ink) !important;
  font-size: 1.1rem;
  font-weight: 800;
}
.tpl-discovery-modern .networn-result-card {
  margin-right: 0 !important;
  margin-left: 0 !important;
  padding: .75rem;
  overflow: hidden;
  border: 1px solid var(--nw-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(20,37,61,.035);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.tpl-discovery-modern .networn-result-card:hover {
  transform: translateY(-2px);
  border-color: #c4dfe2;
  box-shadow: 0 12px 28px rgba(20,37,61,.075);
}
.tpl-discovery-modern .networn-result-card.featured {
  border-color: #d8e8c6;
}
.tpl-discovery-modern .networn-result-media {
  min-height: 190px;
  overflow: hidden;
  border-radius: 10px;
  background: #eaf1f4;
}
.tpl-discovery-modern .networn-result-media > a {
  display: block;
  height: 100%;
  min-height: 190px;
}
.tpl-discovery-modern .networn-result-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  transition: transform .3s ease;
}
.tpl-discovery-modern .networn-result-card:hover .networn-result-media img {
  transform: scale(1.035);
}
.tpl-discovery-modern .networn-result-media .cat-name-figure {
  position: absolute;
  bottom: .55rem;
  left: .55rem;
  max-width: calc(100% - 1.1rem);
  overflow: hidden;
  border-radius: 999px !important;
  color: #fff;
  background: rgba(13,32,50,.86);
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tpl-discovery-modern .networn-result-card h4 {
  margin-top: .1rem;
  font-size: 1.12rem;
  line-height: 1.35;
}
.tpl-discovery-modern .networn-result-card h4 a {
  color: var(--nw-ink);
  font-weight: 800;
  text-decoration: none;
}
.tpl-discovery-modern .networn-result-card h4 a:hover {
  color: var(--nw-brand-dark);
}
.tpl-discovery-modern .networn-result-meta,
.tpl-discovery-modern .networn-result-address {
  color: var(--nw-muted);
  font-size: .86rem;
  line-height: 1.55;
}
.tpl-discovery-modern .networn-result-meta .dot-divider {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 .45rem .15rem;
  border-radius: 50%;
  background: #9aabba;
}
.tpl-discovery-modern .networn-result-summary {
  color: #40536a;
  font-size: .92rem;
  line-height: 1.65;
}
.tpl-discovery-modern .networn-result-link {
  color: var(--nw-brand-dark);
  font-size: .86rem;
  overflow-wrap: anywhere;
}
.tpl-discovery-modern .networn-result-link:hover {
  text-decoration: underline;
}
.tpl-discovery-modern .networn-favorite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--nw-line);
  border-radius: 50%;
  color: #bd4058;
  background: #fff;
}
.tpl-discovery-modern .networn-favorite-btn:hover {
  border-color: #e8c0c8;
  background: #fff4f6;
}
.tpl-discovery-modern .networn-empty-state {
  padding: 1rem 1.1rem;
  border: 1px solid #e8dcb7;
  border-radius: 12px;
  color: #765b1a;
  background: #fffaf0;
}
.tpl-discovery-modern .pagination {
  gap: .3rem;
  margin-top: 1.5rem;
}
.tpl-discovery-modern .pagination .page-link {
  border: 1px solid var(--nw-line);
  border-radius: 8px;
  color: #31445d;
  background: #fff;
}
.tpl-discovery-modern .pagination .active .page-link {
  border-color: var(--nw-brand);
  color: #fff;
  background: var(--nw-brand);
}
.tpl-discovery-modern #map-col {
  overflow: hidden;
  background: #e9eff2;
}
.tpl-discovery-modern .networn-map-panel {
  border-radius: 12px;
  overflow: hidden;
}
.tpl-discovery-modern a:focus-visible,
.tpl-discovery-modern button:focus-visible,
.tpl-discovery-modern input:focus-visible,
.tpl-discovery-modern select:focus-visible {
  outline: 3px solid rgba(8,127,140,.55);
  outline-offset: 2px;
}
@media (max-width: 991.98px) {
  .tpl-discovery-modern .networn-results-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .tpl-discovery-modern #map-col {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    height: 280px !important;
    margin-bottom: 1rem;
  }
  .tpl-discovery-modern .networn-map-panel,
  .tpl-discovery-modern #map-canvas {
    height: 280px !important;
  }
  .tpl-discovery-modern .networn-result-media,
  .tpl-discovery-modern .networn-result-media > a,
  .tpl-discovery-modern .networn-result-media img {
    min-height: 160px;
  }
}
@media (max-width: 575.98px) {
  .tpl-discovery-modern .networn-discovery-page {
    padding-right: .65rem;
    padding-left: .65rem;
  }
  .tpl-discovery-modern .networn-results-title {
    font-size: 1.55rem;
  }
  .tpl-discovery-modern .networn-result-card {
    padding: .55rem;
  }
  .tpl-discovery-modern .networn-result-media,
  .tpl-discovery-modern .networn-result-media > a,
  .tpl-discovery-modern .networn-result-media img {
    min-height: 145px;
  }
  .tpl-discovery-modern .networn-result-card .col-sm-8 {
    padding: .85rem !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tpl-discovery-modern *,
  .tpl-discovery-modern *::before,
  .tpl-discovery-modern *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* VISUAL OVERHAUL v2 — clearer search hierarchy and stronger listing cards. */
.tpl-discovery-modern { --nw-ink: #10243a; --nw-muted: #66788a; background: #f4f7f7; }
.tpl-discovery-modern #header-nav { min-height: 72px; }
.tpl-discovery-modern .networn-discovery-page {
  padding: 1.5rem clamp(.75rem, 2.5vw, 2rem) 3rem;
  background: linear-gradient(180deg, #eef4f4 0, #f7f9f8 240px, #f7f9f8 100%);
}
.tpl-discovery-modern #the-sidebar.networn-sidebar {
  border-color: #dce7e7;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(16,36,58,.07);
}
.tpl-discovery-modern .networn-results-topbar {
  padding: .5rem 0 1.4rem;
  border-bottom-color: #d8e4e4;
}
.tpl-discovery-modern .networn-results-title {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  letter-spacing: -.055em;
}
.tpl-discovery-modern .networn-result-card {
  padding: 1rem;
  border-color: #e0e8e8;
  border-radius: 18px;
  box-shadow: 0 7px 24px rgba(16,36,58,.045);
}
.tpl-discovery-modern .networn-result-card:hover {
  transform: translateY(-3px);
  border-color: #b7d7d8;
  box-shadow: 0 16px 36px rgba(16,36,58,.1);
}
.tpl-discovery-modern .networn-result-media,
.tpl-discovery-modern .networn-result-media > a,
.tpl-discovery-modern .networn-result-media img {
  border-radius: 13px;
}
.tpl-discovery-modern .networn-result-media { min-height: 210px; }
.tpl-discovery-modern .networn-result-card h3,
.tpl-discovery-modern .networn-result-card h4 {
  color: #10243a;
  font-size: 1.22rem;
  font-weight: 830;
  letter-spacing: -.025em;
}
.tpl-discovery-modern .networn-result-summary {
  color: #5f7182;
  font-size: .92rem;
  line-height: 1.7;
}
.tpl-discovery-modern .networn-result-address { color: #5b6d7f; font-size: .86rem; }
.tpl-discovery-modern .networn-results-actions .btn { border-radius: 999px; padding: .55rem .9rem; }
.tpl-discovery-modern .networn-sidebar-title { font-size: 1.03rem; font-weight: 800; }
.tpl-discovery-modern .networn-sidebar-section a { padding: .32rem .15rem; }
@media (max-width: 767.98px) {
  .tpl-discovery-modern .networn-discovery-page { padding: .8rem .6rem 2rem; }
  .tpl-discovery-modern .networn-result-card { padding: .65rem; }
  .tpl-discovery-modern .networn-result-media { min-height: 160px; }
}


/* MOBILE UX V3 — improve discovery filters, result cards and tap targets. */
@media (max-width: 767.98px) {
  .tpl-discovery-modern .networn-results-topbar {
    align-items: stretch;
    flex-direction: column;
    gap: .75rem;
    padding: .25rem 0 1rem;
  }
  .tpl-discovery-modern .networn-results-title {
    font-size: clamp(1.4rem, 6vw, 1.85rem);
    line-height: 1.2;
  }
  .tpl-discovery-modern .networn-results-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
  }
  .tpl-discovery-modern .networn-results-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    white-space: normal;
    text-align: center;
  }
  .tpl-discovery-modern .networn-sidebar-form .form-control,
  .tpl-discovery-modern .networn-sidebar-form select,
  .tpl-discovery-modern .networn-sidebar-form button {
    min-height: 44px;
  }
  .tpl-discovery-modern .networn-result-card {
    border-radius: 13px;
    box-shadow: 0 3px 12px rgba(20,37,61,.045);
  }
  .tpl-discovery-modern .networn-result-media,
  .tpl-discovery-modern .networn-result-media > a,
  .tpl-discovery-modern .networn-result-media img {
    min-height: 150px;
  }
  .tpl-discovery-modern .networn-result-card .btn,
  .tpl-discovery-modern .networn-result-card a.btn {
    min-height: 40px;
  }
}

@media (max-width: 380px) {
  .tpl-discovery-modern .networn-results-actions {
    grid-template-columns: minmax(0, 1fr);
  }
  .tpl-discovery-modern .networn-result-card {
    padding: .5rem;
  }
  .tpl-discovery-modern .networn-result-media,
  .tpl-discovery-modern .networn-result-media > a,
  .tpl-discovery-modern .networn-result-media img {
    min-height: 132px;
  }
}


/* Business listing images use logo_url, not editorial photography.
   Keep the full logo visible instead of cropping it to fill the card. */
.tpl-discovery-modern .networn-result-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.tpl-discovery-modern .networn-result-media > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.tpl-discovery-modern .networn-result-media img {
  width: 100%;
  height: 210px;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  background: #fff;
}
@media (max-width: 991.98px) {
  .tpl-discovery-modern .networn-result-media img {
    height: 190px;
  }
}
@media (max-width: 575.98px) {
  .tpl-discovery-modern .networn-result-media img {
    height: 150px;
  }
}


/* Use a discovery-specific category badge. The legacy .cat-name-figure class
   has global styles that conflict with the refreshed logo/media layout. */
.tpl-discovery-modern .networn-result-media .networn-result-category-badge {
  position: absolute;
  z-index: 2;
  left: .75rem;
  bottom: .75rem;
  display: inline-block;
  width: auto;
  max-width: calc(100% - 1.5rem);
  padding: .35rem .65rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(13,32,50,.86);
  font-size: .72rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}


/* DISCOVERY QUALITY PASS — category labels should never obscure listing imagery. */
.tpl-discovery-modern .networn-result-media {
  position: relative;
  isolation: isolate;
}
.tpl-discovery-modern .networn-result-image-link {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
  border-radius: 13px;
}
.tpl-discovery-modern .networn-result-image-link img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}
.tpl-discovery-modern .networn-result-media .cat-name-figure,
.tpl-discovery-modern .networn-result-media .networn-result-category-badge {
  position: absolute;
  z-index: 1;
  right: .6rem;
  bottom: .6rem;
  left: .6rem;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: calc(100% - 1.2rem);
  padding: .35rem .65rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px !important;
  color: #fff;
  background: rgba(16,36,58,.78);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(3px);
}
.tpl-discovery-modern .networn-result-media img { background: #edf2f5; }
.tpl-discovery-modern .networn-result-card h4 a:focus-visible,
.tpl-discovery-modern .networn-result-image-link:focus-visible,
.tpl-discovery-modern .networn-favorite-btn:focus-visible {
  outline: 3px solid rgba(8,127,140,.65);
  outline-offset: 3px;
}
@media (max-width: 575.98px) {
  .tpl-discovery-modern .networn-result-media,
  .tpl-discovery-modern .networn-result-media > a,
  .tpl-discovery-modern .networn-result-media img { min-height: 155px; }
}
