/* Directory pages — ported from mockups/directory.html (nav/footer come from site.css). */

/* HERO */
.dir-hero { padding: 3rem 1.5rem 2rem; text-align: center; }
.dir-hero .breadcrumb { font-size: 0.8rem; color: #888; margin-bottom: 1rem; }
.dir-hero .breadcrumb a { color: #666; text-decoration: none; }
.dir-hero .breadcrumb a:hover { color: var(--brand-primary, #2a2a2a); text-decoration: underline; }
.dir-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700; color: var(--brand-primary, #2a2a2a);
  margin-bottom: 0.75rem;
}
.dir-hero p { color: #6b6b6b; font-size: 1rem; max-width: 36rem; margin: 0 auto; line-height: 1.7; }
.result-count {
  display: inline-block; margin-top: 1.5rem;
  padding: 0.4rem 1rem; border-radius: 9999px;
  background: rgba(42,42,42,0.08);
  font-size: 0.75rem; font-weight: 700; color: #555;
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* FILTERS */
.filters {
  max-width: 80rem; margin: 0 auto; padding: 0 1.5rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem;
}
.filter-btn {
  padding: 0.5rem 1rem; border-radius: 9999px;
  border: 1px solid #ddd; background: #fff;
  font-size: 0.8rem; font-weight: 600; color: #555;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 0.35rem;
}
.filter-btn:hover { border-color: #aaa; }
.filter-btn.active {
  background: var(--brand-primary, #2a2a2a); color: #fff; border-color: var(--brand-primary, #2a2a2a);
}

/* LISTINGS */
.listings { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem 4rem; }
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.listing-card {
  border-radius: 1.25rem;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3);
  overflow: hidden;
  transition: all 0.3s;
  text-decoration: none; color: inherit;
  display: block;
}
.listing-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }
.listing-card.hidden-by-filter { display: none; }
.listing-img { height: 180px; background: #e0e0e0; overflow: hidden; position: relative; }
.listing-img img { width: 100%; height: 100%; object-fit: cover; }
.listing-img .img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
  color: rgba(255,255,255,0.6);
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 2rem;
}
.listing-body { padding: 1.25rem; }
.listing-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 0.5rem;
}
.listing-name { font-weight: 700; font-size: 1.1rem; color: #1a1a1a; }
.listing-rating {
  display: flex; align-items: center; gap: 0.25rem;
  font-size: 0.8rem; font-weight: 700; color: #1a1a1a;
  background: rgba(245,158,11,0.1);
  padding: 0.2rem 0.5rem; border-radius: 0.5rem;
}
.listing-rating svg { color: #f59e0b; }
.listing-category { font-size: 0.8rem; color: #888; margin-bottom: 0.75rem; }
.listing-services { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.listing-tag {
  padding: 0.2rem 0.6rem; border-radius: 9999px;
  background: rgba(42,42,42,0.06);
  font-size: 0.7rem; font-weight: 600; color: #666;
}
.listing-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 0.75rem; border-top: 1px solid #f0f0f0;
  font-size: 0.8rem; color: #888;
}
.listing-footer .price { font-weight: 700; color: var(--brand-primary, #2a2a2a); }

/* PRIORITY BADGE */
.priority-badge {
  position: absolute; top: 0.75rem; left: 0.75rem;
  padding: 0.25rem 0.6rem; border-radius: 9999px;
  background: var(--brand-primary, #2a2a2a); color: #fff;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* SEO CONTENT */
.seo-content {
  max-width: 80rem; margin: 0 auto; padding: 3rem 1.5rem 4rem;
  border-top: 1px solid #e2e8f0;
}
.seo-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem;
}
.seo-content p {
  color: #6b6b6b; font-size: 0.9rem; line-height: 1.8; margin-bottom: 1rem;
  max-width: 48rem;
}
.seo-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.seo-links a {
  padding: 0.35rem 0.75rem; border-radius: 9999px;
  border: 1px solid #ddd; background: #fff;
  font-size: 0.75rem; color: #555; text-decoration: none;
  transition: all 0.2s;
}
.seo-links a:hover { border-color: var(--brand-primary, #2a2a2a); color: var(--brand-primary, #2a2a2a); }

/* DIRECTORY INDEX (browse page) */
.dir-index { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem 4rem; }
.dir-index h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem; font-weight: 700; margin: 2rem 0 1rem;
}
.dir-index .empty { color: #888; text-align: center; padding: 3rem 0; }

@media (max-width: 768px) {
  body { overflow-x: hidden; }

  /* SEARCH — sticky under nav (only present on directory.php if the view adds it;
     harmless if unused) */
  .search-bar {
    position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 100;
    padding: 12px 16px;
    background: var(--brand-cream, #f8f7f2);
  }
  .search-wrapper { position: relative; }
  .search-wrapper svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #999; }
  .search-input {
    width: 100%; padding: 14px 14px 14px 42px;
    min-height: 48px; font-size: 16px;
  }

  /* BREADCRUMBS — horizontal scroll */
  .dir-hero { padding: 1.5rem 16px 1rem; text-align: left; }
  .dir-hero .breadcrumb {
    white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    font-size: 12px; margin-bottom: 0.75rem;
  }
  .dir-hero .breadcrumb::-webkit-scrollbar { display: none; }
  .dir-hero h1 { font-size: 24px; line-height: 1.3; }
  .dir-hero p { font-size: 0.9rem; }

  /* FILTER PILLS — horizontal scroll row */
  .filters {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 8px 16px 16px; gap: 8px; margin: 0; scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn {
    flex-shrink: 0; padding: 10px 18px; min-height: 44px;
    border-radius: 9999px; font-size: 13px;
  }

  /* LISTING CARDS — stack, horizontal thumb layout */
  .listings { padding: 0 0 3rem; }
  .listing-grid { grid-template-columns: 1fr; gap: 0; }
  .listing-card {
    display: flex; gap: 14px;
    border-radius: 1rem; margin: 0 16px 12px; padding: 14px;
  }
  .listing-img {
    width: 80px; height: 80px; flex-shrink: 0;
    border-radius: 0.75rem;
  }
  .listing-body { padding: 0; flex: 1; min-width: 0; }
  .listing-name { font-size: 15px; }
  .listing-category { font-size: 12px; margin-bottom: 6px; }
  .listing-services { margin-bottom: 6px; }
  .listing-tag { font-size: 11px; }
  .listing-footer {
    border-top: none; padding-top: 0;
    font-size: 13px;
  }

  /* SEO CONTENT + NEARBY CITIES */
  .seo-content { padding: 1.5rem 16px 2rem; }
  .seo-links {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; gap: 8px;
  }
  .seo-links::-webkit-scrollbar { display: none; }
  .seo-links a {
    flex-shrink: 0; min-height: 44px; display: flex; align-items: center;
    padding: 10px 18px; border-radius: 9999px; font-size: 13px;
  }

  .dir-index { padding: 0 16px 2rem; }
}
