/* ═══════════════════════════════════════════════════════════
   resources/css/pages/index.css
   CSS เฉพาะหน้า Home (index)
   ─────────────────────────────────────────────────────────
   ใส่ CSS ที่ใช้เฉพาะหน้า Home เท่านั้นในไฟล์นี้
   ไม่ควรใส่ CSS ที่ใช้ร่วมกันหลายหน้า (ให้ใส่ใน app.css)
═══════════════════════════════════════════════════════════ */

/* ── Hero animated placeholder text (index-specific) ── */
/* CSS เพิ่มเติมสำหรับหน้า Home */

/* ═══════════════════════════════════════════════════════════
   SECTION 6: BILLBOARD (Horizontal Ad Banner 19:6)
   ─────────────────────────────────────────────────────────
   Banner โฆษณาแนวนอน อัตราส่วน 19:6 ขอบมนสไตล์ modern
   คลิกแล้วพาไปที่ LINE OA
═══════════════════════════════════════════════════════════ */
.billboard-section {
  padding: 44px 0 44px;
}

.billboard-banner {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 21 / 7;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  isolation: isolate;
  transform: translateZ(0);
  transition: box-shadow .35s ease, transform .35s ease;
}

.billboard-banner2 {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 30 / 15;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  isolation: isolate;
  transform: translateZ(0);
  transition: box-shadow .35s ease, transform .35s ease;
}

.billboard-banner::before {
  /* กรอบ gold บาง ๆ แบบ modern เข้ากับโทนเว็บ */
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  border: 1.5px solid rgba(215, 166, 92, 0.35);
  pointer-events: none;
  transition: border-color .35s ease;
}

.billboard-banner:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-3px);
}

.billboard-banner:hover::before {
  border-color: rgba(215, 166, 92, .75);
}

.billboard-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
  transition: transform .6s ease;
}

.billboard-banner:hover .billboard-img {
  transform: scale(1.035);
}

/* ประกาย shine วิ่งผ่านตอน hover — โทน gold ให้ความรู้สึก premium */
.billboard-shine {
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  z-index: 2;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(240, 198, 117, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left .75s ease;
}

.billboard-banner:hover .billboard-shine {
  left: 130%;
}

@media (max-width: 767.98px) {
  .billboard-section {
    padding: 4px 0 32px;
  }
  .billboard-banner {
    aspect-ratio: 21 / 7;
    border-radius: var(--radius-sm);
  }
}

/* ═══════════════════════════════════════════════════════════
   HERO — Modern Luxury (lx-hero)
   ─────────────────────────────────────────────────────────
   แทน .hero-section เดิมใน style.css (ยังเก็บ rule เดิมไว้ เผื่อหน้าอื่นใช้)
   • Desktop: ข้อความชิดซ้ายบนรูป + การ์ดค้นหาสีขาวลอยอยู่ใต้ข้อความ
   • Mobile : รูปอยู่ครึ่งบน การ์ดค้นหาซ้อนทับขอบล่างของรูป ช่องค้นหาเรียงแนวตั้ง
═══════════════════════════════════════════════════════════ */
.lx-hero {
  /* ใช้โทนทองเดียวกับปุ่ม "ลงประกาศ" (.btn-gold-fill) และไอคอนประเภทอสังหาฯ ใน style.css
     จะได้ไม่โดดจากส่วนอื่นของเว็บ */
  --lx-gold: var(--gold, #d7a65c);
  --lx-gold-deep: var(--gold-dark, #c08a3f);
  --lx-icon-bg: rgba(198, 165, 90, .08); /* = .type-icon-bg */
  --lx-champagne: #f3dcaa;
  --lx-ink: #231d16;
  --lx-muted: #8a8177;
  --lx-line: #ece5da;
  --lx-cream: #faf6ef;
  --lx-curve: var(--bg-light, #f6f6f6); /* = พื้นหลัง section ถัดไป ให้โค้ง (มือถือ) กลืนต่อเนื่อง */
  --lx-media-bottom: 0px; /* ระยะจากขอบล่าง section ถึงขอบล่างรูป (มือถือ = 150px) */

  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 78vh, 720px);
  padding-top: 68px; /* ความสูง navbar-top (fixed) */
  background: var(--lx-curve);
}

.lx-hero-media {
  position: absolute;
  inset: 0 0 var(--lx-media-bottom);
  overflow: hidden;
}

.lx-hero-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: 62% center;
     object-position: 62% center;
  /* ซูมเข้า-ออกวนไปเรื่อยๆ จังหวะเดียวกับ hero เดิม (zoomInOut ใน style.css) */
  animation: lxHeroZoom 8s ease-in-out infinite;
  will-change: transform;
}

@keyframes lxHeroZoom {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* ซ้ายเข้ม (ให้อ่านตัวอักษรขาวออก) → ขวาใส (โชว์ตัวบ้าน) + ขอบล่างเข้มนิดๆ ให้การ์ดลอยเด่น
   (มือถือใช้ overlay อีกชุด — ดู media query ด้านล่าง) */
.lx-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(22, 17, 11, .68) 0%, rgba(22, 17, 11, .42) 36%, rgba(22, 17, 11, .05) 68%, rgba(22, 17, 11, 0) 100%),
    linear-gradient(0deg, rgba(22, 17, 11, .38) 0%, rgba(22, 17, 11, 0) 38%);
}

.lx-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 48px;
  padding-bottom: 64px;
}

