/* REFERENCE-BASED BOXED LAYOUT - COMPLETELY NEW FROM SCRATCH */

/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Design System Based on Reference Image */
:root {
  /* Colors from Reference */
  --primary-blue: #4f46e5;
  --secondary-blue: #6366f1;
  --success-green: #10B981;
  --warning-orange: #F59E0B;
  --danger-red: #EF4444;
  
  /* Neutral Colors */
  --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;
  
  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Main Container */
.reference-layout {
  min-height: 100vh;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: var(--space-6);
  overflow-x: hidden;
}

/* Homepage: keep default reference-layout background; only adjust padding/overflow via home-hero-overlay in CRA styles */

/* Dashboard-specific layout: let dashboard control its own background */
.dashboard-layout {
  background: transparent;
  padding: 0;
  position: relative;
  /* Allow vertical scrolling but clamp any horizontal overflow so dashboard never shows an x-scrollbar */
  overflow-x: hidden;
}

.dashboard-layout .ref-footer {
  display: none;
}

.maintenance-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 9, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;
}

.maintenance-card {
  max-width: 520px;
  text-align: center;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(2, 6, 23, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  color: #f3f4f6;
}

.maintenance-card h1 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.maintenance-card p {
  color: #cbd5f5;
  font-size: 0.95rem;
}

/* Admin layout: no animated background */
.admin-layout::before,
.admin-layout::after {
  display: none !important;
}

.dashboard-layout:not(.admin-layout)::before,
.dashboard-layout:not(.admin-layout)::after {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 999px;
  filter: blur(42px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.dashboard-layout:not(.admin-layout)::before {
  top: -140px;
  left: -120px;
  background:
    radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.7), transparent 62%),
    radial-gradient(circle at 70% 80%, rgba(129, 140, 248, 0.8), transparent 68%);
  animation: homePastelDrift1 46s ease-in-out infinite alternate;
}

.dashboard-layout:not(.admin-layout)::after {
  bottom: -140px;
  right: -120px;
  background:
    radial-gradient(circle at 30% 30%, rgba(251, 113, 133, 0.7), transparent 62%),
    radial-gradient(circle at 70% 80%, rgba(96, 165, 250, 0.8), transparent 68%);
  animation: homePastelDrift2 60s ease-in-out infinite alternate;
}

/* legacy .home-aura-shell is no-op now (kept only if used elsewhere) */
.home-aura-shell::before,
.home-aura-shell::after {
  content: none;
}

/* Section Wrapper - Creates Modern Card Effect */
.ref-section-wrapper {
  background: #ffffff;
  border-radius: 22px;
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  box-shadow:
    10px 10px 24px rgba(163, 177, 198, 0.7),
    -10px -10px 24px rgba(255, 255, 255, 0.9);
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-hero-overlay .ref-section-wrapper {
  background: transparent;
  box-shadow: none;
  border: 1px solid rgba(190, 190, 190, 0.65);
}

.home-hero-overlay .ref-section-wrapper:first-of-type {
  margin-top: var(--space-6);
  position: relative;
  z-index: 2;
}

.ref-section-wrapper:hover {
  transform: translateY(-2px);
  box-shadow:
    12px 12px 28px rgba(163, 177, 198, 0.75),
    -12px -12px 28px rgba(255, 255, 255, 0.95);
}

.home-hero-overlay .ref-section-wrapper:hover {
  transform: none;
  box-shadow: none;
}

/* Homepage premium info row (stats + about PrimPlot) */
.home-premium-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: stretch;
}

.home-premium-shell {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.home-premium-header {
  max-width: 720px;
}

.home-premium-header .home-premium-title {
  color: #0f172a;
}

.home-premium-header .home-premium-subtitle {
  color: var(--gray-600);
}

.home-premium-left,
.home-premium-right {
  display: flex;
}

.home-premium-left {
  flex-direction: column;
  gap: var(--space-4);
}

.home-premium-right {
  justify-content: flex-end;
}

.home-premium-main-stat {
  border-radius: 20px;
  padding: var(--space-5);
  background: radial-gradient(circle at 0% 0%, #0b1120, #020617);
  box-shadow:
    0 18px 40px rgba(17, 24, 39, 0.65),
    0 0 0 1px rgba(30, 64, 175, 0.7);
}

.home-premium-main-number {
  font-size: 40px;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--space-1);
}

.home-premium-main-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.95);
}

.home-premium-main-note {
  margin-top: var(--space-2);
  font-size: 13px;
  color: rgba(148, 163, 184, 0.95);
}

.home-premium-stat-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.home-premium-stat-pill {
  border-radius: 999px;
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(135deg, #f9fafb, #ffffff);
  border: 1px solid rgba(209, 213, 219, 0.9);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-premium-stat-pill-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-500);
}

.home-premium-stat-pill-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

.home-premium-about-card {
  border-radius: 22px;
  padding: var(--space-5);
  background:
    radial-gradient(circle at 0% 100%, rgba(129, 140, 248, 0.26), transparent 58%),
    linear-gradient(150deg, #f9fafb 0%, #ffffff 60%, #eef2ff 100%);
  box-shadow:
    0 18px 40px rgba(148, 163, 184, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  border: 1px solid rgba(148, 163, 184, 0.6);
  max-width: 420px;
}

.home-premium-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-600);
  background: rgba(239, 246, 255, 0.9);
  border: 1px solid rgba(191, 219, 254, 0.9);
  margin-bottom: var(--space-2);
}

.home-premium-about-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: var(--space-2);
}

.home-premium-about-body {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.home-premium-feature-chips {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.home-premium-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(209, 213, 219, 0.9);
}

.home-premium-stat--primary {
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-color: transparent;
  box-shadow:
    0 14px 28px rgba(148, 163, 184, 0.5);
}

.home-premium-stat--primary .home-premium-stat-note {
  color: #111827;
}

.home-premium-feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #4f46e5, #22c55e);
}

.home-premium-feature-text {
  font-size: 13px;
  color: var(--gray-700);
}

.home-premium-card {
  position: relative;
  border-radius: 24px;
  padding: var(--space-6);
  border: 1px solid rgba(148, 163, 184, 0.55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow:
    0 22px 48px rgba(17, 24, 39, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

.home-premium-card::before {
  content: '';
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.18), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.16), transparent 55%);
  opacity: 0.9;
  z-index: 0;
}

