:root {
  --apigraf-blue: #0b2b4c;
  --apigraf-blue-2: #16476f;
  --apigraf-red: #c9342d;
  --apigraf-red-dark: #a62420;
  --ink: #172231;
  --muted: #65707d;
  --canvas: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --line: #dce2e8;
  --line-strong: #c8d0d8;
  --shadow-sm: 0 8px 24px rgba(11, 43, 76, 0.07);
  --shadow-md: 0 22px 60px rgba(11, 43, 76, 0.12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 28px;
  --content: 1240px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--apigraf-blue);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button,
.ghost,
.card-action,
.map-link,
.back-link {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--apigraf-blue);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

h1 {
  max-width: 950px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 6.5vw, 5.75rem);
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.35rem);
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  width: 100%;
  padding: 16px max(24px, calc((100vw - var(--content)) / 2));
  border-bottom: 1px solid rgba(11, 43, 76, 0.1);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 22px rgba(11, 43, 76, 0.04);
  backdrop-filter: blur(16px);
}

.brand {
  flex: 0 0 auto;
}

.brand img {
  width: 178px;
  height: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.top-nav a {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 9px 13px;
  border-radius: 999px;
  color: #344151;
  font-size: 0.83rem;
  font-weight: 730;
  letter-spacing: 0.015em;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--apigraf-blue);
  background: #edf2f6;
  outline: none;
}

.top-nav a.active {
  color: #fff;
  background: var(--apigraf-blue);
}

main,
.site-footer {
  width: min(var(--content), calc(100% - 48px));
  margin-inline: auto;
}

main {
  min-height: calc(100vh - 180px);
}

.hero,
.map-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  margin: 40px 0 0;
  border: 0;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.12), transparent 25%),
    linear-gradient(135deg, #082846 0%, #123f65 58%, #1a527b 100%);
  box-shadow: var(--shadow-md);
}

.hero::after,
.map-hero::after,
.detail-hero::after {
  position: absolute;
  right: -110px;
  bottom: -180px;
  width: 460px;
  height: 460px;
  border: 80px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero,
.map-hero {
  display: block;
}

.hero.hero-directory {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  align-items: stretch;
}

.hero.hero-directory .hero-copy {
  max-width: none;
}

.hero-copy,
.map-hero > div:first-child {
  position: relative;
  z-index: 1;
  max-width: 940px;
  padding: clamp(48px, 7vw, 88px);
}

.hero h1,
.map-hero h1,
.detail-hero h1 {
  color: #fff;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--apigraf-red);
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow,
.map-hero .eyebrow,
.detail-hero .eyebrow {
  color: #ffb4ad;
}

.lead {
  max-width: 780px;
  margin-bottom: 0;
  color: #41505f;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.hero .lead,
.map-hero .lead,
.detail-hero .lead {
  color: rgba(255, 255, 255, 0.82);
}

.map-metric,
.hero-metric {
  display: none !important;
}

.hero-media {
  position: relative;
  z-index: 1;
  display: block;
  padding: 18px;
}

.hero-video {
  height: 100%;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 18px;
  background: #051d32;
  box-shadow: 0 18px 42px rgba(3, 20, 35, .28);
}

.hero-video video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
}

.maps-disabled .map-section,
.maps-disabled .map-layout,
.maps-disabled .map-card {
  display: none !important;
}

.hero-actions,
.contact-strip,
.view-actions,
.directory-cta-actions,
.directory-more-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-actions {
  margin-top: 30px;
}

.button,
.ghost,
.card-action,
.map-link,
.back-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0.015em;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.button:hover,
.ghost:hover,
.card-action:hover,
.map-link:hover,
.back-link:hover {
  transform: translateY(-1px);
}

.button.primary,
.card-action.primary {
  color: #fff;
  background: var(--apigraf-red);
  box-shadow: 0 8px 22px rgba(201, 52, 45, 0.24);
}

.button.primary:hover,
.card-action.primary:hover {
  background: var(--apigraf-red-dark);
}

.button.outline {
  color: var(--apigraf-blue);
  border-color: var(--line-strong);
  background: #fff;
}

.hero .button.outline,
.map-hero .button.outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.06);
}

.hero .button.outline:hover,
.map-hero .button.outline:hover {
  background: rgba(255, 255, 255, 0.13);
}

