/* Sulaymaniyah Real Estate - Brand Colors */
:root {
  /* Brand palette: #167575 teal, #fed03a/#ffdd50 gold, #fdf3eb cream */
  --md-primary: #167575;
  --md-primary-container: #fdf3eb;
  --md-on-primary: #FFFFFF;
  --md-on-primary-container: #0d4d4d;
  --md-secondary: #125a5a;
  --md-secondary-container: #e8f5f5;
  --md-on-secondary: #FFFFFF;
  --md-on-secondary-container: #0d4d4d;
  --md-surface: #fdf3eb;
  --md-surface-variant: #f9ede3;
  --md-on-surface: #1C1B1F;
  --md-on-surface-variant: #49454F;
  --md-outline: #79747E;
  --md-outline-variant: #d4c4b8;
  --md-error: #B3261E;
  --md-on-error: #FFFFFF;
  /* Brand accents */
  --brand-gold: #fed03a;
  --brand-gold-light: #ffdd50;
  /* Legacy vars mapped to brand */
  --primary: var(--md-primary);
  --primary-hover: #125a5a;
  --primary-light: var(--md-primary-container);
  --text: var(--md-on-surface);
  --text-muted: var(--md-on-surface-variant);
  --bg: var(--md-surface);
  --bg-alt: var(--md-surface-variant);
  --border: var(--md-outline-variant);
  /* M3 Elevation (dp) */
  --elevation-0: none;
  --elevation-1: 0 1px 2px rgba(0,0,0,0.3), 0 1px 3px 1px rgba(0,0,0,0.15);
  --elevation-2: 0 1px 2px rgba(0,0,0,0.3), 0 2px 6px 2px rgba(0,0,0,0.15);
  --elevation-3: 0 4px 8px 3px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.3);
  --elevation-4: 0 6px 10px 4px rgba(0,0,0,0.15), 0 2px 3px rgba(0,0,0,0.3);
  --elevation-5: 0 8px 12px 6px rgba(0,0,0,0.15), 0 4px 4px rgba(0,0,0,0.3);
  --shadow: var(--elevation-1);
  --shadow-lg: var(--elevation-3);
  /* M3 Shape (rounded corners) */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --radius: var(--radius-sm);
  --radius-lg: var(--radius-md);
  /* M3 Motion */
  --transition: 200ms cubic-bezier(0.2, 0, 0, 1);
  --touch-min: 48px;
  /* 8dp grid */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
}

/* RTL support for Arabic */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .header,
[dir="rtl"] .header-actions,
[dir="rtl"] .listings-toolbar,
[dir="rtl"] .property-detail-header,
[dir="rtl"] .property-card-meta,
[dir="rtl"] .property-card-agent {
  flex-direction: row-reverse;
}

[dir="rtl"] .search-hero {
  direction: rtl;
}

[dir="rtl"] .property-gallery {
  direction: rtl;
}
@media (min-width: 769px) {
  [dir="rtl"] .property-gallery .gallery-track {
    direction: ltr;
  }
}

/* Property detail: keep grid columns same as LTR (description | sidebar); align text RTL inside each pane */
[dir="rtl"] .property-detail-content {
  direction: ltr;
}
[dir="rtl"] .property-detail-content > div:first-child {
  direction: rtl;
  text-align: right;
}
[dir="rtl"] .property-detail-content .contact-card {
  direction: rtl;
  text-align: right;
}
[dir="rtl"] .property-detail-header > div {
  text-align: right;
  flex: 1;
  min-width: 0;
}
[dir="rtl"] .property-detail-meta .spec-item {
  direction: ltr;
  flex-direction: row-reverse;
}
[dir="rtl"] .property-actions {
  justify-content: flex-start;
}
[dir="rtl"] .breadcrumb {
  direction: rtl;
  text-align: right;
}
[dir="rtl"] .gallery-all-btn {
  right: auto;
  left: 1rem;
  flex-direction: row-reverse;
}
[dir="rtl"] .header-phone {
  flex-direction: row-reverse;
}
.header-phone-text,
.phone-ltr,
.price-ltr {
  direction: ltr;
  unicode-bidi: embed;
}
.property-detail-price .price-ltr,
.property-card-price .price-ltr {
  display: inline-block;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.15px;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

#main-content {
  overflow-x: hidden;
}

/* Header - compact with logo + actions */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  background: #fff;
  box-shadow: var(--elevation-1);
}

.logo {
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0;
  color: var(--md-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language dropdown with flags */
.lang-dropdown {
  position: relative;
}

.lang-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  min-height: 40px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all var(--transition);
}

.lang-dropdown-trigger:hover {
  border-color: var(--md-primary);
  color: var(--md-primary);
}

.lang-dropdown.open .lang-dropdown-trigger {
  border-color: var(--md-primary);
  box-shadow: 0 0 0 1px var(--md-primary);
}

.lang-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.lang-chevron {
  font-size: 0.65rem;
  opacity: 0.7;
  transition: transform var(--transition);
}

.lang-dropdown.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--elevation-3);
  border: 1px solid var(--border);
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 200;
}

.lang-dropdown.open .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown-menu li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: background var(--transition);
}

.lang-dropdown-menu li:hover {
  background: var(--md-primary-container);
}

.lang-dropdown-menu li[aria-selected="true"] {
  background: var(--md-primary-container);
  color: var(--md-primary);
  font-weight: 500;
}

/* Menu toggle - hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.menu-toggle:hover {
  background: var(--md-primary-container);
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

/* Side panel */
.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 150;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.side-panel.open {
  transform: translateX(0);
}

.side-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 140;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.side-panel-overlay.open {
  opacity: 1;
  visibility: visible;
}

.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
}

