/* ========================================
   ED JUNG REALTOR - STYLES
   ======================================== */

/* CSS Variables */
:root {
  --color-primary: #1a3a5c;
  --color-primary-dark: #0f2540;
  --color-secondary: #c9a96e;
  --color-secondary-light: #ddc9a3;
  --color-background: #f8f6f3;
  --color-foreground: #1a1a1a;
  --color-muted: #6b7280;
  --color-white: #ffffff;
  --color-border: #e5e5e5;
  
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-foreground);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
}

.section-label {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-secondary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--color-primary-dark);
  margin-bottom: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn-secondary:hover {
  background-color: var(--color-white);
  color: var(--color-primary);
}

.btn-light {
  background-color: var(--color-white);
  color: var(--color-primary);
}

.btn-light:hover {
  background-color: var(--color-secondary-light);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* ========================================
   NAVIGATION
   ======================================== */
#navbar {
  height: 110px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  /* ORIGINAL STYLE: transparent over hero */
  background: transparent;
  transition: all 1.0s ease;
}

/* When scrolling */
.navbar.scrolled {
  background-color: var(--color-white);
  box-shadow: var(--shadow-md);
  padding: 12px 0;
}

/* text colors when scrolled */
.navbar.scrolled .logo-text,
.navbar.scrolled .logo-sub,
.navbar.scrolled .nav-links a {
  color: var(--color-foreground);
}

/* hamburger fix */
.navbar.scrolled .hamburger,
.navbar.scrolled .hamburger::before,
.navbar.scrolled .hamburger::after {
  background-color: var(--color-foreground);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-white);
  line-height: 1;
}

.logo-sub {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--color-white);
  opacity: 0.8;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links > li {
  position: relative;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--color-white);
  position: relative;
}

.nav-links > li > a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-secondary);
  transition: width var(--transition-normal);
}

.nav-links > li > a:hover::after {
  width: 100%;
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: var(--shadow-xl);
  padding: 20px;
  min-width: 500px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  margin-top: 15px;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--color-white);
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  margin-top: 10px;
}

.dropdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.dropdown-grid a {
  padding: 10px 16px;
  font-size: 0.875rem;
  color: var(--color-foreground) !important;
  border-radius: 4px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.dropdown-grid a:hover {
  background-color: var(--color-background);
  color: var(--color-primary) !important;
}

.dropdown-grid a::after {
  display: none !important;
}

.nav-cta {
  background-color: var(--color-secondary);
  color: var(--color-white) !important;
  padding: 10px 24px;
  border-radius: 4px;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background-color: var(--color-secondary-light);
  color: var(--color-primary) !important;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  position: relative;
  transition: background-color var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  left: 0;
  transition: all var(--transition-fast);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

.mobile-menu-btn.active .hamburger {
  background-color: transparent;
}

.mobile-menu-btn.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.mobile-menu-btn.active .hamburger::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('images/hero.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 37, 64, 0.7), rgba(26, 58, 92, 0.8));
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 500;
  color: var(--color-white);
  margin-bottom: 24px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-white);
  opacity: 0.7;
  animation: bounce 2s infinite;
}

.scroll-indicator span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-white), transparent);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ========================================
   LOCATIONS SECTION
   ======================================== */
.locations {
  padding: 100px 0;
  background-color: var(--color-white);
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.location-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3/4;
  display: block;
}

.location-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform var(--transition-slow);
}

.location-card:hover .location-image {
  transform: scale(1.1);
}

.location-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 60%);
}

.location-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 1;
  color: var(--color-white);
}

.location-info h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.location-info p {
  font-size: 0.875rem;
  opacity: 0.8;
}

.location-card-more {
  background-color: var(--color-primary);
}

.location-card-more .location-image {
  opacity: 0.3;
}

.location-card-more .location-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  top: 0;
  text-align: center;
}

.location-card-more .location-info h3 {
  font-size: 1.5rem;
}

/* ========================================
   PAGE HEADER (for locations page)
   ======================================== */
.page-header {
  padding: 140px 0 60px;
  background-color: var(--color-background);
}

.back-link {
  display: inline-block;
  color: var(--color-primary);
  font-size: 0.875rem;
  margin-bottom: 24px;
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--color-secondary);
}