.button.full {
  width: 100%;
}

.search-panel,
.map-search-panel {
  position: relative;
  z-index: 2;
  margin: 28px 0 38px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.home-search {
  margin-top: -38px;
  margin-right: 28px;
  margin-left: 28px;
}

.search-row,
.filters label {
  display: grid;
  gap: 7px;
}

.search-row label,
.filters label {
  color: #3d4a58;
  font-size: 0.73rem;
  font-weight: 780;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #89939e;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--apigraf-blue-2);
  box-shadow: 0 0 0 4px rgba(22, 71, 111, 0.11);
}

.main-search input {
  min-height: 58px;
  padding-left: 18px;
  font-size: 1.02rem;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.directory-professional:not(.has-directory-filters) .filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#clearFilters,
.ghost {
  min-height: 52px;
  border-color: var(--line-strong);
  color: var(--apigraf-blue);
  background: var(--surface-soft);
  cursor: pointer;
}

#clearFilters:hover,
.ghost:hover {
  border-color: #aeb9c3;
  background: #edf1f4;
}

.view-tools {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.view-tools p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 660;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.active-filter-chip {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #cdd8e1;
  border-radius: 999px;
  color: var(--apigraf-blue);
  background: #edf4f8;
  font-size: 0.73rem;
  font-weight: 720;
  cursor: pointer;
}

.active-filter-chip span {
  color: #5f7080;
  font-weight: 630;
}

.active-filter-chip b {
  margin-left: 4px;
  font-size: 1rem;
  line-height: 0;
}

.view-actions #clearFilters {
  min-height: 34px;
  padding: 6px 12px;
}

.section-heading,
.results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin: 58px 0 24px;
}

.section-heading p,
.results-heading p {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
}

.results-heading h2,
.section-heading h2 {
  margin-bottom: 0;
}

.home-page:not(.has-directory-filters) .home-results-heading,
.home-page:not(.has-directory-filters) .home-grid {
  display: none;
}

.directory-cta,
.search-more-card {
  display: none !important;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin-bottom: 36px;
}

.solution-browser {
  margin: 16px 0 48px;
}

.solution-heading {
  margin-top: 42px;
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.solution-card {
  display: grid;
  min-height: 168px;
  align-content: start;
  gap: 9px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: linear-gradient(145deg, #fff 0%, #f7f9fb 100%);
  text-align: left;
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.solution-card:hover {
  transform: translateY(-3px);
  border-color: #b9c8d4;
  box-shadow: 0 14px 34px rgba(11, 43, 76, 0.09);
}

.solution-card strong {
  color: var(--apigraf-blue);
  font-family: var(--font-display);
  font-size: 1.13rem;
  line-height: 1.25;
}

.solution-card span {
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.48;
}

.solution-card em {
  align-self: end;
  margin-top: auto;
  color: var(--apigraf-red);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 760;
}

.company-card,
.detail-card,
.district-block,
.localities-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 5px 20px rgba(11, 43, 76, 0.045);
}

.company-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.company-card:hover {
  transform: translateY(-3px);
  border-color: #c3cdd6;
  box-shadow: 0 16px 40px rgba(11, 43, 76, 0.1);
}

.card-top {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding: 20px 20px 17px;
  border-bottom: 1px solid #e8edf1;
}

.logo-box {
  display: grid;
  width: 104px;
  height: 76px;
  place-items: center;
  overflow: hidden;
  padding: 10px;
  border-radius: 11px;
  background: var(--surface-soft);
}

.logo-box.mini {
  width: 60px;
  height: 48px;
}

.logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-box.is-default img {
  max-width: 85%;
  opacity: 0.72;
}

.card-title h3 {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--apigraf-blue);
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.card-title p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 13px;
  padding: 18px 20px 20px;
}

.taxonomy-block {
  display: grid;
  gap: 7px;
}

.taxonomy-label {
  color: #778592;
  font-size: 0.65rem;
  font-weight: 780;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.tagline,
.card-location {
  margin: 0;
  color: #53606d;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chips,
.badges,
.segment-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chips:empty,
.contact-line:empty {
  display: none;
}

.chips span,
.filter-chip,
.badges span,
.segment-link {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #d8e1e8;
  border-radius: 999px;
  color: #405162;
  background: #f4f7f9;
  font-size: 0.72rem;
  font-weight: 690;
  line-height: 1.2;
  text-decoration: none;
}

.filter-chip {
  font-family: inherit;
  cursor: pointer;
}

.filter-chip:hover {
  color: #fff;
  border-color: var(--apigraf-blue);
  background: var(--apigraf-blue);
}

.product-chips span,
.product-chips .filter-chip,
.segment-link.product {
  color: #6b403e;
  border-color: #ead8d6;
  background: #fbf4f3;
}

.category-chips .filter-chip {
  color: #16476f;
  border-color: #c9dce9;
  background: #edf5fa;
}

.certification-chips .filter-chip,
.segment-link.certification {
  color: #3d603f;
  border-color: #cadfc9;
  background: #f0f7ef;
}

.more-chip {
  color: #6e7a85 !important;
  border-style: dashed !important;
  background: transparent !important;
}

.segment-link:hover {
  color: #fff;
  border-color: var(--apigraf-blue);
  background: var(--apigraf-blue);
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: auto;
}

.contact-line a {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #536a7d;
  font-size: 0.82rem;
  font-weight: 650;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 3px;
}

.card-action {
  min-height: 42px;
  padding: 9px 12px;
  border-color: var(--line-strong);
  color: var(--apigraf-blue);
  background: #fff;
}

.muted-action {
  color: #89939e;
  background: var(--surface-soft);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 2px 0 70px;
}

.load-more-wrap .button {
  min-width: 210px;
  border-color: var(--apigraf-blue);
  color: var(--apigraf-blue);
  background: #fff;
  cursor: pointer;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 42px;
  text-align: center;
}

.empty-state h2 {
  font-size: 1.75rem;
}

.muted {
  color: var(--muted);
}

.localities-section {
  margin: 68px 0 30px;
  padding: 28px;
}

.locality-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.locality-card {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface-soft);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.locality-card:hover {
  transform: translateY(-2px);
  border-color: #bdc9d3;
  background: #fff;
}

.locality-card strong {
  display: block;
  color: var(--apigraf-blue);
  font-size: 0.93rem;
}

.locality-card span span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.locality-count {
  flex: 0 0 auto;
  display: grid;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--apigraf-blue);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 780;
}

.district-index-hero,
.directory-hero,
body.map-page .map-hero {
  min-height: auto;
}

.district-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 30px 0 72px;
}

.district-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}

.district-block-head:hover {
  background: #f9fbfc;
}

.district-block-head strong {
  display: block;
  color: var(--apigraf-blue);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.district-block-head em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
}

.district-block-head b {
  display: grid;
  min-width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--apigraf-blue);
  font-size: 0.95rem;
}