.side-panel-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.side-panel-close {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.side-panel-close:hover {
  background: var(--md-primary-container);
  color: var(--md-primary);
}

.side-panel-nav {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) 0;
}

.side-nav-link {
  padding: 1rem var(--space-3);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
}

.side-nav-link:hover {
  background: var(--md-primary-container);
  color: var(--md-primary);
  border-left-color: var(--md-primary);
}

[dir="rtl"] .side-panel {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

[dir="rtl"] .side-panel.open {
  transform: translateX(0);
}

[dir="rtl"] .side-nav-link {
  border-left: none;
  border-right: 3px solid transparent;
}

[dir="rtl"] .side-nav-link:hover {
  border-right-color: var(--md-primary);
}

[dir="rtl"] .lang-dropdown-menu {
  right: auto;
  left: 0;
}

/* Hero - compact */
.hero {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-2);
  text-align: center;
  background: var(--md-primary);
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
  margin-bottom: var(--space-1);
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-3);
}

/* Search - city & neighborhood dropdowns */
.search-hero {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-3);
  overflow: visible;
}

.search-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--space-1);
  padding: var(--space-2);
  overflow: visible;
}

.search-tabs {
  display: flex;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid var(--md-outline-variant);
}

.search-tab {
  min-height: 44px;
  padding: 0 var(--space-2);
  background: var(--md-surface-variant);
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--md-on-surface-variant);
  cursor: pointer;
  transition: all var(--transition);
}

.search-tab:hover {
  background: var(--md-outline-variant);
  color: var(--md-on-surface);
}

.search-tab.active {
  background: var(--md-primary);
  color: var(--md-on-primary);
}

.search-hero select {
  flex: 1;
  min-width: 120px;
  min-height: 44px;
  padding: 0 var(--space-2);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-xs);
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--md-surface);
  color: var(--md-on-surface);
  cursor: pointer;
}

.search-hero select:focus {
  outline: none;
  border-color: var(--md-primary);
}

/* Searchable neighborhood dropdown */
.searchable-neighborhood-wrap {
  position: relative;
  flex: 1;
  min-width: 120px;
  overflow: visible;
}

.searchable-neighborhood-input {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-2);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-xs);
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--md-surface);
  color: var(--md-on-surface);
}

.searchable-neighborhood-input:focus {
  outline: none;
  border-color: var(--md-primary);
}

.searchable-neighborhood-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--md-surface);
  border: 1px solid var(--md-outline-variant);
  border-top: none;
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--elevation-2);
  z-index: 9999;
  display: none;
}

.searchable-neighborhood-list.open {
  display: block;
}

.searchable-neighborhood-list li {
  padding: var(--space-2) var(--space-2);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--md-on-surface);
}

.searchable-neighborhood-list li:hover {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}

.filter-group .searchable-neighborhood-wrap {
  flex: none;
  min-width: 0;
}

.filter-group:has(.searchable-neighborhood-wrap) {
  overflow: visible;
}

.searchable-no-match {
  color: var(--text-muted);
  cursor: default;
  font-style: italic;
}

.filter-group .searchable-neighborhood-input {
  min-height: var(--touch-min);
}

.search-hero .btn-search {
  min-height: 44px;
  padding: 0 var(--space-3);
  background: var(--md-primary);
  color: var(--md-on-primary);
  border: none;
  border-radius: var(--radius-xs);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.1px;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.search-hero .btn-search:hover {
  background: var(--primary-hover);
  box-shadow: var(--elevation-2);
}

@media (max-width: 640px) {
  .hero {
    min-height: 240px;
    padding: var(--space-3) var(--space-2);
  }
  .search-hero-inner {
    flex-direction: column;
  }
  .search-tabs {
    width: 100%;
  }
  .search-tab {
    flex: 1;
  }
  .search-hero select,
  .search-hero .searchable-neighborhood-wrap {
    min-width: 100%;
  }
  .search-hero .btn-search {
    width: 100%;
  }
}

/* Breadcrumb */
.breadcrumb {
  padding: var(--space-2) var(--space-3);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--md-primary);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}

/* Sections */
.section {
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 1.5rem);
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #fff;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-1);
  margin-bottom: var(--space-3);
  border-left: 4px solid var(--md-primary);
}

[dir="rtl"] .section-header {
  border-left: none;
  border-right: 4px solid var(--md-primary);
}

.section-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0;
  margin: 0;
  color: var(--md-primary);
}

.section-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--md-primary);
  text-decoration: none;
}

.section-link:hover {
  text-decoration: underline;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevation-1);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow var(--transition);
  border: 1px solid var(--md-outline-variant);
}

.news-card:hover {
  box-shadow: var(--elevation-3);
}

.news-card-img {
  aspect-ratio: 16/9;
  width: 100%;
  display: block;
  object-fit: cover;
  background-color: var(--bg-alt);
}

.news-card-body {
  padding: 1.25rem;
}

.news-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.35rem;
}

.news-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.news-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.news-article {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevation-1);
  border: 1px solid var(--md-outline-variant);
}

.news-article-hero {
  height: 280px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-alt);
}

.news-article-header {
  padding: 1.5rem 1.5rem 0;
}

.news-article-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.5rem;
}

.news-article-header h1 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
  line-height: 1.3;
}

.news-article-content {
  padding: 1.5rem;
  line-height: 1.7;
}

.news-article-content p {
  margin: 0 0 1rem;
}

.news-grid-home {
  margin-top: 0;
}

.home-browse {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.home-browse a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--touch-min);
  padding: var(--space-2) var(--space-3);
  background: var(--md-surface);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.1px;
  color: var(--md-primary);
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--elevation-1);
}

.home-browse a:hover {
  background: var(--md-primary-container);
  border-color: transparent;
  box-shadow: var(--elevation-2);
}

