/*--------------------------------------------------------------
# Directory Results Page — directory-results.css
#
# Mirrors prototype result-card, results-tier-label,
# results-divider, badge-certified exactly, with cp- prefix.
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Page layout
--------------------------------------------------------------*/

.cp-results-section {
  background: #f2f4f7;
  padding: 48px 40px 72px;
}

.cp-results-wrap {
  max-width: 860px;
  margin: 0 auto;
}

/* Count line — sits inside dark hero so white text */
.cp-results-count {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.75);
}

.cp-results-prompt,
.cp-no-results {
  background: #fff;
  border-radius: 4px;
  padding: 56px 32px;
  text-align: center;
  color: #666;
  font-size: 16px;
}

/*--------------------------------------------------------------
# Landing callout (no search params)
--------------------------------------------------------------*/

.cp-landing-callout {
  background: #fff;
  border-radius: 4px;
  border-top: 4px solid #c8960c;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  padding: 40px 32px;
  margin-bottom: 36px;
  text-align: center;
}

.cp-landing-callout__title {
  font-size: 26px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #002751 !important;
  margin: 0 0 10px !important;
}

.cp-landing-callout__text {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  max-width: 560px;
  margin: 0 auto 24px;
}

.cp-landing-callout__btn {
  display: inline-block;
  padding: 12px 32px;
  background: #ff1f1f;
  border: 2px solid #ff1f1f;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: "Lato", system-ui, -apple-system, sans-serif;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cp-landing-callout__btn:hover,
.cp-landing-callout__btn:focus {
  background: #002751;
  border-color: #002751;
  color: #fff;
}

/*--------------------------------------------------------------
# Results list — grid
#
# 2 columns. Everything spans full width (labels, dividers,
# certified cards, messages) EXCEPT free cards, which fill
# one column each. Works with Load More appends unchanged.
--------------------------------------------------------------*/

.cp-results-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cp-results-list > * {
  grid-column: 1 / -1;
}

.cp-results-list > .cp-result-card--free {
  grid-column: auto;
}

/*--------------------------------------------------------------
# Section labels
--------------------------------------------------------------*/

.cp-section-certified {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #c8960c;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cp-section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #888;
  margin: 20px 0 8px; /* plus 16px grid gap = original 36px / 24px spacing */
}

.cp-section-divider::before,
.cp-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #d0d5de;
}

/*--------------------------------------------------------------
# Result card — paid/active
--------------------------------------------------------------*/

.cp-result-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  padding: 24px 28px;
  margin-bottom: 0; /* spacing handled by grid gap */
  border-left: 4px solid transparent;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cp-result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.cp-result-card--certified {
  border-left-color: #c8960c;
}

/*--------------------------------------------------------------
# Card avatar / badge
--------------------------------------------------------------*/

.cp-card-logo {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cp-certified-badge-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
}

.cp-card-logo-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #c8960c;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

/*--------------------------------------------------------------
# Card body
--------------------------------------------------------------*/

.cp-card-body {
  flex: 1;
  min-width: 0;
}

.cp-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.cp-card-title-wrap {
  min-width: 0;
}

.cp-card-title {
  font-size: 16px !important;
  font-weight: 700;
  color: #002751;
  margin: 0 0 2px;
  line-height: 1.3;
}

.cp-card-title a {
  color: #002751 !important;
  text-decoration: none;
}

.cp-card-title a:hover {
  color: #ff1f1f;
}

.cp-card-rep {
  font-size: 13px;
  color: #777;
  margin: 0;
}

/*--------------------------------------------------------------
# Certified badge (top-right of card)
--------------------------------------------------------------*/

.cp-certified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #c8960c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

/*--------------------------------------------------------------
# Category tags
--------------------------------------------------------------*/

.cp-card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.cp-cat-tag {
  display: inline-block;
  background: #eef2f7;
  color: #444;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 2px;
}

/*--------------------------------------------------------------
# Meta line (city, est year, travel distance)
--------------------------------------------------------------*/

.cp-card-meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}

.cp-meta-sep {
  margin: 0 5px;
  opacity: 0.5;
}

.cp-card-distance {
  color: #0693e3;
}

/*--------------------------------------------------------------
# Description excerpt
--------------------------------------------------------------*/

.cp-card-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 14px;
}

/*--------------------------------------------------------------
# View profile link — covers entire card click area
--------------------------------------------------------------*/

.cp-card-link {
  font-size: 14px;
  font-weight: 700;
  color: #002751 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

/* Stretch link to cover full card */
.cp-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.cp-card-link:hover {
  color: #ff1f1f !important;
}

/*--------------------------------------------------------------
# Free / scraped card — minimal, 2-column
--------------------------------------------------------------*/

.cp-result-card--free {
  padding: 20px 24px;
}

.cp-result-card--free .cp-card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cp-result-card--free .cp-card-title {
  margin-bottom: 6px;
}

.cp-result-card--free .cp-card-meta {
  margin-bottom: 6px;
}

/* Keep "View Profile" aligned at the bottom when cards in a row differ in height */
.cp-result-card--free .cp-card-link {
  margin-top: auto;
  align-self: flex-start;
}

/*--------------------------------------------------------------
# Load More button
--------------------------------------------------------------*/

.cp-load-more-wrap {
  text-align: center;
  margin-top: 32px;
}

.cp-load-more-btn {
  display: inline-block;
  padding: 12px 36px;
  background: #fff;
  border: 2px solid #002751;
  color: #002751;
  font-size: 15px;
  font-weight: 700;
  font-family: "Lato", system-ui, -apple-system, sans-serif;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.cp-load-more-btn:hover {
  background: #002751;
  color: #fff;
}

.cp-load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/

@media (max-width: 767px) {
  .cp-results-section {
    padding: 32px 16px 48px;
  }

  /* Collapse to 1 column */
  .cp-results-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .cp-result-card {
    flex-direction: column;
    gap: 14px;
  }

  .cp-card-header {
    flex-direction: column;
    gap: 8px;
  }

  .cp-landing-callout {
    padding: 28px 20px;
  }

  .cp-landing-callout__title {
    font-size: 22px !important;
  }
}
