/* ============================================================
   PORTFOLIO PAGE — PropArties Project Portfolio
   Follows main site design tokens (--act-col, --ff-head, etc.)
   ============================================================ */

/* ── NAV ─────────────────────────────────── */
.pf-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 6.4rem; padding-inline: var(--tmpl-ip, 4rem);
  background: rgba(250, 250, 250, .88);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  border-bottom: 1px solid rgba(117, 94, 94, .12);
}
.pf-nav-logo { text-decoration: none; }
.pf-nav-center { position: absolute; left: 50%; transform: translateX(-50%); }
.pf-nav-title {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  color: var(--fc-main); letter-spacing: .04rem;
}
.pf-nav-back {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--ff-gen); font-size: 1.4rem; font-weight: 600;
  color: var(--act-col); text-decoration: none;
  transition: opacity .2s;
}
.pf-nav-back:hover { opacity: .7; }
.pf-nav-back i { font-size: 1.2rem; transition: transform .2s; }
.pf-nav-back:hover i { transform: translateX(-3px); }

/* ── HERO BANNER ─────────────────────────── */
.pf-hero {
  background: linear-gradient(135deg, var(--act-col) 0%, #4a3939 100%);
  padding: 8rem var(--tmpl-ip, 4rem) 6rem;
  text-align: center; direction: rtl;
}
.pf-hero-content { max-width: 64rem; margin: 0 auto; }
.pf-hero-heading {
  font-size: clamp(3.2rem, 5vw, 5.6rem);
  color: #fff; letter-spacing: .08rem;
  margin-bottom: 1.2rem;
}
.pf-hero-sub {
  font-family: var(--ff-gen); font-size: clamp(1.5rem, 2vw, 2rem);
  color: rgba(255, 255, 255, .82); line-height: 1.6;
  max-width: 52rem; margin: 0 auto;
}

/* ── FILTER TABS ─────────────────────────── */
.pf-filters {
  padding: 2.4rem var(--tmpl-ip, 4rem);
  background: var(--bg-1); text-align: center;
  border-bottom: 1px solid rgba(117, 94, 94, .08);
}
.pf-filter-wrap {
  display: inline-flex; gap: .6rem;
  background: rgba(117, 94, 94, .06);
  border-radius: 10rem; padding: .4rem;
}
.pf-filter-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .9rem 2.4rem; border: none; border-radius: 10rem;
  background: transparent;
  font-family: var(--ff-gen); font-size: 1.4rem; font-weight: 600;
  color: var(--fc-main); cursor: pointer;
  transition: all .25s ease;
}
.pf-filter-btn:hover:not(.active) { background: rgba(117, 94, 94, .08); }
.pf-filter-btn.active {
  background: var(--act-col); color: #fff;
  box-shadow: 0 2px 8px rgba(117, 94, 94, .3);
}
.pf-filter-btn i { font-size: 1.2rem; }

/* ── PROJECT GRID ────────────────────────── */
.pf-projects {
  padding: 4rem var(--tmpl-ip, 4rem) 8rem;
  background: var(--bg-1); min-height: 40vh;
}
.pf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 52rem;
  margin: 0 auto;
}

/* ── PROJECT CARD ────────────────────────── */
.pf-card {
  position: relative; border-radius: var(--br-l, 2.4rem);
  overflow: hidden; cursor: pointer;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
  transition: transform .35s ease, box-shadow .35s ease;
}
.pf-card:hover {
  transform: translateY(-.6rem);
  box-shadow: 0 12px 40px rgba(117, 94, 94, .18);
}
.pf-card-img-wrap {
  position: relative; width: 100%;
  aspect-ratio: 16 / 10; overflow: hidden;
}
.pf-card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.pf-card:hover .pf-card-img-wrap img { transform: scale(1.05); }

.pf-card-badge {
  position: absolute; top: 1.4rem; right: 1.4rem;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.2rem; border-radius: 10rem;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(8px);
  font-family: var(--ff-gen); font-size: 1.2rem; font-weight: 700;
  color: var(--act-col);
}
.pf-card-badge i { font-size: 1rem; }

.pf-card-avail {
  position: absolute; top: 1.4rem; left: 1.4rem;
  padding: .5rem 1.2rem; border-radius: 10rem;
  background: rgba(46, 125, 50, .88);
  font-family: var(--ff-gen); font-size: 1.15rem; font-weight: 700;
  color: #fff;
}

