/* =====================================================================
   VILLAFLOW CMS — PUBLIC SITE STYLESHEET (assets/css/main.css)
   =====================================================================
   Warna/font diambil dari CSS variables yang di-inject oleh
   includes/header.php (bersumber dari tabel brand_settings), supaya
   setiap tenant bisa punya identitas visual berbeda tanpa build step.
   Palet fallback yang dipakai di sini adalah identitas default
   VILLAFLOW: ink-green gelap + brass-gold, tipografi Fraunces + Plus
   Jakarta Sans.
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--vf-body-font);
  color: #2A2620;
  background: #FBF9F5;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.vf-no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--vf-heading-font); font-weight: 500; margin: 0 0 .5em; line-height: 1.15; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

.vf-container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.vf-eyebrow {
  font-family: var(--vf-body-font);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--vf-primary);
  margin-bottom: .6em;
}
.vf-section { padding: 88px 0; }
.vf-section--tint { background: rgba(0,0,0,.02); }
.vf-section__title { font-size: clamp(1.7rem, 3vw, 2.4rem); max-width: 620px; }

/* ---- Buttons ------------------------------------------------------ */
.vf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 14px 26px;
  font-family: var(--vf-body-font); font-weight: 600; font-size: .95rem;
  background: var(--vf-primary); color: #fff;
  border: 1px solid var(--vf-primary);
  border-radius: var(--vf-radius);
  cursor: pointer; transition: transform .15s ease, opacity .15s ease;
}
.vf-btn:hover { transform: translateY(-1px); opacity: .92; }
.vf-btn--sm { padding: 9px 16px; font-size: .82rem; }
.vf-btn--lg { padding: 17px 34px; font-size: 1rem; }
.vf-btn--block { width: 100%; }
.vf-btn--ghost { background: transparent; color: var(--vf-accent); border-color: currentColor; }
.vf-btn--invert { background: #fff; color: var(--vf-accent); border-color: #fff; }
body.btn-outline .vf-btn { background: transparent; color: var(--vf-primary); }
body.btn-soft .vf-btn { background: color-mix(in srgb, var(--vf-primary) 16%, #fff); color: var(--vf-primary); border-color: transparent; }
.vf-link { color: var(--vf-primary); font-weight: 600; text-decoration: underline; }

/* ---- Header ------------------------------------------------------- */
.vf-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251,249,245,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.vf-header.is-scrolled { border-color: rgba(0,0,0,.06); box-shadow: 0 6px 24px rgba(0,0,0,.04); }
.vf-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; }
.vf-logo__text { font-family: var(--vf-heading-font); font-size: 1.35rem; font-weight: 600; color: var(--vf-accent); }
.vf-logo img { max-height: 44px; }
.vf-nav { display: flex; align-items: center; gap: 30px; }
.vf-nav a:not(.vf-btn) { font-weight: 500; font-size: .95rem; color: var(--vf-accent); }
.vf-nav a:not(.vf-btn):hover { color: var(--vf-primary); }
.vf-menu-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px;
}
.vf-menu-toggle span { width: 22px; height: 2px; background: var(--vf-accent); border-radius: 2px; }

/* ---- Hero ------------------------------------------------------- */
.vf-hero, .vf-property-hero {
  position: relative; min-height: 88vh; display: flex; align-items: flex-end;
  color: #fff; overflow: hidden; background: var(--vf-accent);
}
.vf-property-hero { min-height: 52vh; }
.vf-hero__bg, .vf-property-hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.vf-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,33,28,.25) 0%, rgba(22,33,28,.85) 100%);
}
.vf-hero__content, .vf-property-hero__content { position: relative; padding-bottom: 72px; max-width: 760px; }
.vf-hero__content .vf-eyebrow, .vf-property-hero__content .vf-eyebrow { color: var(--vf-primary); }
.vf-hero h1, .vf-property-hero__content h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: #fff; }
.vf-hero__desc { font-size: 1.1rem; opacity: .9; max-width: 560px; }
.vf-hero__actions { display: flex; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.vf-back-link { display: inline-block; margin-bottom: 18px; opacity: .85; font-weight: 500; }
.vf-back-link:hover { opacity: 1; }

/* ---- Grids / Cards ------------------------------------------------ */
.vf-grid { display: grid; gap: 28px; margin-top: 44px; }
.vf-grid--cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.vf-card {
  background: #fff; border-radius: var(--vf-radius); overflow: hidden;
  box-shadow: 0 10px 30px rgba(20,20,10,.06); display: flex; flex-direction: column;
}
.vf-card__media { display: block; aspect-ratio: 4/3; overflow: hidden; background: #eee; }
.vf-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.vf-card:hover .vf-card__media img { transform: scale(1.05); }
.vf-card__media--placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #e7e2d8, #cfc7b3); }
.vf-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.vf-card__body h3 { font-size: 1.25rem; }
.vf-card__body p { color: #6b6558; font-size: .92rem; margin-bottom: 0; }
.vf-card__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: #7a7364; margin-top: 4px; }
.vf-card__footer { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vf-price { font-weight: 700; color: var(--vf-accent); }
.vf-price small { font-weight: 500; color: #8a8373; font-size: .75em; }
.vf-price--lg { font-size: 1.6rem; margin-bottom: 14px; }
.vf-empty { color: #8a8373; margin-top: 24px; }

.vf-about { max-width: 760px; }
.vf-about__text { font-size: 1.05rem; color: #4c473c; }
.vf-highlight { max-width: 680px; }
.vf-highlight p { color: #4c473c; font-size: 1.02rem; }

/* ---- Gallery / Lightbox -------------------------------------------- */
.vf-grid--gallery { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); grid-auto-flow: dense; }
.vf-gallery-item { border: none; padding: 0; background: none; cursor: pointer; border-radius: var(--vf-radius); overflow: hidden; aspect-ratio: 1; }
.vf-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.vf-gallery-item:hover img { transform: scale(1.06); }

.vf-lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; background: rgba(10,10,8,.92); padding: 24px;
}
.vf-lightbox.is-open { display: flex; }
.vf-lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 8px; }
.vf-lightbox__close { position: absolute; top: 20px; right: 24px; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; }

/* ---- Amenities ------------------------------------------------- */
.vf-grid--amenities { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 30px; }
.vf-amenity {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: #fff; border-radius: var(--vf-radius); font-weight: 500; font-size: .92rem;
}
.vf-amenity__icon { width: 20px; height: 20px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--vf-primary) 18%, #fff); }

/* ---- Testimonials ------------------------------------------------- */
.vf-grid--testimonials { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.vf-testimonial { margin: 0; background: #fff; border-radius: var(--vf-radius); padding: 24px; box-shadow: 0 10px 30px rgba(20,20,10,.05); }
.vf-testimonial__rating { color: var(--vf-primary); letter-spacing: 2px; margin-bottom: 10px; }
.vf-testimonial p { font-style: italic; color: #4c473c; }
.vf-testimonial footer { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .9rem; }
.vf-testimonial footer img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* ---- Location ------------------------------------------------- */
.vf-location { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.vf-location__map { border-radius: var(--vf-radius); overflow: hidden; aspect-ratio: 4/3; }
.vf-location__map iframe { width: 100%; height: 100%; border: 0; }

/* ---- FAQ Accordion ------------------------------------------------- */
.vf-faq { max-width: 780px; }
.vf-accordion__item { border-bottom: 1px solid rgba(0,0,0,.08); padding: 18px 0; }
.vf-accordion__item summary { cursor: pointer; font-weight: 600; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; }
.vf-accordion__item summary::-webkit-details-marker { display: none; }
.vf-accordion__item summary::after { content: '+'; font-size: 1.3rem; color: var(--vf-primary); }
.vf-accordion__item[open] summary::after { content: '\2212'; }
.vf-accordion__body { padding-top: 12px; color: #5a5548; }

/* ---- CTA ------------------------------------------------- */
.vf-cta { background: var(--vf-accent); color: #fff; padding: 96px 0; }
.vf-cta__inner { text-align: center; max-width: 620px; margin: 0 auto; }
.vf-cta h2 { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.vf-cta p { opacity: .85; margin-bottom: 26px; }

/* ---- Property detail layout ------------------------------------------------- */
.vf-property-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 56px; align-items: start; }
.vf-property-stats { display: flex; gap: 22px; flex-wrap: wrap; margin: 30px 0; padding: 20px 0; border-top: 1px solid rgba(0,0,0,.08); border-bottom: 1px solid rgba(0,0,0,.08); }
.vf-property-stats strong { display: block; font-family: var(--vf-heading-font); font-size: 1.2rem; color: var(--vf-accent); }
.vf-prose { margin-top: 40px; }
.vf-prose h2 { font-size: 1.4rem; }
.vf-property-sidebar { position: sticky; top: 100px; }
.vf-booking-box { background: #fff; border-radius: var(--vf-radius); padding: 26px; box-shadow: 0 14px 34px rgba(20,20,10,.08); }
.vf-booking-box__facts { margin: 16px 0 20px; display: grid; gap: 8px; }
.vf-booking-box__facts div { display: flex; justify-content: space-between; font-size: .88rem; color: #6b6558; }
.vf-booking-box__facts dt, .vf-booking-box__facts dd { margin: 0; }
.vf-booking-box__address { margin-top: 16px; font-size: .86rem; color: #7a7364; }
.vf-notfound { text-align: center; padding: 140px 0; }
.vf-notfound .vf-btn { margin-top: 20px; }

/* ---- Footer ------------------------------------------------- */
.vf-footer { background: var(--vf-accent); color: rgba(255,255,255,.82); padding: 70px 0 0; }
.vf-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,.12); }
.vf-footer__brand p { opacity: .75; max-width: 280px; }
.vf-footer__social { display: flex; gap: 12px; margin-top: 14px; }
.vf-footer__social a { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); }
.vf-footer__nav { display: flex; flex-direction: column; gap: 10px; }
.vf-footer__contact p { margin-bottom: 6px; opacity: .8; font-size: .92rem; }
.vf-footer__bottom { padding: 22px 0; font-size: .82rem; opacity: .6; text-align: center; }
.vf-footer__bottom a { text-decoration: underline; }

/* ---- Floating WhatsApp button ------------------------------------------------- */
.vf-fab-wa {
  position: fixed; right: 22px; bottom: 22px; z-index: 30;
  width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(0,0,0,.24);
}
.vf-fab-wa:hover { transform: translateY(-2px); }

/* ---- Booking modal ------------------------------------------------- */
.vf-modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; }
.vf-modal.is-open { display: flex; }
.vf-modal__backdrop { position: absolute; inset: 0; background: rgba(15,15,10,.55); }
.vf-modal__panel {
  position: relative; background: #fff; border-radius: var(--vf-radius);
  padding: 32px; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
}
.vf-modal__close { position: absolute; top: 14px; right: 18px; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: #8a8373; }
.vf-modal__subtitle { color: #8a8373; font-size: .9rem; margin-bottom: 20px; }
.vf-modal__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#vf-booking-form label { display: block; font-size: .84rem; font-weight: 600; color: #4c473c; margin-bottom: 14px; }
#vf-booking-form input, #vf-booking-form textarea {
  width: 100%; margin-top: 6px; padding: 11px 13px; font-family: var(--vf-body-font);
  border: 1px solid rgba(0,0,0,.14); border-radius: 10px; font-size: .95rem; background: #FBF9F5;
}
#vf-booking-form input:focus, #vf-booking-form textarea:focus { outline: 2px solid var(--vf-primary); outline-offset: 1px; }
.vf-modal__error { background: #FDEDED; color: #B3261E; padding: 10px 12px; border-radius: 8px; font-size: .86rem; margin-bottom: 14px; }

/* ---- Responsive ------------------------------------------------- */
@media (max-width: 900px) {
  .vf-property-layout { grid-template-columns: 1fr; }
  .vf-property-sidebar { position: static; }
  .vf-location { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .vf-menu-toggle { display: flex; }
  .vf-nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw, 320px);
    background: #fff; flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 24px; padding: 40px 32px; transform: translateX(100%); transition: transform .25s ease;
    box-shadow: -10px 0 30px rgba(0,0,0,.08);
  }
  .vf-nav.is-open { transform: translateX(0); }
  .vf-footer__inner { grid-template-columns: 1fr; }
}