.page-title {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  color: var(--color-primary-dark);
  margin-bottom: 16px;
}

.page-description {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 600px;
  line-height: 1.7;
}

/* ========================================
   ALL LOCATIONS GRID (locations page)
   ======================================== */
.all-locations {
  padding: 60px 0 100px;
  background-color: var(--color-white);
}

.locations-full-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.location-full-card {
  background-color: var(--color-background);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.location-full-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.location-full-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.location-full-content {
  padding: 24px;
}

.location-full-content h3 {
  font-size: 1.375rem;
  color: var(--color-primary-dark);
  margin-bottom: 4px;
}

.location-subtitle {
  font-size: 0.875rem;
  color: var(--color-secondary);
  margin-bottom: 16px;
}

.location-data {
  padding: 16px;
  background-color: var(--color-white);
  border-radius: 8px;
  margin-bottom: 16px;
  min-height: 60px;
}

.location-data p {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-style: italic;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
  padding: 100px 0;
  background-color: var(--color-background);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  position: relative;
}

.image-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.image-wrapper img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.experience-badge {
  position: absolute;
  bottom: -30px;
  right: -30px;
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 24px 32px;
  border-radius: 8px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.experience-badge .years {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1;
}

.experience-badge .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

.about-content {
  padding-right: 40px;
}

.about-text {
  color: var(--color-muted);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-tagline {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--color-primary);
  margin: 32px 0;
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services {
  padding: 100px 0;
  background-color: var(--color-white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.service-card {
  background-color: var(--color-background);
  padding: 40px 30px;
  border-radius: 8px;
  transition: all var(--transition-normal);
}

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

.service-icon {
  width: 60px;
  height: 60px;
  background-color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--color-white);
}

.service-card h3 {
  font-size: 1.25rem;
  color: var(--color-primary-dark);
  margin-bottom: 16px;
}

.service-card p {
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-secondary);
}

.service-link span {
  transition: transform var(--transition-fast);
}

.service-link:hover span {
  transform: translateX(4px);
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta {
  padding: 80px 0;
  background-color: var(--color-secondary);
  text-align: center;
}

.cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--color-white);
  margin-bottom: 16px;
}

.cta p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
  padding: 100px 0;
  background-color: var(--color-background);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact-description {
  color: var(--color-muted);
  margin-bottom: 40px;
  line-height: 1.8;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background-color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  flex-shrink: 0;
}

.contact-item h4 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-foreground);
  margin-bottom: 4px;
}

.contact-item p {
  color: var(--color-muted);
}

.contact-form-wrapper {
  background-color: var(--color-white);
  padding: 48px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-foreground);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background-color: var(--color-background);
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background-color: var(--color-primary-dark);
  color: var(--color-white);
  width: 100%;
  display: block;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 20px;
  margin-bottom: 24px;
  line-height: 1.7;
}

.footer .logo-text,
.footer .logo-sub {
  color: var(--color-white);
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  transition: all var(--transition-fast);
}

.social-links a:hover {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.footer-links h4,
.footer-contact h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.footer-links a:hover {
  color: var(--color-secondary);
}

.footer-contact p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  margin-bottom: 8px;
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
}

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

/* ========================================
   RESPONSIVE — 1024px
   ======================================== */
@media (max-width: 1024px) {
  .locations-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .locations-grid .location-card:nth-child(4),
  .locations-grid .location-card:nth-child(5) {
    grid-column: span 1;
  }

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

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

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

  .dropdown-menu {
    min-width: 400px;
  }

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

/* ========================================
   RESPONSIVE — 768px
   ======================================== */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--color-primary-dark);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    transition: right var(--transition-normal);
    box-shadow: var(--shadow-xl);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.125rem;
    color: var(--color-white) !important;
  }

  .nav-dropdown:hover .dropdown-menu {
    display: none;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .about-content {
    padding-right: 0;
    order: -1;
  }

  .experience-badge {
    right: 20px;
    bottom: -20px;
  }

  .locations-grid {
    grid-template-columns: 1fr;
  }

  .location-card {
    aspect-ratio: 16/9;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    padding: 32px 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

/* Center footer brand on mobile */
  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }

  .locations-full-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    background-attachment: scroll;
    background-size: cover;
    background-position: center center;
    min-height: 100svh;
  }

  .hero-buttons .btn {
    width: 100%;
  }
}