/* Property cards - Zillow-style */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .properties-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  .property-card-body {
    padding: 0.55rem 0.6rem 0.65rem;
    gap: 0.15rem;
  }
  .property-card-price {
    font-size: 0.95rem;
  }
  .property-card-title {
    font-size: 0.78rem;
    line-height: 1.3;
  }
  .property-card-img-footer {
    padding: 1.25rem 0.45rem 0.4rem;
  }
  .property-card-location-overlay {
    font-size: 0.68rem;
  }
  .property-card-status-chip {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }
  .spec-chip {
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
    gap: 0.18rem;
  }
  .spec-chip:first-child { padding-left: 0; }
  .spec-unit { display: none; }
  .spec-chip b { font-size: 0.78rem; }
  .spec-chip .spec-icon { width: 0.78rem; height: 0.78rem; }
  .property-card-agent { display: none; }
}

.properties-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.property-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevation-1);
  transition: box-shadow var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid var(--md-outline-variant);
}

.property-card:hover {
  box-shadow: var(--elevation-3);
}

.property-card-img-wrap {
  position: relative;
  overflow: hidden;
}
.property-card-img,
.property-card-video {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  height: auto;
  background: var(--bg-alt);
  display: block;
}
/* 16:10 placeholder SVG inside 4:3 — object-fit:cover cropped long English lines on mobile */
.property-card-img.property-card-img--ph {
  object-fit: contain;
  object-position: center;
}
.property-card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.property-card-img-wrap:has(.property-card-video) {
  aspect-ratio: 4/3;
}
.property-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(0,0,0,0.7);
  color: white;
}
.property-badge-fast {
  background: var(--brand-gold);
  color: #1C1B1F;
}
[dir="rtl"] .property-badge {
  left: auto;
  right: 0.5rem;
}

.property-card-body {
  padding: 0.9rem 1rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* View more - empty card in grid */
.view-more-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border-style: dashed;
}
.view-more-card .view-more-text {
  font-weight: 500;
  color: var(--md-primary);
  font-size: 1rem;
}
.view-more-card:hover {
  background: var(--md-primary-container);
}
.view-more-card:hover .view-more-text {
  color: var(--md-primary);
}

.property-card-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--md-primary);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.property-card-title {
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--md-on-surface);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Image footer: location overlay + status chip */
.property-card-img-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.75rem 0.65rem 0.55rem;
  background: linear-gradient(to top, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.25) 60%, transparent 100%);
  pointer-events: none;
}

.property-card-location-overlay {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.property-card-location-overlay .spec-icon {
  flex-shrink: 0;
  color: #fff;
  width: 0.85rem;
  height: 0.85rem;
  opacity: 0.9;
}

.property-card-location-overlay > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-card-status-chip {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  pointer-events: auto;
}

.chip-sale {
  background: var(--md-primary);
  color: #fff;
}

.chip-rent {
  background: var(--brand-gold);
  color: #1C1B1F;
}

/* Specs row: beds | baths | sqm */
.property-card-specs {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 0.2rem;
  flex-wrap: nowrap;
  overflow: hidden;
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.spec-chip:first-child { padding-left: 0; }

.spec-chip + .spec-chip {
  border-left: 1px solid var(--md-outline-variant);
}

.spec-chip b {
  font-weight: 600;
  color: var(--md-on-surface);
  font-size: 0.88rem;
}

.spec-chip .spec-icon {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--md-primary);
  opacity: 0.8;
}

.spec-unit {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Keep legacy selector for detail page specs */
.property-card-meta .spec-item,
.property-detail-meta .spec-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.property-detail-meta .spec-icon-slot {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.property-detail-meta .spec-item-loc {
  text-align: start;
}

.property-card-agent {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.property-card-agent .agent-name {
  font-weight: 500;
  color: var(--md-on-surface);
}

.property-card-agent .agent-phone {
  color: var(--md-primary);
  text-decoration: none;
  font-weight: 500;
}

.property-card-agent .agent-phone:hover,
.property-card-agent .agent-phone:focus {
  text-decoration: underline;
}

.spec-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--md-primary);
}

/* List view variant */
.property-card.list-view {
  display: grid;
  grid-template-columns: 200px 1fr;
}

.property-card.list-view .property-card-img {
  aspect-ratio: 1;
}

@media (max-width: 600px) {
  .property-card.list-view {
    grid-template-columns: 1fr;
  }
}

/* Neighborhoods - Zillow-style location links */
.neighborhoods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .neighborhoods {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

.neighborhood-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--bg);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--elevation-1);
  transition: background 0.18s ease, color 0.18s ease,
              border-color 0.18s ease, transform 0.18s ease;
}

.neighborhood-link:hover {
  background: var(--md-primary);
  border-color: var(--md-primary);
  color: #fff;
  transform: translateY(-2px);
}

.neighborhood-link-type {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.18s ease;
}

.neighborhood-link:hover .neighborhood-link-type {
  color: rgba(255, 255, 255, 0.7);
}

.neighborhood-link-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: inherit;
}

.neighborhood-link-arrow {
  font-size: 1rem;
  color: var(--md-primary);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  align-self: flex-end;
}

.neighborhood-link:hover .neighborhood-link-arrow {
  opacity: 1;
  transform: translateX(0);
  color: #fff;
}

@media (max-width: 640px) {
  .neighborhood-link { padding: 0.9rem 0.85rem 0.85rem; gap: 0.5rem; }
  .neighborhood-link-arrow { display: none; }
}

/* "See all" button */
.neighborhoods-see-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--md-primary);
  background: var(--bg);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.neighborhoods-see-all:hover {
  background: var(--md-primary);
  color: #fff;
  border-color: var(--md-primary);
}

