/* ── Page Layout ── */
.directory-page {
  background: #f9f9f9;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* ── Hero ── */
.directory-hero {
  background: linear-gradient(135deg, #004f4d 0%, #006b68 100%);
  color: white;
  text-align: center;
  padding: 56px 20px 48px;
}
.directory-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 12px;
}
.directory-hero p {
  font-size: 1.05rem;
  opacity: 0.88;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Category Cards Grid ── */
.categories-section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 48px 20px 0;
}
.categories-section h2 {
  text-align: center;
  color: #2e2e2e;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 28px;
}
.category-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 768px) {
  .category-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .category-cards-grid {
    grid-template-columns: 1fr;
  }
  .directory-hero h1 {
    font-size: 1.6rem;
  }
}

.cat-card {
  background: white;
  border: 2.5px solid #e5e7eb;
  border-radius: 14px;
  padding: 28px 20px 22px;
  cursor: pointer;
  text-align: center;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.15s;
  user-select: none;
}
.cat-card:hover {
  border-color: #004f4d;
  box-shadow: 0 4px 18px rgba(0, 79, 77, 0.12);
  transform: translateY(-2px);
}
.cat-card.active {
  border-color: #004f4d;
  background: #004f4d;
  box-shadow: 0 6px 24px rgba(0, 79, 77, 0.22);
  transform: translateY(-2px);
}
.cat-card.active .cat-icon-wrap {
  background: rgba(255, 255, 255, 0.18);
}
.cat-card.active .cat-icon-wrap i {
  color: white;
}
.cat-card.active .cat-name {
  color: white;
}
.cat-card.active .cat-sub-count {
  color: rgba(255, 255, 255, 0.72);
}

.cat-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  transition: background 0.18s;
}
.cat-icon-wrap i {
  font-size: 1.7rem;
  transition: color 0.18s;
}
.cat-name {
  font-size: 1rem;
  font-weight: 700;
  color: #2e2e2e;
  margin: 0 0 5px;
  transition: color 0.18s;
}
.cat-sub-count {
  font-size: 0.8rem;
  color: #6b7280;
  transition: color 0.18s;
}

.cat-card[data-cat="property"] .cat-icon-wrap {
  background: #e6f7f7;
}
.cat-card[data-cat="property"] .cat-icon-wrap i {
  color: #004f4d;
}
.cat-card[data-cat="construction"] .cat-icon-wrap {
  background: #f1f5f9;
}
.cat-card[data-cat="construction"] .cat-icon-wrap i {
  color: #475569;
}
.cat-card[data-cat="maintenance"] .cat-icon-wrap {
  background: #eff6ff;
}
.cat-card[data-cat="maintenance"] .cat-icon-wrap i {
  color: #2563eb;
}
.cat-card[data-cat="outdoor"] .cat-icon-wrap {
  background: #f0fdf4;
}
.cat-card[data-cat="outdoor"] .cat-icon-wrap i {
  color: #16a34a;
}
.cat-card[data-cat="cleaning"] .cat-icon-wrap {
  background: #faf5ff;
}
.cat-card[data-cat="cleaning"] .cat-icon-wrap i {
  color: #7c3aed;
}
.cat-card[data-cat="moving"] .cat-icon-wrap {
  background: #fff7ed;
}
.cat-card[data-cat="moving"] .cat-icon-wrap i {
  color: #ea580c;
}

/* ── Vendor Results Section ── */
.vendors-section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 44px 20px 0;
}

.vendors-prompt {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}
.vendors-prompt i {
  font-size: 2.5rem;
  margin-bottom: 14px;
  display: block;
}
.vendors-prompt p {
  font-size: 1rem;
  margin: 0;
}

.vendors-section-heading {
  display: none;
  font-size: 1.15rem;
  font-weight: 700;
  color: #2e2e2e;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}
.vendors-section-heading span {
  color: #004f4d;
}

.vendors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) {
  .vendors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .vendors-grid {
    grid-template-columns: 1fr;
  }
}

.vendor-tile {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 22px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
}

.vendor-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: #004f4d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
}
.vendor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vendor-name {
  font-size: 0.97rem;
  font-weight: 700;
  color: #2e2e2e;
  margin: 0 0 8px;
  word-break: break-word;
}
.vendor-detail {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: #6b7280;
  margin-bottom: 4px;
  word-break: break-all;
}
.vendor-detail i {
  color: #004f4d;
  width: 14px;
  flex-shrink: 0;
}

