/* =========================================================
   Real Estate + Live Chat — Public site styles
   ========================================================= */
:root {
  --brand: #0f766e;
  --brand-600: #0d9488;
  --brand-50: #e6f5f2;
  --brand-dark: #0b3d4a;
  --accent: #f59e0b;
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f8fb;
  --card: #ffffff;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 24px 60px -20px rgba(11, 61, 74, .35);
  --bs-primary: #0f766e;
  --bs-primary-rgb: 15, 118, 110;
  --bs-link-color: #0f766e;
  --bs-link-color-rgb: 15, 118, 110;
  --bs-link-hover-color: #0b5c56;
  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-color: #334155;
  --bs-border-radius: .65rem;
}

body { background: var(--bg); color: var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .fw-display { color: var(--ink); letter-spacing: -.02em; }
a { text-decoration: none; }
img { max-width: 100%; }
::selection { background: var(--brand); color: #fff; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: 12px; padding: .6rem 1.15rem; }
.btn-sm { padding: .38rem .8rem; border-radius: 10px; }
.btn-lg { padding: .8rem 1.5rem; border-radius: 14px; }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus { background: #0b5c56; border-color: #0b5c56; color: #fff; }
.btn-outline-brand { border: 1.5px solid var(--brand); color: var(--brand); background: transparent; }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #1f1300; }
.btn-accent:hover { background: #d98a06; color: #1f1300; }
.btn-soft { background: var(--brand-50); color: var(--brand); border: 0; }
.btn-soft:hover { background: #cfece6; color: #0b5c56; }
.btn-primary { --bs-btn-bg: #0f766e; --bs-btn-border-color: #0f766e; --bs-btn-hover-bg: #0b5c56; --bs-btn-hover-border-color: #0b5c56; --bs-btn-active-bg: #0b5c56; }
.text-brand { color: var(--brand) !important; }
.bg-brand { background: var(--brand) !important; }
.bg-brand-soft { background: var(--brand-50) !important; }
.form-control, .form-select { border-radius: 12px; border-color: var(--line); padding: .65rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand-600); box-shadow: 0 0 0 .2rem rgba(13, 148, 136, .15); }
.form-label { font-weight: 600; color: var(--ink); font-size: .9rem; }
.badge-soft.text-bg-warning { background: #fef3c7 !important; color: #92400e !important; }
.badge-soft.text-bg-success { background: #dcfce7 !important; color: #166534 !important; }
.badge-soft.text-bg-danger { background: #fee2e2 !important; color: #991b1b !important; }
.badge-soft.text-bg-info { background: #e0f2fe !important; color: #075985 !important; }
.badge-soft.text-bg-secondary { background: #f1f5f9 !important; color: #475569 !important; }
.badge-soft.text-bg-dark { background: #1e293b !important; color: #fff !important; }

/* ---------- Navbar ---------- */
.site-nav { background: rgba(255, 255, 255, .9); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid rgba(226, 232, 240, .7); padding: .7rem 0; }
.brand-logo { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.25rem; color: var(--ink) !important; letter-spacing: -.03em; }
.brand-logo .logo-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), var(--brand-600)); display: grid; place-items: center; color: #fff; font-size: 1.15rem; box-shadow: 0 6px 16px -6px rgba(15, 118, 110, .6); }
.site-nav .nav-link { white-space: nowrap; font-weight: 600; color: var(--body); padding: .5rem .9rem !important; border-radius: 10px; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--brand); background: var(--brand-50); }
.navbar-toggler { border: 0; box-shadow: none !important; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; padding: 90px 0 130px; overflow: hidden; background: var(--brand-dark); }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-img, none) center/cover no-repeat; opacity: .35; }
.hero::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(900px 400px at 85% 10%, rgba(45, 212, 191, .35), transparent 60%),
  radial-gradient(700px 400px at 0% 100%, rgba(245, 158, 11, .18), transparent 60%),
  linear-gradient(120deg, rgba(11, 61, 74, .92), rgba(15, 118, 110, .82)); }
.hero > .container { position: relative; z-index: 2; }
.hero h1 { color: #fff; font-weight: 800; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -.035em; }
.hero p.lead { color: rgba(255, 255, 255, .85); max-width: 620px; }
.hero-pill { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); padding: .4rem .9rem; border-radius: 99px; font-size: .85rem; font-weight: 600; }
.hero-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); }
.hero-shape { position: absolute; bottom: -1px; left: 0; right: 0; z-index: 2; line-height: 0; }

.search-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 1rem; margin-top: -80px; position: relative; z-index: 5; }
.search-tabs { display: inline-flex; background: var(--bg); padding: 4px; border-radius: 12px; gap: 4px; margin-bottom: .8rem; }
.search-tabs input { display: none; }
.search-tabs label { padding: .45rem 1.1rem; border-radius: 9px; font-weight: 700; font-size: .9rem; cursor: pointer; color: var(--muted); }
.search-tabs input:checked + label { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.search-card .form-select, .search-card .form-control { background-color: var(--bg); border-color: transparent; }
.search-field-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .3rem; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-sm { padding: 45px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: .4rem; }
.section-title { font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.15rem); margin: 0; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat-item { background: #fff; border-radius: var(--radius); padding: 1.2rem; text-align: center; box-shadow: var(--shadow-sm); }
.stat-item .num { font-size: 1.7rem; font-weight: 800; color: var(--ink); }
.stat-item .lbl { color: var(--muted); font-size: .85rem; font-weight: 600; }
@media (max-width: 767px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Property card ---------- */
.prop-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease; height: 100%; display: flex; flex-direction: column; border: 1px solid rgba(226, 232, 240, .6); }
.prop-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.prop-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--brand-50); }
.prop-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.prop-card:hover .prop-media img { transform: scale(1.06); }
.prop-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(to top, rgba(2, 6, 23, .65), transparent); }
.badge-purpose { position: absolute; top: 12px; left: 12px; z-index: 2; padding: .35rem .7rem; border-radius: 8px; font-size: .75rem; font-weight: 700; color: #fff; }
.badge-purpose.sale { background: var(--brand); }
.badge-purpose.rent { background: #7c3aed; }
.badge-featured { position: absolute; top: 12px; right: 12px; z-index: 2; background: var(--accent); color: #1f1300; padding: .35rem .6rem; border-radius: 8px; font-size: .72rem; font-weight: 800; }
.prop-price { position: absolute; left: 14px; bottom: 12px; z-index: 2; color: #fff; font-weight: 800; font-size: 1.25rem; }
.price-unit { font-size: .75em; font-weight: 600; opacity: .85; margin-left: 2px; }
.prop-sold { position: absolute; inset: 0; z-index: 3; background: rgba(2, 6, 23, .55); display: grid; place-items: center; color: #fff; font-weight: 800; letter-spacing: .15em; font-size: 1.1rem; text-transform: uppercase; }
.prop-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.prop-type { font-size: .78rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25rem; }
.prop-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 .35rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prop-title a { color: var(--ink); }
.prop-title a:hover { color: var(--brand); }
.prop-loc { color: var(--muted); font-size: .88rem; margin-bottom: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prop-facts { display: flex; gap: 1rem; border-top: 1px dashed var(--line); padding-top: .75rem; margin-top: auto; font-size: .85rem; color: var(--body); font-weight: 600; flex-wrap: wrap; }
.prop-facts i { color: var(--muted); margin-right: .25rem; }

/* ---------- Type tiles ---------- */
.type-tile { display: flex; align-items: center; gap: .9rem; background: #fff; border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow-sm); color: var(--ink); transition: .2s; border: 1px solid transparent; height: 100%; }
.type-tile:hover { border-color: var(--brand); transform: translateY(-3px); color: var(--ink); }
.type-tile .ic { width: 50px; height: 50px; border-radius: 14px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; }
.type-tile .t { font-weight: 700; }
.type-tile .c { color: var(--muted); font-size: .85rem; }

/* ---------- How it works ---------- */
.step-card { background: #fff; border-radius: 20px; padding: 1.8rem; box-shadow: var(--shadow-sm); height: 100%; position: relative; }
.step-card .n { position: absolute; top: 1.2rem; right: 1.4rem; font-size: 2.6rem; font-weight: 800; color: var(--brand-50); }
.step-card .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-600)); margin-bottom: 1rem; }

.cta-band { border-radius: 24px; background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; padding: 2.6rem; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -120px; top: -160px; background: rgba(255, 255, 255, .08); }
.cta-band h2 { color: #fff; }

/* ---------- Page header ---------- */
.page-hero { background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; padding: 48px 0 56px; }
.page-hero h1 { color: #fff; font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.page-hero .breadcrumb-item, .page-hero .breadcrumb-item a, .page-hero .breadcrumb-item::before { color: rgba(255, 255, 255, .75) !important; }

/* ---------- Filters ---------- */
.filter-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.3rem; position: sticky; top: 90px; }
.filter-card h6 { font-weight: 800; }
.chip-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-group input { display: none; }
.chip-group label { border: 1.5px solid var(--line); padding: .35rem .8rem; border-radius: 99px; font-size: .85rem; font-weight: 600; cursor: pointer; background: #fff; }
.chip-group input:checked + label { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.result-bar { background: #fff; border-radius: 14px; padding: .7rem 1rem; box-shadow: var(--shadow-sm); }
.empty-state { text-align: center; padding: 60px 20px; background: #fff; border-radius: var(--radius); }
.empty-state .ic { font-size: 3rem; color: var(--brand); opacity: .5; }

/* ---------- Property detail ---------- */
.gallery-main { border-radius: 20px; overflow: hidden; background: var(--brand-50); position: relative; }
.gallery-main .carousel-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; cursor: zoom-in; }
.gallery-thumbs { display: flex; gap: .5rem; overflow-x: auto; padding: .6rem 0 .2rem; scrollbar-width: thin; }
.gallery-thumbs button { border: 2px solid transparent; padding: 0; border-radius: 10px; overflow: hidden; flex: 0 0 92px; height: 66px; background: none; opacity: .7; }
.gallery-thumbs button.active { border-color: var(--brand); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.photo-count { position: absolute; right: 14px; bottom: 14px; z-index: 3; background: rgba(2, 6, 23, .7); color: #fff; padding: .3rem .7rem; border-radius: 8px; font-size: .8rem; font-weight: 600; }
.detail-card { background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); margin-bottom: 1.25rem; }
.detail-card h2.h5 { font-weight: 800; margin-bottom: 1rem; }
.detail-price { font-size: 2rem; font-weight: 800; color: var(--brand); }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .8rem; }
.fact { background: var(--bg); border-radius: 14px; padding: .85rem; display: flex; gap: .7rem; align-items: center; }
.fact i { font-size: 1.3rem; color: var(--brand); }
.fact .v { font-weight: 800; color: var(--ink); line-height: 1.1; }
.fact .k { font-size: .76rem; color: var(--muted); font-weight: 600; }
.amenity { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .92rem; padding: .3rem 0; }
.amenity i { color: var(--brand); }
.desc-text { white-space: pre-line; line-height: 1.75; }
.map-frame { width: 100%; height: 320px; border: 0; border-radius: 14px; }

.owner-card { display: flex; gap: .9rem; align-items: center; }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), #14b8a6); flex-shrink: 0; position: relative; }
.avatar.sm { width: 40px; height: 40px; font-size: .9rem; }
.avatar .on { position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: #94a3b8; }
.avatar .on.yes { background: #22c55e; }

/* ---------- Visitor chat widget ---------- */
.chat-card { scroll-margin-top: 90px; background: #fff; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.chat-card-head { background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; padding: 1rem 1.2rem; display: flex; gap: .8rem; align-items: center; }
.chat-card-head .avatar { background: rgba(255, 255, 255, .18); }
.chat-card-head .avatar .on { border-color: var(--brand); }
.chat-card-head .t { font-weight: 700; }
.chat-card-head small { opacity: .85; }
.chat-start { padding: 1.2rem; }
.chat-messages { height: 340px; overflow-y: auto; padding: 1rem; background: #f8fafc; display: flex; flex-direction: column; gap: .5rem; scroll-behavior: smooth; }
.msg { max-width: 82%; padding: .55rem .85rem; border-radius: 16px; font-size: .93rem; line-height: 1.45; word-wrap: break-word; white-space: pre-wrap; position: relative; }
.msg .tm { display: block; font-size: .68rem; opacity: .7; margin-top: .2rem; text-align: right; }
.msg.me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.msg.them { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.sys { align-self: center; background: transparent; color: var(--muted); font-size: .78rem; text-align: center; padding: .2rem; }
.chat-input { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--line); background: #fff; }
.chat-input textarea { resize: none; border-radius: 12px; min-height: 44px; max-height: 120px; }
.chat-input .btn { border-radius: 12px; width: 46px; height: 44px; padding: 0; flex-shrink: 0; }
.chat-input { align-items: flex-end; }
.chat-input .chat-attach { background: #f1f5f9; border: 1px solid var(--line); color: var(--muted); font-size: 1.1rem; }
.chat-input .chat-attach:hover { color: var(--brand); border-color: var(--brand); background: #fff; }
.chat-input .chat-attach:disabled { opacity: .45; }

/* Chat photos */
.msg.has-img { padding: .3rem; }
.msg.has-img .cap { padding: .35rem .5rem 0; }
.msg.has-img .tm { padding: 0 .45rem .15rem; }
.msg-img { display: block; border-radius: 12px; overflow: hidden; background: rgba(15, 23, 42, .06); line-height: 0; }
.msg-img img { display: block; width: 240px; max-width: 100%; max-height: 320px; min-height: 80px; object-fit: cover; cursor: zoom-in; }
.chat-attach-preview { display: flex; align-items: center; gap: .65rem; padding: .55rem .75rem; border-top: 1px solid var(--line); background: #fff; }
.chat-attach-preview img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.chat-attach-preview .btn-close { margin-left: auto; flex-shrink: 0; }
.chat-messages.drag, #chatBox.drag .chat-messages { outline: 2px dashed var(--brand); outline-offset: -8px; }
.rc-lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(2, 6, 23, .9); display: none; align-items: center; justify-content: center; padding: 3.5rem 1rem 1rem; }
.rc-lightbox.show { display: flex; }
.rc-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.rc-lb-bar { position: absolute; top: .75rem; right: .75rem; display: flex; gap: .4rem; }
.rc-lb-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; text-decoration: none; }
.rc-lb-btn:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.chat-foot { padding: .45rem .9rem .7rem; font-size: .78rem; color: var(--muted); background: #fff; }
.typing-hint { font-size: .78rem; color: var(--muted); }

.mobile-chat-bar { display: none; }
@media (max-width: 991px) {
  .mobile-chat-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: #fff; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(15, 23, 42, .12); gap: .6rem; align-items: center; }
  body.has-chat-bar { padding-bottom: 80px; }
}

/* ---------- Footer ---------- */
.site-footer { background: #071f26; color: rgba(255, 255, 255, .7); padding: 60px 0 0; margin-top: 60px; }
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.site-footer a { color: rgba(255, 255, 255, .7); }
.site-footer a:hover { color: #fff; }
.site-footer .brand-logo { color: #fff !important; }
.footer-links li { margin-bottom: .55rem; }
.footer-eho { display: flex; gap: .9rem; align-items: flex-start; margin-top: 40px; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .6); }
.footer-eho svg { flex-shrink: 0; color: rgba(255, 255, 255, .75); }
.footer-eho + .footer-bottom { margin-top: 1.2rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 1.2rem 0; margin-top: 40px; font-size: .88rem; }
.social a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .08); display: inline-grid; place-items: center; margin-right: .4rem; }
.social a:hover { background: var(--brand); }

/* ---------- Toast / misc ---------- */
.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; max-width: calc(100vw - 32px); }
.rc-toast { background: var(--ink); color: #fff; padding: .8rem 1rem; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: .9rem; display: flex; gap: .6rem; align-items: start; animation: toastIn .3s ease; max-width: 360px; }
.rc-toast a { color: #5eead4; font-weight: 700; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.lightbox { position: fixed; inset: 0; background: rgba(2, 6, 23, .92); z-index: 3000; display: none; align-items: center; justify-content: center; padding: 20px; }
.lightbox.show { display: flex; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: 10px; }
.lightbox .x { position: absolute; top: 16px; right: 20px; color: #fff; font-size: 2rem; background: none; border: 0; }

.contact-info-item { display: flex; gap: 1rem; align-items: start; margin-bottom: 1.3rem; }
.contact-info-item .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }

@media (max-width: 575px) {
  .hero { padding: 60px 0 110px; }
  .section { padding: 50px 0; }
  .detail-card { padding: 1.15rem; }
  .detail-price { font-size: 1.6rem; }
  .cta-band { padding: 1.8rem; }
}
