/* style.css */
/* ============================================
   STARS - Sir Tito Arellano Realty Services
   Brand Stylesheet
   ============================================ */

/* === DESIGN TOKENS === */
:root {
  --color-dark-brown: #50391c;
  --color-dark-brown-rgb: 80, 57, 28;
  /* The new tokens' moss-strong and moss-deep (src/styles/tokens.css): the old #6f8658 was 4.0:1 on
     white, under WCAG AA for small text and for white button labels (axe, part 4B) */
  --color-moss-green: #566d40;
  --color-moss-green-dark: #475a35;
  --color-tan: #c4a587;
  --color-tan-light: #e8d9c8;
  --color-tan-lighter: #f5efe8;
  --color-blue-teal: #73a1b1;
  --color-blue-teal-dark: #5d8a9a;
  --color-white: #ffffff;
  --color-off-white: #faf8f5;
  --color-text: #3a2e1f;
  --color-text-light: #7a6b58;
  --color-border: #e2d5c5;

  --font-heading: 'Host Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Liter', 'Georgia', serif;

  --shadow-sm: 0 1px 3px rgba(var(--color-dark-brown-rgb), 0.08);
  --shadow-md: 0 4px 12px rgba(var(--color-dark-brown-rgb), 0.1);
  --shadow-lg: 0 8px 30px rgba(var(--color-dark-brown-rgb), 0.12);
  --shadow-xl: 0 16px 50px rgba(var(--color-dark-brown-rgb), 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition: 0.3s ease;
  --header-height: 80px;
}

/* === RESET & BASE === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  overflow-x: hidden;
  overflow-x: clip; /* clip, unlike hidden, makes no scroll box, so position: sticky works (listing inquiry form) */
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

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

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

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark-brown);
}

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

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

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

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

.btn--outline {
  background: transparent;
  color: var(--color-moss-green);
  border-color: var(--color-moss-green);
}

.btn--outline:hover {
  background: var(--color-moss-green);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* === SECTION UTILITIES === */
.section-header {
  margin-bottom: 48px;
}

.section-header--center {
  text-align: center;
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-moss-green);
  margin-bottom: 12px;
}

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

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 600px;
}

.section-header--center .section-subtitle {
  margin: 0 auto;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

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

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1001;
}

.header-logo-img {
  display: block;
  height: calc(var(--header-height) - 12px);
  width: auto;
}

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

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-moss-green);
}

.nav-link--cta {
  background: var(--color-moss-green);
  color: var(--color-white) !important;
  padding: 10px 24px;
  margin-left: 8px;
}

.nav-link--cta:hover {
  background: var(--color-moss-green-dark);
  transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark-brown);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=1920&q=80') center/cover no-repeat;
  margin-top: var(--header-height);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(var(--color-dark-brown-rgb), 0.55) 0%,
    rgba(var(--color-dark-brown-rgb), 0.35) 50%,
    rgba(var(--color-dark-brown-rgb), 0.6) 100%
  );
}

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

.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--color-white);
  margin-bottom: 16px;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--color-tan-light);
  margin-bottom: 40px;
  font-style: italic;
  letter-spacing: 0.06em;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow-xl);
  max-width: 650px;
  margin: 0 auto;
}

.search-icon {
  width: 22px;
  height: 22px;
  color: var(--color-text-light);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-text);
  background: transparent;
}

.search-input::placeholder {
  color: var(--color-text-light);
}

.search-btn {
  background: var(--color-moss-green);
  color: var(--color-white);
  border: none;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.search-btn:hover {
  background: var(--color-moss-green-dark);
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.search-tag {
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}

.search-tag:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   BROWSE HOMES SECTION
   ============================================ */
.browse-section {
  padding: 100px 0;
  background: var(--color-off-white);
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 20px;
}

.browse-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: block;
}

.browse-card--large {
  grid-row: span 2;
  aspect-ratio: auto;
}

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

.browse-card:hover img {
  transform: scale(1.08);
}

.browse-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(var(--color-dark-brown-rgb), 0.75) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  transition: background var(--transition);
}

.browse-card:hover .browse-card-overlay {
  background: linear-gradient(180deg, transparent 20%, rgba(var(--color-dark-brown-rgb), 0.8) 100%);
}

