/* ================================================================
   HOUZEZ DEVELOPER SHOWCASE v5.0
   ALL styles scoped to .hds-section — ZERO global overrides
   Black #0a0a0a | White #fff | Red #e0001b
   ================================================================ */

/* ── Variables (scoped) ──────────────────────────────────────── */
.hds-section {
  --c-bg:      #0a0a0a;
  --c-card:    #141414;
  --c-card2:   #1e1e1e;
  --c-border:  #2a2a2a;
  --c-white:   #ffffff;
  --c-off:     #d0d0d0;
  --c-muted:   #888;
  --c-red:     #e0001b;
  --c-red2:    #b50016;
  --c-glow:    rgba(224,0,27,.15);
  --r:         10px;
  --r2:        6px;
  --ease:      cubic-bezier(.4,0,.2,1);
  --shadow:    0 8px 40px rgba(0,0,0,.6);
}

/* ── Section wrapper ─────────────────────────────────────────── */
.hds-section {
  background: var(--c-bg);
  color: var(--c-white);
  padding: 170px 40px 64px;  /* Extra top padding so content clears the fixed header */
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

/* Full width on page */
.hds-section *,
.hds-section *::before,
.hds-section *::after {
  box-sizing: border-box;
}

/* ── Search bar ──────────────────────────────────────────────── */
.hds-search-bar {
  margin-bottom: 32px;
}

.hds-search-bar input {
  width: 100%;
  max-width: 480px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 50px;
  color: var(--c-white);
  font-size: 14px;
  padding: 12px 22px;
  outline: none;
  transition: border-color .25s;
}

.hds-search-bar input:focus {
  border-color: var(--c-red);
}

.hds-search-bar input::placeholder {
  color: var(--c-muted);
}

/* ================================================================
   DEVELOPER GRID
   ================================================================ */
.hds-dev-grid {
  display: grid;
  grid-template-columns: repeat(var(--hds-cols, 4), 1fr);
  gap: 18px;
}

@media (max-width: 1200px) { .hds-dev-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .hds-dev-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .hds-dev-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 380px)  { .hds-dev-grid { grid-template-columns: 1fr; } }

/* ── Developer Card ─────────────────────────────────────────── */
.hds-dev-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  padding: 24px 14px 20px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  text-decoration: none !important;
  text-align: center;
  transition: transform .3s var(--ease),
              border-color .3s var(--ease),
              box-shadow .3s var(--ease);
  animation: hds-fadeup .5s var(--ease) both;
  position: relative;
  overflow: hidden;
}

.hds-dev-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--c-glow), transparent 70%);
  opacity: 0;
  transition: opacity .35s;
}

.hds-dev-card:hover {
  transform: translateY(-5px);
  border-color: var(--c-red);
  box-shadow: 0 0 0 1px var(--c-red), var(--shadow);
}

.hds-dev-card:hover::after { opacity: 1; }

/* Logo box */
.hds-dev-logo-box {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;  /* White background so coloured logos show properly */
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r2);
  padding: 10px 12px;
  overflow: hidden;
  transition: border-color .3s, background .3s;
}

.hds-dev-card:hover .hds-dev-logo-box {
  border-color: var(--c-red);
  background: #f5f5f5;
}

.hds-dev-logo-box img {
  max-width: 100%;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  /* No filter — show logos in their natural colors on white background */
  filter: none;
  transition: opacity .3s, transform .3s;
}

.hds-dev-card:hover .hds-dev-logo-box img {
  opacity: 0.85;
  transform: scale(1.05);
}

/* Initials fallback */
.hds-dev-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--c-red);
  letter-spacing: 2px;
}

/* Text */
.hds-dev-label {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hds-dev-name {
  display: block;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--c-white) !important;
  line-height: 1.3 !important;
}

.hds-dev-count {
  display: block;
  font-size: 11px;
  color: var(--c-muted);
}

