/* ============================================
   2Hame – Smart Moving & Housing Platform
   Main Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ─── CSS Variables ─── */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #3B82F6;
  --secondary: #0F172A;
  --accent: #22C55E;
  --accent-dark: #16A34A;
  --light-bg: #F8FAFC;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --danger: #EF4444;
  --warning: #F59E0B;
  --info: #06B6D4;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --shadow-xl: 0 25px 50px rgba(0,0,0,0.15);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --nav-height: 84px;
}

/* Dark/light logo swap - see .theme-logo-light / .theme-logo-dark on the
   <img> tags in templates/home/base.html (nav logo + mobile menu logo).
   Both images are always in the DOM; this just shows/hides the right one.
   Not used on the footer logo - the footer's background is always dark
   (see .footer below) regardless of site theme, so it always uses the
   light/white logo directly rather than swapping. */
.theme-logo-dark { display: none; }
[data-theme="dark"] .theme-logo-light { display: none; }
[data-theme="dark"] .theme-logo-dark { display: inline-block; }

/* Dark Mode */
[data-theme="dark"] {
  --light-bg: #18191A;
  --white: #242526;
  --gray-50: #242526;
  --gray-100: #2D2E30;
  --gray-200: #3A3B3C;
  --gray-300: #4E4F50;
  --gray-400: #6B6C6E;
  --gray-500: #9A9B9D;
  --gray-600: #B0B3B8;
  --gray-700: #CED0D4;
  --gray-800: #E4E6EB;
  --gray-900: #F0F2F5;
  --secondary: #0F172A;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--light-bg);
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
  width: 100%;
  min-width: 0;
}

.nav-logo-img {
  width: auto;
  height: 74px;
  max-width: 250px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  transition: var(--transition);
}

.footer-logo-img {
  width: auto;
  height: 40px;
  max-width: 150px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

/*
 * Light/dark logo swap. logo.png (dark navy wordmark) is the light-theme
 * version; logo-dark-mode.png (white wordmark, same teal/orange accents)
 * is shown once [data-theme="dark"] is set on <html> by main.js's dark
 * mode toggle. Both images are always in the DOM (no extra request when
 * switching, no flash of the wrong logo) - CSS just shows one at a time.
 * Not used on the footer logo, which sits on an always-dark background
 * (see .footer background) regardless of site theme, so it's hardcoded
 * to the white logo-dark-mode.png instead of swapping.
 */

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; max-width: 100%; }

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray-500);
  margin-bottom: 3rem;
}

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  white-space: nowrap;
  font-family: var(--font-display);
  max-width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-outline-dark {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline-dark:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-glass {
  background: rgba(255,255,255,0.15);
  color: #fff;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-glass:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

/* ─── Navigation ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(24,25,26,0.97);
}

.navbar.solid {
  background: rgba(255,255,255,0.98) !important;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.navbar.solid .nav-logo { color: var(--primary) !important; }
.navbar.solid .nav-link { color: var(--gray-700) !important; }
.navbar.solid .nav-link:hover,
.navbar.solid .nav-link.active { color: var(--primary) !important; background: rgba(37,99,235,0.08) !important; }
.navbar.solid .nav-btn-login { color: var(--gray-700) !important; border-color: var(--gray-300) !important; }
.navbar.solid .nav-btn-login:hover { background: var(--gray-100) !important; }
.navbar.solid .dark-toggle { color: var(--gray-600) !important; }
.navbar.solid .dark-toggle:hover { background: var(--gray-100) !important; }
.navbar.solid .hamburger span { background: var(--gray-700) !important; }

[data-theme="dark"] .navbar.solid {
  background: rgba(24,25,26,0.98) !important;
}
[data-theme="dark"] .navbar.solid .nav-logo { color: var(--primary) !important; }
[data-theme="dark"] .navbar.solid .nav-link { color: var(--gray-700) !important; }
[data-theme="dark"] .navbar.solid .nav-btn-login { color: var(--gray-600) !important; border-color: var(--gray-300) !important; }

.navbar.transparent {
  background: transparent;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--white);
  transition: var(--transition);
  flex-shrink: 0;
}

.navbar.scrolled .nav-logo { color: var(--primary); }

.nav-logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.navbar.scrolled .nav-logo-icon {
  background: var(--primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.15);
}

.navbar.scrolled .nav-link {
  color: var(--gray-700);
}

[data-theme="dark"] .navbar.scrolled .nav-logo { color: var(--primary); }
[data-theme="dark"] .navbar.scrolled .nav-link { color: var(--gray-600); }
[data-theme="dark"] .navbar.scrolled .nav-link:hover,
[data-theme="dark"] .navbar.scrolled .nav-link.active { color: var(--primary); background: rgba(37,99,235,0.12); }
[data-theme="dark"] .navbar.scrolled .nav-btn-login { color: var(--gray-600); border-color: var(--gray-300); }
[data-theme="dark"] .navbar.scrolled .nav-btn-login:hover { background: var(--gray-100); }
[data-theme="dark"] .navbar.scrolled .dark-toggle { color: var(--gray-500); }
[data-theme="dark"] .navbar.scrolled .dark-toggle:hover { background: var(--gray-100); }

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: var(--primary);
  background: rgba(37,99,235,0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-btn-login {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  border: 1.5px solid rgba(255,255,255,0.4);
  transition: var(--transition);
  font-size: 0.9rem;
}

.nav-btn-login:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.navbar.scrolled .nav-btn-login {
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.navbar.scrolled .nav-btn-login:hover {
  background: var(--gray-100);
}

.nav-btn-register {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  transition: var(--transition);
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(37,99,235,0.4);
}

.nav-btn-register:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.dark-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.8);
  transition: var(--transition);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.dark-toggle:hover { background: rgba(255,255,255,0.15); color: #fff; }

.navbar.scrolled .dark-toggle { color: var(--gray-600); }
.navbar.scrolled .dark-toggle:hover { background: var(--gray-100); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar.scrolled .hamburger span { background: var(--gray-700); }

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  z-index: 999;
  border-bottom: 1px solid var(--gray-200);
  transform: translateY(-10px);
  opacity: 0;
  transition: var(--transition);
  max-height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

[data-theme="dark"] .mobile-menu {
  background: rgba(15,23,42,0.98);
  border-color: var(--gray-700);
}

.mobile-menu.open {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  color: var(--gray-700);
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition-fast);
}

.mobile-menu a:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.mobile-menu .mobile-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.mobile-menu .mobile-actions .btn {
  flex: 1;
  justify-content: center;
}

/* Dark/Light mode toggle, styled as a row when placed inside the mobile menu */
.mobile-menu .dark-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  color: var(--gray-700);
  font-weight: 500;
  font-size: 1rem;
  border-radius: var(--radius);
  transition: var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  margin-top: 0.25rem;
  border-top: 1px solid var(--gray-200);
  padding-top: 1.125rem;
}

.mobile-menu .dark-toggle:hover { background: var(--gray-100); color: var(--primary); }
.mobile-menu .dark-toggle-icon { font-size: 1.1rem; }
.mobile-menu .dark-toggle-label { flex: 1; }

[data-theme="dark"] .mobile-menu .dark-toggle { color: var(--gray-300); border-color: var(--gray-700); }
[data-theme="dark"] .mobile-menu .dark-toggle:hover { background: rgba(255,255,255,0.06); color: var(--primary); }

/* ─── Hero Section ─── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active { opacity: 1; }

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15,23,42,0.75) 0%,
    rgba(37,99,235,0.35) 50%,
    rgba(15,23,42,0.55) 100%
  );
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem;
  padding-top: calc(var(--nav-height) + 2rem);
  z-index: 2;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
  text-align: center;
}

.hero-badge span { color: var(--accent); }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 7vw, 4.5rem);
  font-weight: 800;
  color: #fff;
  max-width: 800px;
  margin-bottom: 1.1rem;
  line-height: 1.15;
  width: 100%;
  transition: opacity 0.25s ease;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  color: rgba(255,255,255,0.85);
  max-width: 550px;
  margin-bottom: 2rem;
  width: 100%;
  transition: opacity 0.25s ease;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
  width: 100%;
}

/* Hero Search Bar — rebuilt to be robust at every width */
.hero-search {
  width: 100%;
  max-width: 700px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-xl);
  padding: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0 auto 2.5rem;
}

