/* =====================================================================
   Nirvana Realty — design tokens
   Palette grounded in architectural drafting: ink navy + brass accent
   on a warm stone background, with a blueprint grid motif in the hero.
   ===================================================================== */

:root {
  --ink-900: #0F2A3A;
  --ink-800: #16333F;
  --ink-700: #223C4A;
  --stone-50: #F8F7F3;
  --stone-100: #EFEDE6;
  --brass-500: #B08D45;
  --brass-600: #96762E;
  --text-body: #2B3238;
  --text-muted: #6B7480;
  --border-soft: #E3E0D6;
  --radius-card: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(15, 42, 58, .06);
  --shadow-md: 0 18px 40px rgba(15, 42, 58, .12);
  --shadow-lg: 0 20px 50px rgba(15, 42, 58, .18);
  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Work Sans", "Helvetica Neue", Arial, sans-serif;

  /* spacing scale, used for section rhythm at each breakpoint */
  --space-section: 4.25rem;
  --space-section-sm: 2.75rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--stone-50);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="bn"] body,
html[lang="bn"] h1, html[lang="bn"] h2, html[lang="bn"] h3, html[lang="bn"] h4 {
  font-family: "Noto Sans Bengali", var(--font-body);
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  color: var(--ink-900);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.14; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.2; }
h3 { font-size: 1.25rem; }

a { color: var(--ink-800); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brass-600); }

.container-narrow { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Buttons ---------- */
.btn-brass, .btn-brass:visited {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--brass-500); color: #fff;
  border: 1px solid var(--brass-500);
  padding: .75rem 1.6rem; border-radius: 999px;
  font-weight: 500; font-size: .95rem;
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.btn-brass:hover { background: var(--brass-600); color: #fff; box-shadow: 0 10px 22px rgba(176,141,69,.32); transform: translateY(-1px); }
.btn-outline-ink, .btn-outline-ink:visited {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: transparent; color: var(--ink-900);
  border: 1px solid var(--ink-900);
  padding: .72rem 1.5rem; border-radius: 999px; font-weight: 500; font-size: .95rem;
  transition: background .15s ease, color .15s ease;
}
.btn-outline-ink:hover { background: var(--ink-900); color: #fff; }
.btn-ghost-light, .btn-ghost-light:visited {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.5);
  padding: .72rem 1.5rem; border-radius: 999px; font-weight: 500; font-size: .95rem;
  transition: background .15s ease, color .15s ease;
}
.btn-ghost-light:hover { background: #fff; color: var(--ink-900); }

/* ---------- Header ---------- */
.site-header {
  background: rgba(248, 247, 243, .92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 40;
}
.site-header .logo { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--ink-900); }
.site-header nav a {
  color: var(--text-body); font-weight: 500; margin-left: 1.5rem; font-size: .93rem;
}
.site-header nav a:hover { color: var(--brass-600); }

.lang-switch { display: flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--text-muted); }
.lang-switch a { color: var(--text-muted); }
.lang-switch a.active { color: var(--ink-900); font-weight: 600; }

.icon-link { position: relative; color: var(--ink-900); font-size: 1.1rem; display: inline-flex; }
.icon-badge {
  position: absolute; top: -8px; right: -10px; background: var(--brass-500); color: #fff;
  font-size: .65rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.icon-badge:empty, .icon-badge[data-favorites-count="0"] { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink-900);
  color: #fff;
  overflow: hidden;
  padding: 5.5rem 0 4.5rem;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 85%);
}
.hero::after {
  content: "";
  position: absolute; right: -8%; bottom: -30%; width: 46%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(176,141,69,.28), transparent 70%);
  pointer-events: none;
}
.hero .content { position: relative; z-index: 1; max-width: 640px; }
.hero p.lead { color: rgba(255,255,255,.78); font-size: 1.1rem; margin: 1rem 0 2rem; }

/* ---------- Search bar ---------- */
.search-card {
  background: #fff; border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  padding: 1.4rem; margin-top: -3.25rem; position: relative; z-index: 5;
}
.search-card select, .search-card input {
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: .65rem .8rem;
  width: 100%; font-size: .92rem; background: #fff; transition: border-color .15s ease;
}
.search-card select:focus, .search-card input:focus { outline: none; border-color: var(--brass-500); }

/* ---------- Section spacing ---------- */
.section { padding: var(--space-section) 0; }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head p { color: var(--text-muted); }
.section-alt { background: var(--stone-100); }

/* ---------- Cards ---------- */
.card-property, .card-project, .card-post {
  background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-card);
  overflow: hidden; height: 100%; transition: box-shadow .18s ease, transform .18s ease;
}
.card-property:hover, .card-project:hover, .card-post:hover {
  box-shadow: var(--shadow-md); transform: translateY(-3px);
}
.card-media {
  aspect-ratio: 4/3; background: linear-gradient(135deg, var(--ink-800), var(--ink-700));
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.5);
  font-family: var(--font-display); font-size: .95rem; position: relative; text-align: center; padding: 1rem;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge-status {
  position: absolute; top: .75rem; left: .75rem;
  background: rgba(15,42,58,.85); color: #fff; font-size: .72rem;
  padding: .32rem .7rem; border-radius: 999px; text-transform: capitalize;
}
.card-body-x { padding: 1.35rem; }
.card-price { color: var(--brass-600); font-weight: 600; font-size: 1.05rem; }
.card-meta { color: var(--text-muted); font-size: .85rem; }
.card-meta i { margin-right: .35rem; width: 14px; text-align: center; }