.home-premium-card--stats,
.home-premium-card--about {
  background:
    radial-gradient(circle at 0% 100%, rgba(129, 140, 248, 0.26), transparent 58%),
    linear-gradient(150deg, #f9fafb 0%, #ffffff 60%, #eef2ff 100%);
}

.home-premium-eyebrow {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
  margin-bottom: var(--space-2);
}

.home-premium-title {
  position: relative;
  z-index: 1;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  color: #f9fafb;
  margin-bottom: var(--space-2);
}

.home-premium-card--about .home-premium-title {
  color: #0f172a;
}

/* Light theme text colors for stats card to match about card */
.home-premium-card--stats .home-premium-title {
  color: #0f172a;
}

.home-premium-subtitle {
  position: relative;
  z-index: 1;
  font-size: 14px;
  color: rgba(209, 213, 219, 0.95);
  margin-bottom: var(--space-5);
  max-width: 34rem;
}

.home-premium-card--about .home-premium-subtitle,
.home-premium-body {
  color: var(--gray-600);
}

.home-premium-card--stats .home-premium-subtitle {
  color: var(--gray-600);
}

.home-premium-body {
  position: relative;
  z-index: 1;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: var(--space-4);
}


.home-premium-stat-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.home-premium-stat {
  padding: var(--space-4);
  border-radius: 18px;
  background: linear-gradient(145deg, #f9fafb, #ffffff);
  box-shadow:
    0 10px 24px rgba(148, 163, 184, 0.45),
    0 0 0 1px rgba(226, 232, 240, 0.95) inset;
  border: 1px solid rgba(209, 213, 219, 0.9);
  text-align: center;
}

.home-premium-stat-label {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, #c4b5fd, #a5b4fc, #7dd3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 2px;
}

.home-premium-stat-value {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, #a5b4fc, #7dd3fc, #6ee7b7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--space-1);
}

.home-premium-stat-note {
  margin-top: var(--space-1);
  font-size: 12px;
  color: rgba(156, 163, 175, 0.95);
}

.home-premium-list {
  position: relative;
  z-index: 1;
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 14px;
  color: var(--gray-600);
}

.home-premium-list li {
  position: relative;
  padding-left: 20px;
}

.home-premium-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #4f46e5, #22c55e);
  box-shadow: 0 0 0 1px rgba(209, 213, 219, 0.9);
}

@media (max-width: 992px) {
  .home-premium-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .home-premium-card {
    padding: var(--space-5);
  }

  .home-premium-title {
    font-size: 24px;
  }

  .home-premium-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Dark mode variants for homepage premium row */
.dark .home-premium-card {
  border-color: var(--dark-surface-a40);
  box-shadow: var(--dark-shadow-md);
}

.dark .home-premium-card::before {
  background: none;
  opacity: 0;
}

.dark .home-premium-card--stats {
  background: var(--dark-surface-a20);
}

.dark .home-premium-card--about {
  background: var(--dark-surface-a20);
}

.dark .home-premium-title {
  color: #f9fafb;
}

.dark .home-premium-card--about .home-premium-title {
  color: #e5e7eb;
}

.dark .home-premium-subtitle,
.dark .home-premium-body {
  color: #cbd5e1;
}

.dark .home-premium-eyebrow {
  color: #9ca3af;
}

.dark .home-premium-stat {
  background: var(--dark-surface-a30);
  box-shadow: var(--dark-shadow-md);
  border-color: var(--dark-surface-a40);
}

.dark .home-premium-stat-value {
  background: linear-gradient(135deg, var(--primary-blue), var(--success-green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dark .home-premium-stat-label {
  color: #9ca3af;
}

.dark .home-premium-stat-note {
  color: #6b7280;
}

.dark .home-premium-list {
  color: #cbd5e1;
}

.dark .home-premium-list li::before {
  box-shadow: 0 0 0 1px var(--dark-surface-a40);
}

/* Header Section */
.ref-header {
  background: #ffffff;
  border-radius: 22px;
  box-shadow:
    10px 10px 24px rgba(163, 177, 198, 0.7),
    -10px -10px 24px rgba(255, 255, 255, 0.9);
  border: none;
  padding: var(--space-5) 0;
  margin: 0 auto var(--space-6);
  max-width: 1400px;
}

.ref-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-6);
}

/* Hero overlay variant: simple transparent header over hero */
.home-hero-overlay .ref-header {
  background: transparent;
  box-shadow: none;
  border: none;
  margin-bottom: 0;
}

.home-hero-overlay .ref-header-content {
  position: relative;
  z-index: 10;
}

.home-hero-overlay .ref-logo {
  color: #ffffff;
}

.home-hero-overlay .ref-nav-link {
  color: rgba(249, 250, 251, 0.9);
}

.home-hero-overlay .ref-nav-link:hover {
  color: #ffffff;
  background: rgba(17, 24, 39, 0.32);
}

.home-hero-overlay .ref-auth-avatar-circle {
  background: rgba(17, 24, 39, 0.75);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.5);
  color: #ffffff;
}

.home-hero-overlay .ref-auth-avatar-label {
  color: #ffffff;
}

/* Hero header button styling: Dark Mode, List Property, Sign in / Sign up */
.home-hero-overlay .ref-auth-buttons {
  gap: 10px;
}

.home-hero-overlay .theme-toggle-btn {
  border-radius: 999px;
  height: 34px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 500;
}

.home-hero-overlay .theme-toggle-btn:hover {
  background: rgba(17, 24, 39, 0.9);
  border-color: #a855f7;
}

.home-hero-overlay .ref-auth-buttons .btn.btn-primary {
  border-radius: 999px;
  padding: 8px 22px;
  background: linear-gradient(135deg, #4f46e5, #22c55e);
  color: #f9fafb;
  border: none;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.45);
  font-weight: 600;
  font-size: 14px;
}

.home-hero-overlay .ref-auth-buttons .btn.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(22, 163, 74, 0.6);
}

.home-hero-overlay .ref-auth-avatar {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(17, 24, 39, 0.75);
}

.home-hero-overlay .ref-auth-avatar-circle {
  width: 20px;
  height: 20px;
  font-size: 13px;
  box-shadow: none;
  background: transparent;
}

.home-hero-overlay .ref-auth-avatar-label {
  color: #ffffff;
  font-size: 13px;
}

.ref-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-blue);
}

.ref-nav {
  display: flex;
  gap: var(--space-8);
}

.ref-nav-link {
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.ref-nav-link:hover {
  color: var(--primary-blue);
  background: var(--gray-100);
}

.ref-nav-item {
  position: relative;
}

.ref-nav-link--has-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ref-nav-caret {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
}

.ref-nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  min-width: 260px;
  padding: var(--space-3) 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.18);
  border: 1px solid rgba(17, 24, 39, 0.04);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 40;
}

.ref-nav-item--has-dropdown:hover .ref-nav-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ref-nav-dropdown-link {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--gray-700);
  text-decoration: none;
  white-space: nowrap;
}

.ref-nav-dropdown-link:hover {
  background: var(--gray-100);
  color: var(--primary-blue);
}

.ref-auth-buttons {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.ref-auth-logged-in {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ref-auth-dashboard-btn {
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
}

.ref-auth-logout-btn {
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: #b91c1c !important;
  border: 1px solid rgba(248, 113, 113, 0.6);
}

.ref-auth-logout-btn:hover {
  background: rgba(248, 113, 113, 0.08);
}

.home-hero-overlay .ref-auth-logout-btn {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.85);
}

.home-hero-overlay .ref-auth-logout-btn:hover {
  background: rgba(248, 113, 113, 0.15);
}

.ref-auth-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 4px;
}

.ref-auth-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    4px 4px 10px rgba(163, 177, 198, 0.7),
    -4px -4px 10px rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ref-auth-avatar-label {
  font-size: 11px;
  color: #4b5563;
  white-space: nowrap;
}

/* Container System */
.ref-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Hero Section */
.ref-hero {
  background: #020617;
  border-radius: 22px;
  box-shadow:
    10px 10px 24px rgba(163, 177, 198, 0.7),
    -10px -10px 24px rgba(255, 255, 255, 0.9);
  border: none;
  padding: var(--space-16) var(--space-20) var(--space-12);
  text-align: center;
  margin-bottom: var(--space-6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #f9fafb;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ref-hero > * {
  position: relative;
  z-index: 3;
}

.ref-hero-birds-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.home-hero-overlay .ref-hero {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  border-radius: 0 0 22px 22px;
  overflow: visible;
  min-height: calc(100vh - 80px);
}

.ref-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Hero background image with dynamic motion */
.ref-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom, rgba(17, 24, 39, 0.78), rgba(17, 24, 39, 0.35), rgba(17, 24, 39, 0.85)),
    var(--hero-bg-image);
  background-size: cover;
  background-position: center 90%;
  transform-origin: center;
  filter: saturate(1.05) contrast(1.02);
  pointer-events: none;
  z-index: 1;
  animation: heroImageDrift 26s ease-in-out infinite alternate;
}

/* Optional video background layer (behind gradient and content) */
.ref-hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ref-hero-video-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero-overlay .ref-hero::before {
  top: -120px;
  bottom: 0;
}

/* Hero floating decorative elements */
.hero-floating {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.hero-cloud {
  font-size: 54px;
  filter: drop-shadow(0 14px 24px rgba(17, 24, 39, 0.55));
}

.hero-cloud-1 {
  top: 18%;
  left: 10%;
  animation: heroCloudDrift1 36s linear infinite;
}

.hero-cloud-2 {
  top: 26%;
  right: 12%;
  animation: heroCloudDrift2 42s linear infinite;
}

.hero-orb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(129, 140, 248, 0.7), transparent 65%);
  box-shadow:
    0 0 14px rgba(129, 140, 248, 0.7),
    0 0 22px rgba(59, 130, 246, 0.55);
}