.browse-card-overlay h3 {
  color: var(--color-white);
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.browse-card-overlay p {
  color: var(--color-tan-light);
  font-size: 0.85rem;
  font-family: var(--font-heading);
  font-weight: 500;
}

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

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

.about-image {
  position: relative;
}

.about-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.about-image-accent {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 60%;
  height: 60%;
  border: 3px solid var(--color-tan);
  border-radius: var(--radius-lg);
  z-index: -1;
}

.about-badge {
  position: absolute;
  bottom: -24px;
  left: 24px;
  background: var(--color-moss-green);
  color: var(--color-white);
  padding: 20px 28px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.badge-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.badge-text {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.about-content .section-title {
  margin-top: 4px;
}

.about-text {
  font-size: 1.05rem;
  color: var(--color-text-light);
  margin-bottom: 32px;
  line-height: 1.8;
}

/* Mobile-only image (hidden on desktop) */
.about-image-mobile {
  display: none;
  position: relative;
  margin-bottom: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-image-mobile img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.about-badge-mobile {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: var(--color-moss-green);
  color: var(--color-white);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.about-badge-mobile .badge-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.about-badge-mobile .badge-text {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.about-credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 36px;
}

.credential {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.credential-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--color-moss-green);
  margin-top: 2px;
}

.credential-icon svg {
  width: 100%;
  height: 100%;
}

.credential strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-dark-brown);
}

.credential span {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

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

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

.service-card {
  display: block;
  background: var(--color-white);
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-moss-green);
  transform: scaleX(0);
  transition: transform var(--transition);
}

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

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  color: var(--color-moss-green);
  margin-bottom: 24px;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-title {
  font-size: 1.15rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.service-desc {
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ============================================
   FEATURED BLOG POST
   ============================================ */
.featured-blog-section {
  padding: 100px 0;
  background: var(--color-white);
}

.featured-post {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-white);
}

.featured-post-image {
  position: relative;
  overflow: hidden;
}

.featured-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 400px;
  transition: transform 0.5s ease;
}

.featured-post:hover .featured-post-image img {
  transform: scale(1.04);
}

.post-category {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--color-moss-green);
  color: var(--color-white);
  padding: 6px 16px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.featured-post-content {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.post-date,
.post-read {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.featured-post-title {
  font-size: 1.5rem;
  margin-bottom: 16px;
  line-height: 1.35;
}

.featured-post-excerpt {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 28px;
  line-height: 1.7;
}

/* ============================================
   OTHER BLOG POSTS
   ============================================ */
.blog-posts-section {
  padding: 60px 0 100px;
  background: var(--color-white);
}

.blog-posts-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.view-all-link {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-moss-green);
  transition: all var(--transition);
}

.view-all-link:hover {
  color: var(--color-moss-green-dark);
  gap: 4px;
}

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

.blog-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

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

.blog-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.06);
}

.blog-card-content {
  padding: 20px;
}

.blog-card-content .post-date {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
}

.blog-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--color-dark-brown);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.read-more {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-moss-green);
  transition: all var(--transition);
}

.read-more:hover {
  color: var(--color-moss-green-dark);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-dark-brown);
  color: var(--color-tan-light);
}

.footer-top {
  padding: 80px 0 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
}

/* White card: the logo's dark roofs and maroon text disappear on the brown footer. */
.footer-logo {
  display: inline-block;
  background: var(--color-white);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.footer-logo img {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
}

.footer-slogan {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-tan);
  font-style: italic;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--color-tan);
  opacity: 0.8;
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(196, 165, 135, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-tan);
  transition: all var(--transition);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link:hover {
  background: var(--color-moss-green);
  border-color: var(--color-moss-green);
  color: var(--color-white);
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--color-tan);
  opacity: 0.8;
  transition: all var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--color-white);
  padding-left: 4px;
}

.footer-contact li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--color-tan);
  opacity: 0.85;
}

.footer-contact svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-moss-green);
}

.footer-license {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(196, 165, 135, 0.2);
}

.footer-license strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: var(--color-white);
  margin-bottom: 2px;
}

.footer-license span {
  font-size: 0.8rem;
  color: var(--color-tan);
  opacity: 0.7;
}