.hero-search-icon {
  color: rgba(255,255,255,0.6);
  padding: 0 0.4rem;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hero-search-input {
  flex: 1 1 160px;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  padding: 0.65rem 0.6rem;
  width: 100%;
}

.hero-search-input::placeholder { color: rgba(255,255,255,0.6); }

.hero-search-divider {
  width: 1px;
  height: 26px;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.hero-search-select {
  background: rgba(255,255,255,0.08);
  border: none;
  outline: none;
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem;
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  border-radius: var(--radius);
  flex: 1 1 120px;
  min-width: 0;
  max-width: 160px;
}

.hero-search select option,
.hero-search-select option { color: var(--gray-800); background: #fff; }

.hero-search .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Hero Carousel Dots */
.hero-dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 3;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
}

.hero-dot.active {
  width: 28px;
  background: #fff;
}

.hero-stats {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  display: flex;
  gap: 1.25rem;
  z-index: 3;
}

.hero-stat {
  text-align: center;
  color: #fff;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.72rem;
  opacity: 0.75;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── Category Cards ─── */
.categories-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.category-card {
  flex: 0 1 calc(25% - 0.9375rem);
  max-width: calc(25% - 0.9375rem);
  min-width: 140px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: var(--transition);
}

.category-card:hover::before { opacity: 1; }

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.category-card:hover .category-icon,
.category-card:hover .category-name,
.category-card:hover .category-count {
  color: #fff;
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.category-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gray-800);
  position: relative;
  z-index: 1;
  margin-bottom: 0.3rem;
  transition: var(--transition);
}

.category-count {
  font-size: 0.8rem;
  color: var(--gray-400);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

/* ─── Why 2Hame ─── */
.features-bg {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .features-bg {
  background: linear-gradient(135deg, #080E1A 0%, #1a2a6b 100%);
}

.features-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.feature-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.2);
}

.feature-icon {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 14px rgba(37,99,235,0.4);
}

.feature-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.6rem;
}

.feature-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

/* ─── About Section ─── */
.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.25rem;
  margin-top: 1.25rem;
}

.about-highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.about-highlight-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(37,99,235,0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.about-highlight-item strong {
  font-size: 0.85rem;
  line-height: 1.25;
  display: block;
}

.about-highlight-item p {
  font-size: 0.78rem !important;
  line-height: 1.4 !important;
  margin-top: 0.1rem !important;
}

.about-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.about-stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}

.about-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.about-stat-label {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

/* ─── Owner CTA panel (landscape dashboard preview) ─── */
.owner-cta-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.owner-dashboard-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(145deg, #0f2417, #16341f 55%, #10241a);
  box-shadow: 0 20px 45px -15px rgba(16,36,26,0.45), 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,255,255,0.06);
}

.owner-dashboard-preview .browser-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.85rem;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.owner-dashboard-preview .browser-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
}

.owner-dashboard-preview .browser-bar {
  margin-left: 0.5rem;
  flex: 1;
  height: 16px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
}

.owner-dashboard-preview svg {
  display: block;
  width: 100%;
  height: calc(100% - 32px);
}

.owner-cta-btn-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.owner-cta-btn-row .btn { flex-shrink: 0; }

.owner-cta-note {
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* ─── Testimonials ─── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.testimonial-quote-icon {
  font-size: 1.75rem;
  color: var(--primary);
  opacity: 0.3;
  line-height: 1;
}

.testimonial-stars {
  color: var(--warning, #F59E0B);
  font-size: 0.9rem;
  letter-spacing: 2px;
}

.testimonial-text {
  color: var(--gray-600);
  font-size: 0.92rem;
  line-height: 1.65;
  flex: 1;
}

.testimonial-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-100);
}

.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gray-800);
}

.testimonial-location {
  font-size: 0.78rem;
  color: var(--gray-400);
}

/* ─── Property Cards ─── */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.property-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
  min-width: 0;
}

.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.property-img-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.property-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-card:hover .property-img-wrap img {
  transform: scale(1.05);
}

.property-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary);
  color: #fff;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.property-badge.featured { background: var(--accent); }
.property-badge.new { background: var(--warning); color: var(--gray-900); }

.property-save {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray-400);
}

.property-save:hover, .property-save.saved {
  background: #fff;
  color: var(--danger);
  transform: scale(1.1);
}

.property-move-score {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(15,23,42,0.85);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.property-move-score .score-val { color: var(--accent); font-size: 0.95rem; }

.property-body {
  padding: 1.25rem;
}

.property-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.property-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.property-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.property-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--gray-500);
}

.property-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.property-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
}

.property-price span {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-400);
}

.property-card-actions {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  gap: 0.5rem;
}

.property-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
}

.rating-star { color: var(--warning); }

/* ─── CTA Section ─── */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 5rem 0;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.cta-content { position: relative; z-index: 1; }