.hero-orb-1 {
  bottom: 16%;
  left: 18%;
  animation: heroOrbFloat1 24s ease-in-out infinite alternate;
}

.hero-orb-2 {
  bottom: 22%;
  right: 20%;
  animation: heroOrbFloat2 28s ease-in-out infinite alternate;
}

.hero-orb-3 {
  top: 22%;
  left: 32%;
  animation: heroOrbFloat1 30s ease-in-out infinite alternate;
}

.hero-orb-4 {
  top: 30%;
  right: 30%;
  animation: heroOrbFloat2 34s ease-in-out infinite alternate;
}

.hero-star {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  box-shadow:
    0 0 8px rgba(248, 250, 252, 0.9),
    0 0 16px rgba(129, 140, 248, 0.65);
  opacity: 0.65;
}

.hero-star-1 {
  top: 12%;
  left: 24%;
  animation: heroStarBlink 3.8s ease-in-out infinite;
}

.hero-star-2 {
  top: 18%;
  right: 26%;
  animation: heroStarBlink 4.4s ease-in-out infinite;
}

.hero-star-3 {
  bottom: 28%;
  left: 20%;
  animation: heroStarBlink 3.2s ease-in-out infinite;
}

.hero-star-4 {
  bottom: 18%;
  right: 18%;
  animation: heroStarBlink 4.8s ease-in-out infinite;
}

@keyframes bubbleFloat {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.8;
  }
  25% {
    transform: translateY(-20px) translateX(10px);
    opacity: 1;
  }
  50% {
    transform: translateY(-10px) translateX(-15px);
    opacity: 0.9;
  }
  75% {
    transform: translateY(-30px) translateX(5px);
    opacity: 1;
  }
}

@keyframes gridDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-24px, -18px, 0);
  }
  100% {
    transform: translate3d(-48px, -32px, 0);
  }
}

@keyframes parcelFloat {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(6px, -18px, 0);
  }
  100% {
    transform: translate3d(12px, 0, 0);
  }
}

@keyframes parcelFloatAlt {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-10px, -14px, 0);
  }
  100% {
    transform: translate3d(-18px, 0, 0);
  }
}

@keyframes portalPulse {
  0% {
    transform: translate(-50%, -52%) scale(0.96);
    opacity: 0.9;
  }
  40% {
    transform: translate(-50%, -52%) scale(1.02);
    opacity: 1;
  }
  70% {
    transform: translate(-50%, -52%) scale(1.04);
    opacity: 0.96;
  }
  100% {
    transform: translate(-50%, -52%) scale(0.98);
    opacity: 0.9;
  }
}

@keyframes heroImageDrift {
  0% {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(1.06) translate3d(-10px, -8px, 0);
  }
  100% {
    transform: scale(1.08) translate3d(-18px, -12px, 0);
  }
}

@keyframes heroCloudDrift1 {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(40px, -6px, 0);
  }
  100% {
    transform: translate3d(80px, 0, 0);
  }
}

@keyframes heroCloudDrift2 {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-36px, -4px, 0);
  }
  100% {
    transform: translate3d(-72px, 0, 0);
  }
}

@keyframes heroSatelliteOrbit {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(-8px, -10px, 0) rotate(-6deg);
  }
  100% {
    transform: translate3d(-14px, -4px, 0) rotate(4deg);
  }
}

@keyframes heroOrbFloat1 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.9;
  }
  50% {
    transform: translate3d(4px, -10px, 0) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translate3d(10px, -4px, 0) scale(0.96);
    opacity: 0.85;
  }
}

@keyframes heroOrbFloat2 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate3d(-6px, -8px, 0) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translate3d(-12px, -2px, 0) scale(0.94);
    opacity: 0.8;
  }
}

@keyframes heroStarBlink {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.9);
  }
  40% {
    opacity: 0.9;
    transform: scale(1.15);
  }
  70% {
    opacity: 0.5;
    transform: scale(1);
  }
}

@keyframes heroKickerPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 1px rgba(148, 163, 184, 0.4),
      0 0 18px rgba(59, 130, 246, 0.45);
  }
  40% {
    transform: translateY(-1px) scale(1.03);
    box-shadow:
      0 0 0 1px rgba(191, 219, 254, 0.6),
      0 0 28px rgba(59, 130, 246, 0.8);
  }
  70% {
    transform: translateY(0) scale(0.99);
    box-shadow:
      0 0 0 1px rgba(148, 163, 184, 0.5),
      0 0 20px rgba(45, 212, 191, 0.6);
  }
}

@keyframes homePastelDrift1 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(60px, -40px, 0) scale(1.04);
  }
  100% {
    transform: translate3d(120px, 20px, 0) scale(1.02);
  }
}

@keyframes homePastelDrift2 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-60px, -60px, 0) scale(1.05);
  }
  100% {
    transform: translate3d(-130px, 10px, 0) scale(1.02);
  }
}

.ref-hero-title {
  font-size: 48px;
  font-weight: 800;
  color: #f9fafb;
  margin-bottom: 16px; /* slightly larger gap to subtitle */
  line-height: 1.1;
  text-shadow: 0 2px 6px rgba(17, 24, 39, 0.9);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  margin-bottom: var(--space-3);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.85), transparent 65%),
    radial-gradient(circle at 100% 100%, rgba(45, 212, 191, 0.9), transparent 65%),
    rgba(17, 24, 39, 0.75);
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.4),
    0 0 24px rgba(59, 130, 246, 0.55);
  backdrop-filter: blur(18px);
  animation: heroKickerPulse 18s ease-in-out infinite;
}

.hero-kicker-animated {
  /* Top line: smaller, semi-bold animated sentence */
  --hero-slot-row: 26px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0; /* control tracking on inner spans instead */
  text-transform: none; /* show as Buy • Sell • Rent, not forced uppercase */
  padding: 2px 0;
  margin-bottom: 6px; /* small gap to H1 */

  /* No pill background or border; just clean text */
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  border: none;
  animation: none;
}

.hero-animated-sentence {
  display: inline-flex;
  align-items: center;
  gap: 0; /* control spacing via margins for precise comma layout */
}

.hero-animated-sentence span {
  background-image: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: #f9fafb;
  text-shadow: 0 1px 3px rgba(17, 24, 39, 0.9); /* subtle dark shadow for readability */
  letter-spacing: 0; /* base: no extra spacing on punctuation */
}

.hero-word-track span,
.hero-conjunction {
  letter-spacing: 0.18em; /* apply tag-like tracking only to words and 'or' */
}

.hero-word-slot {
  position: relative;
  height: var(--hero-slot-row);
  overflow: hidden;
  display: inline-flex;
  align-items: flex-start;
}

.hero-word-track {
  display: flex;
  flex-direction: column;
  transition: transform 0.6s ease-in-out;
}

.hero-word-track span {
  height: var(--hero-slot-row);
  line-height: var(--hero-slot-row);
}

.hero-punctuation {
  /* Hug comma to preceding word with a small negative left margin, clear space after */
  margin: 0 8px 0 -3px;
  font-weight: 700;
  letter-spacing: 0; /* ensure comma itself is not stretched */
}

.hero-conjunction {
  margin: 0 8px 0 2px;
}

.hero-separator {
  margin: 0 10px;
  font-weight: 700;
}

.hero-step-0 .slot-1 .hero-word-track {
  transform: translateY(0);
}

.hero-step-1 .slot-1 .hero-word-track {
  transform: translateY(calc(-1 * var(--hero-slot-row)));
}

.hero-step-2 .slot-1 .hero-word-track {
  transform: translateY(calc(-2 * var(--hero-slot-row)));
}

.hero-step-0 .slot-2 .hero-word-track {
  transform: translateY(calc(-1 * var(--hero-slot-row)));
}

.hero-step-1 .slot-2 .hero-word-track {
  transform: translateY(calc(-2 * var(--hero-slot-row)));
}

.hero-step-2 .slot-2 .hero-word-track {
  transform: translateY(0);
}

.hero-step-0 .slot-3 .hero-word-track {
  transform: translateY(calc(-2 * var(--hero-slot-row)));
}