.footer-bottom {
  border-top: 1px solid rgba(196, 165, 135, 0.15);
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--color-tan);
  opacity: 0.6;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Visitors who turn motion off see every section at once */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

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

  .about-grid {
    gap: 48px;
  }

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

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

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

  .browse-card--large {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16/7;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    height: 100dvh;
    background: var(--color-white);
    padding: 0 28px 40px;
    padding-top: calc(var(--header-height) + 20px);
    box-shadow: var(--shadow-xl);
    transition: right 0.35s ease;
    z-index: 1001;
    overflow-y: auto;
  }

  .header-nav.open {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
  }

  .nav-link {
    padding: 14px 18px;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
  }

  .nav-link:hover,
  .nav-link.active {
    background: var(--color-tan-lighter);
  }

  .nav-link--cta {
    text-align: center;
    margin-left: 0;
    margin-top: 16px;
    padding: 14px 24px;
  }

  .hero {
    min-height: 80vh;
  }

  .hero-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .search-bar {
    flex-direction: column;
    padding: 14px;
    gap: 10px;
    max-width: 100%;
    border-radius: var(--radius-md);
  }

  .search-icon {
    display: none;
  }

  .search-input {
    padding: 12px 14px;
    text-align: center;
    font-size: 0.88rem;
    width: 100%;
  }

  .search-btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .browse-section,
  .about-section,
  .services-section,
  .featured-blog-section,
  .blog-posts-section {
    padding: 60px 0;
  }

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

  .browse-card--large {
    grid-column: span 1;
    aspect-ratio: 16/9;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .about-image {
    display: none;
  }

  .about-image-mobile {
    display: block;
  }

  .about-credentials {
    grid-template-columns: 1fr;
  }

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

  .featured-post {
    grid-template-columns: 1fr;
  }

  .featured-post-image img {
    min-height: 250px;
  }

  .featured-post-content {
    padding: 28px 24px;
  }

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

  .blog-posts-section .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-top {
    padding: 60px 0 40px;
  }
}

@media (max-width: 480px) {
  .search-tags {
    gap: 6px;
  }

  .search-tag {
    padding: 5px 12px;
    font-size: 0.72rem;
  }

  .about-badge {
    bottom: -16px;
    left: 16px;
    padding: 14px 20px;
  }

  .badge-number {
    font-size: 1.8rem;
  }
}

/* properties.css */
/* ============================================
   STARS - Property Pages Stylesheet
   ============================================ */

/* === BREADCRUMB === */
.breadcrumb-bar {
  margin-top: var(--header-height);
  padding: 16px 0;
  background: var(--color-off-white);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--color-text-light);
}

.breadcrumb a {
  color: var(--color-moss-green);
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--color-moss-green-dark);
  text-decoration: underline;
}

.breadcrumb-sep {
  opacity: 0.4;
}

.breadcrumb-current {
  color: var(--color-text);
  font-weight: 500;
}

/* === PAGE HERO (Listing Page) === */
.page-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?w=1920&q=80') center/cover no-repeat;
  margin-top: var(--header-height);
}

/* Phones load a phone-sized photo (it is the page's largest paint); the page head preloads the same URLs */
@media (max-width: 768px) {
  .page-hero { background-image: url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?w=640&q=40&fm=webp'); }
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(var(--color-dark-brown-rgb), 0.7) 50%,
    rgba(var(--color-dark-brown-rgb), 0.8) 100%
  );
}

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

.page-hero-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
  padding: 6px 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.page-hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.2rem);
  color: var(--color-white);
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.page-hero-subtitle {
  font-size: 1.1rem;
  color: #fff;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.8;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
  opacity: 0.92;
}

/* === FILTER BAR === */
.filter-section {
  padding: 32px 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: var(--header-height);
  /* Under the header (40), so its open menus are drawn over the filters */
  z-index: 30;
}

.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 140px;
}

.filter-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
  margin-bottom: 6px;
}

.filter-group--search {
  flex: 1.5;
}

.filter-group input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition);
}

.filter-group input[type="text"]:focus {
  outline: none;
  border-color: var(--color-moss-green);
}

.filter-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: var(--color-text);
  background: var(--color-white);
  cursor: pointer;
  transition: border-color var(--transition);
}

.filter-group select:focus {
  outline: none;
  border-color: var(--color-moss-green);
}

.filter-btn {
  padding: 10px 24px;
  white-space: nowrap;
}

/* === RESULTS === */
.results-section {
  padding: 48px 0 80px;
  background: var(--color-off-white);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  scroll-margin-top: calc(var(--header-height) + 100px);
}

.results-count {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--color-text-light);
  transition: all 0.3s ease;
  padding: 4px 0;
  border-radius: var(--radius-sm);
}

.results-count strong {
  color: var(--color-dark-brown);
}

.results-count.results-flash {
  background: var(--color-moss-green);
  color: var(--color-white);
  padding: 4px 14px;
}

.results-count.results-flash strong {
  color: var(--color-white);
}

.results-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.results-sort select {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-text);
  background: var(--color-white);
  cursor: pointer;
}