html.dark-mode .neighborhood-link {
  background: #2d2d2d;
  border-color: #404040;
}

html.dark-mode .neighborhood-link:hover {
  background: var(--md-primary);
  border-color: var(--md-primary);
}

/* Listings page layout */
.listings-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  min-height: calc(100vh - 200px);
}

.listings-with-map {
  grid-template-columns: 260px 1fr 400px;
}

.filters-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
  background: var(--md-surface);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-1);
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.filters-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
}

.filters-actions {
  flex-shrink: 0;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filters-sidebar h3 {
  font-size: 1rem;
  margin-bottom: 0;
}

.filters-close {
  display: none;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  width: auto;
  height: auto;
  padding: 0;
  background: var(--bg-alt);
  border: none;
  border-radius: var(--radius);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

.filters-close:hover {
  background: var(--border);
  color: var(--text);
}

.filters-clear {
  width: 100%;
  margin-top: 0.5rem;
  min-height: var(--touch-min);
  padding: 0.5rem 1rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.filters-clear:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.filters-toggle {
  display: none;
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.filter-group input, .filter-group select {
  width: 100%;
  min-height: var(--touch-min);
  padding: var(--space-2) var(--space-2);
  border: 1px solid var(--md-outline);
  border-radius: var(--radius-xs);
  font-size: 16px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.filter-group input:focus, .filter-group select:focus {
  outline: none;
  border-color: var(--md-primary);
  box-shadow: 0 0 0 1px var(--md-primary);
}

.listings-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.view-toggle {
  display: flex;
  gap: 0.25rem;
}

.view-toggle button {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0.5rem;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.view-toggle button.active {
  background: var(--md-primary);
  color: var(--md-on-primary);
  border-color: transparent;
}

.map-toggle, .filters-toggle {
  min-height: var(--touch-min);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
}

.map-panel {
  position: sticky;
  top: 80px;
  height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

#map {
  width: 100%;
  height: 100%;
}

@media (max-width: 1024px) {
  .listings-layout {
    grid-template-columns: 1fr;
  }
  .listings-with-map .map-panel {
    order: -1;
    height: 300px;
  }
  .filters-toggle {
    display: inline-block;
  }
  .filters-sidebar {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    overflow: hidden;
    border-radius: 0;
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    margin: 0;
  }
  .filters-sidebar.open {
    display: flex;
  }
  html.filters-open, body.filters-open {
    overflow: hidden;
    height: 100%;
  }
  .filters-close {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  [dir="rtl"] .filters-sidebar {
    left: auto;
    right: 0;
  }
}

/* Property detail */
.property-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  overflow-x: hidden;
}

.related-section {
  border-top: 1px solid var(--md-outline-variant);
  padding-top: 2rem;
  margin-top: 0;
}

.property-detail-content > * {
  min-width: 0;
}

.property-gallery {
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.gallery-swipeable {
  touch-action: pan-y pinch-zoom;
}

.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 0;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-track {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  scroll-snap-align: start;
  cursor: pointer;
  display: block;
}
.gallery-slide.gallery-slide--ph {
  object-fit: contain;
  object-position: center;
  background: var(--md-surface-variant);
}

.gallery-slide.active {
  flex: 0 0 100%;
}

.gallery-slide-video {
  display: flex;
  background: #000;
}

.gallery-slide-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.gallery-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background 0.2s;
}

.gallery-dots span.active {
  background: white;
  transform: scale(1.2);
}

@media (min-width: 769px) {
  .gallery-track {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 0.5rem;
    overflow: visible;
    scroll-snap-type: none;
  }
  .gallery-slide:first-child {
    grid-row: 1 / -1;
    aspect-ratio: auto;
    height: 100%;
    min-height: 200px;
  }
  .gallery-slide:not(:first-child) {
    flex: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: var(--radius);
  }
  .gallery-slide.gallery-slide--ph:not(:first-child),
  .gallery-slide:first-child.gallery-slide--ph {
    object-fit: contain;
    background: var(--md-surface-variant);
  }
  .gallery-dots {
    display: none;
  }
}

.property-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.property-detail-price {
  font-size: 2rem;
  font-weight: 500;
  color: var(--md-primary);
}

.property-detail-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.property-detail-meta .spec-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.property-detail-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}

@media (max-width: 700px) {
  .property-detail-content {
    grid-template-columns: 1fr;
  }
  .contact-card {
    position: static;
  }
}

.property-description {
  line-height: 1.7;
  color: var(--text-muted);
}

.contact-card {
  background: var(--md-surface-variant);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  height: fit-content;
  position: sticky;
  top: 100px;
  box-shadow: var(--elevation-1);
}

.contact-card h3 {
  margin-bottom: 1rem;
}

.contact-card .agent-info {
  margin-bottom: 1rem;
}

.contact-card .contact-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.contact-card .contact-buttons a {
  flex: 1;
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: opacity var(--transition);
}

.contact-card .contact-buttons .btn-call {
  background: #22c55e;
  color: white;
}

.contact-card .contact-buttons .btn-whatsapp {
  background: #25d366;
  color: white;
}

.contact-card .contact-buttons a:hover {
  opacity: 0.9;
}

.inquiry-form input, .inquiry-form textarea {
  width: 100%;
  min-height: var(--touch-min);
  padding: var(--space-2);
  margin-bottom: var(--space-2);
  border: 1px solid var(--md-outline);
  border-radius: var(--radius-xs);
  font-size: 16px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.inquiry-form input:focus, .inquiry-form textarea:focus {
  outline: none;
  border-color: var(--md-primary);
  box-shadow: 0 0 0 1px var(--md-primary);
}

.inquiry-form textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-primary {
  width: 100%;
  min-height: var(--touch-min);
  padding: var(--space-2) var(--space-3);
  background: var(--md-primary);
  color: var(--md-on-primary);
  border: none;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.1px;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--elevation-2);
}

.property-map {
  height: 300px;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 2rem;
}

.property-map .leaflet-container {
  width: 100% !important;
  max-width: 100%;
}

/* Sticky contact bar - mobile thumb zone */
.contact-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 95;
  background: white;
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  gap: 0.75rem;
}

.contact-sticky-bar a, .contact-sticky-bar button {
  flex: 1;
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.contact-sticky-bar .btn-call {
  background: #22c55e;
  color: white;
}

.contact-sticky-bar .btn-whatsapp {
  background: #25d366;
  color: white;
}

.contact-sticky-bar .btn-inquire {
  background: var(--md-primary);
  color: var(--md-on-primary);
}

.contact-sticky-bar .btn-inquire:hover,
.contact-sticky-bar .btn-call:hover,
.contact-sticky-bar .btn-whatsapp:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .contact-sticky-bar {
    display: flex;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  .property-detail {
    padding-bottom: 90px;
  }
}

[dir="rtl"] .contact-sticky-bar {
  left: 0;
  right: 0;
}

/* Lightbox */
/* ── Gallery "View all" button ───────────────────────────────────── */
.gallery-all-btn {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease;
}
.gallery-all-btn:hover { background: rgba(0,0,0,0.85); }

/* ── Full-screen Gallery Lightbox ────────────────────────────────── */
.glb {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.glb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.96);
}

.glb-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.glb-close:hover { background: rgba(255,255,255,0.25); }

/* Main image stage */
.glb-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

.glb-img-wrap {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.glb-img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

/* Prev / Next arrows */
.glb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.glb-arrow:hover:not([disabled]) { background: rgba(255,255,255,0.25); }
.glb-arrow[disabled] { opacity: 0.2; cursor: default; }
.glb-prev { left: 1rem; }
.glb-next { right: 1rem; }

/* Footer: counter + thumbnail strip */
.glb-footer {
  position: relative;
  z-index: 1;
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.glb-counter {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
}

.glb-thumbs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}
.glb-thumbs::-webkit-scrollbar { display: none; }

.glb-thumb {
  width: 58px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  opacity: 0.45;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.glb-thumb:hover { opacity: 0.75; }
.glb-thumb.active {
  opacity: 1;
  border-color: #fff;
}

@media (max-width: 480px) {
  .glb-img-wrap { max-width: 100vw; }
  .glb-arrow { width: 38px; height: 38px; font-size: 1.5rem; }
  .glb-prev { left: 0.25rem; }
  .glb-next { right: 0.25rem; }
  .glb-thumb { width: 46px; height: 34px; }
}

/* Agents */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.agent-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  padding: 1.5rem;
}

.agent-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  background: var(--bg-alt);
}

.agent-card h3 {
  margin-bottom: 0.25rem;
}

.agent-card .agent-phone, .agent-card .agent-email {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Contact page */
.contact-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.contact-page h1 {
  margin-bottom: 1.5rem;
}

/* Footer */
.footer {
  margin-top: auto;
  background: #0f1923;
  color: #a0adb8;
  font-size: 0.875rem;
}

/* Top section — columns */
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem 2.5rem;
}

@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2.5rem 1.5rem 2rem;
  }
  .footer-col-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; gap: 1.75rem; }
}

.footer-logo-img {
  height: 38px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  margin-bottom: 0.85rem;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-tagline {
  font-size: 0.85rem;
  color: #6b7a87;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 280px;
}

/* Social buttons */
.footer-social {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  color: #a0adb8;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.footer-social-btn svg {
  width: 17px;
  height: 17px;
}

.footer-social-btn:hover {
  background: var(--md-primary);
  color: #fff;
}

/* Column headings */
.footer-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 1rem;
}

/* Link lists */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a {
  color: #6b7a87;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #fff;
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 1rem 1.5rem;
    gap: 0.4rem;
  }
}

