/* Directory listing UI only — pair with each site's header/footer chrome */
:root {
  --dir-green: #3a9a5d;
  --dir-green-dark: #2a7a47;
  --dir-green-soft: #eef6f0;
  --dir-border: #d8e8d2;
  --dir-muted: #5d6a72;
  --dir-text: #334047;
  --dir-bg: #ffffff;
}

body.directory-page {
  background: var(--dir-bg);
}

body.directory-page .site-header {
  position: sticky;
  top: 0;
  z-index: 100050;
  display: block;
  background: var(--header-bar-bg, #fff);
}

.directory-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  padding: 72px 20px 56px;
}

.directory-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.directory-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 30, 20, 0.78), rgba(8, 30, 20, 0.58));
}

.directory-hero-content {
  position: relative;
  z-index: 1;
  padding: 0;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

.directory-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 800;
  color: #fff !important;
}

.directory-hero p {
  margin: 0;
  font-size: clamp(15px, 2vw, 18px);
  opacity: 0.95;
  color: #fff !important;
}

.directory-layout {
  padding: 48px 0 48px;
}

/* ProHealth template footer reserves 305px for overlapping logo badge */
body.directory-page .cs_footer.cs_style_1 {
  margin-top: 0 !important;
}

body.directory-page .cs_footer_logo_wrap {
  display: none !important;
}

.directory-alpha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--dir-border);
}

.directory-alpha-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--dir-text);
}

.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alpha-nav a {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid #c6d4db;
  border-radius: 6px;
  background: #fff;
  color: var(--dir-green-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.alpha-nav a:hover,
.alpha-nav a.active {
  border-color: var(--dir-green);
  background: var(--dir-green);
  color: #fff;
}

.alpha-nav a.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.directory-count {
  margin: 0 0 28px;
  color: var(--dir-muted);
  font-size: 17px;
}

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

.directory-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  font-family: inherit;
}

.directory-card-media {
  display: none;
  background: var(--dir-green-soft);
  border-bottom: 1px solid var(--dir-border);
}

.directory-card-media[hidden] {
  display: none;
}

.directory-card-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.directory-card-media img.is-category-image {
  object-fit: cover;
}

.directory-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 26px 28px;
}

.directory-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  font-family: inherit;
}

.directory-card h2 a {
  color: var(--dir-text, inherit);
  text-decoration: none;
}

.directory-card h2 a:hover {
  text-decoration: underline;
}

.directory-tags {
  margin: 0 0 10px;
  color: var(--dir-green);
  font-size: 14px;
}

.directory-tags strong {
  color: var(--dir-text);
}

.directory-excerpt {
  flex: 1;
  margin: 0 0 14px;
  color: var(--dir-muted);
  font-size: 15px;
  line-height: 1.55;
}

.directory-card .read-more {
  color: var(--dir-green, var(--blue, #1e82c4));
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  font-family: inherit;
}

.directory-card .read-more:hover {
  text-decoration: underline;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 36px;
}

.pagination button {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--dir-border);
  border-radius: 8px;
  background: #fff;
  color: var(--dir-text);
  font-weight: 700;
  cursor: pointer;
}

.pagination button:hover:not(:disabled),
.pagination button.active {
  border-color: var(--dir-green);
  background: var(--dir-green);
  color: #fff;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--dir-muted);
}

.listing-shell {
  padding: 48px 0 48px;
}

.article-breadcrumb {
  margin-bottom: 18px;
  color: var(--dir-muted);
  font-size: 14px;
}

.article-breadcrumb a {
  color: var(--dir-green-dark);
}

.listing-head h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
  color: var(--dir-text) !important;
}

.listing-head .listing-meta {
  margin: 0 0 28px;
  color: var(--dir-muted) !important;
  font-size: 18px;
}

.listing-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: 36px;
  align-items: start;
}

.listing-photo {
  border: 1px solid var(--dir-border);
  border-radius: 13px;
  overflow: hidden;
  background: var(--dir-green-soft);
  box-shadow: 0 9px 28px rgba(11, 61, 36, 0.07);
}

.listing-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.listing-details h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.listing-facts,
.listing-hours {
  margin: 0 0 28px;
  padding-left: 0;
  list-style: none;
}

.listing-facts li,
.listing-hours li {
  margin-bottom: 10px;
  color: var(--dir-text);
  font-size: 16px;
}

.listing-facts a,
.listing-help a {
  color: var(--dir-green-dark);
  text-decoration: underline;
}

.listing-help {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--dir-green-soft);
  color: var(--dir-text);
  font-size: 16px;
  line-height: 1.4;
}

.listing-layout.no-photo {
  grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
  .directory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 930px) {
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing-layout { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .directory-grid { grid-template-columns: 1fr; }
  .directory-alpha { flex-direction: column; align-items: flex-start; }
}