.vendor-contact-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.vendor-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: auto;
  border: 1.5px solid #004f4d;
  border-radius: 20px;
  padding: 5px 14px;
  background: white;
  color: #004f4d;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background 0.15s,
    color 0.15s;
}
.vendor-contact-btn:hover {
  background: #004f4d;
  color: white;
  transform: none;
  opacity: 1;
}
.vendor-contact-revealed {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: #004f4d;
  font-weight: 500;
}
.vendor-contact-revealed i {
  color: #004f4d;
  width: 14px;
  flex-shrink: 0;
}
.vendor-contact-revealed a {
  color: #004f4d;
  text-decoration: underline;
  background: #f0f7f7;
  border-radius: 4px;
  padding: 2px 6px;
  word-break: break-all;
}
.vendor-contact-revealed a:hover {
  background: #d8eeed;
}
.vendor-contact-revealed-inline {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #004f4d;
  text-decoration: underline;
  background: #f0f7f7;
  border-radius: 4px;
  padding: 3px 8px;
  word-break: break-all;
}
.vendor-contact-revealed-inline:hover {
  background: #d8eeed;
}

#contactPopup {
  display: none;
  position: fixed;
  z-index: 10000;
  background: white;
  border: 1.5px solid #004f4d;
  border-radius: 12px;
  padding: 18px 22px 16px;
  box-shadow: 0 8px 28px rgba(0, 79, 77, 0.18);
  min-width: 210px;
  max-width: 290px;
}
#contactPopupClose {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
#contactPopupClose:hover {
  color: #004f4d;
}
.contact-popup-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin-bottom: 8px;
}
.contact-popup-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #004f4d;
  text-decoration: none;
  word-break: break-all;
}
.contact-popup-link i {
  font-size: 0.9rem;
  flex-shrink: 0;
}
.contact-popup-link:hover {
  text-decoration: underline;
}

.vendors-empty {
  text-align: center;
  padding: 52px 20px;
  color: #9ca3af;
  grid-column: 1 / -1;
}
.vendors-empty i {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
}
.vendors-empty p {
  margin: 0;
  font-size: 0.95rem;
}

/* ── Premium (Featured) Card ── */
.vendor-card-featured {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 79, 77, 0.12);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  position: relative;
  border: 1px solid #e5e7eb;
}
.vendor-card-featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 79, 77, 0.18);
}
.premium-hero {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.premium-hero-fallback {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #004f4d 0%, #188f8b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}
.premium-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 79, 77, 0.92);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(6px);
}
.premium-advert-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: linear-gradient(135deg, #90be6d, #5fa832);
  color: white;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.premium-card-body {
  padding: 18px 18px 16px;
}
.premium-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.premium-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, #004f4d 0%, #188f8b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 79, 77, 0.2);
  overflow: hidden;
}
.premium-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.premium-name {
  font-size: 1rem;
  font-weight: 700;
  color: #004f4d;
  margin: 0 0 3px;
  line-height: 1.3;
}
.premium-location {
  font-size: 0.8rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 5px;
}
.premium-cta {
  background: linear-gradient(135deg, #004f4d 0%, #188f8b 100%);
  color: white;
  border: none;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s;
  box-shadow: 0 4px 12px rgba(0, 79, 77, 0.28);
}
.premium-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
}

/* ── Apply CTA (empty state) ── */
.apply-listing-btn {
  display: inline-block;
  margin-top: 14px;
  background: #004f4d;
  color: white;
  padding: 9px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s;
}
.apply-listing-btn:hover {
  background: #006b68;
}