.lx-hero-copy {
  max-width: 640px;
  animation: lxFadeUp .9s ease .1s both;
}

.lx-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--lx-champagne);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .06em;
  margin-bottom: 18px;
}

.lx-hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: .8;
}

.lx-hero-title {
  color: #fff;
  font-size: clamp(2.2rem, 4.4vw, 3.7rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.005em;
  margin: 0 0 18px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}

.lx-hero-title-accent {
  color: var(--lx-champagne);
  font-weight: 500;
}

.lx-hero-subtitle {
  color: rgba(255, 255, 255, .86);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.7;
  margin: 0;
}

@keyframes lxFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Search card ───────────────────────────────────────── */
.lx-search {
  margin-top: 36px;
  max-width: 1040px;
  padding: 14px;
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 22px;
  box-shadow: 0 30px 80px -24px rgba(20, 14, 6, .5), 0 2px 6px rgba(20, 14, 6, .06);
  animation: lxFadeUp .9s ease .25s both;
}

/* segmented tabs ขาย / เช่า — override .search-toggle / .toggle-btn ของ style.css */
.lx-search .lx-search-tabs {
  display: inline-flex;
  gap: 4px;
  width: auto;
  margin: 0 0 12px;
  padding: 4px;
  background: var(--lx-cream);
  border: 1px solid var(--lx-line);
  border-radius: 999px;
  backdrop-filter: none;
}

.lx-search .lx-search-tabs .toggle-btn {
  min-width: 96px;
  padding: 8px 26px;
  border-radius: 999px;
  background: transparent;
  color: #6f665b;
  font-size: .92rem;
  font-weight: 600;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}

.lx-search .lx-search-tabs .toggle-btn:hover {
  background: transparent;
  color: var(--lx-gold-deep);
}

/* สีเดียวกับปุ่ม "ลงประกาศ" (.btn-gold-fill) */
.lx-search .lx-search-tabs .toggle-btn.active {
  background: var(--lx-gold);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.lx-search-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.lx-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 16px 10px 12px;
  background: #fff;
  border: 1px solid var(--lx-line);
  border-radius: 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* z-index: ให้ dropdown autocomplete ลอยทับช่อง "ประเภท" ที่อยู่ถัดไป (มือถือเรียงแนวตั้ง) */
.lx-field.location-field { flex-grow: 1.7; z-index: 3; }
.lx-field--select        { padding-right: 38px; }

.lx-field:hover        { border-color: #dccfb9; }
.lx-field:focus-within {
  border-color: var(--lx-gold);
  box-shadow: 0 0 0 4px rgba(215, 166, 92, .16);
}

/* สีเดียวกับไอคอนการ์ดประเภทอสังหาฯ (.type-icon-bg / .type-icon-wrap i) */
.lx-field-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--lx-icon-bg);
  color: var(--lx-gold);
  font-size: 1.25rem;
}

.lx-field-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.lx-field-label {
  margin: 0 0 2px;
  color: var(--lx-muted);
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
}

.lx-field-input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--lx-ink);
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: .98rem;
  font-weight: 500;
  line-height: 1.5;
  text-overflow: ellipsis;
}

