:root {
  /* Palette — Modern Uttarakhand Luxury: forest green, warm ivory, bronze accent used sparingly */
  --forest: #163a2d;       /* primary */
  --forest-deep: #0e251c;  /* darker anchor — hero gradient, high-contrast dark states */
  --pine: #28513e;         /* secondary — reserved for later phases (section backgrounds, secondary emphasis) */
  --ivory: #f7f5ef;        /* page background */
  --white: #ffffff;        /* card/surface background */
  --ink: #171a18;          /* primary text */
  --slate: #626862;        /* secondary text */
  --bronze: #b18a4a;       /* accent — use sparingly, never as a dominant fill */
  --bronze-light: #c7a367; /* accent hover state */
  --border: #e5e1d8;       /* hairline borders */

  /* Legacy names kept stable so existing template classes (.text-brand,
     .btn-brand, .bg-soft, etc.) don't need to change across every
     template — only what they resolve to does. New code should prefer
     the palette tokens above directly. */
  --brand: var(--forest);
  --brand-dark-solid: var(--forest-deep);
  --accent: var(--bronze);
  --accent-light: var(--bronze-light);
  --bg-soft: var(--ivory);

  /* Typography — premium serif for headings, quiet sans for everything
     else. System stacks only for now (zero load cost / no LCP risk);
     revisit with an embedded webfont in the performance phase if the
     system stack still feels insufficiently distinctive once live. */
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing — 8px base scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Radius — minimal, per brand direction */
  --radius-sm: 4px;
  --radius-md: 6px;

  /* Shadow — two elevations only: a hairline border for resting state,
     one soft shadow for hover/elevated state. Replaces three near-
     duplicate ad hoc shadow values previously scattered per rule. */
  --shadow-resting: 0 1px 2px rgba(23, 26, 24, 0.06);
  --shadow-elevated: 0 8px 24px rgba(23, 26, 24, 0.08);
}

body {
  background-color: var(--ivory);
  color: var(--ink);
  font-family: var(--font-sans);
}

h1, h2, h3 {
  font-family: var(--font-serif);
}

.text-brand { color: var(--brand); }
.bg-brand { background-color: var(--brand); }
.text-accent { color: var(--accent); }

.btn-brand {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--brand-dark-solid);
  font-weight: 600;
}
.btn-brand:hover,
.btn-brand:focus {
  background-color: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--brand-dark-solid);
}

.btn-outline-brand {
  border-color: var(--brand);
  color: var(--brand);
}
.btn-outline-brand:hover {
  background-color: var(--brand);
  color: var(--white);
}

.footer-link {
  color: #c8cdd0;
  text-decoration: none;
}
.footer-link:hover { color: var(--white); }

/* Brand */
.navbar-brand {
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 1.05rem;
}
.navbar-brand img { height: 44px; width: auto; }
.brand-gold { color: var(--accent); }
.brand-tagline {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--brand-dark-solid), var(--brand));
  color: var(--white);
  padding: 4.5rem 0 6.5rem;
}
.hero h1 { font-weight: 700; }
.hero .lead { color: rgba(255, 255, 255, 0.9); }

.search-card {
  margin-top: -4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  border: none;
}

/* Property cards */
.property-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}
.property-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}
.property-card .card-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--bg-soft);
}
.property-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-preview-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: rgba(22, 58, 45, 0.75);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  pointer-events: none;
}
.property-card .price {
  font-weight: 700;
  color: var(--accent);
}
.property-card .badge-status-sold {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}
.property-card-media-link { display: block; }
.property-card .card-body { position: relative; }
.property-card-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.35rem;
}
.property-card-eyebrow i { font-size: 0.5rem; margin-right: 0.4rem; vertical-align: middle; }
.property-card-specs { line-height: 1.4; }

.section-title {
  font-weight: 700;
  border-left: 4px solid var(--accent);
  padding-left: 0.75rem;
}