.hero-step-1 .slot-3 .hero-word-track {
  transform: translateY(0);
}

.hero-step-2 .slot-3 .hero-word-track {
  transform: translateY(calc(-1 * var(--hero-slot-row)));
}

.ref-hero-subtitle {
  font-size: 20px;
  color: rgba(249, 250, 251, 0.86);
  margin-bottom: var(--space-6);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(17, 24, 39, 0.85);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODERN HERO SEARCH BAR
   ═══════════════════════════════════════════════════════════════════════════ */

.hero-search-modern {
  width: 100%;
  max-width: 900px;
  margin: 2.5rem auto 0;
}

.hero-search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Toggle Buttons */
.hero-search-toggle {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.hero-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-toggle-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.hero-toggle-btn i {
  font-size: 1rem;
}

/* Search Fields Container */
.hero-search-fields {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 0.5rem;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* Individual Field */
.hero-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.625rem 1rem;
  flex: 1;
  min-width: 0;
  border-right: 1px solid #e5e7eb;
}

.hero-field:last-of-type {
  border-right: none;
}

.hero-field-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Min-Max Input Group */
.hero-minmax {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.hero-minmax-sep {
  color: #9ca3af;
  font-size: 0.875rem;
}

.hero-input,
.hero-select {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  color: #111827;
  outline: none;
  padding: 0.25rem 0;
}

.hero-input::placeholder {
  color: #9ca3af;
}

/* Hide number spinners */
.hero-input[type="number"]::-webkit-outer-spin-button,
.hero-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.hero-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.hero-select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 16px;
}

.hero-select option {
  background: #fff;
  color: #111827;
}

/* Search Button */
.hero-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.hero-search-btn:hover {
  background: linear-gradient(135deg, #764ba2, #667eea);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
}

.hero-search-btn i {
  font-size: 1rem;
}

/* Quick Links */
.hero-quick-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-quick-links span {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
}

.hero-quick-links a {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.hero-quick-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-search-fields {
    flex-direction: column;
    border-radius: 16px;
  }
  
  .hero-field {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem;
  }
  
  .hero-field:last-of-type {
    border-bottom: none;
  }
  
  .hero-search-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 0.25rem;
  }
}

@media (max-width: 640px) {
  .hero-search-toggle {
    flex-wrap: wrap;
  }
  
  .hero-quick-links {
    display: none;
  }
}

/* Dark Mode */
.dark .hero-toggle-btn {
  background: rgba(17, 24, 39, 0.6);
  border-color: rgba(71, 85, 105, 0.5);
  color: #cbd5e1;
}

.dark .hero-toggle-btn:hover {
  background: rgba(31, 41, 55, 0.8);
  border-color: rgba(100, 116, 139, 0.6);
}

.dark .hero-toggle-btn.active {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
}

.dark .hero-search-fields {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(71, 85, 105, 0.4);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(59, 130, 246, 0.1);
}

.dark .hero-field {
  border-right-color: rgba(71, 85, 105, 0.4);
}

.dark .hero-field-label {
  color: #94a3b8;
}

.dark .hero-minmax-sep {
  color: #64748b;
}

.dark .hero-input,
.dark .hero-select {
  color: #f1f5f9;
}

.dark .hero-input::placeholder {
  color: #64748b;
}

.dark .hero-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.dark .hero-select option {
  background: #111827;
  color: #f1f5f9;
}

.dark .hero-search-btn {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.dark .hero-search-btn:hover {
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.45);
}

.dark .hero-quick-links span {
  color: rgba(148, 163, 184, 0.7);
}

.dark .hero-quick-links a {
  color: #cbd5e1;
  background: rgba(55, 65, 81, 0.4);
  border-color: rgba(71, 85, 105, 0.5);
}

.dark .hero-quick-links a:hover {
  background: rgba(71, 85, 105, 0.5);
  border-color: rgba(100, 116, 139, 0.6);
}

@media (max-width: 900px) {
  .dark .hero-field {
    border-bottom-color: rgba(71, 85, 105, 0.4);
  }
}

/* Legacy Search Box (keep for compatibility) */
.ref-search-box {
	background: rgba(255, 255, 255, 0);
	border-radius: 999px;
	padding: 4px;
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(0.2px);
	-webkit-backdrop-filter: blur(0.2px);
	width: 100%;
	max-width: 1200px;
	margin: var(--space-10) auto 0;
	align-self: center;
	position: static;
	transform: none;
}

.ref-search-shell {
	background: rgba(248, 250, 252, 0.18);
	backdrop-filter: blur(18px);
	border-radius: inherit;
	padding: 12px 22px;
	border: 0;
	box-shadow:
		inset 0 0 4px rgba(255, 255, 255, 0.9),
		inset 0 -1px 4px rgba(148, 163, 184, 0.35);
}

.home-hero-overlay .ref-hero .ref-form-label {
  color: #f9fafb;
}

/* Force light text for hero search inputs/selects only in dark mode */
.dark .home-hero-overlay .ref-hero .ref-form-input,
.dark .home-hero-overlay .ref-hero .ref-form-select {
  color: #e5fdfb !important;
}

.ref-search-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.ref-search-row {
	display: flex;
	align-items: flex-end;
	gap: var(--space-4);
	justify-content: center;
}

/* Remove spinner controls for numeric inputs in the hero search bar only */
.ref-search-box .ref-form-input[type="number"]::-webkit-outer-spin-button,
.ref-search-box .ref-form-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ref-search-box .ref-form-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Hero inputs/selects – light glass look by default */
.ref-hero-input {
  background: rgba(255, 255, 255, 0.22) !important;
  border-radius: 999px !important;
  border: 1px solid rgba(148, 163, 184, 0.8) !important;
  color: #111827 !important;
  height: 44px;
}

.ref-hero-input::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

/* Remove number spinners for hero inputs only */
.ref-hero-input[type="number"]::-webkit-outer-spin-button,
.ref-hero-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ref-hero-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.ref-hero-select {
  background: rgba(255, 255, 255, 0.22) !important;
  border-radius: 999px !important;
  border: 1px solid rgba(148, 163, 184, 0.8) !important;
  color: #111827 !important;
  height: 44px;
}

.ref-hero-select option {
  background-color: #ffffff;
  color: #111827;
}

.ref-hero-search-btn {
  margin-top: 0;
  min-width: 150px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 999px;
  border: none;
  color: #f9fafb;
  box-shadow:
    0 12px 26px rgba(102, 126, 234, 0.55);
}

.ref-hero-toggle {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(17, 24, 39, 0.65);
  min-height: 40px;
}

.ref-hero-toggle-active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: #667eea;
  color: #f9fafb;
  box-shadow: 0 6px 14px rgba(102, 126, 234, 0.38);
}

.ref-hero-input:focus,
.ref-hero-select:focus {
  outline: none;
  border-color: var(--primary-blue) !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.ref-hero-search-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 30px rgba(102, 126, 234, 0.65);
}

@media (max-width: 768px) {
	.ref-search-box {
		padding: var(--space-6);
	}

	.ref-search-row {
		flex-direction: column;
		align-items: stretch;
	}

	.ref-form-group {
		width: 100%;
	}

	.ref-hero-search-btn {
		width: 100%;
		margin-top: 16px;
	}
}

.ref-form-group {
  display: flex;
  flex-direction: column;
}

.ref-form-label {
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: var(--space-2);
}

.ref-form-input,
.ref-form-select {
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 16px;
  background: var(--white);
  transition: all 0.2s ease;
}

/* DARK MODE OVERRIDES FOR HERO SEARCH BAR – reuse dark glass neon styling */
.dark .ref-search-box {
	background: transparent;
	backdrop-filter: none;
	box-shadow:
		0 0 20px rgba(45, 212, 191, 0.55),
		0 16px 40px rgba(17, 24, 39, 0.9);
	border: 1px solid rgba(45, 212, 191, 0.9);
}

.dark .ref-search-shell {
	background: rgba(3, 7, 18, 0.6);
	box-shadow:
		inset 0 0 12px rgba(0, 0, 0, 0.7);
}

.dark .ref-hero-input {
  background: transparent !important;
  border: 1px solid rgba(55, 65, 81, 0.9) !important;
  color: #e5fdfb !important;
}

.dark .ref-hero-input::placeholder {
  color: rgba(148, 163, 184, 0.85);
}

.dark .ref-hero-select {
  background: transparent !important;
  border: 1px solid rgba(55, 65, 81, 0.9) !important;
  color: #e5fdfb !important;
}

.dark .ref-hero-select option {
  background-color: #020617;
  color: #e5fdfb;
}

.dark .ref-hero-search-btn {
  background:
    radial-gradient(circle at 100% 50%, rgba(45, 212, 191, 0.55), transparent 60%),
    rgba(3, 7, 18, 0.9);
  border: 1px solid rgba(45, 212, 191, 0.9);
  color: #a5f3fc;
  box-shadow:
    0 0 18px rgba(45, 212, 191, 0.55),
    0 10px 26px rgba(17, 24, 39, 0.8);
}

.dark .ref-hero-search-btn:hover {
  box-shadow:
    0 0 22px rgba(45, 212, 191, 0.7),
    0 18px 40px rgba(17, 24, 39, 0.9);
}

.ref-form-input:focus,
.ref-form-select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

/* Button System - Now handled by design-system.css */
/* Legacy ref-btn classes are mapped in design-system.css */

.ref-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.ref-btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

/* Accent button - maps to primary style */
.ref-btn-accent {
  background: var(--ds-primary, #4f46e5);
  color: #fff !important;
  border-color: var(--ds-primary, #4f46e5);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.ref-btn-accent:hover {
  background: var(--ds-primary-hover, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* Dark mode - glass/neon style matching site aesthetic */
.dark .ref-btn-accent {
  background: linear-gradient(145deg, rgba(25, 25, 25, 0.9), rgba(18, 18, 18, 0.7));
  color: #a5f3fc !important;
  border: 1px solid rgba(45, 212, 191, 0.6);
  box-shadow: 
    0 0 15px rgba(45, 212, 191, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.4);
}

.dark .ref-btn-accent:hover {
  background: linear-gradient(145deg, rgba(30, 30, 30, 0.95), rgba(22, 22, 22, 0.8));
  border-color: rgba(45, 212, 191, 0.9);
  box-shadow: 
    0 0 20px rgba(45, 212, 191, 0.5),
    0 6px 16px rgba(0, 0, 0, 0.5);
}

/* Stats Section */
.ref-stats {
  padding: 0;
  margin: 0;
}

.ref-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.ref-stat-item {
  text-align: center;
  padding: var(--space-6);
  border-radius: 16px;
  background: #F9FAFB;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ref-stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.ref-stat-number {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--primary-blue);
  margin-bottom: var(--space-2);
}

.ref-stat-label {
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 500;
}

/* Section Headers */
.ref-section {
  margin-bottom: var(--space-12);
}

.ref-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.ref-section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
}

.ref-section-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ref-section-link:hover {
  text-decoration: underline;
}

/* Card Grid System */
.ref-card-grid {
  display: grid;
  gap: var(--space-6);
}

.ref-card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.ref-card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Property Cards */
.ref-property-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.ref-property-card {
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ref-property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.1);
}

.ref-property-image {
  position: relative;
  width: 100%;
  height: 230px; /* taller image so card is more visual */
  overflow: hidden;
}

.ref-property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-property-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--white);
}

.ref-property-badge--sale {
  background: var(--success-green);
}

.ref-property-badge--rent {
  background: var(--warning-orange);
}

.ref-property-content {
  padding: var(--space-4);
}

.ref-property-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--space-1);
  line-height: 1.4;
}