.cta-title {
  font-size: clamp(1.85rem, 5vw, 3.5rem);
  color: #fff;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Footer ─── */
.footer {
  background: #0F172A;
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 2rem;
}

[data-theme="dark"] .footer {
  background: #080E1A;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer h1, .footer h2, .footer h3, .footer h4, .footer h5, .footer h6 {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.5rem;
  letter-spacing: 0.08em;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.footer-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 1.25rem;
}

.footer-links li { margin-bottom: 0.6rem; }

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-links a:hover { color: #fff; padding-left: 4px; }

.footer-newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.footer-newsletter-input {
  flex: 1 1 140px;
  min-width: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  padding: 0.65rem 1rem;
  color: #fff;
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.footer-newsletter-input::placeholder { color: rgba(255,255,255,0.4); }

.footer-newsletter-input:focus {
  border-color: var(--primary);
  background: rgba(37,99,235,0.1);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: rgba(255,255,255,0.6);
}

.footer-bottom p { font-size: 0.85rem; color: rgba(255,255,255,0.6); }

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  transition: var(--transition-fast);
}

.footer-bottom-links a:hover { color: #fff; }

.footer .footer-heading { color: #fff; }
.footer .footer-links a { color: rgba(255,255,255,0.6); }
.footer .footer-links a:hover { color: #fff; }
.footer .footer-desc { color: rgba(255,255,255,0.65); }
.footer .footer-tagline { color: rgba(255,255,255,0.45); }
.footer .footer-brand-logo { color: #fff; }

/* ─── Page Hero (inner pages) ─── */
.page-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
  padding: calc(var(--nav-height) + 3rem) 1rem 3rem;
  text-align: center;
  margin-bottom: 0;
}

[data-theme="dark"] .page-hero {
  background: linear-gradient(135deg, #080E1A 0%, #1a2a6b 100%);
}

.page-hero h1 {
  font-size: clamp(1.5rem, 5vw, 2.75rem);
  color: #fff;
  margin-bottom: 0.75rem;
  word-wrap: break-word;
}

/* Same look as .page-hero h1, for pages where the real H1 lives further
   down (e.g. the property detail page, where the H1 is the property
   title itself) - a page should only have one H1. */
.page-hero .page-hero-kicker {
  font-size: clamp(1.5rem, 5vw, 2.75rem);
  color: #fff;
  margin-bottom: 0.75rem;
  word-wrap: break-word;
  font-weight: 700;
}

.page-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
}

/* ─── Properties Page ─── */
.properties-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

.filter-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
  height: fit-content;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  min-width: 0;
}

.filter-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-clear {
  font-size: 0.8rem;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
}

.filter-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.filter-group:last-child { border-bottom: none; margin-bottom: 0; }

.filter-group-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-bottom: 0.75rem;
}

.filter-input {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--gray-800);
  background: var(--gray-50);
  outline: none;
  transition: var(--transition);
}

.filter-input:focus {
  border-color: var(--primary);
  background: var(--white);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  padding: 0.4rem 0.9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-chip:hover, .filter-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37,99,235,0.06);
}

.price-range-wrap {
  padding: 0.5rem 0;
}

.price-range-inputs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.price-range-inputs input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.82rem;
  text-align: center;
  outline: none;
  color: var(--gray-800);
  background: var(--gray-50);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.properties-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.properties-count {
  font-size: 0.9rem;
  color: var(--gray-500);
}

.sort-select {
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--gray-700);
  background: var(--white);
  outline: none;
  cursor: pointer;
  max-width: 100%;
}

.view-toggles {
  display: flex;
  gap: 0.35rem;
}

.view-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-400);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.view-toggle.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37,99,235,0.06);
}

/* ─── Property Detail ─── */

/* ─── Lightbox ─── */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10,14,20,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-lightbox[hidden] { display: none; }

.lightbox-stage {
  max-width: 92vw;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close, .lightbox-nav {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.22); }

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.1);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  align-items: start;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.detail-title {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  word-wrap: break-word;
}

.detail-price {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 800;
  color: var(--primary);
  text-align: right;
}

.detail-price span {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-400);
  text-align: right;
}

.detail-meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.detail-meta-item strong { color: var(--gray-900); }

.detail-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gray-900);
  margin: 1.5rem 0 1rem;
}

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem;
  border-radius: var(--radius);
  background: var(--gray-50);
  font-size: 0.875rem;
  color: var(--gray-700);
}

.amenity-item.available { color: var(--accent); }
.amenity-item.unavailable { opacity: 0.4; text-decoration: line-through; }

.nearby-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.nearby-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  min-width: 0;
}

.nearby-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.nearby-name { font-weight: 600; font-size: 0.875rem; color: var(--gray-800); }
.nearby-dist { font-size: 0.78rem; color: var(--gray-400); }

/* Contact Sidebar */
.contact-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
  box-shadow: var(--shadow-md);
}

.contact-landlord {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
}

.landlord-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.landlord-name { font-weight: 700; font-size: 1rem; }
.landlord-role { font-size: 0.8rem; color: var(--gray-400); }
.landlord-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(34,197,94,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-top: 0.25rem;
}

.contact-btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.875rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.contact-btn-call { background: #EEF2FF; color: var(--primary); }
.contact-btn-call:hover { background: var(--primary); color: #fff; }

.contact-btn-whatsapp { background: #F0FDF4; color: #16A34A; }
.contact-btn-whatsapp:hover { background: #16A34A; color: #fff; }

.contact-btn-email { background: var(--gray-100); color: var(--gray-700); }
.contact-btn-email:hover { background: var(--gray-700); color: #fff; }

.viewing-form input,
.viewing-form select,
.viewing-form textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--gray-800);
  background: var(--gray-50);
  outline: none;
  margin-bottom: 0.75rem;
  transition: var(--transition);
  font-family: inherit;
}

.viewing-form input:focus,
.viewing-form select:focus,
.viewing-form textarea:focus {
  border-color: var(--primary);
  background: var(--white);
}

/* Move Score */
.move-score-card {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.move-score-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.move-score-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.move-score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0% 87%, rgba(255,255,255,0.15) 87% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  position: relative;
  flex-shrink: 0;
}

.move-score-circle::before {
  content: '';
  position: absolute;
  inset: 6px;
  background: #1E3A8A;
  border-radius: 50%;
}

.move-score-num {
  position: relative;
  z-index: 1;
}

.move-score-bars { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 0.5rem; }

.score-bar-item { display: flex; align-items: center; gap: 0.5rem; }
.score-bar-label { font-size: 0.75rem; color: rgba(255,255,255,0.65); width: 90px; flex-shrink: 0; }
.score-bar-track { flex: 1; height: 5px; background: rgba(255,255,255,0.15); border-radius: 3px; overflow: hidden; }
.score-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }

/* ─── Map Page ─── */
.map-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: calc(100vh - var(--nav-height));
  margin-top: var(--nav-height);
}

.map-sidebar {
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--gray-200);
}

.map-search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
}

.map-search-bar input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.875rem;
  color: var(--gray-800);
}

.map-filters {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.map-filter-chip {
  flex-shrink: 0;
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  background: var(--white);
}

.map-filter-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37,99,235,0.06);
}

.map-listings {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.map-listing-card {
  display: flex;
  gap: 1rem;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  min-width: 0;
}

.map-listing-card:hover, .map-listing-card.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.map-listing-img {
  width: 90px;
  height: 75px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.map-listing-info { flex: 1; min-width: 0; }
.map-listing-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-listing-loc {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-bottom: 0.4rem;
}

.map-listing-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
}

.map-container {
  position: relative;
  background: #E8F0FE;
  overflow: hidden;
}

.map-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
}