.footer-copy {
  color: #6b7a87;
  font-size: 0.82rem;
  margin: 0;
}

.footer-copy strong {
  color: #a0adb8;
  font-weight: 600;
}

.footer-powered {
  font-size: 0.82rem;
  color: #6b7a87;
  margin: 0;
}

.footer-powered a {
  color: var(--md-primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-powered a:hover {
  text-decoration: underline;
}

/* Header responsive */
@media (max-width: 480px) {
  .logo-img {
    height: 32px;
    max-width: 110px;
  }
  .lang-dropdown-trigger .lang-label {
    display: none;
  }
}

/* Loading */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--md-outline-variant);
  border-top-color: var(--md-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-2);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state p {
  margin-bottom: 1rem;
}

.empty-state .empty-cta {
  margin-top: 1rem;
}

.empty-state .empty-cta a {
  color: var(--md-primary);
  font-weight: 500;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  background: var(--md-on-surface);
  color: var(--md-surface);
  font-size: 0.9rem;
  box-shadow: var(--elevation-3);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
}

.toast.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.toast-success { background: #22c55e; }
.toast.toast-error { background: #dc2626; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--md-primary);
  color: white;
  text-decoration: none;
  font-weight: 500;
  z-index: 1000;
  border-radius: var(--radius);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--md-primary);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--elevation-3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 90;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: scale(1.05);
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border) 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes skeleton {
  to { background-position: 200% 0; }
}

.skeleton-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevation-1);
}

.skeleton-card .skeleton-img {
  height: 200px;
}

.skeleton-card .skeleton-body {
  padding: 1rem;
}

.skeleton-card .skeleton-line {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-card .skeleton-line.short {
  width: 40%;
}

/* Property card hover */
.property-card {
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--elevation-3);
}

