/* ==========================================================================
   Directory
   ========================================================================== */
.directory {
  --navy: #0f1d39;
  --card-blue: #0254ca;
  --gold: #d69b26;
  --d-line: #eceef0;
  --d-soft: #f8fafb;
  position: relative;
  padding: 44px var(--gutter) 56px;
  font-family: 'Source Sans 3', var(--font-body);
  color: var(--navy);
  /* starts on the hero's cream, settles into a cool light grey-blue */
  background: linear-gradient(180deg, #fbfcf6 0%, #f2f6f8 140px, #eff5f9 100%);
}

.dir-panel {
  --panel-px: 28px;
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 26px var(--panel-px) 28px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #edf0f4;
  box-shadow: 0 30px 60px -36px rgba(15, 29, 57, 0.25);
}

.dir-hero {
  padding: 4px 0 22px;
  text-align: center;
}

.dir-hero h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.45vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: #093332;
}

.dir-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}

.dir-rule {
  width: 55px;
  height: 2px;
  border-radius: 2px;
  background: #c9a45c;
}

.dir-quote {
  display: block;
  height: 24px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
}

.dir-body {
  --side-w: 234px;
  --body-gap: 22px;
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  align-items: start;
  gap: var(--body-gap);
}

/* Sidebar */
.dir-side {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 15px;
}

.af-card {
  padding: 20px 19px 22px;
  border-radius: 14px;
  background: var(--d-soft);
  border: 1px solid var(--d-line);
}

.af-card h4 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.af-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.af-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  min-height: 36px;
  padding: 6px 8px 6px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  animation: fade-up 0.2s var(--ease);
}

.af-tag > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.af-tag svg {
  flex-shrink: 0;
}

.af-tag-state {
  background: #e8effc;
  color: #1d4ed8;
}

.af-tag-service {
  background: #e3f3e7;
  color: #17803d;
  font-size: 13.5px;
  font-weight: 500;
}

.af-tag button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: inherit;
  transition: background 0.15s;
}

.af-tag button:hover {
  background: rgba(255, 255, 255, 0.8);
}

.af-reset {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 4px 2px;
  border: none;
  background: none;
  color: #d4342b;
  font-size: 16px;
  font-weight: 600;
}

.af-reset:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.af-empty {
  display: flex;
  gap: 12px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #6b6f7b;
}

.af-empty svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--gold);
}

.dir-results {
  padding: 16px 19px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--d-line);
  font-size: 14.5px;
  line-height: 1.4;
  color: #4b5262;
}

.dir-results strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--navy);
}

.dir-results b {
  font-weight: 600;
  color: var(--navy);
}

.dir-main {
  min-width: 0;
}

/* Toolbar */
.dir-tools {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 14px;
}

.dir-search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  color: var(--navy);
}

.dir-search > svg {
  position: absolute;
  left: 18px;
  pointer-events: none;
}