/* === PROPERTY CARDS GRID === */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

.property-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

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

.property-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

/* body.legacy: chrome.css's .s-site img { height: auto } would otherwise win and crop photos from the top */
body.legacy .property-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-card:hover .property-card-image img {
  transform: scale(1.06);
}

/* Photo copy deterrent (spec 2026-11-05). A right-click or long-press on these passes through to what holds
   them: on a card that is the link, so "open in new tab" still works, and the browser offers no image options.
   Do not add touch-callout here: on iOS it would take the link's own menu away. */
.property-card-image img,
.gallery-thumb img,
.video-play img {
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

#galleryMainImg,
.gallery-thumb,
.video-play {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

.property-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--color-moss-green);
  color: var(--color-white);
  padding: 4px 14px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.property-card-price {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(var(--color-dark-brown-rgb), 0.85);
  color: var(--color-white);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

/* Sold, Leased, Reserved and Under Negotiation across the top of a photo (listingBanner in src/lib/listings.js).
   Sold and Leased are the track record: solid and the largest. The other two are quieter, and the price stays. */
.listing-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 7px 14px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.listing-banner--sold,
.listing-banner--leased {
  padding: 10px 14px;
  background: var(--brown-deep);
  color: var(--color-white);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.listing-banner--reserved {
  background: var(--color-tan-light);
  color: var(--brown-deep);
}

.listing-banner--under-negotiation {
  background: var(--sky-tint);
  color: var(--ink);
}

/* On the gallery the banner is a flag, not a band: the top right corner holds the logo baked into the photo */
.listing-banner--gallery {
  right: auto;
  max-width: 62%;
  padding: 10px 20px;
  border-bottom-right-radius: var(--radius-md);
  font-size: 1.05rem;
}

@media (max-width: 480px) {
  .listing-banner--gallery {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

.listing-banner--gallery.listing-banner--sold,
.listing-banner--gallery.listing-banner--leased {
  padding: 14px 20px;
  font-size: 1.6rem;
}

.results-sold-link {
  margin-left: 14px;
}

.results-sold-link a {
  color: var(--color-moss-green);
  font-weight: 600;
  text-decoration: underline;
}

.sold-section {
  margin-top: 64px;
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.sold-section .section-title {
  margin-bottom: 8px;
}

.sold-section-lead {
  margin-bottom: 28px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--color-text-light);
}

.sold-section[hidden],
.results-sold-link[hidden] {
  display: none;
}

.property-card-body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.property-card-type {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-moss-green);
  margin-bottom: 6px;
}

.property-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
  color: var(--color-dark-brown);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.property-card-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin-bottom: 14px;
}

.property-card-location svg {
  flex-shrink: 0;
  color: var(--color-tan);
}

.property-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
  margin-top: auto;
}

.property-card-specs span {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-light);
  background: var(--color-tan-lighter);
  padding: 4px 10px;
  border-radius: 50px;
}

/* === EMPTY LISTING STATE === */
.empty-listing {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  color: var(--color-text-light);
  font-family: var(--font-heading);
  font-size: 1rem;
}

.results-count-bottom {
  text-align: center;
  margin-top: 32px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* === PAGINATION === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.pagination-btn:hover {
  border-color: var(--color-moss-green);
  color: var(--color-moss-green);
}

.pagination-btn--active {
  background: var(--color-moss-green);
  color: var(--color-white);
  border-color: var(--color-moss-green);
}

.pagination-btn--next {
  padding: 0 20px;
}

/* ============================================
   PROPERTY DETAIL PAGE
   ============================================ */

/* === GALLERY === */
.property-gallery {
  padding: 24px 0;
  background: var(--color-off-white);
}

.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.gallery-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-tan-lighter);
}

/* body.legacy: chrome.css's .s-site img { height: auto } would otherwise win, so photos were drawn
   at their own height and lost their bottom part */
body.legacy .gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A portrait photo is shown whole instead of cropped to a strip (properties.js sets the class) */
body.legacy .gallery-main img.is-portrait {
  object-fit: contain;
}

.gallery-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--color-moss-green);
  color: var(--color-white);
  padding: 6px 18px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-dark-brown);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
}

.gallery-nav:hover {
  background: var(--color-white);
  transform: translateY(-50%) scale(1.05);
}

.gallery-nav svg {
  width: 20px;
  height: 20px;
}

.gallery-nav--prev { left: 16px; }
.gallery-nav--next { right: 16px; }