.ref-property-location {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: var(--space-3);
}

.ref-property-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--gray-200);
}

.ref-property-size {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--gray-500);
  font-size: 14px;
}

.ref-property-maturity {
  padding: var(--space-1) var(--space-2);
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
}

.ref-property-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ref-property-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-blue);
}

.ref-property-price-period {
  font-size: 14px;
  color: var(--gray-500);
  font-weight: 400;
}

/* Blog Cards */
.ref-blog-card {
  background: #ffffff;
  border: none;
  border-radius: 26px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow:
    10px 10px 24px rgba(163, 177, 198, 0.7),
    -10px -10px 24px rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ref-blog-card:hover {
  transform: translateY(-2px);
  box-shadow:
    12px 12px 28px rgba(163, 177, 198, 0.75),
    -12px -12px 28px rgba(255, 255, 255, 0.95);
}

.ref-blog-image {
  width: 100%;
  height: 320px;
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.ref-blog-content {
  padding: var(--space-5) var(--space-5) 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.ref-blog-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--space-2);
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ref-blog-excerpt {
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 0;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ref-blog-cta {
  margin-top: 0.25rem;
  padding-top: 0;
  display: flex;
  justify-content: flex-end;
}

.ref-blog-cta-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4d6cfa;
  background-color: #f5f7ff;
  border: 1px solid #d1d5f5;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.18);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.ref-blog-cta-label:hover {
  background-color: #e0e7ff;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25);
  transform: translateY(-1px);
}

.ref-blog-cta-label:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(55, 48, 163, 0.3);
}

.dark .ref-blog-cta-label {
  background: linear-gradient(145deg, #131414, #020617);
  border-color: rgba(55, 65, 81, 0.9);
  color: #e5fdfb;
  box-shadow:
    12px 12px 28px rgba(0, 0, 0, 0.95),
    -6px -6px 18px rgba(31, 41, 55, 0.85);
}

/* Newsletter Section */
.ref-newsletter {
  background: var(--primary-blue);
  color: var(--white);
  padding: var(--space-12);
  border-radius: 20px;
  text-align: center;
  margin-bottom: var(--space-6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ref-newsletter:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.ref-newsletter-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.ref-newsletter-subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: var(--space-8);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.ref-newsletter-form {
  display: flex;
  max-width: 400px;
  margin: 0 auto;
  gap: var(--space-3);
}

.ref-newsletter-input {
  flex: 1;
  padding: var(--space-4);
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
}

.ref-newsletter-btn {
  background: var(--white);
  color: var(--primary-blue);
  border: none;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ref-newsletter-btn:hover {
  background: var(--gray-100);
  transform: translateY(-1px);
}

/* FAQ Section */
.ref-faq-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--gray-200);
}

.ref-faq-tab {
  padding: var(--space-3) var(--space-6);
  border: none;
  background: none;
  color: var(--gray-600);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 16px;
}

.ref-faq-tab:hover {
  color: var(--gray-900);
}

.ref-faq-tab.active {
  color: var(--primary-blue);
  border-bottom-color: var(--primary-blue);
}

.ref-faq-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ref-faq-item {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.ref-faq-item:hover {
  border-color: var(--gray-300);
}

.ref-faq-question {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: var(--white);
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  font-size: 16px;
  color: var(--gray-900);
  transition: all 0.2s ease;
}

.ref-faq-question:hover {
  background: var(--gray-50);
}

.ref-faq-question.active {
  background: var(--gray-50);
  color: var(--primary-blue);
}

.ref-faq-answer {
  padding: 0 var(--space-6) var(--space-4);
  background: var(--gray-50);
  animation: slideDown 0.3s ease;
}

.ref-faq-answer p {
  color: var(--gray-700);
  line-height: 1.6;
  margin: 0;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 200px;
  }
}

/* CTA Section */
.ref-cta-section {
  padding: 0;
}

.ref-cta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.ref-cta-card {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: var(--space-6);
  align-items: center;
  padding: var(--space-8);
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ref-cta-buy {
  background: linear-gradient(135deg, #EBF8FF 0%, #DBEAFE 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.ref-cta-rent {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.ref-cta-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.ref-cta-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Fine-tune icon/text alignment in CTA buttons */
.ref-cta-card .ref-btn {
  gap: var(--space-3);
}

.ref-cta-card .ref-btn svg {
  margin-bottom: 1px;
}

.ref-cta-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.ref-cta-subtitle {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.5;
  margin: 0;
}

.ref-cta-image {
  width: 200px;
  height: 150px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
}

/* Browse by Size section headings (1024 / 2048 m²) */
.size-section-heading {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: var(--space-6);
  text-align: center;
  padding: 16px 24px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.size-section-heading-1024 {
  background: linear-gradient(135deg, #EBF8FF 0%, #DBEAFE 100%);
  color: #1F2937;
}

.size-section-heading-2048 {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border-color: rgba(34, 197, 94, 0.2);
  color: #1F2937;
}

.home-hero-overlay .size-section-heading-1024,
.home-hero-overlay .size-section-heading-2048 {
  background: transparent;
}

.ref-btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: 18px;
}

/* Scroll to Top Button */
.ref-scroll-top-btn {
  position: fixed !important;
  bottom: 30px !important;
  right: 30px !important;
  width: 50px !important;
  height: 50px !important;
  background: linear-gradient(135deg, #4F46E5, #6366F1) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 50% !important;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 9999 !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

.ref-scroll-top-btn:hover {
  background: linear-gradient(135deg, #4338CA, #4F46E5);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

/* List Property Notification Bubble - Funky Design */
@keyframes bubbleSlideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes bubblePulse {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3), 0 0 0 0 rgba(139, 92, 246, 0.4);
  }
  50% {
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4), 0 0 0 8px rgba(139, 92, 246, 0);
  }
}

.list-property-bubble {
  position: fixed !important;
  bottom: 100px !important;
  right: 30px !important;
  left: auto !important;
  background: linear-gradient(135deg, #FFF 0%, #FAF5FF 100%) !important;
  border: 3px solid transparent !important;
  border-radius: 25px !important;
  padding: 20px 26px !important;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3) !important;
  z-index: 9998 !important;
  cursor: pointer !important;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  max-width: 300px !important;
  animation: bubbleSlideIn 0.6s ease, bubblePulse 3s ease-in-out infinite !important;
  background-clip: padding-box !important;
  position: relative;
}

.list-property-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 25px;
  padding: 3px;
  background: linear-gradient(135deg, #8B5CF6, #EC4899, #F59E0B, #10B981);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}

.list-property-bubble:hover {
  transform: translateY(-4px) scale(1.02) !important;
  box-shadow: 0 16px 48px rgba(139, 92, 246, 0.4) !important;
}

.list-property-bubble-content {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  position: relative !important;
}

.list-property-bubble-icon {
  width: 48px !important;
  height: 48px !important;
  background: linear-gradient(135deg, #8B5CF6, #A78BFA) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  font-size: 24px !important;
  flex-shrink: 0 !important;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4) !important;
  animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.list-property-bubble-text {
  font-size: 15px !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, #8B5CF6, #EC4899, #F59E0B) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  line-height: 1.5 !important;
  letter-spacing: -0.2px !important;
}

.list-property-bubble-close {
  position: absolute !important;
  top: -12px !important;
  right: -12px !important;
  width: 28px !important;
  height: 28px !important;
  background: linear-gradient(135deg, #EF4444, #DC2626) !important;
  border: 3px solid white !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  font-size: 16px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  z-index: 1 !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
}

.list-property-bubble-close:hover {
  background: linear-gradient(135deg, #DC2626, #B91C1C) !important;
  transform: rotate(90deg) scale(1.15) !important;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.6) !important;
}

/* Demo Dashboard Button (below bubble) */
.demo-dashboard-btn {
  position: fixed !important;
  bottom: 30px !important;
  right: 30px !important;
  left: auto !important;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%) !important;
  border: 3px solid transparent !important;
  border-radius: 20px !important;
  padding: 16px 22px !important;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3) !important;
  z-index: 9997 !important;
  cursor: pointer !important;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  max-width: 300px !important;
  animation: bubbleSlideIn 0.6s ease !important;
  background-clip: padding-box !important;
  position: relative;
}

.demo-dashboard-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  padding: 3px;
  background: linear-gradient(135deg, #3B82F6, #06B6D4, #10B981);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}

.demo-dashboard-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4) !important;
}

.demo-dashboard-btn-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.demo-dashboard-btn-icon {
  font-size: 24px;
  animation: iconBounce 2s ease-in-out infinite;
}

.demo-dashboard-btn-text {
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.3px;
}

/* Global inline login toast for auth-required actions (favorites, etc.) */
.ve-login-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: #fff;
  color: #111;
  padding: 10px 14px;
  border-radius: 6px;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  z-index: 1100;
  max-width: 420px;
  width: calc(100% - 32px);
  font-size: 13px;
  font-weight: 600;
}

.ve-login-toast-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ve-login-toast-btn {
  border: 2px solid #000;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: transform 0.1s, box-shadow 0.1s;
}

.ve-login-toast-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 #000;
}

.ve-login-toast-btn-primary {
  background: #1a4d3e;
  color: #fff;
}

.ve-login-toast-btn-primary:hover {
  background: #143d31;
}

.ve-login-toast-btn-secondary {
  background: #fff;
  color: #555;
  border-color: #999;
}

.ve-login-toast-btn-secondary:hover {
  box-shadow: 2px 2px 0 #999;
}

@media (max-width: 480px) {
  .ve-login-toast {
    bottom: 16px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .ve-login-toast-buttons {
    gap: 6px;
  }

  .ve-login-toast-btn {
    padding: 4px 10px;
    font-size: 11px;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode variants for reference layout and sections */
.dark .reference-layout {
  background: transparent;
}

.dark .ref-section-wrapper {
  background: var(--dark-surface-a20);
  box-shadow: var(--dark-shadow-md);
  border: 1px solid var(--dark-surface-a30);
}

.dark .ref-section-wrapper:hover {
  box-shadow: var(--dark-shadow-lg);
}

.dark .ref-section-title {
  color: #e5e7eb;
}

.dark .ref-section-link {
  color: var(--dark-tint-primary-a10);
}

.dark .ref-section-link:hover {
  color: var(--dark-tint-primary-a20);
}

/* Dark mode variants for Browse by Size headings */
.dark .size-section-heading {
  background: var(--dark-surface-a20);
  border-color: var(--dark-surface-a30);
  color: #f9fafb;
  box-shadow: none;
}

.dark .size-section-heading-1024,
.dark .size-section-heading-2048 {
  border-color: var(--dark-surface-a30);
}

.dark .ref-stats-grid .ref-stat-item {
  background: var(--dark-surface-a20);
  border-color: var(--dark-surface-a30);
}

.dark .ref-stat-number {
  color: var(--dark-tint-primary-a10);
}

.dark .ref-stat-label {
  color: #9ca3af;
}

.dark .ref-header {
  background: var(--dark-surface-a20);
  box-shadow: var(--dark-shadow-md);
  border: 1px solid var(--dark-surface-a30);
}

.dark .ref-logo {
  color: #ffffff;
}

.dark .ref-nav-link {
  color: #cbd5e1;
}

.dark .ref-nav-link:hover {
  color: #f9fafb;
  background: var(--dark-surface-a30);
}

.dark .ref-auth-avatar-circle {
  background: var(--dark-surface-a30);
  box-shadow: 0 0 0 1px var(--dark-surface-a50);
  color: #ffffff;
}

.dark .ref-auth-avatar-label {
  color: #ffffff;
}

/* Dark mode variants for property cards and content */
.dark .ref-property-card {
  background: var(--dark-surface-a20);
  border-color: var(--dark-surface-a30);
  box-shadow: var(--dark-shadow-md);
}

.dark .ref-property-card:hover {
  box-shadow: var(--dark-shadow-lg);
}

.dark .ref-property-title {
  color: #f9fafb;
}

.dark .ref-property-location,
.dark .ref-property-size,
.dark .ref-property-price-period {
  color: #cbd5e1;
}

.dark .ref-property-maturity {
  background: var(--dark-surface-a30);
  color: #e5e7eb;
}

.dark .ref-property-meta {
  border-top-color: var(--dark-surface-a30);
}

.dark .ref-property-price {
  color: var(--dark-tint-primary-a10);
}

/* Dark mode for blog cards */
.dark .ref-blog-card {
  background: var(--dark-surface-a20);
  border-color: var(--dark-surface-a30);
  box-shadow: var(--dark-shadow-md);
}

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

.dark .ref-blog-title {
  color: #f9fafb;
}

.dark .ref-blog-excerpt {
  color: #cbd5e1;
}

.dark .ref-blog-meta {
  color: #9ca3af;
}

/* Dark mode for newsletter section */
.dark .ref-newsletter {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  border-color: var(--dark-surface-a40);
  box-shadow: var(--dark-shadow-md);
}

.dark .ref-newsletter-title {
  color: #f9fafb;
}

.dark .ref-newsletter-subtitle {
  color: #cbd5e1;
}

.dark .ref-newsletter-input {
  background: var(--dark-surface-a20);
  color: #e5e7eb;
}

.dark .ref-newsletter-input::placeholder {
  color: #9ca3af;
}

.dark .ref-newsletter-btn {
  background: #e5e7eb;
  color: #0f172a;
}

.dark .ref-newsletter-btn:hover {
  background: #cbd5e1;
}

/* Dark mode for FAQ section */
.dark .ref-faq-tabs {
  border-bottom-color: var(--dark-surface-a30);
}

.dark .ref-faq-tab {
  color: #cbd5e1;
}

.dark .ref-faq-tab:hover {
  color: #f9fafb;
}

.dark .ref-faq-tab.active {
  color: var(--dark-tint-primary-a10);
  border-bottom-color: var(--dark-tint-primary-a10);
}

.dark .ref-faq-item {
  border-color: var(--dark-surface-a30);
}

.dark .ref-faq-question {
  background: var(--dark-surface-a20);
  color: #e5e7eb;
}

.dark .ref-faq-question:hover,
.dark .ref-faq-question.active {
  background: var(--dark-surface-a30);
}

.dark .ref-faq-answer {
  background: var(--dark-surface-a20);
}

.dark .ref-faq-answer p {
  color: #cbd5e1;
}

/* Dark mode for CTA section */
.dark .ref-cta-card {
  background: var(--dark-surface-a20);
  box-shadow: var(--dark-shadow-md);
  border-color: var(--dark-surface-a30);
}

.dark .ref-cta-buy {
  background: var(--dark-surface-a20);
  border-color: var(--dark-info-a20);
}

.dark .ref-cta-rent {
  background: var(--dark-surface-a20);
  border-color: var(--dark-success-a20);
}

.dark .ref-cta-title {
  color: #f9fafb;
}

.dark .ref-cta-subtitle {
  color: #cbd5e1;
}

/* Dark mode footer */
.dark .ref-footer {
  background: var(--dark-surface-a20);
  box-shadow: var(--dark-shadow-md);
}

.dark .ref-footer-section h3 {
  color: #e5e7eb;
}

.dark .ref-footer-section a {
  color: #cbd5e1;
}

.dark .ref-footer-section a:hover {
  color: var(--dark-tint-primary-a10);
}

.dark .ref-footer-bottom {
  border-top-color: var(--dark-surface-a30);
  color: #9ca3af;
}

/* Dark mode for breadcrumbs and property detail/gallery */
.dark .ref-breadcrumb-link {
  color: var(--dark-tint-primary-a10);
}

.dark .ref-breadcrumb-link:hover {
  color: var(--dark-tint-primary-a20);
}

.dark .ref-breadcrumb-separator {
  color: #6b7280;
}

.dark .ref-breadcrumb-current {
  color: #e5e7eb;
}

.dark .ref-property-gallery {
  background: var(--dark-surface-a20);
  border-color: var(--dark-surface-a30);
  box-shadow: var(--dark-shadow-md);
}

.dark .main-image-container {
  background: var(--dark-surface-a30);
}

.dark .thumbnail-grid {
  background: var(--dark-surface-a20);
}

.dark .thumbnail {
  opacity: 0.75;
}

.dark .thumbnail:hover,
.dark .thumbnail.active {
  opacity: 1;
}

/* Property Detail Layout */
.ref-property-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.ref-property-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ref-property-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.property-price-card {
  padding: 1.5rem;
  text-align: center;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.property-price-card .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-blue);
  display: block;
  margin-bottom: 1rem;
}

.property-price-card .price-period {
  font-size: 1rem;
  color: var(--gray-600);
  margin-left: 0.5rem;
}

.property-agent {
  padding: 1.5rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agent-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.agent-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-blue);
}

.agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-details {
  flex: 1;
}

.agent-details h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.agent-company {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin: 0 0 0.5rem;
}

.agent-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--gray-200);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-600);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--gray-100);
  color: var(--primary-blue);
}

/* Image Gallery */
.ref-property-gallery {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.main-image-container {
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: var(--gray-100);
}

.main-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--gray-50);
}

.thumbnail {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.thumbnail:hover,
.thumbnail.active {
  opacity: 1;
}

/* Guest-only visibility chip for gated fields (price, region, links) */
.guest-only-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
  background: linear-gradient(135deg, #eff6ff, #fef3c7);
  border: 1px solid rgba(59, 130, 246, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.7),
    0 6px 18px rgba(17, 24, 39, 0.18);
  white-space: nowrap;
  gap: 6px;
  animation: guestChipPulse 2.6s ease-in-out infinite;
}

.guest-only-chip-label {
  font-size: inherit;
}

@keyframes guestChipPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.7),
      0 4px 12px rgba(17, 24, 39, 0.2);
  }
  50% {
    transform: translateY(-1px) scale(1.03);
    box-shadow:
      0 0 0 1px rgba(191, 219, 254, 0.9),
      0 8px 22px rgba(37, 99, 235, 0.45);
  }
}