.district-counties {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 18px 22px 6px;
}

.district-counties span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #485766;
  background: var(--surface-soft);
  font-size: 0.72rem;
  font-weight: 680;
}

.district-counties em {
  color: var(--apigraf-red);
  font-style: normal;
}

.district-companies {
  display: grid;
  gap: 7px;
  padding: 15px 22px 22px;
}

.district-companies a {
  overflow: hidden;
  color: var(--apigraf-blue);
  font-size: 0.88rem;
  font-weight: 690;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-companies a:hover {
  color: var(--apigraf-red);
}

.district-companies span {
  color: var(--muted);
}

.detail-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 38px 0 72px;
}

.detail-shell > .back-link {
  min-height: auto;
  margin: 0 8px 16px 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #5e6b78;
  background: transparent;
}

.detail-hero {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-top: 8px;
  padding: clamp(30px, 5vw, 54px);
}

.detail-logo {
  display: grid;
  width: 240px;
  height: 172px;
  place-items: center;
  padding: 18px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 34px rgba(4, 22, 38, 0.18);
}

.detail-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.detail-hero h1 {
  margin-bottom: 0;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
}

.contact-strip {
  margin-top: 22px;
}

.contact-strip a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.79rem;
  font-weight: 720;
  text-decoration: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.detail-card {
  padding: 24px;
}

.detail-card.wide {
  margin-top: 18px;
}