/* Favorite/compare toggles + floating compare bar */
.card-actions { position: absolute; top: .75rem; right: .75rem; display: flex; gap: .45rem; z-index: 2; }
.card-toggle-btn {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(15,42,58,.55); color: #fff;
  border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .9rem;
  transition: background .15s ease, transform .12s ease;
}
.card-toggle-btn:hover { transform: scale(1.06); }
.card-toggle-btn.active, .card-toggle-btn.fav-active { background: var(--brass-500); }

.compare-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: var(--ink-900); color: #fff; padding: .9rem 1.25rem;
  display: none; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  box-shadow: 0 -8px 24px rgba(0,0,0,.15);
}
.compare-bar.visible { display: flex; }
.compare-bar .clear-link { color: rgba(255,255,255,.65); font-size: .85rem; }
body.has-compare-bar .whatsapp-float { bottom: 96px; }

/* ---------- Stats ---------- */
.stat-num { font-family: var(--font-display); font-size: 2.4rem; color: var(--ink-900); font-weight: 700; }
.stat-label { color: var(--text-muted); font-size: .9rem; }

/* ---------- Testimonials ---------- */
.testimonial-card {
  background: #fff; border-radius: var(--radius-card); border: 1px solid var(--border-soft);
  padding: 1.85rem; height: 100%;
}
.testimonial-card .stars { color: var(--brass-500); letter-spacing: 2px; margin-bottom: .75rem; }

/* ---------- Team ---------- */
.team-photo {
  aspect-ratio: 1; border-radius: var(--radius-card);
  background: linear-gradient(135deg, var(--stone-100), var(--border-soft));
  overflow: hidden;
}

/* ---------- FAQ accordion ---------- */
.faq-item { border-bottom: 1px solid var(--border-soft); padding: 1.15rem 0; }
.faq-item button {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: var(--font-display); font-size: 1.05rem; color: var(--ink-900);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item .faq-answer { display: none; margin-top: .8rem; color: var(--text-muted); }
.faq-item.open .faq-answer { display: block; }
.faq-item.open button i { transform: rotate(45deg); }
.faq-item button i { transition: transform .15s ease; flex-shrink: 0; }

/* ---------- CTA ---------- */
.cta-band { background: var(--ink-900); color: #fff; border-radius: var(--radius-card); padding: 3rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-900); color: rgba(255,255,255,.75); padding: 3.5rem 0 1.5rem; }
.site-footer h5 { color: #fff; font-family: var(--font-body); font-weight: 600; font-size: .95rem; margin-bottom: 1rem; }
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: var(--brass-500); }
.site-footer hr { border-color: rgba(255,255,255,.12); margin: 2rem 0 1.25rem; }

/* ---------- Floating WhatsApp ---------- */
.whatsapp-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.25); font-size: 1.5rem;
  transition: bottom .2s ease, transform .12s ease;
}
.whatsapp-float:hover { transform: scale(1.06); color: #fff; }

/* ---------- Forms ---------- */
.form-control-x, textarea.form-control-x, select.form-control-x {
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: .68rem .9rem;
  width: 100%; font-family: var(--font-body); font-size: .95rem; transition: border-color .15s ease;
}
.form-control-x:focus { outline: none; border-color: var(--brass-500); }
.form-label-x { font-size: .85rem; font-weight: 500; margin-bottom: .35rem; display: block; color: var(--ink-900); }

/* ---------- Breadcrumb ---------- */
.breadcrumb-x { font-size: .85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb-x a { color: var(--text-muted); }
.breadcrumb-x a:hover { color: var(--brass-600); }

/* ---------- Pagination ---------- */
.pagination-x { display: flex; gap: .4rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination-x a, .pagination-x span {
  min-width: 38px; height: 38px; padding: 0 .5rem; border-radius: var(--radius-sm); border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
}
.pagination-x a:hover { border-color: var(--brass-500); color: var(--brass-600); }
.pagination-x .active { background: var(--ink-900); color: #fff; border-color: var(--ink-900); }

/* =========================================================================
   RESPONSIVE — audited at 320 / 375 / 425 / 768 / 1024 / 1440
   ========================================================================= */

/* Large phones and small tablets */
@media (max-width: 767.98px) {
  .section { padding: var(--space-section-sm) 0; }
  .search-card { margin-top: 1.25rem; padding: 1.1rem; }
  .hero { padding: 3rem 0 3.25rem; }
  .cta-band { padding: 2rem; text-align: center; }
  .cta-band .d-flex { flex-direction: column; align-items: center !important; }
  .site-footer { padding: 2.5rem 0 1.25rem; }
  .whatsapp-float { width: 50px; height: 50px; font-size: 1.3rem; bottom: 16px; right: 16px; }
  body.has-compare-bar .whatsapp-float { bottom: 108px; }
  .compare-bar { flex-direction: column; align-items: stretch; text-align: center; gap: .6rem; }
  .compare-bar .d-flex { justify-content: center; }
}

/* Phones */
@media (max-width: 575.98px) {
  .container-narrow { padding: 0 1rem; }
  h1 { font-size: 1.85rem; }
  .card-body-x { padding: 1.1rem; }
  .testimonial-card { padding: 1.4rem; }
}

/* Very small phones */
@media (max-width: 374.98px) {
  .btn-brass, .btn-outline-ink, .btn-ghost-light { padding: .65rem 1.15rem; font-size: .88rem; }
  .site-header .logo { font-size: 1.2rem; }
}

/* Sidebar detail cards (inquiry form, price card) are pinned with an
   inline position:sticky for desktop two-column layouts; below the
   breakpoint where they fall into a single column, stickiness just
   causes odd scroll-jumping, so switch them back to normal flow. */
@media (max-width: 991.98px) {
  [style*="position:sticky"] { position: static !important; }
}
