/* ==========================================================================
   Direct Homes – Dark property card
   Markup: components/property-card.php → dh_property_card_overlay()
   Photo on top, fading into a dark content panel. The classic card
   (dh_property_card, css/directhomes-cards.css) stays as it is.
   ========================================================================== */
.dh-ocard {
  --dh-ocard-bg: #16231e;

  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: var(--dh-ocard-bg);
  color: #fff;
  box-shadow: 0 18px 40px rgba(var(--dh-primary-rgb), 0.14);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.45s ease;
}

.dh-ocard:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 56px rgba(var(--dh-primary-rgb), 0.22);
}

/* ---- photo ---- */
.dh-ocard__media {
  position: relative;
  flex: 0 0 auto;
  height: 265px;
}

.dh-ocard__img {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.dh-ocard__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* smooth fade from the photo into the dark panel */
.dh-ocard__media::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 55%;
  background: linear-gradient(180deg,
    rgba(22, 35, 30, 0) 0%,
    rgba(22, 35, 30, 0.45) 45%,
    rgba(22, 35, 30, 0.85) 75%,
    var(--dh-ocard-bg) 100%);
  pointer-events: none;
}

/* labels: Featured left, status right (same places as the classic card) */
/* label row: Featured left, status right */
.dh-ocard__tags {
  position: absolute;
  top: 16px;
  right: 16px;
  left: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.dh-ocard__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
}

.dh-ocard__tag--featured {
  border-color: #fff;
  background: #fff;
  color: var(--dh-primary);
}

.dh-ocard__tag--featured svg {
  color: var(--dh-accent);
}

.dh-ocard__tag--status {
  margin-left: auto;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(22, 35, 30, 0.55);   /* readable on light photos too */
}

/* share + favourite on the photo, bottom right */
.dh-ocard__actions {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

.dh-ocard__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

button:focus-visible{

}

.dh-ocard__icon svg {
  fill: none;
}

.dh-ocard__icon:hover,
.dh-ocard__icon:focus-visible {
  border-color: #fff;
  background: #fff;
  color: var(--dh-primary);
}

.dh-ocard__icon.dh-action--fav.is-active {
  border-color: var(--dh-accent);
  background: var(--dh-accent);
  color: #fff;
}

.dh-ocard__icon.dh-action--fav.is-active svg {
  fill: currentColor;
}

/* ---- content ---- */
.dh-ocard__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 8px 22px 22px;
}

.dh-ocard__title {
  margin: 0 0 8px;
  font-family: var(--dh-font-heading);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
}

.dh-ocard__title a,
.dh-ocard__title a:hover {
  color: #fff;
  text-decoration: none;
}

.dh-ocard__desc {
  display: -webkit-box;
  min-height: 3em;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.dh-ocard__address {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
}

.dh-ocard__address svg {
  flex: 0 0 auto;
  color: #D9B77A;
}

.dh-ocard__address span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* rooms | baths | living area */
.dh-ocard__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.dh-ocard__facts li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 6px;
  text-align: center;
}

.dh-ocard__facts li + li {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.dh-ocard__facts li:first-child {
  align-items: flex-start;
  padding-left: 0;
  text-align: left;
}

.dh-ocard__facts b i {
  margin-right: 7px;
  font-size: 14px;
  color: #D9B77A;   /* gold icons, like the classic card */
}

.dh-ocard__facts b {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  white-space: nowrap;
}

.dh-ocard__facts span {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.62);
}

/* price + link */
.dh-ocard__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.dh-ocard__facts + .dh-ocard__footer {
  margin-top: 16px;
}

.dh-ocard__price {
  font-family: var(--dh-font-heading);
  font-size: 22px;
  line-height: 1.1;
  color: #fff;
  white-space: nowrap;
}

.dh-ocard__more {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #D9B77A;
  text-decoration: none;
  transition: color 0.3s ease;
}

.dh-ocard__more:hover,
.dh-ocard__more:focus-visible {
  color: #fff;
  text-decoration: none;
}

.dh-ocard__more svg {
  transition: transform 0.3s ease;
}

.dh-ocard__more:hover svg {
  transform: translateX(3px);
}

/* slider spacing; equal card height inside the slick track */
.dh-ocard-slider .slick-track {
  display: flex;
}

.dh-ocard-slider .slick-slide {
  height: auto;
}

.dh-ocard-slider .slick-slide > div {
  height: 100%;
}

.dh-ocard-slider .dh-featured__slide {
  height: 100%;
  padding: 14px 10px 26px;
}

/* 3.5 cards from 1200px: three full cards, half of the next one peeks in.
   Slick sizes the slides from the list's inner width, so a right padding of
   1/7 of the width leaves room for exactly half a card. */
@media (min-width: 1200px) {
  .dh-ocard-slider--peek .slick-list {
    padding-right: 14.2857% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dh-ocard,
  .dh-ocard__more svg {
    transition: none;
  }
}