.detail-card h2 {
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.detail-card p:last-child {
  margin-bottom: 0;
}

.taxonomy-note {
  max-width: 700px;
  margin: -8px 0 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

.taxonomy-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.taxonomy-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
}

.taxonomy-group summary {
  position: relative;
  padding: 14px 42px 14px 16px;
  color: var(--apigraf-blue);
  font-size: 0.88rem;
  font-weight: 760;
  cursor: pointer;
  list-style: none;
}

.taxonomy-group summary::-webkit-details-marker {
  display: none;
}

.taxonomy-group summary::after {
  position: absolute;
  top: 50%;
  right: 16px;
  content: '+';
  transform: translateY(-50%);
  color: var(--apigraf-red);
  font-size: 1.15rem;
}

.taxonomy-group[open] summary::after {
  content: '−';
}

.taxonomy-group .segment-cloud {
  padding: 0 14px 15px;
}

.inline-map-link {
  min-height: 40px;
  border-color: var(--line-strong);
  color: var(--apigraf-blue);
  background: var(--surface-soft);
}

.info-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
}

.info-list dt {
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.info-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.info-list a {
  color: var(--apigraf-blue);
  font-weight: 670;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 54px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--apigraf-blue);
  font-weight: 700;
  text-decoration: none;
}

.boxed-footer {
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 38px auto 72px;
}

.admin-head,
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-table {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.admin-table th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.admin-form .full {
  grid-column: 1 / -1;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-box {
  width: min(420px, calc(100% - 36px));
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.error,
.success {
  padding: 11px 13px;
  border: 1px solid;
  border-radius: var(--radius-sm);
}

.error {
  border-color: #e5b9b6;
  color: #8d2924;
  background: #fff2f1;
}

.success {
  border-color: #bfd1a3;
  color: #425e2e;
  background: #f2f8ea;
}

.status-pill {
  padding: 4px 8px;
  border-radius: 999px;
  color: #42602d;
  background: #eaf4df;
  font-size: 0.76rem;
  font-weight: 700;
}

.status-pill.off {
  color: #8e2f29;
  background: #fbe8e7;
}

/* Mapa profissional do diretório. */
.map-section {
  margin: 62px 0 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  gap: 18px;
  align-items: stretch;
  margin: 28px 0 72px;
}

.map-wrap {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cbd5dd;
  border-radius: var(--radius-lg);
  background: #dfe7eb;
  box-shadow: var(--shadow-md);
}

.map-wrap #map,
#singleMap {
  width: 100%;
  min-height: 620px;
  background: #e8edef;
}

.home-map-wrap #map {
  min-height: 470px;
}

#singleMap {
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.map-wrap .leaflet-control-zoom,
#singleMap .leaflet-control-zoom {
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(4, 28, 49, 0.18);
}

.map-wrap .leaflet-control-zoom a,
#singleMap .leaflet-control-zoom a {
  color: var(--apigraf-blue);
}