.map-marker-demo {
  position: absolute;
  background: var(--primary);
  color: #fff;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.map-marker-demo:hover {
  background: var(--secondary);
  transform: translateY(-3px);
}

.map-marker-demo::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--primary);
}

.map-marker-demo:hover::after { border-top-color: var(--secondary); }

/* ─── Profile Page ─── */
.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

.profile-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
  height: fit-content;
}

.profile-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 1rem;
}

.profile-cover {
  height: 100px;
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
}

.profile-info {
  padding: 0 1.5rem 1.5rem;
  text-align: center;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  border: 4px solid var(--white);
  margin: -45px auto 1rem;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.profile-email { font-size: 0.875rem; color: var(--gray-400); word-break: break-word; }

.profile-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(34,197,94,0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-top: 0.75rem;
}

.profile-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition-fast);
  margin-bottom: 0.25rem;
}

.profile-nav-item:hover, .profile-nav-item.active {
  background: rgba(37,99,235,0.08);
  color: var(--primary);
}

.profile-nav-item .icon { font-size: 1.1rem; }

.dashboard-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  min-width: 0;
  overflow-x: auto;
}

.dashboard-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

.stat-card-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-card-label { font-size: 0.8rem; color: var(--gray-400); }

/* QR Code */
.qr-section {
  text-align: center;
}

.qr-code-wrap {
  width: 180px;
  height: 180px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  margin: 1.25rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--gray-400);
  background: var(--gray-50);
  position: relative;
  overflow: hidden;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 12px;
}

.qr-cell {
  aspect-ratio: 1;
  border-radius: 1px;
}

.qr-btns {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Bills Table */
.bills-table {
  width: 100%;
  border-collapse: collapse;
}

.bills-table th {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid var(--gray-200);
}

.bills-table td {
  padding: 0.875rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}

.bill-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.bill-status.paid { background: rgba(34,197,94,0.1); color: var(--accent-dark); }
.bill-status.pending { background: rgba(245,158,11,0.1); color: var(--warning); }
.bill-status.overdue { background: rgba(239,68,68,0.1); color: var(--danger); }

/* ─── Login/Register ─── */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  position: relative;
  overflow: hidden;
}

.auth-left-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-left-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.85) 0%, rgba(37,99,235,0.6) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
}

.auth-left h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: #fff;
  margin-bottom: 0.75rem;
}

.auth-left p { color: rgba(255,255,255,0.75); font-size: 1.05rem; }

/* ─── Auth carousel (login/register left panel) ─── */
.auth-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.auth-slide.active { opacity: 1; }

.auth-slide-copy h2,
.auth-slide-copy p {
  transition: opacity 0.4s ease;
}

.auth-carousel-dots {
  display: flex;
  gap: 0.4rem;
  margin-top: 1.25rem;
}
.auth-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: var(--transition-fast);
}
.auth-carousel-dot.active { background: #fff; width: 22px; border-radius: 4px; }

/* ─── Infinite scrolling testimonials ─── */
.auth-testimonial-viewport {
  margin-top: 1.75rem;
  height: 168px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
}
.auth-testimonial-track {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: auth-testimonial-scroll 22s linear infinite;
}
.auth-testimonial-viewport:hover .auth-testimonial-track {
  animation-play-state: paused;
}
@keyframes auth-testimonial-scroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
.auth-testimonial-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.18);
  flex-shrink: 0;
}
.auth-testimonial-card .t-head {
  display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.5rem;
}
.auth-testimonial-card .t-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
}
.auth-testimonial-card .t-name { font-weight: 700; color: #fff; font-size: 0.82rem; }
.auth-testimonial-card .t-role { font-size: 0.72rem; color: rgba(255,255,255,0.55); }
.auth-testimonial-card p { font-size: 0.8rem; color: rgba(255,255,255,0.85); line-height: 1.5; }
.auth-testimonial-card .t-stars { color: var(--warning); font-size: 0.75rem; margin-top: 0.4rem; }

.auth-logo-mark {
  height: 40px;
  width: auto;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.auth-logo-mark img { height: 100%; width: auto; display: block; object-fit: contain; }

/* Version shown over the dark photo overlay on the left panel — the logo's
   navy mark needs a light backdrop to stay legible there. */
.auth-logo-mark--panel {
  height: 46px;
  background: #fff;
  padding: 7px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--light-bg);
}

.auth-form-wrap {
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.auth-logo img { height: 200px; width: auto; display: block; object-fit: contain; }

.auth-title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--gray-500);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .auth-right { padding: 2.25rem 1.25rem; }
  .auth-logo { margin-bottom: 1.25rem; }
  .auth-logo img { height: 150px; }
  .auth-title { font-size: 1.4rem; }
  .auth-subtitle { margin-bottom: 1.5rem; }
}

@media (max-width: 400px) {
  .auth-right { padding: 1.75rem 1rem; }
  .auth-logo img { height: 160px; }
  .auth-title { font-size: 1.25rem; }
}

@media (max-width: 700px) {
  .auth-right { padding: 1.75rem 1rem; }
  .auth-logo img { height: 160px; }
  .auth-title { font-size: 1.25rem; }
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--gray-800);
  background: var(--white);
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-input-icon {
  position: relative;
}

.form-input-icon .form-input { padding-left: 2.75rem; }

.form-input-icon .icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1rem;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  cursor: pointer;
}

.form-checkbox input { accent-color: var(--primary); }

.form-forgot {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition-fast);
}

.form-forgot:hover { color: var(--primary-dark); }

.auth-divider {
  text-align: center;
  position: relative;
  margin: 1.5rem 0;
  color: var(--gray-400);
  font-size: 0.875rem;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-200);
}

.auth-divider span {
  background: var(--light-bg);
  padding: 0 1rem;
  position: relative;
}

.social-btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition-fast);
  background: var(--white);
  font-family: inherit;
}

.social-btn:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
  transform: translateY(-1px);
}

.auth-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.auth-link a {
  color: var(--primary);
  font-weight: 600;
}

/* ─── Misc Utilities ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-primary { background: rgba(37,99,235,0.1); color: var(--primary); }
.badge-accent { background: rgba(34,197,94,0.1); color: var(--accent-dark); }
.badge-warning { background: rgba(245,158,11,0.1); color: var(--warning); }

.tag {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
}

.divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 1.5rem 0;
}

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--gray-400); }

.loading-shimmer {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Profile Dropdown ─── */
.profile-dropdown {
  position: relative;
}

.profile-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: var(--transition-fast);
  overflow: hidden;
  flex-shrink: 0;
}

.navbar.scrolled .profile-icon-btn,
.navbar.solid .profile-icon-btn {
  background: rgba(37,99,235,0.08);
  border-color: var(--gray-200);
}