/* ===== Listings Page Safety Styles (ADD AT BOTTOM) ===== */

.listings-grid-main:empty::after {
  content: "Loading listings...";
  display: block;
  text-align: center;
  padding: 60px 20px;
  color: #777;
  font-size: 1rem;
}

.listing-card {
  cursor: pointer;
}

.img-placeholder {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

/* Prevent layout jump if no JS */
#listingsGrid {
  min-height: 300px;
}

/* Better mobile spacing fallback */
@media (max-width: 768px) {
  .search-bar-inner {
    gap: 10px;
  }
}

/* =========================
   LISTINGS GRID
   ========================= */

.listings {
  padding: 80px 0;
  background: #f9f9f9;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

/* Card */
.listing-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.listing-card:hover {
  transform: translateY(-5px);
}

/* Image placeholder */
.listing-image {
  height: 180px;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #666;
}

/* Info */
.listing-info {
  padding: 16px;
}

.listing-info h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #1a3a5c;
}

.listing-info p {
  margin: 6px 0;
  color: #555;
}

.listing-info span {
  font-size: 0.9rem;
  color: #888;
}

/* CTA */
.listings-cta {
  margin-top: 50px;
  text-align: center;
  padding: 40px;
  background: #1a3a5c;
  color: white;
}

@media (max-width: 1024px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }
}


/* ========================================
   LOCATIONS PAGE  ← ADD EVERYTHING BELOW HERE
   ======================================== */

.page-hero {
  width: 100%;
  background-color: var(--color-primary-dark);
  padding: 160px 0 80px;
  color: var(--color-white);
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  margin-bottom: 16px;
}

.page-hero p {
  font-size: 1.125rem;
  opacity: 0.8;
}

.search-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .search-bar-inner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .filter-select {
    flex: 1 1 calc(33% - 8px);
    font-size: 0.75rem;
    padding: 7px 6px;
  }

  .search-input-wrap {
    width: 100%;
  }

  .filter-btn {
    width: 100%;
    padding: 8px;
  }
}

.search-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1;
  min-width: 200px;
}

.search-input-wrap input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  background-color: var(--color-background);
}

.search-input-wrap input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.filter-select {
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  background-color: var(--color-background);
  cursor: pointer;
}

.filter-btn {
  padding: 10px 20px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.filter-btn:hover {
  background-color: var(--color-primary-dark);
}

.listings-section {
  width: 100%;
  padding: 80px 0 60px;
  background-color: var(--color-background);
  min-height: 400px;
}

.listings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.results-count {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.sort-select {
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  background-color: var(--color-white);
  cursor: pointer;
}

.listings-grid-main {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.listings-cta {
  width: 100%;
  background-color: var(--color-primary);
  padding: 80px 0;
  text-align: center;
  color: var(--color-white);
}

.listings-cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 16px;
}

.listings-cta p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .listings-grid-main {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .listings-grid-main {
    grid-template-columns: 1fr;
  }

  .search-bar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-select,
  .filter-btn {
    width: 100%;
  }
}

.listing-image {
  position: relative;
}

.listing-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.listing-neighbourhood {
  font-size: 0.8rem !important;
  color: var(--color-secondary) !important;
}

/* ========================================
   LISTING IMAGE SLIDER
   ======================================== */
.listing-image-wrap {
  position: relative;
  height: 180px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.listing-image-slider {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.listing-slide {
  min-width: 100%;
  height: 100%;
}


.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide-btn:hover { background: white; }
.slide-prev { left: 8px; }
.slide-next { right: 8px; }

.slide-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}
.dot.active { background: white; }

#contact {
  scroll-margin-top: 160px;
}

/* ========================================
   SOLD BANNER
   ======================================== */
.listing-image-wrap {
  position: relative; /* already set, just confirming */
}

.sold-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  overflow: hidden;
}

.sold-banner::after {
  content: 'SOLD';
  position: absolute;
  top: 28px;
  left: -38px;
  width: 160px;
  padding: 8px 0;
  background-color: #cc0000;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-align: center;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}