.fav-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: #999;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.fav-btn:hover, .fav-btn.active {
  color: #dc2626;
  background: white;
}

[dir="rtl"] .fav-btn {
  right: auto;
  left: 0.5rem;
}

.property-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.share-btn, .fav-btn-detail {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

.share-btn:hover, .fav-btn-detail:hover {
  border-color: var(--md-primary);
  color: var(--md-primary);
}

.fav-btn-detail.active {
  background: var(--md-primary-container);
  color: var(--md-primary);
  border-color: transparent;
}

.field-error {
  display: block;
  font-size: 0.8rem;
  color: var(--md-error);
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

.page-content {
  line-height: 1.7;
}

.page-content p {
  margin-bottom: 1rem;
}

/* Side panel dark toggle */
.side-panel-dark-toggle {
  padding: 1rem var(--space-3);
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.side-panel-dark-toggle label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;
}

/* Dark mode */
html.dark-mode {
  --md-surface: #1a1a1a;
  --md-surface-variant: #2d2d2d;
  --md-on-surface: #e5e5e5;
  --md-on-surface-variant: #a3a3a3;
  --md-primary-container: #1e3d3d;
  --md-outline-variant: #404040;
  --bg: #1a1a1a;
  --bg-alt: #2d2d2d;
  --text: #e5e5e5;
  --text-muted: #a3a3a3;
  --border: #404040;
}

html.dark-mode .header,
html.dark-mode .side-panel,
html.dark-mode .search-hero,
html.dark-mode .section-header {
  background: #2d2d2d;
}

html.dark-mode .property-card,
html.dark-mode .agent-card {
  background: #2d2d2d;
}

html.dark-mode .spec-chip + .spec-chip {
  border-left-color: #444;
}

html.dark-mode .spec-chip b {
  color: #e5e5e5;
}

html.dark-mode .property-card-price {
  color: #4db8b8;
}

html.dark-mode .contact-card {
  background: #1e3d3d;
}

/* ── Services Grid — desktop: 3-col, mobile: carousel ────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .services-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 0.25rem 0 1.25rem;
    scrollbar-width: none;
    padding-right: 1.5rem;
  }
  .services-grid::-webkit-scrollbar { display: none; }
}

/* ── Service Card ─────────────────────────────────────────────────── */
.service-card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevation-1);
  border: 1px solid var(--md-outline-variant);
  border-top: 3px solid var(--svc-color, var(--md-primary));
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--elevation-3);
}

/* Mobile: carousel snap */
@media (max-width: 640px) {
  .service-card {
    min-width: 72vw;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

/* Card body */
.service-card-body {
  padding: 1.5rem 1.4rem 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Large muted number — "01", "02"… */
.service-card-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--svc-color, var(--md-primary));
  opacity: 0.18;
  letter-spacing: -0.03em;
  margin-bottom: 0.1rem;
  transition: opacity 0.2s ease;
}

.service-card:hover .service-card-num {
  opacity: 0.35;
}

.service-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--md-on-surface);
}

.service-card-excerpt {
  font-size: 0.855rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin: 0;
}

.service-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--svc-color, var(--md-primary));
  padding-top: 0.5rem;
  border-top: 1px solid var(--md-outline-variant);
  margin-top: 0.25rem;
}

/* ── Services Detail Page ─────────────────────────────────────────── */
.services-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.service-detail-card {
  display: flex;
  gap: 2rem;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevation-1);
  border: 1px solid var(--md-outline-variant);
  border-left: 5px solid var(--svc-color, var(--md-primary));
  align-items: flex-start;
  padding: 2rem;
}

.service-detail-sidebar {
  flex-shrink: 0;
}

.service-detail-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--svc-color, var(--md-primary)) 15%, transparent);
}

.service-detail-icon {
  font-size: 2.25rem;
  line-height: 1;
}

.service-detail-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.service-detail-body {
  flex: 1;
  min-width: 0;
}

.service-detail-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--svc-color, var(--md-primary));
}

.service-detail-excerpt {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-style: italic;
}

.service-detail-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
}

/* Rich text output (admin Quill / legacy editors) */
.rich-text ul, .rich-text ol { padding-left: 1.5rem; margin: 0.75rem 0; }
.rich-text li { margin-bottom: 0.35rem; }
.rich-text p { margin-bottom: 0.75rem; }
.rich-text h2, .rich-text h3 { margin: 1rem 0 0.5rem; font-weight: 700; }
.rich-text a { color: var(--primary); }
.rich-text img { max-width: 100%; height: auto; border-radius: var(--radius-xs); }
/* Quill snow classes (editor CSS is not loaded on the public site) */
.rich-text .ql-align-right { text-align: right; }
.rich-text .ql-align-center { text-align: center; }
.rich-text .ql-align-justify { text-align: justify; }
.rich-text .ql-direction-rtl { direction: rtl; }
.rich-text ul.ql-direction-rtl,
.rich-text ol.ql-direction-rtl { padding-right: 1.5rem; padding-left: 0; }
.rich-text ul:has(.ql-direction-rtl),
.rich-text ol:has(.ql-direction-rtl) {
  direction: rtl;
  padding-right: 1.5rem;
  padding-left: 0;
}
.property-description.rich-text { color: var(--text-muted); }

@media (max-width: 640px) {
  .service-detail-card {
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
  }
  .service-detail-sidebar {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  .service-detail-img {
    width: 72px; height: 72px;
    margin-bottom: 0;
  }
}

html.dark-mode .service-card,
html.dark-mode .service-detail-card {
  background: #2d2d2d;
  border-color: #404040;
}

html.dark-mode .service-card-title {
  color: #e5e5e5;
}

/* ── Carousel dots (mobile only) ─────────────────────────────────── */
.carousel-dots {
  display: none;
  justify-content: center;
  gap: 6px;
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .carousel-dots {
    display: flex;
  }
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--md-outline-variant);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, width 0.25s ease;
  flex-shrink: 0;
}