.profile-icon-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

.navbar.scrolled .profile-icon-btn:hover,
.navbar.solid .profile-icon-btn:hover {
  background: rgba(37,99,235,0.15);
}

.profile-icon-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-icon-fallback {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.navbar.scrolled .profile-icon-fallback,
.navbar.solid .profile-icon-fallback {
  color: var(--primary);
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition-fast);
  z-index: 1100;
}

.profile-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown-header {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 0.4rem;
}

.profile-dropdown-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown-email {
  font-size: 0.78rem;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.875rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: var(--transition-fast);
}

.profile-dropdown-item:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 0.4rem 0;
}

.profile-dropdown-danger:hover {
  background: rgba(239,68,68,0.08);
  color: var(--danger);
}

[data-theme="dark"] .profile-dropdown-menu {
  background: #242526;
  border-color: #3A3B3C;
}

[data-theme="dark"] .profile-dropdown-header {
  border-color: #3A3B3C;
}

[data-theme="dark"] .profile-dropdown-item {
  color: #CED0D4;
}

[data-theme="dark"] .hero-search-select {
  background: #1c1d1f;
  color: #E4E6EB;
  border: 1px solid #3A3B3C;
}

[data-theme="dark"] .hero-search-select option {
  background: #1c1d1f;
  color: #E4E6EB;
}

[data-theme="dark"] .profile-dropdown-item:hover {
  background: #2D2E30;
}

@media (max-width: 480px) {
  .profile-dropdown-menu {
    position: fixed;
    top: var(--nav-height);
    right: 0.75rem;
    left: 0.75rem;
    min-width: 0;
  }
}

/* ─── Dark mode explicit overrides ─── */
[data-theme="dark"] body {
  background: #18191A;
  color: var(--gray-800);
}

[data-theme="dark"] .property-card,
[data-theme="dark"] .filter-sidebar,
[data-theme="dark"] .contact-card,
[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .map-sidebar,
[data-theme="dark"] .stat-card {
  background: #242526;
  border-color: #3A3B3C;
}

[data-theme="dark"] .property-name,
[data-theme="dark"] .dashboard-card-title,
[data-theme="dark"] .profile-name,
[data-theme="dark"] .filter-title,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: #F0F2F5;
}

[data-theme="dark"] .section {
  background: #18191A;
}

[data-theme="dark"] .map-search-bar {
  background: #2D2E30;
}

[data-theme="dark"] .map-listing-card {
  background: #242526;
  border-color: #3A3B3C;
}

[data-theme="dark"] .map-listing-card:hover,
[data-theme="dark"] .map-listing-card.active {
  border-color: var(--primary);
}

[data-theme="dark"] .mobile-menu a {
  color: var(--gray-700);
}

[data-theme="dark"] .mobile-menu {
  background: rgba(24,25,26,0.99);
  border-color: #3A3B3C;
}

[data-theme="dark"] .auth-right {
  background: #18191A;
}

[data-theme="dark"] .form-input {
  background: #2D2E30;
  border-color: #3A3B3C;
  color: #E4E6EB;
}

[data-theme="dark"] .form-input:focus {
  background: #242526;
  border-color: var(--primary);
}

[data-theme="dark"] .social-btn {
  background: #2D2E30;
  border-color: #3A3B3C;
  color: #CED0D4;
}

[data-theme="dark"] .social-btn:hover {
  background: #3A3B3C;
}

[data-theme="dark"] .auth-divider span {
  background: #18191A;
}

[data-theme="dark"] .filter-input,
[data-theme="dark"] .sort-select,
[data-theme="dark"] .viewing-form input,
[data-theme="dark"] .viewing-form select,
[data-theme="dark"] .viewing-form textarea {
  background: #2D2E30;
  border-color: #3A3B3C;
  color: #E4E6EB;
}

[data-theme="dark"] .filter-chip {
  border-color: #3A3B3C;
  color: #9A9B9D;
  background: #2D2E30;
}

[data-theme="dark"] .map-filter-chip {
  background: #2D2E30;
  border-color: #3A3B3C;
  color: #9A9B9D;
}

[data-theme="dark"] .tag {
  background: #2D2E30;
  color: #9A9B9D;
}

[data-theme="dark"] .amenity-item {
  background: #2D2E30;
  color: #CED0D4;
}

[data-theme="dark"] .nearby-item {
  background: #242526;
  border-color: #3A3B3C;
}

[data-theme="dark"] .bills-table th {
  color: #6B6C6E;
}

[data-theme="dark"] .bills-table td {
  color: #B0B3B8;
  border-color: #2D2E30;
}

[data-theme="dark"] .profile-nav-item {
  color: #9A9B9D;
}

[data-theme="dark"] .profile-nav-item:hover,
[data-theme="dark"] .profile-nav-item.active {
  background: rgba(37,99,235,0.15);
  color: var(--primary);
}

[data-theme="dark"] .progress-bar-wrap {
  background: #3A3B3C;
}

[data-theme="dark"] .qr-canvas-wrap {
  border-color: #3A3B3C;
  background: #fff;
}

/* Scroll animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.4s; }

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--secondary);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 240px;
  max-width: min(90vw, 360px);
  pointer-events: auto;
}

.toast.show { transform: translateX(0); }
.toast-icon { font-size: 1.2rem; flex-shrink: 0; }

/* ============================================
   RESPONSIVE — progressively tightened
   ============================================ */

@media (max-width: 1100px) {
  .detail-layout { grid-template-columns: 1fr 320px; gap: 1.75rem; }
}

@media (max-width: 1024px) {
  .category-card { flex-basis: calc(33.333% - 0.834rem); max-width: calc(33.333% - 0.834rem); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .properties-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .properties-layout { grid-template-columns: 240px 1fr; }
  .detail-layout { grid-template-columns: 1fr 300px; }
  .auth-layout { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 240px 1fr; }
  .map-layout { grid-template-columns: 300px 1fr; }
}

@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .contact-card { position: static; }
  .properties-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
}

@media (max-width: 860px) {
  :root { --nav-height: 72px; }

  .move-score-section-grid { grid-template-columns: 1fr !important; gap: 2rem !important; }

  .nav-menu, .nav-actions { display: none; }
  .hamburger { display: flex; }

  .nav-logo-img { height: 62px; max-width: 210px; }

  .hero { min-height: 560px; }
  .hero-stats { display: none; }
  .hero-content { padding-left: 1rem; padding-right: 1rem; }

  .category-card { flex-basis: calc(50% - 0.625rem); max-width: calc(50% - 0.625rem); }
  .features-grid { grid-template-columns: 1fr; }
  .properties-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }

  .amenities-grid { grid-template-columns: repeat(2, 1fr); }
  .nearby-grid { grid-template-columns: 1fr; }

  .map-layout { grid-template-columns: 1fr; grid-template-rows: 280px 1fr; height: auto; min-height: calc(100vh - var(--nav-height)); }

  .auth-layout { grid-template-columns: 1fr; }
  .auth-left { display: none; }

  .stat-cards-grid { grid-template-columns: repeat(2, 1fr); }

  .section { padding: 3.5rem 0; }
}