.gallery-counter {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(var(--color-dark-brown-rgb), 0.75);
  color: var(--color-white);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
  background: none;
  opacity: 0.6;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: var(--color-moss-green);
  opacity: 1;
}

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

/* === PROPERTY CONTENT LAYOUT === */
.property-content {
  padding: 40px 0 80px;
}

.property-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px; /* minmax: the thumbnail strip must not widen the column */
  gap: 40px;
  align-items: start;
}

/* The sidebar runs the full height of the listing so the card inside has room to stick */
.property-sidebar {
  align-self: stretch;
}

.sidebar-sticky {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Short screens: the stuck card scrolls on its own so Send Inquiry stays reachable */
.sidebar-sticky .agent-card {
  max-height: calc(100vh - var(--header-height) - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.property-main .sidebar-card {
  margin-bottom: 40px;
}

/* === PROPERTY HEADER === */
.property-header {
  margin-bottom: 32px;
}

.property-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.property-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.property-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 14px;
  border-radius: 50px;
}

.property-tag--status {
  background: var(--color-moss-green);
  color: var(--color-white);
}

.property-tag--sold,
.property-tag--leased {
  background: var(--brown-deep);
}

.property-tag--reserved {
  background: var(--color-tan-light);
  color: var(--brown-deep);
}

.property-tag--under-negotiation {
  background: var(--sky-tint);
  color: var(--ink);
}

.property-tag--type {
  background: var(--color-tan-lighter);
  color: var(--color-dark-brown);
}

.property-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.3;
  margin-bottom: 10px;
}

.property-address {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.property-address svg {
  flex-shrink: 0;
  color: var(--color-tan);
}

.property-price-block {
  text-align: right;
  flex-shrink: 0;
}

.property-price {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-moss-green);
  line-height: 1.2;
}

.property-price--closed {
  color: var(--brown-deep);
}

.property-price-note {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--color-text-light);
  font-weight: 500;
}

/* === KEY SPECS BAR === */
.property-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 a row: the left column beside the form is narrower */
  gap: 12px;
  padding: 20px;
  background: var(--color-off-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-bottom: 20px;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.spec-item svg {
  width: 28px;
  height: 28px;
  color: var(--color-moss-green);
  flex-shrink: 0;
}

.spec-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark-brown);
  line-height: 1.2;
}

.spec-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  color: var(--color-text-light);
  font-weight: 500;
}

/* === ACTION BUTTONS === */
.property-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-light);
  cursor: pointer;
  transition: all var(--transition);
}

.action-btn:hover {
  border-color: var(--color-moss-green);
  color: var(--color-moss-green);
}

.action-btn svg {
  flex-shrink: 0;
}

/* === SECTION NAV (Sticky Tabs) === */
.property-section-nav {
  display: flex;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: var(--header-height);
  background: var(--color-white);
  /* Under the header (40), so its open menus are drawn over the tabs */
  z-index: 30;
  overflow-x: auto;
}

.section-tab {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--color-text-light);
  white-space: nowrap;
  transition: all var(--transition);
}

.section-tab:hover {
  color: var(--color-moss-green);
  background: var(--color-tan-lighter);
}

.section-tab.active {
  color: var(--color-white);
  background: var(--color-moss-green);
}

/* === CONTENT SECTIONS === */
.property-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--color-border);
}

.property-section:last-child {
  border-bottom: none;
}

.property-section-title {
  font-size: 1.35rem;
  margin-bottom: 24px;
  color: var(--color-dark-brown);
}

/* Description */
.property-description p {
  font-size: 0.98rem;
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: 16px;
}

.property-description p:last-child {
  margin-bottom: 0;
}

/* Details Tables */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.details-group-title {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-dark-brown);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-moss-green);
  display: inline-block;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
}

.details-table tr {
  border-bottom: 1px solid var(--color-border);
}

.details-table tr:last-child {
  border-bottom: none;
}

.details-table td {
  padding: 10px 0;
  font-size: 0.88rem;
}

.details-table td:first-child {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-text-light);
  width: 45%;
}

.details-table td:last-child {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-dark-brown);
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.features-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-dark-brown);
  margin-bottom: 16px;
}

.features-group-title svg {
  color: var(--color-moss-green);
}

.features-list li {
  position: relative;
  padding: 6px 0 6px 24px;
  font-size: 0.9rem;
  color: var(--color-text-light);
  font-family: var(--font-heading);
  font-weight: 400;
}

.features-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-moss-green);
  opacity: 0.6;
}