.map-aside {
  display: flex;
  min-height: 620px;
  max-height: 620px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.map-aside-head {
  flex: 0 0 auto;
  padding: 24px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.map-aside-head .eyebrow {
  margin-bottom: 8px;
}

.map-aside-head h2 {
  margin: 0 0 8px;
  color: var(--apigraf-blue);
  font-size: 1.45rem;
}

.map-aside-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

.map-side-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.map-side-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 150ms ease;
}

.map-side-item:hover {
  background: #f6f9fa;
}

.map-side-item .logo-box.mini {
  width: 52px;
  height: 42px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.map-side-item > span {
  min-width: 0;
}

.map-side-item strong,
.map-side-item em,
.map-side-item small {
  display: block;
}

.map-side-item strong {
  overflow: hidden;
  color: var(--apigraf-blue);
  font-size: .8rem;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.map-side-item em {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: .7rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-quality-note {
  margin: 0 0 14px;
  color: var(--muted);
}

.apigraf-marker {
  border: 0;
  background: transparent;
}

.apigraf-marker span {
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--apigraf-red);
  box-shadow: 0 4px 14px rgba(4, 28, 49, .28);
  font-size: .64rem;
  font-weight: 820;
}

.apigraf-marker.is-stack span {
  font-size: .72rem;
}

.company-map-label,
.company-hover-label {
  border: 1px solid rgba(4, 28, 49, .13);
  border-radius: 7px;
  color: var(--apigraf-blue);
  background: rgba(255,255,255,.96);
  box-shadow: 0 4px 13px rgba(4,28,49,.12);
  font-family: inherit;
  font-size: .7rem;
  font-weight: 720;
}

.map-popup {
  min-width: 210px;
  color: var(--ink);
  font-family: inherit;
}

.map-popup > strong,
.map-popup > span,
.map-popup > small {
  display: block;
}

.map-popup > strong {
  color: var(--apigraf-blue);
  font-size: .9rem;
  line-height: 1.35;
}

.map-popup > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: .75rem;
}

.map-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.map-popup-actions a {
  color: var(--apigraf-red-dark);
  font-size: .75rem;
  font-weight: 760;
}

.map-popup-stack ul {
  max-height: 240px;
  margin: 12px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.map-popup-stack li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.map-popup-stack li a,
.map-popup-stack li span {
  display: block;
}

.map-popup-stack li a {
  color: var(--apigraf-blue);
  font-size: .76rem;
  font-weight: 720;
}

.map-popup-stack li span,
.popup-more {
  margin-top: 2px;
  color: var(--muted);
  font-size: .68rem;
}

.map-error {
  display: grid;
  min-height: 420px;
  place-content: center;
  gap: 5px;
  padding: 24px;
  text-align: center;
}

.map-error strong {
  color: var(--apigraf-blue);
}

@media (max-width: 1080px) {
  .hero.hero-directory {
    grid-template-columns: 1fr;
  }

  .hero.hero-directory .hero-media {
    padding: 0 30px 30px;
  }

  .hero-video,
  .hero-video video {
    min-height: 360px;
  }

  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .solution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .locality-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-professional:not(.has-directory-filters) .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-aside {
    min-height: 390px;
    max-height: 390px;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 148px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-top: 13px;
    padding-bottom: 12px;
  }

  .brand img {
    width: 148px;
  }

  .top-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-nav a {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 7px 11px;
    font-size: 0.78rem;
  }

  .hero,
  .map-hero {
    margin-top: 24px;
    border-radius: 22px;
  }

  .hero-copy,
  .map-hero > div:first-child {
    padding: 44px 30px 52px;
  }

  h1 {
    font-size: clamp(2.55rem, 12vw, 4.4rem);
  }

  .home-search {
    margin-right: 12px;
    margin-left: 12px;
  }

  .district-directory,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-logo {
    width: 100%;
    height: 155px;
  }
}

@media (max-width: 680px) {
  main,
  .site-footer {
    width: min(100% - 24px, var(--content));
  }

  .hero-copy,
  .map-hero > div:first-child {
    padding: 38px 23px 46px;
  }

  .hero.hero-directory .hero-media {
    padding: 0 12px 12px;
  }

  .hero-video,
  .hero-video video {
    min-height: 250px;
  }

  .hero-actions,
  .contact-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .contact-strip a {
    width: 100%;
  }

  .search-panel,
  .map-search-panel {
    padding: 18px;
  }

  .map-section {
    margin-top: 42px;
    padding: 16px;
  }

  .map-layout {
    gap: 12px;
    margin-bottom: 48px;
  }

  .map-wrap #map,
  .home-map-wrap #map,
  #singleMap {
    min-height: 440px;
  }

  .filters,
  .directory-grid,
  .locality-strip,
  .solution-grid,
  .taxonomy-groups {
    grid-template-columns: 1fr;
  }

  .directory-professional:not(.has-directory-filters) .filters {
    grid-template-columns: 1fr;
  }

  .view-tools,
  .section-heading,
  .results-heading,
  .site-footer,
  .admin-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading,
  .results-heading {
    margin-top: 44px;
  }

  .card-top {
    grid-template-columns: 88px minmax(0, 1fr);
    padding: 16px;
  }

  .logo-box {
    width: 88px;
    height: 68px;
  }

  .card-body {
    padding: 16px;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .localities-section {
    padding: 18px;
  }

  .district-block-head,
  .district-counties,
  .district-companies {
    padding-right: 17px;
    padding-left: 17px;
  }

  .detail-shell {
    padding-top: 24px;
  }

  .detail-hero {
    padding: 24px;
  }

  .detail-hero h1 {
    font-size: 2.35rem;
  }

  .detail-card {
    padding: 20px;
  }

  .info-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