.pf-card-body {
  padding: 2rem 2.4rem 2.4rem; direction: rtl;
}
.pf-card-name {
  font-family: var(--ff-head); font-size: 2.2rem;
  color: var(--fc-main); margin-bottom: .4rem;
  letter-spacing: .04rem;
}
.pf-card-name-en {
  font-family: var(--ff-gen); font-size: 1.2rem;
  color: #999; letter-spacing: .1rem; text-transform: uppercase;
  margin-bottom: 1rem; direction: ltr; text-align: right;
}
.pf-card-desc {
  font-family: var(--ff-gen); font-size: 1.4rem;
  color: #666; line-height: 1.6; margin-bottom: 1.4rem;
}
.pf-card-meta {
  display: flex; gap: 2rem; flex-wrap: wrap;
}
.pf-card-meta-item {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--ff-gen); font-size: 1.25rem;
  color: var(--act-col); font-weight: 600;
}
.pf-card-meta-item i { font-size: 1.2rem; }

.pf-card-cta {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  width: 100%; padding: 1.4rem;
  border: none; border-top: 1px solid rgba(117, 94, 94, .08);
  background: transparent;
  font-family: var(--ff-gen); font-size: 1.4rem; font-weight: 700;
  color: var(--act-col); cursor: pointer;
  transition: background .2s, color .2s;
}
.pf-card-cta:hover {
  background: var(--act-col); color: #fff;
}
.pf-card-cta i { transition: transform .2s; }
.pf-card:hover .pf-card-cta i { transform: translateX(-.4rem); }

/* ── LOADING & EMPTY STATES ──────────────── */
.pf-loading, .pf-empty {
  display: flex; flex-direction: column; align-items: center; gap: 1.6rem;
  padding: 6rem 2rem; text-align: center;
  font-family: var(--ff-gen); font-size: 1.6rem; color: #999;
}
.pf-loading i, .pf-empty i { font-size: 3.2rem; color: var(--act-col); opacity: .5; }
.pf-spinner {
  width: 4rem; height: 4rem;
  border: 3px solid rgba(117, 94, 94, .15);
  border-top-color: var(--act-col);
  border-radius: 50%;
  animation: pfSpin 1s linear infinite;
}
@keyframes pfSpin { to { transform: rotate(360deg); } }

/* ── UNITS PANEL (slide-up drawer) ───────── */
.pf-units-panel {
  position: fixed; inset: 0; z-index: 200;
  pointer-events: none; opacity: 0;
  transition: opacity .3s ease;
}
.pf-units-panel.open {
  pointer-events: auto; opacity: 1;
}
.pf-units-overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(4px);
}
.pf-units-drawer {
  position: absolute; bottom: 0; left: 0; right: 0;
  max-height: 92vh; overflow-y: auto;
  background: var(--bg-1);
  border-radius: 2.4rem 2.4rem 0 0;
  padding: 0 0 4rem;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}
.pf-units-panel.open .pf-units-drawer {
  transform: translateY(0);
}