.dark .guest-only-chip {
  color: #e5e7eb;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(30, 64, 175, 0.9));
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow:
    0 0 0 1px rgba(17, 24, 39, 0.9),
    0 8px 20px rgba(17, 24, 39, 0.9);
}

/* Property Info Sections */
.card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 1rem;
}

.section-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0 0 1rem;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .ref-property-detail-grid {
    grid-template-columns: 1fr;
  }
  
  .ref-property-sidebar {
    margin-top: 2rem;
  }
}

@media (max-width: 640px) {
  .thumbnail-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .section-title {
    font-size: 1.5rem;
  }
}
.ref-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: 14px;
}

.ref-breadcrumb-link {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ref-breadcrumb-link:hover {
  color: #2563eb;
}

.ref-breadcrumb-separator {
  color: var(--gray-400);
}

.ref-breadcrumb-current {
  color: var(--gray-600);
  font-weight: 500;
}

.ref-property-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.ref-property-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.ref-property-gallery {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: var(--space-6);
  overflow: hidden;
}

/* Footer */
.ref-footer {
  background: #ffffff;
  border-radius: 22px;
  box-shadow:
    10px 10px 24px rgba(163, 177, 198, 0.7),
    -10px -10px 24px rgba(255, 255, 255, 0.9);
  border: none;
  padding: var(--space-10) var(--space-6) var(--space-6);
  margin: var(--space-6) auto 0;
  max-width: 1400px;
}

.ref-footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  padding: 0 var(--space-6) var(--space-4);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.ref-footer-section {
  text-align: center;
}

.ref-footer-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--space-4);
  text-align: center;
}