/* Detail page gallery */
.gallery-main {
  aspect-ratio: 16 / 10;
  background-color: var(--bg-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.gallery-zoom-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  position: relative;
  cursor: zoom-in;
}
.gallery-zoom-icon {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(23, 26, 24, 0.55);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.gallery-thumbs {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-1);
}
.gallery-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 54px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  opacity: 0.7;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { opacity: 1; border-color: var(--accent); }

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(14, 16, 15, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 84vh;
  object-fit: contain;
}
.gallery-lightbox-caption {
  position: absolute;
  bottom: var(--space-5);
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}
.gallery-lightbox-close,
.gallery-lightbox-prev,
.gallery-lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: var(--white);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.gallery-lightbox-close:hover,
.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover { background: rgba(255, 255, 255, 0.2); }
.gallery-lightbox-close { top: var(--space-4); right: var(--space-4); }
.gallery-lightbox-prev { left: var(--space-4); top: 50%; transform: translateY(-50%); }
.gallery-lightbox-next { right: var(--space-4); top: 50%; transform: translateY(-50%); }

.spec-pill {
  background-color: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

#map { height: 320px; border-radius: var(--radius-md); border: 0; }

/* Sticky positioning only makes sense in the desktop 2-column layout —
   on mobile this card sits inline in the single-column stack, and the
   mobile-cta-bar already covers the same Call/WhatsApp/Site-Visit
   actions, so pinning it mid-scroll would just be redundant clutter. */
@media (min-width: 992px) {
  .sticky-inquiry { position: sticky; top: 5.5rem; }
}

/* Detail page: additional-details list + amenities */
.detail-list dt { color: var(--slate); font-weight: 500; padding: var(--space-2) 0; border-top: 1px solid var(--border); }
.detail-list dd { padding: var(--space-2) 0; border-top: 1px solid var(--border); margin-bottom: 0; }
.detail-list dt:first-of-type, .detail-list dd:first-of-type { border-top: none; }
.amenities-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-2) var(--space-4);
}
.amenities-list li { font-size: 0.9rem; }
.amenities-list i { color: var(--accent); margin-right: var(--space-2); }

/* Mobile sticky CTA bar (property detail page only) */
@media (max-width: 991.98px) {
  .property-detail-page { padding-bottom: 4.75rem; }
}
.mobile-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(23, 26, 24, 0.08);
}
.mobile-cta-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.6rem 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
}
.mobile-cta-item i { font-size: 1.05rem; }
.mobile-cta-primary { background-color: var(--forest); color: var(--white); }

/* Filter bar — a Bootstrap responsive offcanvas: a real bottom-sheet
   drawer below the lg breakpoint, a normal inline block above it. */
.filter-bar {
  background-color: var(--bg-soft);
  border-radius: var(--radius-md);
}
@media (min-width: 992px) {
  .filter-offcanvas .offcanvas-body { padding: 0; }
}
.filter-offcanvas .offcanvas-body { max-height: 70vh; overflow-y: auto; }

/* Trust stats strip */
.trust-stats {
  background-color: var(--bg-soft);
  border-radius: var(--radius-md);
}
.trust-stat .stat-number {
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}
.trust-stat .stat-number .text-accent { font-weight: 800; }

/* Services */
.service-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--accent);
}
.service-card .service-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* Sell Your Property */
.sell-trust-strip {
  background-color: var(--bg-soft);
  border-radius: var(--radius-md);
}
.sell-form-card {
  border-radius: var(--radius-md);
}
.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.photo-preview-chip {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.photo-preview-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Hero eyebrow */
.hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-light);
  font-weight: 700;
}

/* Small-icon trust strip (distinct from the numeric trust-stats block) */
.trust-strip-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.85rem;
  color: var(--slate);
  font-weight: 600;
}
.trust-strip-item i {
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Locations section */
.location-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--white);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.location-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}
.location-card-media {
  aspect-ratio: 4 / 3;
  background-color: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.location-card-media img { width: 100%; height: 100%; object-fit: cover; }
.location-card-media i {
  font-size: 1.75rem;
  color: var(--border);
}
.location-card-body { padding: var(--space-4); }

/* Why Us — 4 pillars */
.why-us-heading {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  color: var(--forest);
  text-wrap: balance;
}
.why-pillar-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

/* Sell CTA band */
.sell-cta {
  background-color: var(--forest);
  color: var(--white);
  padding: var(--space-8) 0;
  margin-top: var(--space-8);
}
.sell-cta p { color: rgba(255, 255, 255, 0.85); }
