/* Published property photos — homepage gallery */

/* Full showcase area for admin-posted listings */
.listings-showcase {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
  padding: 8px 0 24px;
  min-height: 280px;
}

.listings-gallery-slot {
  min-height: 120px;
}

.posted-listings-by-region {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.popular-homes-slot:empty {
  display: none;
}

.popular-homes-slot .popular-homes,
.posted-listings-by-region .popular-homes {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.popular-homes--posted {
  padding-top: 28px;
  padding-bottom: 36px;
}

.popular-homes--posted .popular-homes-intro {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #246bce;
}

.popular-homes--posted h2 {
  margin: 0 0 4px;
  font-size: 1.65rem;
  font-weight: 700;
  color: #0f172a;
}

.popular-homes--posted .region-listing-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: #64748b;
}

.published-gallery--loading {
  text-align: center;
  padding: 40px 24px;
  color: #64748b;
  font-size: 0.95rem;
}

.published-gallery--loading i {
  margin-right: 8px;
  color: #246bce;
}

.published-gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 20px 12px;
}

.published-gallery-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.published-gallery-header h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.published-gallery-header p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.95rem;
}

.published-gallery-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 600;
}

.published-grid {
  display: grid;
  gap: 20px;
}

/* Posted properties — 2 rows, scroll left/right */
#posted-homes .published-carousel-wrap {
  position: relative;
}

#posted-homes .published-carousel-arrows {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

#posted-homes .published-carousel-arrow {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

#posted-homes .published-carousel-arrow:hover:not(.inactive) {
  background: #f8fafc;
  transform: scale(1.06);
}

#posted-homes .published-carousel-arrow.inactive {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}

#posted-homes .published-grid-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

#posted-homes .published-grid-scroll::-webkit-scrollbar {
  height: 8px;
}

#posted-homes .published-grid-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 8px;
}

#posted-homes .published-grid-scroll::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 8px;
}

#posted-homes .published-grid-scroll::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

#posted-homes .published-grid--two-rows {
  display: grid;
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 272px);
  gap: 20px;
  width: max-content;
  min-height: 0;
}

#posted-homes .published-grid--two-rows .published-card {
  width: 100%;
  min-width: 240px;
  max-width: 272px;
}

.published-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
}

.published-scroll-hint i {
  color: #246bce;
  font-size: 0.8rem;
}

.published-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
}

.published-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.published-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #e2e8f0;
  overflow: hidden;
}

.published-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.published-card:hover .published-card-image img {
  transform: scale(1.04);
}

.published-card-region {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.published-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.published-card-badge.available {
  background: rgba(34, 197, 94, 0.92);
  color: #fff;
}

.published-card-badge.unavailable {
  background: rgba(100, 116, 139, 0.92);
  color: #fff;
}

.published-card-body {
  padding: 16px 16px 18px;
}

.published-card-body h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.published-card-price {
  margin: 0;
  font-size: 0.9rem;
  color: #246bce;
  font-weight: 600;
}

.published-card-meta {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
}

.home-card--posted .image-container::after {
  content: 'Posted';
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(36, 107, 206, 0.9);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 2;
}

.published-gallery--empty {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
}

.published-gallery--empty i {
  font-size: 2.2rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.published-gallery--empty h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: #334155;
}

.published-gallery--empty p {
  margin: 0;
  color: #64748b;
  max-width: 420px;
  margin-inline: auto;
}

.published-gallery--services {
  background: #f8fafc;
}

.published-card--service .published-card-service-type {
  background: rgba(15, 23, 42, 0.72);
}

.published-card-desc {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.published-services-section {
  height: auto !important;
  min-height: 40vh;
  background: #f8fafc;
  scroll-snap-align: start;
  display: block;
  overflow: visible;
}

.published-services-section::before {
  display: none;
}

@media (max-width: 900px) {
  #posted-homes .published-grid--two-rows {
    grid-auto-columns: minmax(220px, 250px);
  }

  #posted-homes .published-grid--two-rows .published-card {
    min-width: 220px;
    max-width: 250px;
  }
}

@media (max-width: 640px) {
  #posted-homes .published-grid--two-rows {
    grid-auto-columns: minmax(200px, 85vw);
  }

  #posted-homes .published-grid--two-rows .published-card {
    min-width: 200px;
    max-width: 85vw;
  }

  .published-gallery {
    padding-top: 28px;
  }

  .published-gallery--services .published-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .published-card--service {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 12px 14px 12px 12px;
    border-radius: 18px;
  }

  .published-card--service .published-card-image {
    width: 76px;
    height: 76px;
    min-width: 76px;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    outline: 2px solid rgba(36, 107, 206, 0.18);
  }

  .published-card--service .published-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }

  .published-card--service .published-card-region {
    top: auto;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.62rem;
    padding: 3px 8px;
  }

  .published-card--service .published-card-body {
    padding: 0;
    min-width: 0;
    flex: 1;
  }

  .published-card--service .published-card-body h3 {
    font-size: 0.98rem;
    margin-bottom: 4px;
  }

  .published-card--service .published-card-price,
  .published-card--service .published-card-desc {
    font-size: 0.8rem;
  }
}