/* Location */
.location-details {
  margin-bottom: 24px;
  max-width: 500px;
}

.location-map {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.location-map iframe {
  display: block;
}

/* Nearby */
.nearby-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.nearby-category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-dark-brown);
  margin-bottom: 14px;
}

.nearby-category-title svg {
  color: var(--color-moss-green);
}

.nearby-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.85rem;
}

.nearby-list li:last-child {
  border-bottom: none;
}

.nearby-name {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-text);
}

.nearby-dist {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-moss-green);
  font-size: 0.8rem;
  background: var(--color-tan-lighter);
  padding: 2px 10px;
  border-radius: 50px;
}

/* Schedule Form */
.schedule-form-wrapper {
  max-width: 700px;
}

.schedule-form,
.agent-inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-moss-green);
}

.form-group textarea {
  resize: vertical;
}

.btn--full {
  width: 100%;
  justify-content: center;
}

/* === SIDEBAR === */
.agent-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.agent-card-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.agent-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-moss-green);
  flex-shrink: 0;
}

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

.agent-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.agent-title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.agent-license {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--color-moss-green);
  font-weight: 600;
}

.agent-contact-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.agent-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition);
}

.agent-contact-btn--phone {
  background: var(--color-moss-green);
  color: var(--color-white);
}

.agent-contact-btn--phone:hover {
  background: var(--color-moss-green-dark);
}

/* The Messenger button; brand brown, since white on the old green was 2:1 */
.agent-contact-btn--messenger {
  background: var(--color-dark-brown);
  color: var(--color-white);
}

.agent-contact-btn--messenger:hover {
  background: #3d2b14;
}

.inquiry-form-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark-brown);
  margin-bottom: 4px;
}

.inquiry-form-note {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--color-text);
}

.inquiry-form-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
}

.inquiry-form-links a {
  color: var(--color-moss-green);
  text-decoration: underline;
}

.agent-inquiry-form {
  gap: 12px;
}

.agent-inquiry-form .form-group input,
.agent-inquiry-form .form-group select,
.agent-inquiry-form .form-group textarea {
  padding: 9px 12px;
  font-size: 0.85rem;
}

/* Sidebar Card */
.sidebar-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark-brown);
  margin-bottom: 16px;
}

.payment-options li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.payment-options li:last-child {
  border-bottom: none;
}

.payment-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.payment-value {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  color: var(--color-dark-brown);
  font-weight: 700;
}

.payment-note {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--color-text-light);
  line-height: 1.6;
  font-style: italic;
}

/* === SIMILAR PROPERTIES === */
.similar-section {
  padding: 80px 0;
  background: var(--color-off-white);
  overflow: hidden;
}

.similar-section .section-header,
.listing-guides .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* === GUIDES FOR BUYERS (src/lib/link-graph.js) === */
.listing-guides {
  padding: 0 0 80px;
  background: var(--color-off-white);
}

/* Right under the similar listings the two read as one band; without them it needs its own top space */
.property-content + .listing-guides {
  padding-top: 80px;
}

.listing-guides .section-header {
  margin-bottom: 32px;
}

.listing-guides-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.listing-guides-list a {
  display: grid;
  gap: 8px;
  height: 100%;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text);
  transition: all var(--transition);
}

.listing-guides-list a:hover {
  border-color: var(--color-moss-green);
  box-shadow: var(--shadow-lg);
}

.listing-guides-list b {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--color-dark-brown);
}

.listing-guides-list span {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text-light);
}

/* Ensure property content doesn't overflow */
.property-content {
  overflow: hidden;
  overflow: clip; /* clip keeps the sidebar's sticky card working; hidden would trap it */
}

.property-gallery {
  overflow: hidden;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .property-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
  }

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

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

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

