/* /css/apx-home-plot-card.css
   Reusable Zillow-style APE homepage card with photo carousel + video/favorite overlays */

.apx-home-card{
  position:relative;
}

.apx-home-card__link{
  position:relative;
  z-index:1;
  display:block;
}

.apx-home-card__link:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 34px rgba(15,23,42,.16);
}

.apx-home-card__media,
.apx-home-card__image{
    position:relative;
    height:185px;
    overflow:hidden;
    background:#e5e7eb;
}

.apx-home-card__slide{
    position:absolute;
    inset:0;
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    opacity:0;
    transition:opacity .18s ease;
}

.apx-home-card__slide.is-active{ opacity:1; }

.apx-card-badge,
.apx-card-photo-count,
.apx-card-time,
.apx-card-views,
.apx-card-fav,
.apx-card-video{
    position:absolute;
    z-index:3;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.35rem;
    box-shadow:0 8px 20px rgba(15,23,42,.18);
}

.apx-card-photo-count{
    top:.7rem;
    left:.7rem;
    min-width:52px;
    height:36px;
    border-radius:999px;
    background:rgba(255,255,255,.96);
    color:#334155;
    font-size:.9rem;
    font-weight:850;
}

.apx-card-badge{
    top:.7rem;
    left:50%;
    transform:translateX(-50%);
    min-width:128px;
    max-width:190px;
    min-height:38px;
    border-radius:999px;
    color:#fff;
    background:#f59e0b !important;
    font-size:.88rem;
    line-height:1.05;
    font-weight:900;
    text-align:center;
    padding:.45rem .85rem;
    border:1px solid rgba(255,255,255,.35);
    white-space:normal;
}