@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }

  /* Quick Actions / Residence summary grids were fixed at 3-4 columns via
     inline styles — collapse them so nothing gets squeezed on phones. */
  .residence-meta-grid,
  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Rent Summary (3 cards) & Bill Stats (4 numbers) — keep them on one row
     but shrink padding/gap/font so they actually fit instead of overflowing. */
  .rent-summary-grid {
    gap: 0.5rem !important;
  }
  .rent-summary-grid .dashboard-card {
    padding: 0.75rem 0.4rem !important;
  }
  .rent-summary-amount { font-size: 1rem !important; }
  .rent-summary-label { font-size: 0.65rem !important; }

  .bill-stats-grid {
    gap: 0.4rem !important;
    padding: 0.75rem 0.5rem !important;
  }
  .bill-stat-num { font-size: 1rem !important; }
  .bill-stat-label { font-size: 0.68rem !important; }

  /* Bills table -> stacked cards on phones instead of a horizontally
     scrolling table. */
  .bills-table thead { display: none; }
  .bills-table, .bills-table tbody, .bills-table tr, .bills-table td {
    display: block;
    width: 100%;
  }
  .bills-table tr {
    margin-bottom: 0.875rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
  }
  .bills-table td {
    border-bottom: none !important;
    padding: 0.4rem 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    text-align: right;
  }
  .bills-table td[colspan] { display: block; text-align: center; }
  .bills-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-400);
    text-align: left;
    flex-shrink: 0;
    padding-top: 0.15rem;
  }
  .bills-table td:first-child {
    display: block;
    text-align: left;
    font-weight: 600;
    padding-bottom: 0.6rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid var(--gray-100);
  }
  .bills-table td:first-child::before { content: none; }

  .hero { min-height: 540px; }
  .hero-title { margin-bottom: 0.9rem; }
  .hero-subtitle { margin-bottom: 1.5rem; }
  .hero-buttons { gap: 0.75rem; margin-bottom: 1.75rem; }
  .hero-buttons .btn { flex: 1 1 auto; }

  .hero-search {
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    border-radius: var(--radius-lg);
    gap: 0.5rem;
  }
  .hero-search-icon { display: none; }
  .hero-search-input { flex: 1 1 auto; width: 100%; text-align: left; padding: 0.7rem 0.85rem; background: rgba(255,255,255,0.08); border-radius: var(--radius); }
  .hero-search-divider { display: none; }
  .hero-search-select { flex: 1 1 auto; width: 100%; max-width: 100%; }
  .hero-search .btn { width: 100%; }

  .categories-grid { gap: 1rem; }
  .category-card { flex-basis: calc(50% - 0.5rem); max-width: calc(50% - 0.5rem); }
  .properties-grid { grid-template-columns: 1fr; }

  /* Compact list rows on phones: small image left, title/price/location
     right, instead of one tall image-on-top card per screen. Excludes
     .mobile-carousel-grid (homepage featured strip), which is its own
     swipeable card carousel and should keep its normal card layout. */
  .properties-grid:not(.mobile-carousel-grid) .property-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 108px;
    cursor: pointer;
  }
  .properties-grid:not(.mobile-carousel-grid) .property-img-wrap {
    width: 108px;
    height: 108px;
    flex-shrink: 0;
  }
  .properties-grid:not(.mobile-carousel-grid) .property-card .property-badge,
  .properties-grid:not(.mobile-carousel-grid) .property-card .property-move-score,
  .properties-grid:not(.mobile-carousel-grid) .property-meta,
  .properties-grid:not(.mobile-carousel-grid) .property-rating,
  .properties-grid:not(.mobile-carousel-grid) .property-card-actions {
    display: none !important;
  }
  .properties-grid:not(.mobile-carousel-grid) .property-card .property-save {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    top: 0.35rem;
    right: 0.35rem;
  }
  .properties-grid:not(.mobile-carousel-grid) .property-body {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
  }
  .properties-grid:not(.mobile-carousel-grid) .property-name {
    font-size: 0.9rem;
    margin-bottom: 0;
    width: 100%;
  }
  .properties-grid:not(.mobile-carousel-grid) .property-footer {
    order: 2;
    padding-top: 0;
    border-top: none;
    justify-content: flex-start;
  }
  .properties-grid:not(.mobile-carousel-grid) .property-price { font-size: 0.92rem; }
  .properties-grid:not(.mobile-carousel-grid) .property-location {
    order: 3;
    margin-bottom: 0;
    display: block;
    width: 100%;
    background: none;
    color: var(--gray-500);
    font-size: 0.75rem;
    padding: 0;
    border-radius: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .testimonials-grid { grid-template-columns: 1fr; }
  .about-stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .about-highlights { grid-template-columns: 1fr; }
  .owner-cta-btn-row { flex-direction: column; align-items: stretch; }
  .owner-cta-btn-row .btn { width: 100%; justify-content: center; }

  .lightbox-nav { width: 40px; height: 40px; font-size: 1.5rem; }
  .lightbox-close { top: 0.75rem; right: 0.75rem; }

  .detail-header { flex-direction: column; align-items: flex-start; }
  .detail-price, .detail-price span { text-align: left; }

  .move-score-main { flex-direction: column; align-items: flex-start; }
  .move-score-bars { width: 100%; min-width: 0; }

  .nearby-grid, .amenities-grid { grid-template-columns: 1fr; }

  .stat-cards-grid { grid-template-columns: 1fr; }

  .profile-info { padding: 0 1rem 1.5rem; }

  .qr-btns { flex-direction: column; }
  .qr-btns .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  :root { --nav-height: 66px; }
  html { font-size: 15px; }

  .container { padding: 0 1rem; }
  .nav-container { padding: 0 1rem; }

  .nav-logo-img { height: 54px; max-width: 190px; }

  .section { padding: 3rem 0; }
  .section-subtitle { margin-bottom: 2rem; font-size: 1rem; }

  .hero { min-height: 520px; }
  .hero-badge { font-size: 0.72rem; padding: 0.35rem 0.85rem; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .hero-buttons .btn { justify-content: center; }

  .categories-grid { gap: 0.75rem; }
  .category-card { flex-basis: calc(50% - 0.375rem); max-width: calc(50% - 0.375rem); }
  .category-card { padding: 1.25rem 0.75rem; }
  .category-icon { font-size: 2rem; }

  .feature-card { padding: 1.5rem; }

  .cta-section { padding: 3.5rem 0; }
  .cta-content > div { flex-direction: column; }

  .footer { padding: 3rem 0 1.5rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .page-hero { padding: calc(var(--nav-height) + 2rem) 1rem 2rem; }

  .detail-meta { gap: 0.875rem; }

  .contact-card, .dashboard-card { padding: 1.25rem; }

  .mobile-menu { padding: 1.25rem; }

  .toast-container { left: 1rem; right: 1rem; bottom: 1rem; align-items: stretch; }
  .toast { min-width: 0; max-width: 100%; width: 100%; }
}

@media (max-width: 380px) {
  .hero-title { font-size: clamp(1.6rem, 8vw, 2.2rem); }
  .nav-logo { font-size: 1.25rem; }
  .nav-logo-icon { width: 32px; height: 32px; font-size: 1rem; }

  .residence-meta-grid,
  .rent-summary-grid,
  .bill-stats-grid {
    grid-template-columns: 1fr !important;
  }
  .rent-summary-amount { font-size: 1.3rem !important; }
  .bill-stat-num { font-size: 1.15rem !important; }
}

/* ─── Reusable auto-advancing carousel/slider ─── */
.tuhame-carousel-wrap {
  position: relative;
}
.tuhame-carousel-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0.25rem 1rem;
  scrollbar-width: thin;
}
.tuhame-carousel-track::-webkit-scrollbar { height: 6px; }
.tuhame-carousel-track::-webkit-scrollbar-thumb { background: var(--gray-300, #d1d5db); border-radius: 3px; }
.tuhame-carousel-track::-webkit-scrollbar-track { background: transparent; }
.tuhame-carousel-track > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
}
.tuhame-carousel-nav {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  border: 1px solid var(--gray-200, #e5e7eb);
  font-size: 1rem;
  color: var(--gray-700, #374151);
  transition: var(--transition-fast, all 0.15s ease);
}
.tuhame-carousel-nav:hover { background: var(--primary, #2563EB); color: #fff; border-color: var(--primary, #2563EB); }
.tuhame-carousel-nav.prev { left: -6px; }
.tuhame-carousel-nav.next { right: -6px; }
@media (max-width: 640px) {
  .tuhame-carousel-nav { display: none; }
}

/* ─── Auto-scrolling partner logos marquee ─── */
.partners-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.partners-track {
  display: flex;
  width: max-content;
  gap: 1.25rem;
  padding: 0.25rem 0.25rem 0.5rem;
  animation: partners-scroll 30s linear infinite;
}
.partners-marquee:hover .partners-track { animation-play-state: paused; }
@keyframes partners-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .partners-track { animation: none; overflow-x: auto; }
}

/* Partner logo mark: icon + wordmark, grayscale until hovered */
.partner-logo-card {
  width: 168px;
  height: 96px;
  flex: 0 0 auto;
  background: var(--white, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--partner-color, var(--gray-500));
  filter: grayscale(1);
  opacity: 0.75;
  transition: var(--transition-fast, all 0.15s ease);
}
.partner-logo-card:hover {
  filter: grayscale(0);
  opacity: 1;
  border-color: var(--partner-color, var(--primary));
  transform: translateY(-2px);
}
.partner-logo-icon { width: 26px; height: 26px; flex-shrink: 0; }
.partner-logo-img {
  max-width: 100px;
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.partner-logo-link {
  display: contents;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.partner-logo-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: -0.01em;
  text-align: center;
  line-height: 1.15;
  padding: 0 0.5rem;
}

/* Property image slider (property detail page) */
.property-image-slider .tuhame-carousel-track > * {
  width: 100%;
  scroll-snap-align: center;
}

/* ─── Turn any grid into a swipeable one-row carousel on phones ─── */
@media (max-width: 640px) {
  .mobile-carousel-grid {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 0.25rem 1rem;
    scrollbar-width: thin;
  }
  .mobile-carousel-grid::-webkit-scrollbar { height: 6px; }
  .mobile-carousel-grid::-webkit-scrollbar-thumb { background: var(--gray-300, #d1d5db); border-radius: 3px; }
  .mobile-carousel-grid::-webkit-scrollbar-track { background: transparent; }
  .mobile-carousel-grid > * {
    flex: 0 0 82%;
    max-width: 82%;
    scroll-snap-align: start;
  }
}
/* ══════════════════ BLOG ══════════════════ */

.blog-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.blog-filter-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.2rem 0.1rem;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  /* Without these two, a horizontal drag that starts on the pills can
     "escape" into the page itself on mobile once it reaches its own
     scroll edge — overscroll-behavior-x stops that hand-off at the
     boundary, touch-action tells the browser upfront that this element
     owns horizontal panning so it never even considers the page. */
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

.blog-filter-pills::-webkit-scrollbar { display: none; }

.blog-pill {
  flex-shrink: 0;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.blog-pill:hover { border-color: var(--primary); color: var(--primary); }

.blog-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.blog-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  flex-shrink: 0;
}

.blog-search-box input {
  border: none;
  outline: none;
  font-size: 0.85rem;
  width: 180px;
  background: transparent;
  color: var(--gray-800);
}

.blog-search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

/* Featured post */
.blog-featured-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  margin-bottom: 3rem;
  transition: var(--transition);
}

.blog-featured-card:hover { box-shadow: var(--shadow-lg); }

.blog-featured-img {
  height: 100%;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  background-color: var(--gray-100);
}

.blog-featured-body { padding: 1rem 2.5rem 1rem 0; }

.blog-featured-eyebrow {
  display: inline-block;
  background: rgba(37,99,235,0.1);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.blog-featured-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.blog-featured-excerpt {
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Grid of cards */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.blog-card-img {
  position: relative;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--gray-100);
}

.blog-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.blog-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
}

.blog-card-category {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(15,23,42,0.75);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.blog-card-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  color: var(--gray-500);
  font-size: 0.87rem;
  line-height: 1.55;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: auto;
}

.blog-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--gray-400);
}

.blog-empty-state h3 { color: var(--gray-700); margin: 0.5rem 0; }

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.blog-pagination a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

/* ─── Blog Detail / Article ─── */
.blog-article-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
  padding: calc(var(--nav-height) + 3rem) 1rem 3rem;
}

[data-theme="dark"] .blog-article-hero {
  background: linear-gradient(135deg, #080E1A 0%, #1a2a6b 100%);
}

.blog-article-hero-inner { max-width: 760px; margin: 0 auto; }

.blog-article-breadcrumb {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.25rem;
}

.blog-article-breadcrumb a { color: rgba(255,255,255,0.85); text-decoration: none; }

.blog-article-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.blog-article-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  align-items: center;
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
}

.blog-article-cover {
  max-width: 900px;
  margin: -2.5rem auto 0;
  padding: 0 1rem;
}

.blog-article-cover img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: block;
}

.blog-article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.blog-article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--gray-700);
}

.blog-article-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 2.25rem 0 1rem;
}