/* Drawer header */
.pf-units-header {
  position: sticky; top: 0; z-index: 10;
  padding: 2rem var(--tmpl-ip, 4rem);
  background: rgba(250, 250, 250, .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(117, 94, 94, .1);
  display: flex; align-items: center; gap: 2rem;
  direction: rtl;
}
.pf-units-close {
  width: 4rem; height: 4rem; border: none; border-radius: 50%;
  background: rgba(117, 94, 94, .08);
  color: var(--fc-main); font-size: 1.8rem;
  display: grid; place-items: center;
  cursor: pointer; transition: background .2s, transform .2s;
  flex-shrink: 0;
}
.pf-units-close:hover { background: rgba(117, 94, 94, .18); transform: scale(1.08); }
.pf-units-project-info { flex: 1; }
.pf-units-project-info h2 {
  font-family: var(--ff-head); font-size: 2.2rem;
  color: var(--fc-main);
}
.pf-units-project-info p {
  font-family: var(--ff-gen); font-size: 1.3rem;
  color: #888;
}

/* ── BUDGET SELECTOR ─────────────────────── */
.pf-budget, .pf-room-filter {
  padding: 2rem var(--tmpl-ip, 4rem);
  direction: rtl;
}
.pf-budget-title {
  display: flex; align-items: center; gap: .8rem;
  font-family: var(--ff-gen); font-size: 1.6rem;
  font-weight: 700; color: var(--fc-main);
  margin-bottom: 1.6rem;
}
.pf-budget-title i { color: var(--act-col); font-size: 1.4rem; }

.pf-budget-inputs {
  display: flex; align-items: center; gap: 1.2rem;
  margin-bottom: 1.6rem;
}
.pf-budget-field { flex: 1; }
.pf-budget-field label {
  display: block; font-family: var(--ff-gen);
  font-size: 1.2rem; color: #999; margin-bottom: .4rem;
}
.pf-budget-field input {
  width: 100%; padding: .8rem 1.2rem;
  border: 1.5px solid rgba(117, 94, 94, .2);
  border-radius: 1rem; background: #fff;
  font-family: var(--ff-gen); font-size: 1.4rem;
  font-weight: 600; color: var(--fc-main);
  text-align: center; direction: ltr;
}
.pf-budget-sep {
  font-size: 1.6rem; color: #bbb; padding-top: 1.8rem;
}

/* Dual-range slider */
.pf-budget-slider-wrap {
  position: relative; height: 3.6rem;
  display: flex; align-items: center;
  margin-bottom: 1.4rem;
}
.pf-range {
  position: absolute; width: 100%; height: .6rem;
  background: transparent;
  -webkit-appearance: none; appearance: none;
  pointer-events: none; z-index: 2;
}
.pf-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--act-col);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  cursor: pointer; pointer-events: auto;
  transition: transform .15s;
}
.pf-range::-webkit-slider-thumb:hover { transform: scale(1.2); }
.pf-range::-moz-range-thumb {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--act-col);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  cursor: pointer; pointer-events: auto;
}
.pf-range-track {
  position: absolute; height: .6rem;
  border-radius: .3rem;
  background: rgba(117, 94, 94, .12);
  width: 100%; z-index: 1;
}
.pf-range-track::after {
  content: ''; position: absolute;
  height: 100%; border-radius: .3rem;
  background: var(--act-col);
  left: var(--range-left, 0%);
  right: var(--range-right, 0%);
}

/* Budget pills */
.pf-budget-pills, .pf-room-pills {
  display: flex; flex-wrap: wrap; gap: .6rem;
}
.pf-pill {
  padding: .6rem 1.4rem; border-radius: 10rem;
  border: 1.5px solid rgba(117, 94, 94, .2);
  background: #fff; cursor: pointer;
  font-family: var(--ff-gen); font-size: 1.25rem; font-weight: 600;
  color: var(--fc-main); direction: ltr;
  transition: all .2s;
}
.pf-pill:hover { border-color: var(--act-col); color: var(--act-col); }
.pf-pill.active {
  background: var(--act-col); color: #fff;
  border-color: var(--act-col);
}

/* Stats bar */
.pf-units-stats {
  display: flex; gap: 2rem; flex-wrap: wrap;
  padding: 1.4rem var(--tmpl-ip, 4rem);
  background: rgba(117, 94, 94, .04);
  border-top: 1px solid rgba(117, 94, 94, .06);
  border-bottom: 1px solid rgba(117, 94, 94, .06);
  direction: rtl;
}
.pf-stat {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--ff-gen); font-size: 1.3rem;
  color: #666;
}
.pf-stat strong { color: var(--act-col); font-weight: 700; }