.apx-card-badge--trending{ background:#f59e0b !important; }
.apx-card-badge--latest{ background:#16a34a !important; }
.apx-card-badge--landmark{ background:#0b3b3f !important; }
.apx-card-badge--venture{ background:#0b3b3f !important; }

.apx-card-fav{
    top:.65rem;
    right:.65rem;
    width:46px;
    height:46px;
    border-radius:999px;
    border:0;
    background:rgba(255,255,255,.96);
    color:#334155;
    font-size:1.45rem;
    cursor:pointer;
}

.apx-card-fav:hover,
.apx-card-fav.is-saved,
.apx-card-fav.is-saved i{
    color:#e11d48;
    background:#fff;
}

.apx-card-video{
    left:.75rem;
    top:3.25rem;
    width:34px;
    height:34px;
    border-radius:999px;
    background:rgba(255,255,255,.96);
    color:#0b3b3f;
}

.apx-card-nav{
    position:absolute;
    top:50%;
    z-index:4;
    transform:translateY(-50%);
    width:38px;
    height:38px;
    border-radius:999px;
    border:0;
    background:rgba(255,255,255,.92);
    color:#334155;
    box-shadow:0 8px 18px rgba(15,23,42,.18);
    cursor:pointer;
}

.apx-card-nav:hover{ background:#fff; color:#0b3b3f; }
.apx-card-nav--prev{ left:.6rem; }
.apx-card-nav--next{ right:.6rem; }

.apx-card-time{
    left:.75rem;
    bottom:.75rem;
    min-height:42px;
    border-radius:14px;
    padding:.45rem .75rem;
    background:rgba(255,255,255,.92);
    color:#334155;
    font-size:.95rem;
    font-weight:850;
    backdrop-filter:blur(8px);
}

.apx-card-views{
    right:.75rem;
    bottom:.75rem;
    min-height:42px;
    border-radius:14px;
    padding:.45rem .75rem;
    background:rgba(255,255,255,.92);
    color:#1e40af;
    font-size:.95rem;
    font-weight:900;
    backdrop-filter:blur(8px);
}

.apx-home-card__body{ padding:.78rem .9rem .85rem; }

.apx-home-card__price{
    font-size:1.62rem;
    line-height:1.05;
    font-weight:950;
    letter-spacing:-.04em;
    color:#050b1f;
    margin-bottom:.35rem;
}

.apx-home-card__meta{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:.42rem;
    color:#111827;
    font-size:1rem;
    line-height:1.25;
    margin-bottom:.38rem;
}

.apx-home-card__meta span{
    width:1px;
    height:1rem;
    background:#cbd5e1;
    display:inline-block;
}

.apx-home-card__location{
    color:#374151;
    font-size:.98rem;
    line-height:1.35;
    margin-bottom:.38rem;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.apx-home-card__source{
    color:#6b7280;
    font-size:.78rem;
    line-height:1.3;
    display:flex;
    justify-content:space-between;
    gap:.75rem;
    align-items:center;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.apx-home-card__views{
    color:#0b3b3f;
    font-weight:850;
    flex:0 0 auto;
}

@media (max-width:575.98px){
    .apx-home-card{
        flex:0 0 86vw !important;
        max-width:86vw !important;
    }

    .apx-home-card__media,
    .apx-home-card__image{ height:145px; }

    .apx-home-card__body{ padding:.65rem .75rem .72rem; }
    .apx-home-card__price{ font-size:1.2rem; }
    .apx-home-card__meta{ font-size:.82rem; }
    .apx-home-card__location{ font-size:.8rem; }
    .apx-home-card__source{ font-size:.68rem; }

    .apx-card-photo-count{
        min-width:42px;
        height:30px;
        font-size:.74rem;
    }

    .apx-card-fav{
        width:38px;
        height:38px;
        font-size:1.15rem;
    }

    .apx-card-badge{
        min-width:104px;
        max-width:145px;
        min-height:32px;
        font-size:.72rem;
        padding:.34rem .6rem;
    }

    .apx-card-time,
    .apx-card-views{
        min-height:32px;
        border-radius:11px;
        padding:.3rem .48rem;
        font-size:.72rem;
    }

    .apx-card-nav{
        width:30px;
        height:30px;
    }

    .apx-card-video{
        top:2.85rem;
        width:30px;
        height:30px;
        font-size:.8rem;
    }
}

/* Final media-card polish */
.apx-home-card__media{
    height:170px;
}

.apx-card-badge{
    max-width:150px;
    min-width:auto;
    padding:.42rem .78rem;
    font-size:.78rem;
    white-space:normal;
    line-height:1.08;
}

.apx-card-photo-count{
    top:.55rem;
    left:.55rem;
    height:32px;
    min-width:46px;
    font-size:.78rem;
}

.apx-card-fav{
    top:.55rem;
    right:.55rem;
    width:42px;
    height:42px;
    font-size:1.25rem;
}

.apx-card-time,
.apx-card-views{
    min-height:34px;
    border-radius:12px;
    padding:.34rem .58rem;
    font-size:.8rem;
}

.apx-card-nav{
    opacity:0;
    transition:opacity .18s ease;
}

.apx-home-card__media:hover .apx-card-nav{
    opacity:1;
}

@media (max-width:575.98px){
    .apx-home-card{
        flex:0 0 86vw !important;
        max-width:86vw !important;
    }

    .apx-home-card__media{
        height:145px;
    }

    .apx-card-badge{
        max-width:130px;
        padding:.32rem .58rem;
        font-size:.66rem;
    }

    .apx-card-photo-count{
        height:26px;
        min-width:36px;
        font-size:.62rem;
    }

    .apx-card-fav{
        width:34px;
        height:34px;
        font-size:1rem;
    }

    .apx-card-time,
    .apx-card-views{
        min-height:28px;
        padding:.24rem .4rem;
        font-size:.6rem;
    }

    .apx-card-nav{
        width:28px;
        height:28px;
        opacity:.85;
    }
}
.apx-card-views{
    display:none !important;
}

.apx-home-card__rate{
    color:#10b981;
    font-size:.9rem;
    font-weight:850;
    margin-top:-.15rem;
    margin-bottom:.35rem;
}

@media (max-width:575.98px){
    .apx-home-card__rate{
        font-size:.72rem;
        margin-bottom:.25rem;
    }
}
.apx-home-cta-grid{ padding-top:2rem; }
.apx-home-cta-card{ min-height:230px; border-radius:18px; }

@media (max-width:575.98px){
  .apx-home-cta-grid{ padding-bottom:110px; }
  .apx-home-cta-card{ min-height:auto; }
  .apx-locality-cloud{ padding-right:72px; }
}

@media (max-width:575.98px){
  .apx-home-cta-grid{
    padding-bottom:150px !important;
  }
}

.apx-card-badge--recommended{
    background:#1d4ed8 !important;
}

.apx-score-badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:0.75rem;
  font-weight:600;
  padding:6px 12px;
  border-radius:999px;
  margin-top:6px;
  margin-bottom:6px; /* reduce from current */
  /* Premium base */
  background: linear-gradient(135deg, #fff9ec, #f7f1de);
  border:1px solid rgba(212,175,55,0.55);
  color:#8a6d1d;

  /* Depth */
  box-shadow:0 2px 8px rgba(0,0,0,0.06);
}

/* High score (8+) → premium gold hint */
.apx-score-badge.hot {
  background: linear-gradient(135deg, #fff8e6, #f6f1dc);
  border:1px solid rgba(212,175,55,0.55);
  color:#8a6d1d;
}

/* Medium score (5–7.9) → teal subtle */
.apx-score-badge.mid {
  background: linear-gradient(135deg, #eef6f6, #e4f0f0);
  border:1px solid rgba(11,59,63,0.25);
  color:#0b3b3f;
}

/* Low score → soft neutral */
.apx-score-badge.low {
  background:#f4f4f4;
  border:1px solid #e0e0e0;
  color:#777;
}

.apx-score-tag{
  font-size:0.65rem;
  color:#b88700;
  margin-left:6px;
}

.apx-card-wa{
  position:absolute;
  right:.72rem;
  bottom:3.05rem;
  width:34px;
  height:34px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.9);
  background:#25D366;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  z-index:50;
  pointer-events:auto;
  box-shadow:0 8px 18px rgba(0,0,0,.18);
}

.apx-card-wa:hover{
  color:#fff;
  background:#1fb856;
  transform:scale(1.06);
}

@media(max-width:575.98px){
  .apx-card-wa{
    right:.85rem;
    bottom:3.15rem;
    width:32px;
    height:32px;
  }
}

.apx-demand-badge{
  position:absolute;
  left:.65rem;
  top:3rem;
  z-index:8;
  display:inline-flex;
  align-items:center;
  gap:.32rem;
  padding:.32rem .58rem;
  border-radius:999px;
  background:rgba(255,248,230,.96);
  color:#9a5b00;
  border:1px solid rgba(212,175,55,.55);
  font-size:.7rem;
  font-weight:850;
  box-shadow:0 8px 18px rgba(15,23,42,.15);
  white-space:nowrap;
}

@media(max-width:575.98px){
  .apx-demand-badge{
    top:2.55rem;
    left:.55rem;
    font-size:.58rem;
    padding:.22rem .42rem;
  }
}

.apx-card-mobile-actions{
  display:none;
}

@media(max-width:575.98px){
  .apx-card-wa{
    display:none !important;
  }

  .apx-card-mobile-actions{
    display:grid;
    grid-template-columns:1fr 1fr; /* was 3 */
    gap:.5rem;
    padding:.6rem .75rem .75rem;
    background:#fff;
    border-top:1px solid #eef2f7;
  }

  .apx-card-mobile-action{
    border:1px solid #dbe4ef;
    background:#fff;
    color:#0f172a;
    border-radius:999px;
    min-height:36px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:.32rem;
    font-size:.72rem;
    font-weight:850;
    box-shadow:0 6px 14px rgba(15,23,42,.06);
  }

  .apx-card-mobile-action i{
    font-size:.9rem;
  }

  .apx-card-mobile-wa{
    background:#22c55e;
    border-color:#22c55e;
    color:#fff;
  }

  .apx-card-mobile-wa:hover{
    background:#16a34a;
    color:#fff;
  }
}
.apx-fav-btn{
  transition:all .2s ease;
}

.apx-fav-btn.active{
  background:#ef4444;
  color:#fff;
  transform:scale(1.05);
}

.apx-fav-btn.active i{
  color:#fff;
}