.dir-search input {
  width: 100%;
  height: 44px;
  padding: 0 42px 0 52px;
  border: 1px solid #e3e6e9;
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
  color: var(--navy);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.dir-search input::placeholder {
  color: #565966;
}

.dir-search input:focus {
  border-color: #9fb3d6;
  box-shadow: 0 0 0 4px rgba(2, 84, 202, 0.1);
}

.dir-search-clear {
  position: absolute;
  right: 10px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #f0f2f5;
  color: #4b5563;
}

.dir-search-clear:hover {
  background: var(--danger-50);
  color: var(--danger);
}

.dir-sort {
  position: relative;
  flex: 0 0 214px;
  display: flex;
  align-items: center;
  color: var(--navy);
}

.dir-sort > svg {
  position: absolute;
  left: 18px;
  pointer-events: none;
}

.dir-sort > .dir-sort-arrow {
  left: auto;
  right: 16px;
}

.dir-sort select {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 50px;
  border: 1px solid #e3e6e9;
  border-radius: 9px;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  outline: none;
}

.dir-sort select:focus-visible {
  border-color: #9fb3d6;
  box-shadow: 0 0 0 4px rgba(2, 84, 202, 0.1);
}

.view-toggle {
  display: flex;
  gap: 14px;
}

.view-toggle button {
  display: grid;
  place-items: center;
  width: 65px;
  height: 44px;
  border: none;
  border-radius: 9px;
  background: #e9eff4;
  color: var(--navy);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.view-toggle button:hover {
  background: #dfe7ee;
}

.view-toggle button[aria-pressed='true'] {
  background: #0d1f3c;
  color: #fff;
  box-shadow: 0 10px 20px -12px rgba(13, 31, 60, 0.9);
}

/* Card grid: 3 per row */
.dir-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* Cards */
.entry {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px 20px 13px 22px;
  border-radius: 14px;
  background: linear-gradient(180deg, #0357cd 0%, #014fc2 55%, var(--card-blue) 100%);
  color: #fff;
  box-shadow: 0 16px 30px -20px rgba(2, 72, 180, 0.7);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  animation: fade-up 0.28s var(--ease) both;
}

.entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 40px -22px rgba(2, 72, 180, 0.8);
}

.entry mark {
  background: #ffd666;
  color: var(--navy);
}

.entry-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.entry-quote {
  display: block;
  height: 30px;
  margin-top: 6px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 50px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
}

.entry-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: #1e2b47;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.45);
}

.entry h4 {
  margin: 6px 0 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.entry-verified {
  display: inline-flex;
  margin-left: 6px;
  vertical-align: -4px;
  color: #fff;
  cursor: help;
}

.entry-verified svg {
  fill: #23a85e;
}

.entry-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 26px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip svg {
  flex-shrink: 0;
}

.entry-fields {
  display: grid;
  gap: 7px;
  margin: 14px -7px 13px;
  padding: 12px 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
}

.field {
  position: relative;
  min-width: 0;
  padding-left: 36px;
}

.field dt {
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.82);
}

.field dt svg {
  position: absolute;
  left: 1px;
  top: 3px;
  color: #fff;
}

.field dd {
  margin: 1px 0 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: #fff;
  overflow-wrap: anywhere;
}

.field.is-empty dd {
  color: rgba(255, 255, 255, 0.72);
  font-style: italic;
}

.entry-phone,
.entry-web {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.entry-web {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.entry-phone:hover,
.entry-web:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-notes {
  display: grid;
  gap: 7px;
  margin: auto -7px 0;
  padding: 12px 18px;
  border-radius: 10px;
  background: #fff;
}

.entry-notes p {
  display: flex;
  gap: 14px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #4d5361;
}

.entry-notes svg {
  flex-shrink: 0;
  color: #104091;
}

.entry-notes b {
  font-weight: 700;
  color: var(--navy);
}

/* List layout */
.dir-list {
  display: grid;
  gap: 14px;
}

.dir-list .entry-fields {
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 10px 20px;
}

/* Pagination + empty */
.dir-more {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  font-size: 14px;
  color: #4b5262;
}

.dir-more > span {
  margin-right: 4px;
}

.dir-more b {
  color: var(--navy);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 20px;
  border-radius: 9px;
  border: 1px solid #d9dee6;
  background: #fff;
  color: var(--navy, var(--ink-900));
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn-ghost:hover {
  background: #f4f6f9;
  border-color: #c5ccd8;
  transform: translateY(-1px);
}

.btn-link {
  border: none;
  background: none;
  padding: 6px 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--card-blue, var(--brand-600));
}

.btn-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 48px 20px;
  border-radius: 14px;
  border: 1.5px dashed #d6dce5;
  background: var(--d-soft);
  text-align: center;
  color: #4b5262;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 6px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--d-line);
  color: var(--card-blue);
  box-shadow: var(--shadow-sm);
}

.empty b {
  font-size: 17px;
  color: var(--navy);
}

.empty p {
  margin: 0 0 10px;
  font-size: 14px;
}

/* "For more details" link below the cards */
.dir-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 22px;
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f5f8fe, #eef4fd);
  border: 1px solid #dfe8f6;
}

.dir-cta-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
}

.dir-cta-text svg {
  color: var(--card-blue);
}

.dir-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  background: linear-gradient(180deg, #0a5fd8, var(--card-blue));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 22px -12px rgba(2, 84, 202, 0.85);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), filter 0.18s;
}

.dir-cta-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 14px 26px -12px rgba(2, 84, 202, 0.9);
}

.dir-cta-btn:focus-visible {
  outline: 3px solid rgba(2, 84, 202, 0.35);
  outline-offset: 2px;
}

/* Directory responsive */
@media (max-width: 1280px) {
  .dir-body {
    --side-w: 220px;
  }

  .dir-sort {
    flex-basis: 180px;
  }

  .view-toggle {
    gap: 10px;
  }

  .view-toggle button {
    width: 54px;
  }
}

@media (max-width: 1099px) {
  .dir-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dir-list .entry-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .dir-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .dir-side {
    position: static;
  }

  .af-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .af-reset {
    margin-top: 12px;
  }

}

@media (max-width: 720px) {
  .directory {
    padding: 28px 12px 36px;
  }

  .dir-panel {
    --panel-px: 14px;
    padding: 20px var(--panel-px) 22px;
    border-radius: 18px;
  }

  .dir-rule {
    width: 40px;
  }

  .dir-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .dir-search {
    grid-column: 1 / -1;
  }

  .view-toggle button {
    width: 48px;
  }

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

  .entry {
    padding: 16px 16px 12px 18px;
  }

  .dir-list .entry-fields {
    grid-template-columns: 1fr;
  }
}