.lx-field-input::-moz-placeholder { color: #aaa297; font-weight: 400; }

.lx-field-input::placeholder { color: #aaa297; font-weight: 400; }

.lx-field-select {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.lx-field-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #a39a8e;
  pointer-events: none;
}

.lx-search-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.lx-btn-filter,
.lx-btn-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease, background .2s ease;
}

.lx-btn-filter {
  padding: 0 18px;
  background: #fff;
  border: 1px solid var(--lx-line);
  color: #5c544a;
  font-size: .9rem;
}

.lx-btn-filter i { font-size: 1.15rem; color: var(--lx-gold); }

.lx-btn-filter:hover {
  border-color: var(--lx-gold);
  color: var(--lx-gold-deep);
}

/* สี / hover เดียวกับปุ่ม "ลงประกาศ" (.btn-gold-fill) */
.lx-btn-search {
  padding: 0 34px;
  background: var(--lx-gold);
  border: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.lx-btn-search i { font-size: 1.15rem; }

.lx-btn-search:hover {
  background: linear-gradient(135deg, var(--lx-gold), var(--lx-gold-deep));
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, .45);
}

.lx-btn-search:focus-visible,
.lx-btn-filter:focus-visible,
.lx-search .toggle-btn:focus-visible {
  outline: 2px solid var(--lx-gold);
  outline-offset: 2px;
}

/* ── Tablet ────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .lx-search-row { flex-wrap: wrap; }
  .lx-field.location-field { flex-basis: 100%; }
  .lx-search-actions .lx-btn-search { padding: 0 26px; }
}

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .lx-hero {
    /* รูปกินแค่ส่วนบน การ์ดค้นหาครึ่งล่างยื่นลงมาบนพื้นเทาอ่อน ขอบโค้งอยู่ด้านหลังการ์ด */
    --lx-media-bottom: 150px;
    display: block;
    min-height: 0;
  }

  /* ขอบล่างโค้งแบบวงรี (เหมือน Ref) — เฉพาะมือถือ จอคอมเป็นขอบตรง
     วางไว้ที่ .lx-hero ไม่ใช่ใน .lx-hero-media — ถ้าอยู่ในกล่องที่ overflow:hidden
     ขอบที่ถูกตัดของ overlay กับของโค้งจะซ้อนกันพอดีแล้วเกิดเส้นเทาบางๆ ตรงรอยต่อ
     จึงให้โค้งยื่นเลยขอบล่างของรูปลงไป 2px เพื่อปิดขอบรูปให้มิด */
  .lx-hero::after {
    content: '';
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: calc(var(--lx-media-bottom) - 2px);
    height: 58px;
    background: var(--lx-curve);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    pointer-events: none;
  }

  .lx-hero-img { -o-object-position: 72% center; object-position: 72% center; }

  /* + หมอกขาวจางๆ ช่วงล่าง ให้รูปค่อยๆ กลืนเข้าขอบโค้ง */
  .lx-hero-overlay {
    background:
      linear-gradient(0deg, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 22%),
      linear-gradient(180deg, rgba(22, 17, 11, .6) 0%, rgba(22, 17, 11, .34) 50%, rgba(22, 17, 11, .15) 78%, rgba(22, 17, 11, 0) 100%);
  }

  .lx-hero-inner {
    padding-top: 40px;
    padding-bottom: 24px;
  }

  .lx-hero-eyebrow { font-size: .8rem; margin-bottom: 12px; }
  .lx-hero-eyebrow::before { width: 22px; }
  .lx-hero-title { font-size: 1.9rem; margin-bottom: 12px; }
  .lx-hero-subtitle { font-size: .92rem; line-height: 1.6; }

  .lx-search {
    margin-top: 28px;
    padding: 12px;
    border-radius: 20px;
    box-shadow: 0 24px 50px -20px rgba(20, 14, 6, .45), 0 2px 6px rgba(20, 14, 6, .06);
  }

  .lx-search .lx-search-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .lx-search .lx-search-tabs .toggle-btn { min-width: 0; padding: 9px 0; }

  .lx-search-row { flex-direction: column; gap: 8px; }
  .lx-field { padding: 9px 14px 9px 10px; }
  .lx-field--select { padding-right: 36px; }
  .lx-field-icon { width: 38px; height: 38px; font-size: 1.1rem; }

  .lx-search-actions { margin-top: 2px; }
  .lx-btn-filter { width: 52px; height: 52px; padding: 0; flex-shrink: 0; }
  .lx-btn-filter span { display: none; }
  .lx-btn-search { flex: 1; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  /* .lx-hero-img ไม่อยู่ในนี้โดยตั้งใจ — ให้รูปซูมเข้า-ออกทุกเครื่องเหมือน hero เดิม */
  .lx-hero-copy,
  .lx-search { animation: none; }
}