.ref-footer-section ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.ref-footer-section li {
  margin-bottom: var(--space-2);
}

.ref-footer-section a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 14px;
}

.ref-footer-section a:hover {
  color: var(--primary-blue);
}

.ref-footer-bottom {
  border-top: 1px solid var(--gray-200);
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray-500);
  font-size: 14px;
}

/* 404 / 500 Page */
.not-found-page {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
  background: #faf8f3;
}

.not-found-glow { display: none; }

.not-found-card {
  max-width: 520px;
  width: 100%;
  padding: 3rem 2.5rem;
  border-radius: 6px;
  border: 2px solid #000;
  background: #fff;
  text-align: center;
  box-shadow: 6px 6px 0 #000;
}

.not-found-code {
  font-size: clamp(3.5rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #1a4d3e;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.not-found-card h1 {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #111;
}

.not-found-message {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 2rem;
}

.not-found-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.nb-nf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #1a4d3e;
  color: #fff;
  border: 2px solid #000;
  border-radius: 6px;
  box-shadow: 3px 3px 0 #000;
  padding: 0.6rem 1.4rem;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}
.nb-nf-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #000;
  color: #fff;
  text-decoration: none;
}
.nb-nf-btn-ghost {
  background: #fff;
  color: #1a4d3e;
}
.nb-nf-btn-ghost:hover { color: #1a4d3e; }

@media (max-width: 640px) {
  .not-found-card {
    padding: 2rem 1.25rem;
    box-shadow: 4px 4px 0 #000;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .ref-card-grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .ref-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .ref-container {
    padding: 0 var(--space-4);
  }
  
  .ref-hero-title {
    font-size: 36px;
  }
  
  .ref-search-row {
    flex-wrap: wrap;
    gap: var(--space-3);
  }
  
  .ref-search-row .ref-form-group {
    min-width: 140px !important;
  }
  
  .ref-card-grid-3,
  .ref-card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ref-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ref-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
  
  .ref-newsletter-form {
    flex-direction: column;
  }
  
  .ref-footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ref-header-content {
    flex-direction: column;
    gap: var(--space-4);
  }
  
  .ref-nav {
    gap: var(--space-4);
  }
  
  .ref-faq-tabs {
    flex-wrap: wrap;
  }
  
  .ref-cta-grid {
    grid-template-columns: 1fr;
  }
  
  .ref-cta-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .ref-cta-image {
    width: 100%;
    height: 200px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .ref-search-row {
    flex-direction: column;
  }
  
  .ref-search-row .ref-form-group {
    min-width: 100% !important;
  }
  
  .ref-card-grid-3,
  .ref-card-grid-4 {
    grid-template-columns: 1fr;
  }
  
  .ref-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .ref-footer-content {
    grid-template-columns: 1fr;
  }
  
  .ref-footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
  }
}

/* Cookie Consent Banner */
@keyframes cookieSlideUp {
  0% {
    transform: translateY(120%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes cookieRock {
  0%, 100% {
    transform: rotate(0deg) translateY(0);
  }
  25% {
    transform: rotate(-6deg) translateY(-2px);
  }
  50% {
    transform: rotate(4deg) translateY(1px);
  }
  75% {
    transform: rotate(-3deg) translateY(-1px);
  }
}

.cookie-banner-shell {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 60;
  pointer-events: none;
}

.cookie-banner {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 380px;
  padding: 16px;
  border-radius: 6px;
  background: #faf8f3;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
  color: #111;
  font-size: 14px;
  animation: cookieSlideLeft 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.cookie-banner-image {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
}

.cookie-banner-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.cookie-banner-title {
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.cookie-banner-text {
  font-size: 13px;
  color: #444;
}

.cookie-banner-link {
  color: #1a4d3e;
  text-decoration: underline;
  font-weight: 600;
}

.cookie-banner-link:hover {
  text-decoration: none;
}

.cookie-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}

.cookie-banner-button {
  width: 100%;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 2px solid #000;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.cookie-banner-button:hover {
  transform: translate(-1px, -1px);
}

.nb-cookie-accept {
  background: #1a4d3e;
  color: #fff;
  box-shadow: 2px 2px 0 #000;
}

.nb-cookie-accept:hover {
  box-shadow: 3px 3px 0 #000;
}

.nb-cookie-reject {
  background: #fff;
  color: #111;
  box-shadow: 2px 2px 0 #000;
}

.nb-cookie-reject:hover {
  box-shadow: 3px 3px 0 #000;
}

@keyframes cookieSlideLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .cookie-banner-shell {
    left: 10px;
    bottom: 10px;
  }
  
  .cookie-banner {
    max-width: calc(100vw - 20px);
  }
}

/* Homepage ad slots */
.home-ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-ad-slot img {
  max-width: 100%;
  height: auto;
  /* Do not force full-width if the ad has a fixed size like 728x90 */
  width: auto;
}

/* ============================================================
   Mobile responsive: hamburger nav, off-canvas menu, padding,
   footer single-col, tap-to-open dropdowns
   ============================================================ */

/* Hamburger toggle — hidden on desktop, shown on mobile */
.ref-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}
.ref-nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--gray-700, #374151);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

/* On hero-overlay pages (homepage), header sits on top of the dark hero image —
   make the hamburger lines white so they're visible. */
.home-hero-overlay .ref-nav-toggle span {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

/* Dark theme: light hamburger on dark header */
.dark .ref-nav-toggle span {
  background: #f9fafb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.ref-nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.ref-nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.ref-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.ref-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Mobile auth section inside drawer — hidden on desktop */
.ref-nav-mobile-auth {
  display: none;
}
body.nav-open .ref-nav-backdrop {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .ref-nav-toggle {
    display: flex;
  }

  /* Off-canvas nav drawer */
  .ref-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 82%;
    max-width: 320px;
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 72px 12px 24px;
    background: var(--white, #fff);
    box-shadow: -8px 0 24px rgba(15, 23, 42, 0.18);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    z-index: 999;
  }
  .ref-nav.is-open {
    transform: translateX(0);
  }

  .ref-nav-link {
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 10px;
  }

  /* Force readable dark text inside the drawer regardless of page variant
     (homepage hero overlay normally styles nav links white) */
  .ref-nav .ref-nav-link,
  .home-hero-overlay .ref-nav .ref-nav-link {
    color: var(--gray-700, #374151);
  }
  .ref-nav .ref-nav-link:hover,
  .home-hero-overlay .ref-nav .ref-nav-link:hover {
    color: var(--primary-blue, #4F46E5);
    background: var(--gray-100, #f3f4f6);
  }
  .ref-nav .ref-nav-dropdown-link {
    color: var(--gray-700, #374151);
  }

  /* Login/Sign Up + Dashboard buttons, shown only inside the drawer */
  .ref-nav-mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--gray-200, #e5e7eb);
  }
  .ref-nav-mobile-auth .ref-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 15px;
  }

  /* Tap-to-open dropdowns inside the drawer */
  .ref-nav-item--has-dropdown {
    width: 100%;
  }
  .ref-nav-item--has-dropdown .ref-nav-link--has-dropdown {
    width: 100%;
    justify-content: space-between;
  }
  .ref-nav-caret {
    transition: transform 0.2s ease;
  }
  .ref-nav-item--has-dropdown.is-open .ref-nav-caret {
    transform: rotate(180deg);
  }

  /* In drawer, dropdowns should be inline (not absolute popovers) */
  .ref-nav-dropdown {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 8px 12px;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: none;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .ref-nav-item--has-dropdown.is-open .ref-nav-dropdown {
    max-height: 600px;
    opacity: 1;
    pointer-events: auto;
  }
  /* Disable hover-open on touch — only the .is-open class controls it */
  .ref-nav-item--has-dropdown:hover .ref-nav-dropdown {
    opacity: 0;
    pointer-events: none;
    transform: none;
  }
  .ref-nav-item--has-dropdown.is-open:hover .ref-nav-dropdown {
    opacity: 1;
    pointer-events: auto;
  }
  .ref-nav-dropdown-link {
    padding: 10px 14px;
    font-size: 14px;
  }

  /* Header layout fix: don't stack the whole header — keep hamburger on right */
  .ref-header-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  /* Hide the auth buttons row on mobile (they're not in the drawer; user gets them via dashboard) */
  .ref-auth-buttons {
    display: none;
  }
}

/* Reduce outer padding on small screens — recovers ~24-36px horizontal.
   Excludes dashboard-layout / admin-layout which have their own zero-padding
   shell and would break (sidebar 260px + 12px×2 padding = no room on 320px). */
@media (max-width: 640px) {
  .reference-layout:not(.dashboard-layout):not(.admin-layout) {
    padding: 12px;
  }
}

/* Footer single-column at very small sizes */
@media (max-width: 480px) {
  .ref-footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ref-footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* Global iOS zoom prevention: form inputs need ≥16px on small viewports */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px;
  }
}