.blog-article-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 1.75rem 0 0.85rem;
}

.blog-article-content p { margin-bottom: 1.25rem; }

.blog-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
}

.blog-article-content ul, .blog-article-content ol {
  margin: 0 0 1.25rem 1.25rem;
}

.blog-article-content li { margin-bottom: 0.5rem; }

.blog-article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 1.75rem 0;
  color: var(--gray-600);
  font-style: italic;
}

.blog-article-content a { color: var(--primary); text-decoration: underline; }

.blog-article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.blog-article-content table td, .blog-article-content table th {
  border: 1px solid var(--gray-200);
  padding: 0.6rem 0.85rem;
}

.blog-share-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--gray-200);
}

.blog-share-label { font-size: 0.85rem; font-weight: 700; color: var(--gray-600); margin-right: 0.25rem; }

.blog-share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  color: var(--gray-600);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.blog-share-btn:hover { background: var(--primary); color: #fff; }

.blog-related {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1rem 4rem;
}

.blog-related h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
}

.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-related-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-featured-card { grid-template-columns: 1fr; }
  .blog-featured-body { padding: 0 1.5rem 1.75rem; }
  .blog-featured-img { min-height: 220px; }
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-related-grid { grid-template-columns: 1fr; }
  .blog-filter-bar { flex-direction: column; align-items: stretch; }
  .blog-search-box { width: 100%; }
  .blog-search-box input { width: 100%; }
  .blog-article-title { font-size: 1.5rem; }
  .blog-article-body { padding: 2rem 1rem; }
  .blog-article-content { font-size: 1rem; }
  .blog-article-cover { margin-top: -1.5rem; }
  .blog-article-cover img { max-height: 260px; }
}