/* CTA */
.hds-dev-cta {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-red);
  text-transform: uppercase;
  letter-spacing: .6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .25s, transform .25s;
}

.hds-dev-card:hover .hds-dev-cta {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   DEVELOPER PAGE BANNER
   ================================================================ */
.hds-dev-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 36px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.hds-dev-banner-left {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
}

.hds-dev-banner-logo {
  flex-shrink: 0;
  background: #ffffff;  /* White background so coloured logos display properly */
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r);
  padding: 16px 24px;
  min-width: 140px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hds-dev-banner-logo img {
  max-height: 64px;
  max-width: 200px;
  object-fit: contain;
  filter: none;  /* Show logo in natural colours on white background */
  display: block;
}

.hds-dev-banner-info {}

.hds-dev-banner-title {
  font-size: 38px !important;
  font-weight: 800 !important;
  color: var(--c-white) !important;
  margin: 0 0 8px !important;
  line-height: 1.1 !important;
  text-transform: none !important;
  letter-spacing: -0.5px !important;
}

.hds-dev-banner-sub {
  font-size: 15px !important;
  color: var(--c-muted) !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
}

.hds-red-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--c-red);
  border-radius: 50%;
  animation: hds-pulse 1.8s infinite;
}

@keyframes hds-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(1.3); }
}

/* Back button */
.hds-back-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r2);
  color: var(--c-off) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: border-color .25s, color .25s, background .25s;
  white-space: nowrap;
}

.hds-back-btn:hover {
  border-color: var(--c-red);
  color: var(--c-red) !important;
  background: var(--c-card2);
}

@media (max-width: 700px) {
  .hds-dev-banner         { flex-direction: column; align-items: flex-start; }
  .hds-dev-banner-title   { font-size: 26px !important; }
  .hds-dev-banner-left    { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ================================================================
   HOUZEZ GRID V7 WRAPPER — dark overrides when Houzez renders
   ================================================================ */
.hds-houzez-grid {
  width: 100%;
}

/* Force Houzez card dark inside our section */
.hds-section .listing-item-wrap,
.hds-section .houzez-property-listing,
.hds-section .property-listing-item {
  background: var(--c-card) !important;
  border-color: var(--c-border) !important;
  color: var(--c-white) !important;
}

.hds-section .listing-title a,
.hds-section .listing-item-title a,
.hds-section h2.listing-title a,
.hds-section h3.listing-title a {
  color: var(--c-white) !important;
}

.hds-section .listing-price,
.hds-section .item-price {
  color: var(--c-red) !important;
}

.hds-section .listing-meta span,
.hds-section .listing-meta-item {
  color: var(--c-muted) !important;
}

.hds-section .item-amenities li,
.hds-section .property-meta-items li {
  color: var(--c-muted) !important;
}

.hds-section .btn,
.hds-section .button,
.hds-section a.btn-default,
.hds-section .houzez-btn {
  border-color: var(--c-red) !important;
  color: var(--c-red) !important;
  background: transparent !important;
}

.hds-section .btn:hover,
.hds-section .button:hover,
.hds-section a.btn-default:hover {
  background: var(--c-red) !important;
  color: #fff !important;
}

/* ================================================================
   FALLBACK PROPERTY CARDS (when Houzez V7 template not found)
   ================================================================ */
.hds-prop-grid {
  display: grid;
  gap: 22px;
}

.hds-prop-cols-3 { grid-template-columns: repeat(3,1fr); }
.hds-prop-cols-4 { grid-template-columns: repeat(4,1fr); }
.hds-prop-cols-2 { grid-template-columns: repeat(2,1fr); }

@media (max-width: 1024px) {
  .hds-prop-cols-3,
  .hds-prop-cols-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 580px) {
  .hds-prop-cols-2,
  .hds-prop-cols-3,
  .hds-prop-cols-4 { grid-template-columns: 1fr; }
}

/* Individual property card */
.hds-pcard {
  display: flex;
  flex-direction: column;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  animation: hds-fadeup .5s var(--ease) both;
}

.hds-pcard:hover {
  transform: translateY(-5px);
  border-color: var(--c-red);
  box-shadow: 0 0 0 1px var(--c-red), var(--shadow);
}

/* Property image */
.hds-pcard-img {
  display: block;
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--c-card2);
  text-decoration: none !important;
}

.hds-pcard-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .55s var(--ease);
}