@media (max-width: 768px) {
  .property-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar-sticky {
    position: static;
  }

  .sidebar-sticky .agent-card {
    max-height: none;
    overflow-y: visible;
  }

  .property-header-top {
    flex-direction: column;
    gap: 16px;
  }

  .property-price-block {
    text-align: left;
  }

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

  .properties-grid,
  .similar-grid {
    grid-template-columns: 1fr;
  }

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

  /* Stacked, the form is taller than most of a phone screen: stuck to the top it would hide the listings */
  .filter-section {
    position: static;
  }

  .filter-bar {
    flex-direction: column;
    gap: 12px;
  }

  .filter-group {
    min-width: 100%;
  }

  .filter-btn {
    width: 100%;
    justify-content: center;
  }

  .gallery-main {
    aspect-ratio: 16/10;
  }

  .gallery-thumb {
    width: 72px;
    height: 50px;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .agent-contact-methods {
    grid-template-columns: 1fr;
  }

  .property-section-nav {
    gap: 2px;
  }

  .section-tab {
    padding: 6px 12px;
    font-size: 0.78rem;
  }

  .page-hero {
    min-height: 320px;
  }

  .similar-section .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .property-actions {
    flex-wrap: wrap;
  }

  .pagination {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .property-specs {
    grid-template-columns: 1fr;
  }

  .property-price {
    font-size: 1.4rem;
  }
}

/* ============================================
   PROPERTY COMPARISON (Houzez-style)
   ============================================ */

/* Compare button inside card body */
.compare-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 16px;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: 50px;
  background: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-light);
  cursor: pointer;
  transition: all var(--transition);
}

.compare-card-btn:hover {
  border-color: var(--color-moss-green);
  color: var(--color-moss-green);
}

.compare-card-btn.active {
  background: var(--color-moss-green);
  border-color: var(--color-moss-green);
  color: var(--color-white);
}

/* Right-side slide panel */
.cp-panel {
  position: fixed;
  right: -290px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 998;
  transition: right 0.3s ease;
}

.cp-panel.has-items .cp-tab { display: flex; }
.cp-panel.open { right: 0; }

.cp-tab {
  display: none;
  position: absolute;
  left: -52px;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 56px;
  border-radius: 10px 0 0 10px;
  border: none;
  background: var(--color-moss-green);
  color: var(--color-white);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: -3px 0 16px rgba(0, 0, 0, 0.15);
}

.cp-tab:hover { background: var(--color-moss-green-dark); }

.cp-tab-count {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
}

.cp-body {
  width: 290px;
  background: var(--color-white);
  border-left: 1px solid var(--color-border);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  padding: 20px;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 10px 0 0 10px;
}

.cp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.cp-header strong { font-family: var(--font-heading); font-size: 0.95rem; color: var(--color-dark-brown); }

.cp-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--color-border); background: var(--color-white);
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-light);
}
.cp-close:hover { color: var(--color-dark-brown); border-color: var(--color-dark-brown); }

.cp-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; flex: 1; }

.cp-empty { font-size: 0.82rem; color: var(--color-text-light); line-height: 1.5; text-align: center; padding: 12px 0; }

.cp-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; background: var(--color-off-white);
  border-radius: var(--radius-sm); border: 1px solid var(--color-border);
}

.cp-item img { width: 50px; height: 38px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.cp-item-info { flex: 1; min-width: 0; }

.cp-item-title {
  display: block; font-family: var(--font-heading); font-size: 0.78rem;
  font-weight: 600; color: var(--color-dark-brown); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.cp-item-price { font-family: var(--font-heading); font-size: 0.72rem; color: var(--color-moss-green); font-weight: 600; }

.cp-item-remove {
  background: none; border: none; font-size: 1.3rem;
  color: var(--color-text-light); cursor: pointer; padding: 0 4px; line-height: 1; flex-shrink: 0;
}
.cp-item-remove:hover { color: #d9534f; }

.cp-actions { display: none; }

.cp-go {
  display: block; text-align: center; padding: 11px;
  background: var(--color-moss-green); color: var(--color-white);
  border-radius: var(--radius-sm); font-family: var(--font-heading);
  font-size: 0.85rem; font-weight: 600; margin-bottom: 8px;
  transition: background var(--transition);
}
.cp-go:hover { background: var(--color-moss-green-dark); }

.cp-clear {
  display: block; width: 100%; padding: 8px;
  background: none; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); font-family: var(--font-heading);
  font-size: 0.8rem; font-weight: 500; color: var(--color-text-light);
  cursor: pointer; transition: all var(--transition);
}
.cp-clear:hover { border-color: var(--color-dark-brown); color: var(--color-dark-brown); }

/* Compare page table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

.compare-table th {
  padding: 20px 16px;
  text-align: center;
  vertical-align: bottom;
  background: var(--color-off-white);
  border-bottom: 2px solid var(--color-border);
}

.compare-table th:first-child {
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
}

.compare-thumb {
  width: 100%;
  max-width: 180px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin: 0 auto 8px;
  display: block;
}

.compare-prop-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-dark-brown);
  line-height: 1.3;
}

.compare-table td {
  padding: 12px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 500;
}

.compare-table td:first-child { text-align: left; }

.compare-label {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text-light);
  font-size: 0.82rem;
}

.compare-table tr:hover td { background: var(--color-tan-lighter); }
.compare-table th a { color: inherit; }
.compare-table th a:hover .compare-prop-title { color: var(--color-moss-green); }

/* Compare toast */
.cp-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-dark-brown);
  color: var(--color-white);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  animation: cpSlideUp 0.3s ease;
}

