:root {
  --ink: #17221d;
  --ink-soft: #536057;
  --cream: #f7f6f1;
  --paper: #fff;
  --line: #dce3dc;
  --sage: #728b78;
  --sage-dark: #3f604b;
  --gold: #bd8b43;
  --shadow: 0 18px 50px rgba(27, 49, 35, .1);
  --shadow-sm: 0 8px 24px rgba(27, 49, 35, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "DM Sans", sans-serif; overflow-x: hidden; }
h1, h2, h3, h4, h5, .brand { font-family: "Playfair Display", serif; }
h1, h2, h3, h4, p { margin-top: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; }
.topbar { background: var(--ink); color: #fff; font-size: .76rem; letter-spacing: .04em; }
.topbar .container { min-height: 36px; display: flex; align-items: center; justify-content: space-between; }
.navbar { min-height: 80px; transition: all .3s ease; z-index: 10; }
.navbar.scrolled { background: rgba(255,255,255,.96) !important; box-shadow: var(--shadow-sm); }
.brand { font-size: 1.65rem; font-weight: 700; letter-spacing: -.04em; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 8px; color: #fff; background: var(--sage-dark); border-radius: 10px 10px 10px 2px; font-family: "DM Sans", sans-serif; font-size: .8rem; }
.nav-link { color: var(--ink-soft); font-size: .84rem; font-weight: 600; margin: 0 .45rem; }
.nav-link:hover, .nav-link.active { color: var(--sage-dark); }
.btn { border-radius: 9px; padding: .78rem 1.1rem; font-weight: 700; font-size: .8rem; }
.btn-primary { background: var(--sage-dark); border-color: var(--sage-dark); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.btn-outline-dark { border-color: var(--ink); }
.btn-gold { color: #fff; background: var(--gold); border-color: var(--gold); }
.btn-gold:hover { color: #fff; background: #9f702e; }
.eyebrow { color: var(--sage-dark); font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.section-pad { padding: 100px 0; }
.section-heading { max-width: 620px; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.05; letter-spacing: -.04em; }
.section-heading p { color: var(--ink-soft); line-height: 1.8; }
.hero { min-height: 650px; position: relative; display: flex; align-items: center; color: #fff; background: linear-gradient(90deg, rgba(13, 28, 19, .8), rgba(13, 28, 19, .25)), url('https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?auto=format&fit=crop&w=2000&q=85') center/cover; }
.hero-content { padding: 100px 0 125px; max-width: 690px; }
.hero h1 { font-size: clamp(3.3rem, 7vw, 6rem); line-height: .98; letter-spacing: -.06em; }
.hero p { max-width: 540px; color: rgba(255,255,255,.8); font-size: 1.05rem; line-height: 1.8; }
.search-panel { position: absolute; bottom: -42px; left: 50%; width: min(1100px, calc(100% - 30px)); transform: translateX(-50%); padding: 18px; color: var(--ink); background: #fff; border-radius: 14px; box-shadow: var(--shadow); }
.tab-button { border: 0; background: transparent; padding: .5rem 1rem; color: var(--ink-soft); font-weight: 700; font-size: .8rem; }
.tab-button.active { color: var(--sage-dark); border-bottom: 2px solid var(--sage-dark); }
.form-label { color: var(--ink-soft); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.form-control, .form-select { padding: .82rem .9rem; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; background: #fff; }
.form-control:focus, .form-select:focus { border-color: var(--sage); box-shadow: 0 0 0 .2rem rgba(114,139,120,.15); }
.stat { border-left: 1px solid var(--line); padding-left: 22px; }
.stat strong { display: block; color: var(--sage-dark); font: 700 2.3rem "Playfair Display", serif; }
.stat span { color: var(--ink-soft); font-size: .8rem; }
.property-card, .agent-card, .blog-card, .service-card { height: 100%; overflow: hidden; background: var(--paper); border: 1px solid rgba(220,227,220,.8); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .3s ease, box-shadow .3s ease; }
.property-card:hover, .agent-card:hover, .blog-card:hover, .service-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.card-image { position: relative; height: 250px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.property-card:hover .card-image img, .blog-card:hover .card-image img { transform: scale(1.06); }
.badge-soft, .badge-gold { display: inline-block; padding: .42rem .62rem; border-radius: 5px; font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.badge-soft { color: var(--sage-dark); background: #e6eee7; }
.badge-gold { color: #7a531e; background: #f1dfbd; }
.card-body { padding: 22px; }
.card-body h3 { font-size: 1.35rem; line-height: 1.15; }
.muted { color: var(--ink-soft); }
.meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--ink-soft); font-size: .75rem; }
.meta i { color: var(--sage-dark); margin-right: 3px; }
.price { color: var(--sage-dark); font: 700 1.3rem "Playfair Display", serif; }
.favorite { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--ink); background: #fff; }
.favorite.active { color: #ae4d49; }
.category-tile { min-height: 220px; position: relative; display: flex; align-items: end; overflow: hidden; padding: 22px; color: #fff; border-radius: var(--radius); background: #333; }
.category-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13,28,19,.75), transparent); }
.category-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.category-tile:hover img { transform: scale(1.08); }
.category-tile div { position: relative; z-index: 1; }
.feature-icon { display: grid; place-items: center; width: 50px; height: 50px; color: var(--sage-dark); background: #e8f0e9; border-radius: 12px; font-size: 1.2rem; }
.split-image { min-height: 510px; border-radius: var(--radius); background: url('https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?auto=format&fit=crop&w=1200&q=85') center/cover; }
.dark-band { color: #fff; background: var(--ink); }
.dark-band .muted, .dark-band p { color: rgba(255,255,255,.66); }
.testimonial { padding: 30px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stars { color: var(--gold); letter-spacing: .12em; }
.accordion-item { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 9px !important; overflow: hidden; }
.accordion-button { color: var(--ink); font-weight: 700; background: #fff; box-shadow: none !important; }
.accordion-button:not(.collapsed) { color: var(--sage-dark); background: #f1f6f1; }
.page-hero { padding: 80px 0; color: #fff; background: linear-gradient(90deg, rgba(17,34,23,.88), rgba(17,34,23,.5)), url('https://images.unsplash.com/photo-1494526585095-c41746248156?auto=format&fit=crop&w=2000&q=85') center/cover; }
.page-hero h1 { font-size: clamp(2.8rem, 6vw, 5rem); letter-spacing: -.05em; }
.filter-bar { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.details-gallery-main { height: 480px; overflow: hidden; border-radius: var(--radius); }
.details-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumb { width: 100%; height: 85px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background: transparent; }
.thumb.active { border-color: var(--sage-dark); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0; list-style: none; }
.detail-list li { display: flex; gap: 10px; color: var(--ink-soft); font-size: .86rem; }
.detail-list i { color: var(--sage-dark); }
.timeline { position: relative; padding-left: 28px; border-left: 1px solid var(--sage); }
.timeline-item { position: relative; margin-bottom: 35px; }
.timeline-item::before { content: ""; position: absolute; left: -34px; top: 4px; width: 11px; height: 11px; border: 3px solid var(--cream); border-radius: 50%; background: var(--sage-dark); }
.agent-avatar { width: 100%; height: 300px; object-fit: cover; object-position: center top; }
.agent-details .agent-avatar { height: 500px; border-radius: var(--radius); }
.socials a { display: inline-grid; place-items: center; width: 31px; height: 31px; margin-right: 5px; color: var(--sage-dark); background: #e8f0e9; border-radius: 50%; font-size: .8rem; }
.article-content { max-width: 780px; margin: auto; font-size: 1.03rem; line-height: 1.9; }
.article-content h2 { margin-top: 45px; font-size: 2rem; }
.article-content blockquote { margin: 38px 0; padding: 26px 30px; color: var(--sage-dark); border-left: 4px solid var(--gold); background: #f1f6f1; font: italic 1.5rem/1.5 "Playfair Display", serif; }
.map-box { min-height: 320px; display: grid; place-items: center; color: var(--sage-dark); border-radius: var(--radius); background: linear-gradient(135deg, #dfe9df, #b9cfbd); }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-visual { display: flex; align-items: end; padding: 70px; color: #fff; background: linear-gradient(0deg, rgba(17,34,23,.85), rgba(17,34,23,.15)), url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1200&q=85') center/cover; }
.auth-panel { display: flex; align-items: center; padding: 55px; background: #fff; }
.auth-form { width: min(430px, 100%); margin: auto; }
footer { padding: 70px 0 25px; color: rgba(255,255,255,.7); background: var(--ink); }
footer .brand, footer h5 { color: #fff; }
footer a { display: block; margin-bottom: 10px; font-size: .82rem; }
footer a:hover { color: #fff; }
.footer-bottom { margin-top: 50px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.13); font-size: .76rem; }
#backToTop { position: fixed; right: 20px; bottom: 20px; z-index: 8; display: none; width: 42px; height: 42px; color: #fff; background: var(--sage-dark); border: 0; border-radius: 50%; box-shadow: var(--shadow-sm); }
.loading-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; color: #fff; background: var(--ink); transition: opacity .5s ease, visibility .5s ease; }
.loading-screen.hidden { opacity: 0; visibility: hidden; }
.toast-message { position: fixed; right: 20px; bottom: 75px; z-index: 20; padding: 14px 18px; color: #fff; background: var(--sage-dark); border-radius: 8px; box-shadow: var(--shadow); }
.is-hidden { display: none !important; }