/* ── Pamphlet Modal ── */
#pamphletModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
#pamphletModal.open {
  display: flex;
}
.pamphlet-container {
  position: relative;
  max-width: 980px;
  width: 100%;
  max-height: 90vh;
  margin: 20px;
  animation: pamphletOpen 0.4s ease;
  z-index: 1;
}
.pamphlet-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  background: #ff9500;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 2001;
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.4);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pamphlet-book {
  display: flex;
  background: white;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  min-height: 560px;
  max-height: 88vh;
}
.pamphlet-page {
  flex: 1;
  padding: 28px;
  position: relative;
  overflow-y: auto;
}
.pamphlet-page-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 3px solid #004f4d;
}
.pamphlet-page-header h2 {
  color: #004f4d;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pamphlet-category-pill {
  background: #188f8b;
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}
.pamphlet-hero-img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  max-height: 180px;
  display: block;
  margin: 16px 0;
}
.pamphlet-section-title {
  color: #004f4d;
  font-size: 13px;
  font-weight: 700;
  margin: 18px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pamphlet-about {
  color: #555;
  line-height: 1.6;
  margin: 0;
  font-size: 0.875rem;
}
.pamphlet-contact-section h3 {
  color: #004f4d;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pamphlet-contact-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.pamphlet-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}
.pamphlet-contact-item i {
  color: #188f8b;
  font-size: 15px;
  width: 16px;
  flex-shrink: 0;
}
.pamphlet-contact-item strong {
  display: block;
  color: #004f4d;
  font-size: 12px;
  font-weight: 600;
}
.pamphlet-contact-item span,
.pamphlet-contact-item a {
  color: #555;
  font-size: 13px;
  text-decoration: none;
}
.pamphlet-contact-item a:hover {
  color: #188f8b;
  text-decoration: underline;
}
.pamphlet-services-list {
  margin: 0;
  padding-left: 18px;
  color: #555;
  font-size: 0.875rem;
}
.pamphlet-services-list li {
  margin-bottom: 5px;
}
.pamphlet-footer-cta {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #004f4d 0%, #188f8b 100%);
  border-radius: 8px;
  color: white;
  text-align: center;
}
.pamphlet-footer-cta h3 {
  color: white;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
  text-transform: uppercase;
}
.pamphlet-footer-cta p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 12px;
  font-size: 0.8rem;
}
.pamphlet-footer-cta a {
  background: #ff9500;
  color: white;
  border: none;
  padding: 9px 20px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
.pamphlet-footer-cta a:hover {
  background: #e8890a;
}
/* ── Featured Section ── */
.featured-section {
  background: linear-gradient(180deg, #f0f7f7 0%, #f9f9f9 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 44px 20px 36px;
}
.featured-inner {
  max-width: 1060px;
  margin: 0 auto;
}
.featured-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 24px;
}
.featured-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2e2e2e;
  margin: 0;
}
.featured-sub {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Category header row ── */
.categories-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 10px;
}
.categories-header h2 {
  margin: 0;
}
.clear-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1.5px solid #004f4d;
  color: #004f4d;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.clear-filter-btn:hover {
  background: #004f4d;
  color: white;
}

/* ── Browse Section ── */
.browse-section {
  padding: 44px 20px 0;
}
.browse-inner {
  max-width: 1060px;
  margin: 0 auto;
}
.browse-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}
.browse-heading h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2e2e2e;
  margin: 0;
}
.browse-count {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
}
.tier-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 6px;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tier-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid #e5e7eb;
}
.tier-divider.premium-div {
  color: #004f4d;
}
.tier-divider.essential-div {
  color: #6b7280;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes pamphletOpen {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@media (max-width: 768px) {
  .pamphlet-container {
    max-height: 95vh;
    overflow-y: auto;
    margin: 10px;
  }
}

.acct-type-btn {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem 0.75rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  width: 100%;
}
.acct-type-btn:hover {
  border-color: #004f4d;
  background: #f0fdf4;
}
.acct-type-icon {
  font-size: 1.4rem;
  color: #004f4d;
  margin-bottom: 0.4rem;
}
.acct-type-label {
  font-weight: 700;
  color: #1f2937;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.acct-type-desc {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}

.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-modal-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.auth-modal-header {
  padding: 20px 20px 10px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}
.auth-modal-header h3 {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  color: #004f4d;
  font-size: 1.5rem;
  pointer-events: none;
}
.auth-modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-modal-close:hover {
  color: #333;
}
.auth-modal-body {
  padding: 20px;
}
.auth-form {
  display: none;
}
.auth-form.active {
  display: block;
}
.auth-btn-primary {
  width: 100%;
  padding: 12px;
  background: #004f4d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 10px;
}
.auth-btn-primary:hover {
  background: #006b68;
}
.auth-btn-secondary {
  width: 100%;
  padding: 12px;
  background: white;
  color: #004f4d;
  border: 2px solid #004f4d;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-btn-secondary:hover {
  background: #f0fdf4;
}
.auth-divider {
  text-align: center;
  margin: 15px 0;
  position: relative;
  border-top: 1px solid #eee;
}
.auth-divider span {
  position: relative;
  top: -10px;
  background: white;
  padding: 0 10px;
  color: #999;
  font-size: 0.85rem;
}