/* ── UNIT CARDS ──────────────────────────── */
.pf-units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
  gap: 2rem;
  padding: 2.4rem var(--tmpl-ip, 4rem);
  direction: rtl;
}
.pf-unit-card {
  position: relative;
  background: #fff; border-radius: 1.6rem;
  overflow: hidden;
  border: 1.5px solid rgba(117, 94, 94, .1);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.pf-unit-card:hover {
  transform: translateY(-.4rem);
  box-shadow: 0 8px 28px rgba(117, 94, 94, .14);
  border-color: var(--act-col);
}
.pf-unit-card-img {
  width: 100%; aspect-ratio: 16 / 10;
  object-fit: cover;
}
.pf-unit-card-body {
  padding: 1.6rem 2rem 2rem;
}
.pf-unit-card-top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: .6rem;
}
.pf-unit-card-num {
  font-family: var(--ff-head); font-size: 1.8rem;
  color: var(--fc-main);
}
.pf-unit-card-type {
  padding: .3rem .8rem; border-radius: 6rem;
  background: rgba(117, 94, 94, .08);
  font-family: var(--ff-gen); font-size: 1.1rem; font-weight: 700;
  color: var(--act-col);
}
.pf-unit-card-price {
  font-family: var(--ff-gen); font-size: 2rem;
  font-weight: 800; color: var(--act-col);
  direction: ltr; text-align: right;
  margin-bottom: .8rem;
}
.pf-unit-card-details {
  display: flex; gap: 1.6rem; flex-wrap: wrap;
}
.pf-unit-detail {
  display: flex; align-items: center; gap: .4rem;
  font-family: var(--ff-gen); font-size: 1.2rem;
  color: #777;
}
.pf-unit-detail i { color: var(--act-col); font-size: 1.1rem; }

.pf-unit-card-status {
  position: absolute; top: 1.2rem; right: 1.2rem;
  padding: .4rem 1rem; border-radius: 6rem;
  font-family: var(--ff-gen); font-size: 1.1rem; font-weight: 700;
}
.pf-unit-card-status.open {
  background: rgba(46, 125, 50, .88); color: #fff;
}
.pf-unit-card-status.reserved {
  background: rgba(255, 152, 0, .88); color: #fff;
}

/* Units empty */
.pf-units-empty {
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  padding: 4rem 2rem; text-align: center;
  font-family: var(--ff-gen); color: #999;
}
.pf-units-empty i { font-size: 3rem; color: var(--act-col); opacity: .4; }
.pf-units-empty p { font-size: 1.5rem; }
.pf-reset-btn {
  padding: .8rem 2.4rem; border: 2px solid var(--act-col);
  border-radius: 10rem; background: transparent;
  font-family: var(--ff-gen); font-size: 1.3rem; font-weight: 700;
  color: var(--act-col); cursor: pointer;
  transition: all .2s;
}
.pf-reset-btn:hover {
  background: var(--act-col); color: #fff;
}

/* ── FOOTER ──────────────────────────────── */
.pf-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2.4rem var(--tmpl-ip, 4rem);
  background: var(--fc-main); direction: rtl;
}
.pf-footer-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--ff-gen); font-size: 1.3rem;
  font-weight: 600; color: rgba(255,255,255,.7);
  text-decoration: none; transition: color .2s;
}
.pf-footer-link:hover { color: #fff; }
.pf-footer-copy {
  font-family: var(--ff-gen); font-size: 1.2rem;
  color: rgba(255,255,255,.4);
}

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 768px) {
  .pf-nav { padding-inline: 2rem; height: 5.6rem; }
  .pf-nav-title { font-size: 1.6rem; }
  .pf-nav-back span { display: none; }
  .pf-hero { padding: 6rem 2rem 4rem; }
  .pf-hero-heading { font-size: 3rem; }
  .pf-filters { padding: 1.6rem 2rem; }
  .pf-filter-btn { padding: .7rem 1.6rem; font-size: 1.25rem; }
  .pf-projects { padding: 2.4rem 2rem 6rem; }
  .pf-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .pf-budget, .pf-room-filter { padding: 1.6rem 2rem; }
  .pf-units-grid { grid-template-columns: 1fr; padding: 2rem; }
  .pf-units-header { padding: 1.6rem 2rem; }
  .pf-units-stats { padding: 1.2rem 2rem; }
  .pf-footer { flex-direction: column; gap: 1rem; padding: 2rem; }
}

@media (max-width: 480px) {
  .pf-nav-center { display: none; }
  .pf-hero { padding: 5rem 1.6rem 3rem; }
  .pf-hero-heading { font-size: 2.6rem; }
  .pf-hero-sub { font-size: 1.4rem; }
  .pf-card-body { padding: 1.4rem 1.6rem 1.6rem; }
  .pf-card-name { font-size: 1.8rem; }
  .pf-budget-inputs { flex-direction: column; gap: .8rem; }
  .pf-budget-sep { display: none; }
  .pf-units-drawer { max-height: 96vh; }
}