.carousel-dot.active {
  background: var(--md-primary);
  width: 22px;
  border-radius: 4px;
  transform: none;
}

/* ── About Page ───────────────────────────────────────────────────────────── */
.about-hero {
  background: linear-gradient(135deg, #0d4d4d 0%, #167575 100%);
  padding: clamp(3rem, 8vw, 5rem) clamp(1rem, 4vw, 2rem);
  text-align: center;
}
.about-hero-inner { max-width: 700px; margin: 0 auto; }
.about-hero-title { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 700; color: #fff; line-height: 1.25; margin-bottom: 1rem; }
.about-hero-sub   { color: rgba(255,255,255,0.82); font-size: 1.05rem; line-height: 1.65; margin-bottom: 2rem; }
.about-cta-row    { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-about-primary { background: var(--brand-gold); color: #1C1B1F; padding: 0.75rem 1.75rem; border-radius: var(--radius-full); font-weight: 700; text-decoration: none; font-size: 0.95rem; transition: opacity 0.2s; }
.btn-about-primary:hover { opacity: 0.88; }
.btn-about-outline { border: 2px solid rgba(255,255,255,0.6); color: #fff; padding: 0.75rem 1.75rem; border-radius: var(--radius-full); font-weight: 600; text-decoration: none; font-size: 0.95rem; transition: border-color 0.2s, background 0.2s; }
.btn-about-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

.about-stats-bar {
  background: var(--md-primary);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
.about-stat {
  flex: 1;
  min-width: 140px;
  padding: 1.5rem 1rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.about-stat:last-child { border-right: none; }
.about-stat-n { display: block; font-size: 2rem; font-weight: 700; color: var(--brand-gold); }
.about-stat-l { display: block; font-size: 0.78rem; color: rgba(255,255,255,0.75); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 0.2rem; }

.about-section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.about-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.about-text-block p { color: var(--text-muted); line-height: 1.75; margin-bottom: 1rem; }

.about-values-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about-value-card  { background: #fff; border-radius: var(--radius-md); padding: 1.25rem; border: 1px solid var(--md-outline-variant); }
.about-value-card h3 { font-size: 0.95rem; font-weight: 600; margin: 0.4rem 0 0.35rem; color: var(--md-on-surface); }
.about-value-card p  { font-size: 0.82rem; color: var(--text-muted); margin: 0; line-height: 1.55; }
.about-value-icon  { font-size: 1.5rem; }

.why-choose-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.why-item { padding: 1.5rem; background: #fff; border-radius: var(--radius-md); border: 1px solid var(--md-outline-variant); }
.why-num  { display: block; font-size: 2rem; font-weight: 800; color: var(--md-primary); opacity: 0.18; line-height: 1; margin-bottom: 0.5rem; }
.why-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--md-on-surface); }
.why-item p  { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

@media (max-width: 900px) {
  .about-two-col { grid-template-columns: 1fr; }
  .why-choose-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .about-values-grid { grid-template-columns: 1fr; }
  .why-choose-grid { grid-template-columns: 1fr; }
  .about-stat { min-width: 50%; }
}

html.dark-mode .about-value-card,
html.dark-mode .why-item { background: #2d2d2d; border-color: #404040; }

/* ── FAQ Page ─────────────────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; max-width: 780px; }
.faq-item { border: 1px solid var(--md-outline-variant); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow 0.2s; }
.faq-item.faq-open { box-shadow: var(--elevation-2); border-color: var(--md-primary); }
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--md-on-surface);
  transition: background 0.15s;
}
.faq-question:hover { background: var(--md-primary-container); }
.faq-item.faq-open .faq-question { background: var(--md-primary-container); color: var(--md-primary); }
.faq-chevron { flex-shrink: 0; color: var(--md-primary); transition: transform 0.25s ease; }
.faq-item.faq-open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  padding: 0 1.25rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  background: var(--md-primary-container);
}
html.dark-mode .faq-question { background: #2d2d2d; }
html.dark-mode .faq-item.faq-open .faq-question,
html.dark-mode .faq-answer { background: #1e3d3d; }

/* ── Testimonials Section ─────────────────────────────────────────────────── */
.testimonials-section {
  background: linear-gradient(135deg, #0d4d4d 0%, #167575 60%, #1a8a6e 100%);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.testimonials-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.5rem);
}

.testimonials-header {
  background: transparent !important;
  box-shadow: none !important;
  border-left-color: var(--brand-gold) !important;
  margin-bottom: 2rem;
}

.testimonials-header .section-title {
  color: #fff !important;
}

/* Testimonial card */
.testi-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: #fff;
  min-height: 260px;
  /* flex sizing handled by .prop-carousel-viewport children */
  scroll-snap-align: start;
}

.testi-quote-icon {
  font-size: 3rem;
  line-height: 1;
  color: var(--brand-gold);
  opacity: 0.7;
  font-family: Georgia, serif;
  margin-bottom: -0.5rem;
}

.testi-quote {
  font-size: 0.975rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.92);
  flex: 1;
  font-style: italic;
}

.testi-stars {
  font-size: 1rem;
  color: var(--brand-gold);
  letter-spacing: 2px;
}

.testi-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: auto;
}

.testi-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-gold);
  color: #1C1B1F;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.testi-author-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.testi-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
}

.testi-meta {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
}

/* Override carousel btn colors for testimonials teal background */
.testi-btn {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
  box-shadow: none !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
}
.testi-btn:hover {
  background: var(--brand-gold) !important;
  color: #1C1B1F !important;
  border-color: transparent !important;
}
.testi-dots .carousel-dot {
  background: rgba(255,255,255,0.35);
}
.testi-dots .carousel-dot.active {
  background: var(--brand-gold);
}

/* Testi cards inside carousel viewport */
.testi-viewport > .testi-card {
  flex: 0 0 calc(33.333% - 1rem);
}

@media (max-width: 900px) {
  .testi-viewport > .testi-card {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

@media (max-width: 640px) {
  .testi-viewport > .testi-card {
    flex: 0 0 84vw;
    min-height: 220px;
    padding: 1.5rem 1.25rem 1.25rem;
  }
  .testi-quote { font-size: 0.88rem; }
}

/* ── Property Carousel ────────────────────────────────────────────────────── */
.prop-carousel {
  position: relative;
  padding: 0 2.75rem;
}

.prop-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: var(--elevation-3);
  color: var(--md-primary);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.prop-carousel-btn:hover {
  background: var(--md-primary);
  color: #fff;
  box-shadow: var(--elevation-4);
}

.prop-carousel-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.prop-carousel-prev { left: 0; }
.prop-carousel-next { right: 0; }

.prop-carousel-viewport {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0.1rem 0.75rem;
}

.prop-carousel-viewport::-webkit-scrollbar { display: none; }

.prop-carousel-viewport > .property-card,
.prop-carousel-viewport > .view-more-card {
  flex: 0 0 calc(33.333% - 1rem);
  scroll-snap-align: start;
}

@media (max-width: 900px) {
  .prop-carousel { padding: 0 2.25rem; }
  .prop-carousel-btn { width: 38px; height: 38px; font-size: 1.5rem; }
  .prop-carousel-viewport > .property-card,
  .prop-carousel-viewport > .view-more-card {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

@media (max-width: 640px) {
  .prop-carousel { padding: 0 1.75rem; }
  .prop-carousel-btn { width: 34px; height: 34px; font-size: 1.3rem; }
  .prop-carousel-viewport {
    gap: 0.85rem;
    padding: 0.25rem 0.1rem 0.75rem;
  }
  .prop-carousel-viewport > .property-card,
  .prop-carousel-viewport > .view-more-card {
    flex: 0 0 80vw;
  }
}

.prop-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 0.75rem;
}

html.dark-mode .prop-carousel-btn {
  background: #3a3a3a;
  color: var(--brand-gold);
}

html.dark-mode .prop-carousel-btn:hover {
  background: var(--md-primary);
  color: #fff;
}

/* ── Header phone number ─────────────────────────────────────────────────── */
.header-phone {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--md-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--md-primary);
  border-radius: var(--radius-full);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.header-phone:hover {
  background: var(--md-primary);
  color: #fff;
}
.header-phone svg { flex-shrink: 0; }
@media (max-width: 480px) {
  .header-phone-text { display: none; }
  .header-phone { padding: 0.4rem; border-radius: 50%; width: 36px; height: 36px; justify-content: center; }
}
html.dark-mode .header-phone {
  color: var(--brand-gold);
  border-color: var(--brand-gold);
}
html.dark-mode .header-phone:hover {
  background: var(--brand-gold);
  color: #1a1a1a;
}

/* ── Trust stats banner ──────────────────────────────────────────────────── */
.stats-banner {
  background: var(--md-primary);
  color: #fff;
  padding: 2.5rem var(--space-3);
}
.stats-container {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
.stat-item { padding: 0.5rem; }
.stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--brand-gold);
  line-height: 1.1;
}
.stat-label {
  display: block;
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 0.3rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
@media (max-width: 640px) {
  .stats-container { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .stat-number { font-size: 1.75rem; }
}

/* ── WhatsApp floating action button ────────────────────────────────────── */
.whatsapp-fab {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #25D366;
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.whatsapp-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px rgba(37,211,102,0.55);
}
@media (max-width: 480px) {
  .whatsapp-fab-label { display: none; }
  .whatsapp-fab { padding: 0.85rem; border-radius: 50%; bottom: 5.5rem; }
}

/* ── Cookie consent banner ───────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: #1a1a2e;
  color: #e5e5e5;
  padding: 1rem var(--space-3);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
  animation: slideUpCookie 0.4s ease;
}
.cookie-banner[hidden] { display: none; }
@keyframes slideUpCookie {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.cookie-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-banner-text {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.5;
  min-width: 200px;
}
.cookie-link {
  color: var(--brand-gold);
  text-underline-offset: 2px;
}
.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.cookie-btn {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}
.cookie-btn:hover { opacity: 0.85; }
.cookie-btn-accept { background: var(--md-primary); color: #fff; }
.cookie-btn-decline { background: transparent; color: #aaa; border: 1px solid #555; }

/* ── 404 Not Found page ──────────────────────────────────────────────────── */
.not-found-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.not-found-content {
  text-align: center;
  padding: 2rem;
}
.not-found-code {
  font-size: clamp(6rem, 20vw, 10rem);
  font-weight: 700;
  line-height: 1;
  color: var(--md-primary);
  opacity: 0.15;
  letter-spacing: -4px;
  margin-bottom: -1rem;
}
.not-found-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.not-found-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 380px;
  margin-inline: auto;
}
.not-found-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.not-found-actions .btn-primary {
  background: var(--md-primary);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  transition: background var(--transition);
}
.not-found-actions .btn-primary:hover { background: var(--primary-hover); }
.not-found-actions .btn-outline {
  border: 2px solid var(--md-primary);
  color: var(--md-primary);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
.not-found-actions .btn-outline:hover {
  background: var(--md-primary);
  color: #fff;
}
html.dark-mode .not-found-code { color: var(--brand-gold); }