@keyframes cpSlideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .cp-panel { right: -260px; }
  .cp-body { width: 260px; }
  .cp-tab { left: -44px; width: 44px; height: 48px; }
}

/* Listing videos (spec 2026-11-04) */
.gallery-videos-link {
  position: absolute;
  left: 20px; /* under the status badge, level with the photo counter */
  bottom: 16px;
  padding: 8px 16px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-dark-brown);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.gallery-videos-link:hover { background: var(--color-white); }

/* No scroll-margin: html's scroll-padding-top (80px, 70px on phones) already clears the header (76px, 68px) and adds to any margin */
.listing-videos { margin-bottom: 28px; }
.listing-videos .property-section-title { margin: 0 0 14px; }

.video-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.video-card { min-width: 0; }

/* A one-third card is too small to watch in, so the playing card takes the whole column.
   A listing's only video takes it from the start, so the thumbnail is the size the player will be. */
.video-card.is-playing,
.video-card:only-child { grid-column: 1 / -1; }

.video-play {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-tan-lighter);
  cursor: pointer;
  aspect-ratio: 16 / 9;
}

.video-play[hidden] { display: none; }

body.legacy .video-play img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A vertical clip shows whole on the card's plain sides, like a portrait photo in the gallery */
body.legacy .video-card.is-portrait .video-play img { object-fit: contain; }

/* A whole-column vertical clip sits in a box shaped like the gallery. The thumbnail and the player fill the same
   box, so pressing play moves nothing. */
@media (min-width: 641px) {
  .video-card.is-portrait:only-child .video-stage,
  .video-card.is-portrait.is-playing .video-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 80vh;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-tan-lighter);
  }

  .video-card.is-portrait:only-child .video-play {
    position: absolute;
    inset: 0;
    height: 100%;
    border-radius: 0;
    aspect-ratio: auto;
  }
}

.video-card.is-portrait .video-stage .video-frame {
  position: absolute;
  top: 0;
  left: 50%;
  width: auto;
  height: 100%;
  margin: 0;
  transform: translateX(-50%);
  border-radius: 0;
}

.video-card.is-portrait.is-playing .video-card-label {
  width: auto;
  margin-inline: 0;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  padding: 13px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-dark-brown);
}

.video-play:hover .video-play-icon { background: var(--color-white); }

.video-length {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--color-white);
  font-size: 0.8rem;
}

/* The width sets the height through the clip's shape (listing-videos.js sets --video-shape), so any clip
   stays whole: as wide as its card, or narrower and centred when that would pass 80% of the screen height */
.video-frame {
  display: block;
  width: min(100%, 80vh * (var(--video-shape)));
  aspect-ratio: var(--video-shape);
  margin-inline: auto;
  border: 0;
  border-radius: var(--radius-md);
  background: #000;
  scroll-margin-bottom: calc(var(--bar-height) + env(safe-area-inset-bottom) + 12px); /* the phone action bar must not cover the player */
}

.video-card-label { margin: 8px 0 0; font-weight: 600; overflow-wrap: anywhere; }

/* Under a narrower centred frame the label starts at the frame's left edge */
.video-card.is-playing .video-card-label {
  width: min(100%, 80vh * (var(--video-shape)));
  margin-inline: auto;
}

/* Beside the form on a tablet the left column is too narrow for three */
@media (max-width: 1024px) {
  .video-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .video-cards { grid-template-columns: minmax(0, 1fr); }

  /* A phone is the right shape already: the clip fills the width in its own shape, with no sides to shrink it.
     listing-videos.js sets --video-shape on load; a very tall clip stops at 80% of the screen. */
  .video-card.is-portrait .video-stage {
    position: relative;
    width: 100%;
    aspect-ratio: var(--video-shape, 9 / 16);
    max-height: 80vh;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-tan-lighter);
  }

  .video-card.is-portrait .video-play {
    position: absolute;
    inset: 0;
    height: 100%;
    border-radius: 0;
    aspect-ratio: auto;
  }
}

/* Beside other cards a full-width card would leave a hole, so it goes first. Stacked phones have no hole and keep their order. */
@media (min-width: 641px) {
  .video-card.is-playing { order: -1; }
}