/* ─── Legal pages (Terms of Service / Privacy Policy) ─── */
.legal-page {
  padding: 7rem 0 4rem;
}

.legal-container {
  max-width: 760px;
}

.legal-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.legal-updated {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.legal-notice {
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: #78350F;
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 2rem 0 0.75rem;
}

.legal-page p {
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.legal-page a {
  color: var(--primary);
  text-decoration: underline;
}

/* ─── Blog detail: newsletter signup ─── */
.blog-newsletter-section {
  background: var(--primary);
  padding: 3rem 0;
}

.blog-newsletter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.blog-newsletter-heading {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.blog-newsletter-copy {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
}

.blog-newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.blog-newsletter-input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .blog-newsletter-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    text-align: center;
  }
  .blog-newsletter-form {
    flex-direction: column;
  }
}

@media (max-width: 400px) {
  .blog-newsletter-section { padding: 2rem 0; }
  .blog-newsletter-heading { font-size: 1.3rem; }
}

/* ─── Blog detail: main + sidebar layout ─── */
.blog-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 3rem;
  align-items: start;
}

.blog-article-layout .blog-article-body {
  min-width: 0;
}

@media (max-width: 960px) {
  .blog-article-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ─── Sidebar ─── */
.blog-sidebar {
  position: sticky;
  top: calc(var(--nav-height, 72px) + 1rem);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

@media (max-width: 960px) {
  .blog-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .blog-sidebar-widget { flex: 1 1 260px; }
}

@media (max-width: 560px) {
  .blog-sidebar { flex-direction: column; }
}

.blog-sidebar-widget {
  background: var(--gray-50, #F9FAFB);
  border: 1px solid var(--gray-200, #E5E7EB);
  border-radius: var(--radius-lg, var(--radius));
  padding: 1.25rem;
}

[data-theme="dark"] .blog-sidebar-widget {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
}

.blog-sidebar-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.blog-sidebar-posts {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.blog-sidebar-post {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: inherit;
}

.blog-sidebar-post-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
}

.blog-sidebar-post-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-200, #E5E7EB);
  color: var(--gray-400);
  font-size: 1.25rem;
}

.blog-sidebar-post-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--gray-900);
}

.blog-sidebar-post:hover .blog-sidebar-post-title {
  color: var(--primary);
}

.blog-sidebar-post-date {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
}

.blog-sidebar-categories {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.blog-sidebar-categories a {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.blog-sidebar-categories a:hover {
  color: var(--primary);
}

/* ─── Like button ─── */
.blog-like-form { display: inline-block; }

.blog-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.blog-like-btn .lucide-icon {
  color: var(--gray-400);
  transition: var(--transition);
}

.blog-like-btn.liked .lucide-icon,
.blog-like-btn:hover .lucide-icon {
  color: #EF4444;
}

/* ─── Comments ─── */
.blog-comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200, #E5E7EB);
}

[data-theme="dark"] .blog-comments {
  border-color: rgba(255,255,255,0.08);
}

.blog-comments-heading {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.blog-comment-form textarea {
  resize: vertical;
  min-height: 5rem;
}

.blog-comment-form button {
  align-self: flex-end;
}

.blog-comment-login-prompt {
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--gray-50, #F9FAFB);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--gray-600);
}

[data-theme="dark"] .blog-comment-login-prompt {
  background: rgba(255,255,255,0.03);
}

.blog-comment-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-comment {
  display: flex;
  gap: 0.9rem;
}

.blog-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.blog-comment-body { min-width: 0; flex: 1; }

.blog-comment-meta {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.blog-comment-author {
  font-weight: 600;
  font-size: 0.9rem;
}

.blog-comment-date {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.blog-comment-text {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.6;
  word-break: break-word;
}

.blog-comment-empty {
  color: var(--gray-500);
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .blog-comment-form button { align-self: stretch; }
}

/* ─── Property detail: main image + thumbnail-row gallery ─── */
.property-gallery-new {
  margin-bottom: 1.5rem;
}

.gallery-main-frame {
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: var(--radius-lg, var(--radius));
  overflow: hidden;
  cursor: pointer;
  background: var(--gray-100, #F3F4F6);
}

.gallery-main-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-main-counter {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(15,23,42,0.7);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.gallery-expand-btn {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(15,23,42,0.7);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-expand-btn:hover { background: rgba(15,23,42,0.9); }

.gallery-thumb-row {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.75rem 0.1rem;
  scrollbar-width: thin;
}

.gallery-thumb-row::-webkit-scrollbar { height: 6px; }
.gallery-thumb-row::-webkit-scrollbar-thumb {
  background: var(--gray-300, #D1D5DB);
  border-radius: 999px;
}

.gallery-thumb {
  flex-shrink: 0;
  width: 90px;
  height: 68px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  opacity: 0.65;
  transition: var(--transition);
  background: none;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb:hover { opacity: 0.9; }

.gallery-thumb.active {
  opacity: 1;
  border-color: var(--primary);
}

@media (max-width: 860px) {
  .gallery-main-frame { height: 340px; }
  .gallery-thumb { width: 72px; height: 54px; }
}

@media (max-width: 480px) {
  .gallery-main-frame { height: 240px; border-radius: var(--radius); }
  .gallery-thumb { width: 60px; height: 46px; }
  .gallery-expand-btn { width: 34px; height: 34px; }
  .gallery-main-counter { font-size: 0.7rem; padding: 0.25rem 0.55rem; }
}
