/* ============================================================
   AllTheProperties – Service Directory Styles
   ============================================================ */

/* --- Hero Section --- */
.service-directory {
  background-color: #f9f9f9;
  padding-bottom: 4rem;
}

.service-directory .dir-hero {
  text-align: center;
  margin: 0rem 0 2rem;
}

.service-directory .dir-hero h1 {
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3rem);
  color: #a51c36;
  margin-bottom: 0.4rem;
  letter-spacing: -0.5px;
}

.service-directory .dir-hero .sub {
  margin: 0 auto 1rem;
  color: #555;
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 650px;
  line-height: 1.5;
}

.service-directory .ai-badge {
  background: #fff5f7;
  border: 1px solid #f0c8d0;
  border-radius: 12px;
  color: #a51c36;
  padding: 0.25rem 0.8rem;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
}

/* --- Search Box --- */
.searchbox {
  position: relative;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.searchbox input {
  width: 100%;
  border: 2px solid #c24b60;
  border-radius: 56px;
  padding: 0 3.25rem 0 1.2rem;
  height: 56px;
  font-size: 1rem;
  color: #222;
  background: #fff;
  box-shadow: 0 6px 24px rgba(164, 29, 58, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.searchbox input:focus {
  border-color: #a51c36;
  box-shadow: 0 8px 26px rgba(164, 29, 58, 0.16),
    0 0 0 4px rgba(164, 29, 58, 0.1);
  outline: none;
}

.searchbox .go {
  position: absolute;
  right: 6px;
  top: 6px;
  height: 44px;
  width: 44px;
  border-radius: 50%;
  border: none;
  background: #a51c36;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.1s ease-in-out;
}

.searchbox .go:hover {
  background: #8c1833;
}

.searchbox .go:active {
  transform: scale(0.95);
}

/* --- Results Grid (consistent card sizing) --- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  justify-content: flex-start;
  margin-top: 2rem;
}



.service-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(164, 29, 58, 0.05);
  padding: 1.25rem 1.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 26px rgba(164, 29, 58, 0.1);
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1f1f1f;
  margin-bottom: 0.25rem;
}

.service-card p {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.service-card .meta {
  font-size: 0.85rem;
  color: #777;
}

.service-card .btn {
  align-self: flex-start;
  font-size: 0.9rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
}

.service-card .btn-outline-primary {
  color: #a51c36;
  border-color: #a51c36;
  background: transparent;
}

.service-card .btn-outline-primary:hover {
  background-color: #a51c36;
  color: #fff;
}

/* --- No Results --- */
#noResults {
  text-align: center;
  color: #777;
  font-size: 1rem;
  margin-top: 2rem;
}

/* --- Utility --- */
.text-center {
  text-align: center !important;
}

.text-muted {
  color: #777 !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .service-directory .dir-hero h1 {
    font-size: 2rem;
  }

  .service-directory .dir-hero .sub {
    font-size: 1rem;
  }

  .service-card {
    padding: 1rem;
  }

  .service-card h3 {
    font-size: 1.05rem;
  }
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.page-btn {
  border: 1px solid #ddd;
  background: #fff;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.page-btn.active,
.page-btn:hover {
  background: #a51c36;
  color: #fff;
  border-color: #a51c36;
}

.page-btn[disabled] {
  opacity: 0.4;
  cursor: default;
}

.alphabet-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.alpha-btn {
  border: 1px solid var(--border-color, #ccc);
  background: #fff;
  color: var(--text-color, #333);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.alpha-btn:hover {
  background: var(--primary-color, #a51c36);
  color: #fff;
}

.alpha-btn.active {
  background: var(--primary-color, #a51c36);
  color: #fff;
  font-weight: 600;
}


.see-all {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-top: 1rem;
}

.see-all .alpha-btn {
  border: 1px solid var(--border-color, #ccc);
  background: #fff;
  color: var(--text-color, #333);
  border-radius: 6px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.see-all .alpha-btn:hover {
  background: var(--primary-color, #a51c36);
  color: #fff;
}

.see-all .alpha-btn.active {
  background: var(--primary-color, #a51c36);
  color: #fff;
  font-weight: 600;
}


/* Remove white gap below global header */
body.page-template-service-directory #content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Ensure section background starts immediately */
.service-directory {
  background-color: #f9f9f9;
  margin-top: 0 !important;
  padding-top: 3rem;
  /* optional breathing space */
}

/* === Autocomplete Dropdown === */
.atp-autocomplete {
  position: relative;
}

.atp-autocomplete-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  max-height: 260px;
  overflow-y: auto;
}

.atp-autocomplete-menu.show {
  display: block;
}

.atp-autocomplete-item {
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.atp-autocomplete-item:hover,
.atp-autocomplete-item[aria-selected="true"] {
  background: #a51c36;
  color: #fff;
}