.hds-pcard:hover .hds-pcard-img img {
  transform: scale(1.07);
}

.hds-pcard-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: var(--c-muted);
  background: var(--c-card2);
}

/* Image gradient shade */
.hds-pcard-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 50%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.hds-pcard:hover .hds-pcard-shade { opacity: 1; }

/* Badge */
.hds-pcard-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--c-red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
}

/* Body */
.hds-pcard-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 18px 20px;
  flex: 1;
}

.hds-pcard-price {
  font-size: 19px;
  font-weight: 800;
  color: var(--c-red);
  line-height: 1;
  letter-spacing: -.2px;
}

.hds-pcard-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

.hds-pcard-title a {
  color: var(--c-white) !important;
  text-decoration: none !important;
  transition: color .2s;
}

.hds-pcard-title a:hover { color: var(--c-red) !important; }

.hds-pcard-loc {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px !important;
  color: var(--c-muted) !important;
  margin: 0 !important;
}

.hds-pcard-loc svg { flex-shrink: 0; color: var(--c-muted); }

/* Meta chips */
.hds-pcard-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.hds-pcard-meta span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--c-off);
  background: var(--c-card2);
  border: 1px solid var(--c-border);
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

/* View button */
.hds-pcard-btn {
  display: inline-block;
  margin-top: auto;
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--c-red) !important;
  border: 1px solid var(--c-red);
  border-radius: var(--r2);
  text-decoration: none !important;
  transition: background .25s, color .25s;
  align-self: flex-start;
  line-height: 1 !important;
}

.hds-pcard-btn:hover {
  background: var(--c-red) !important;
  color: #fff !important;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.hds-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 48px;
}

.hds-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r2);
  color: var(--c-white) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  transition: background .25s, border-color .25s;
}

.hds-pagination .page-numbers:hover,
.hds-pagination .page-numbers.current {
  background: var(--c-red) !important;
  border-color: var(--c-red) !important;
  color: #fff !important;
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.hds-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-muted);
  font-size: 15px;
  border: 1px dashed var(--c-border);
  border-radius: var(--r);
}

/* ================================================================
   ANIMATION
   ================================================================ */
@keyframes hds-fadeup {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger property cards */
.hds-pcard:nth-child(1)  { animation-delay: .04s; }
.hds-pcard:nth-child(2)  { animation-delay: .08s; }
.hds-pcard:nth-child(3)  { animation-delay: .12s; }
.hds-pcard:nth-child(4)  { animation-delay: .16s; }
.hds-pcard:nth-child(5)  { animation-delay: .20s; }
.hds-pcard:nth-child(6)  { animation-delay: .24s; }
.hds-pcard:nth-child(7)  { animation-delay: .28s; }
.hds-pcard:nth-child(8)  { animation-delay: .32s; }
.hds-pcard:nth-child(9)  { animation-delay: .36s; }
.hds-pcard:nth-child(10) { animation-delay: .40s; }
.hds-pcard:nth-child(11) { animation-delay: .44s; }
.hds-pcard:nth-child(12) { animation-delay: .48s; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .hds-section { padding: 60px 16px 48px; }
}

/* Extra top clearance when page uses Elementor header_footer template
   (header is sticky/fixed and content must not merge with it) */
body.elementor-template-header-footer .hds-section,
body.hds-active-page .hds-section {
  padding-top: 100px;
}
@media (max-width: 768px) {
  body.elementor-template-header-footer .hds-section,
  body.hds-active-page .hds-section {
    padding-top: 80px;
  }
}
