/*
 * Homes Overstock — site-wide theme (load last in <head>)
 * Primary brand: teal #0d9488 on slate / ivory. Legacy var names (--primary-red, --gradient-red)
 * keep older templates working while mapping to the teal system.
 */
:root {
  --hos-ruby: #b91c31;
  --hos-ruby-soft: rgba(185, 28, 49, 0.12);
  --hos-navy-deep: #0f172a;
  --hos-navy-mid: #1e293b;
  --hos-teal: #0d9488;
  --hos-teal-soft: rgba(13, 148, 136, 0.2);
  --hos-gold: #d97706;
  --hos-champagne: #fde68a;
  --hos-ivory: #f8fafc;

  /* global.css + theme buttons / icons */
  --main-color: rgb(13, 148, 136);
  --main-color-rgb: 13, 148, 136;
  --color-two: rgb(19, 78, 74);
  --color-two-rgb: 19, 78, 74;

  /* modern-layout.css + listing-pages.css token aliases */
  --primary-red: #0d9488;
  --primary-red-dark: #0f766e;
  --primary-red-light: #5eead4;
  --gradient-red: linear-gradient(135deg, #134e4a 0%, #0d9488 55%, #115e59 100%);
  --shadow-red: 0 10px 36px rgba(13, 148, 136, 0.28);

  /* CTA / mesh section (used below) */
  --hos-cta-mesh:
    radial-gradient(ellipse 110% 70% at 8% -8%, rgba(94, 234, 212, 0.22) 0%, transparent 52%),
    radial-gradient(circle at 88% 25%, rgba(19, 78, 74, 0.42) 0%, transparent 48%),
    linear-gradient(155deg, #0f172a 0%, #1a3d3d 44%, #0d9488 74%, #0f766e 100%);
}

/* --- Wordmark (replaces raster logo images) -------------------------------- */
.hos-wordmark {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.08;
  text-decoration: none !important;
}
.hos-wordmark:focus {
  outline: 2px solid var(--hos-teal);
  outline-offset: 4px;
  border-radius: 4px;
}
.hos-wtop {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
  color: var(--hos-navy-deep);
  text-transform: uppercase;
}
.hos-wordmark--footer .hos-wtop {
  color: #ffffff;
}
.hos-wordmark--mini .hos-wtop {
  font-size: 1rem;
}
.hos-wordmark--footer.hos-wordmark--mini .hos-wtop {
  color: rgba(255, 255, 255, 0.94);
}
.hos-wordmark .hos-wbot {
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--hos-ruby) 10%, var(--hos-gold) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-transform: uppercase;
}
.hos-wordmark--footer .hos-wbot {
  background: linear-gradient(120deg, #fca5a5 15%, var(--hos-champagne) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hos-wordmark .hos-dot {
  font-size: 0.65em;
  opacity: 0.75;
}
.hos-wordmark .hos-wdom {
  display: inline-block;
  margin-top: 0.06rem;
  font-size: 0.668rem;
  font-weight: 700;
  letter-spacing: 0.082em;
  line-height: 1.38;
  max-width: none;
  white-space: nowrap;
  background: linear-gradient(102deg, #0f766e 0%, #0d9488 48%, #b45309 105%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hos-wordmark--footer .hos-wdom {
  background: none;
  -webkit-text-fill-color: unset;
  color: rgba(186, 230, 253, 0.95) !important;
  font-weight: 600 !important;
  max-width: 18rem;
}
.hos-brand-mark.logo {
  min-height: auto;
}

/* Header CTA slightly less “all red”: gradient with teal edge */
.main-header.header-style-three .theme-btn.btn-style-one span {
  filter: saturate(1.08);
}

/* --- Homepage hero --------------------------------------------------------- */
@keyframes hosBadgeGlow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(253, 230, 138, 0.25);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 6px 32px rgba(13, 148, 136, 0.35), 0 0 0 1px rgba(253, 230, 138, 0.2);
    border-color: rgba(167, 243, 208, 0.5);
    transform: translateY(-2px);
  }
}

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

@keyframes hosHeadlineFlipIn {
  from {
    transform: rotateX(76deg) translateY(10px) translateZ(-3px);
    opacity: 0;
  }
  to {
    transform: rotateX(0deg) translateY(0) translateZ(0);
    opacity: 1;
  }
}

@keyframes hosGrain {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100px 60px;
  }
}

@keyframes hosOrbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes hosHeroPan {
  0% {
    background-position: 46% 36%;
  }
  100% {
    background-position: 54% 46%;
  }
}

body.homepage-hero-upgrade .modern-hero {
  min-height: 720px;
  overflow: visible !important;
  background-color: var(--hos-navy-deep);
  /* Wide façade — avoids portrait crops that feel like stock mistakes */
  background-image:
    linear-gradient(
      118deg,
      rgba(15, 23, 42, 0.93) 0%,
      rgba(15, 23, 42, 0.78) 34%,
      rgba(15, 23, 42, 0.42) 56%,
      rgba(13, 148, 136, 0.18) 100%
    ),
    url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?fm=webp&auto=format&fit=crop&w=2400&q=85');
  background-size: cover;
  background-position: center 42%;
  animation: hosHeroPan 48s ease-in-out infinite alternate;
  will-change: background-position;
}

body.homepage-hero-upgrade .modern-hero::before {
  mix-blend-mode: soft-light;
  opacity: 0.72;
}

body.homepage-hero-upgrade .modern-hero h1 .highlight {
  background: linear-gradient(118deg, #5eead4 5%, var(--hos-gold) 48%, #fef3c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hosHeadlineReveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.homepage-hero-upgrade .modern-hero h1 {
  animation: hosHeadlineReveal 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Headline rhythm: stacked lines read as one headline (no stray justify gaps). */
body.homepage-hero-upgrade .modern-hero h1.hos-hero-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(6px, 0.08em, 12px);
  max-width: min(18em, 100%);
  text-align: left;
  text-wrap: balance;
}

body.homepage-hero-upgrade .modern-hero h1 .hos-hero-title__line {
  display: block;
}

body.homepage-hero-upgrade .modern-hero h1 .hos-hero-title__glue {
  display: inline;
  white-space: normal;
}

body.homepage-hero-upgrade .modern-hero h1 .hos-hero-title__accent {
  display: block;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* Rotating listing archetypes before “Homes & Listings” (GSAP in homes-hero-flip.js; CSS fallback for exit). */
body.homepage-hero-upgrade .modern-hero h1 .hos-headline-flip {
  display: inline-flex;
  align-items: baseline;
  vertical-align: baseline;
  margin-right: max(0.18em, 6px);
  perspective: 900px;
  perspective-origin: 50% 45%;
}

body.homepage-hero-upgrade .modern-hero .hos-headline-flip__inner {
  display: inline-block;
  transform-style: preserve-3d;
  min-inline-size: min-content;
  text-align: left;
}

body.homepage-hero-upgrade .modern-hero h1 .hos-hero-title__and {
  display: inline;
  font-weight: 700;
  letter-spacing: -0.035em;
  white-space: normal;
}

body.homepage-hero-upgrade .modern-hero .hos-headline-flip__word {
  display: inline-block;
  letter-spacing: -0.035em;
  transform-origin: 50% 50%;
  transition:
    transform 0.52s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.26s linear;
  color: inherit;
  text-shadow:
    0 2px 0 rgba(15, 23, 42, 0.25),
    0 12px 40px rgba(13, 148, 136, 0.38),
    0 0 1px rgba(255, 255, 255, 1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* GSAP SplitText wrappers — staggered typewriter feel */
body.homepage-hero-upgrade .hos-flip-char {
  display: inline-block;
  will-change: transform, opacity, filter;
}

/* Typing caret while characters reveal */
body.homepage-hero-upgrade .hos-headline-flip__word[data-typing='1']::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 0.74em;
  margin-left: 3px;
  vertical-align: -0.05em;
  border-radius: 1px;
  background: linear-gradient(180deg, #5eead4 0%, #fde68a 100%);
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.45);
  animation: hosTypeCaret 0.78s ease-in-out infinite;
}

@keyframes hosTypeCaret {
  0%,
  48% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.15;
  }
}

body.homepage-hero-upgrade .hos-headline-flip--exit .hos-headline-flip__word {
  transform: rotateX(-88deg) translateZ(-2px);
  opacity: 0.06;
}

body.homepage-hero-upgrade .hos-headline-flip--enter .hos-headline-flip__word {
  animation: hosHeadlineFlipIn 0.6s cubic-bezier(0.19, 0.93, 0.18, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  body.homepage-hero-upgrade .modern-hero {
    animation: none !important;
    will-change: auto;
  }

  body.homepage-hero-upgrade .modern-hero h1,
  body.homepage-hero-upgrade .modern-hero h1 .highlight {
    animation: none !important;
    opacity: 1 !important;
  }

  body.homepage-hero-upgrade .hos-headline-flip__word {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .hos-float-card {
    animation: none !important;
  }

  .hos-float-card:hover .hos-float-card__surface {
    transform: none;
  }

  .hos-float-card:hover .hos-float-card__thumb img {
    transform: none;
  }
}

.hero-badge {
  animation: hosBadgeGlow 4.5s ease-in-out infinite;
}

.hero-search-box .search-tabs button.active {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 55%, #134e4a 115%) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.hero-search-box .search-btn {
  background: linear-gradient(135deg, #0d9488 0%, #115e59 100%) !important;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s;
  box-shadow: 0 10px 28px rgba(13, 148, 136, 0.28);
}
.hero-search-box .search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(13, 148, 136, 0.4);
}

.hero-floating-shapes .floating-shape:nth-child(1) {
  background: radial-gradient(circle, var(--hos-teal-soft) 0%, transparent 70%);
}
.hero-floating-shapes .floating-shape:nth-child(2) {
  background: radial-gradient(circle, rgba(217, 119, 6, 0.2) 0%, transparent 70%);
}
.hero-floating-shapes .floating-shape:nth-child(3) {
  background: radial-gradient(circle, rgba(13, 148, 136, 0.18) 0%, transparent 70%);
}

/* Soft teal ring deco (premium depth) — index only */
.hero-floating-shapes::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  right: 6%;
  top: 12%;
  border-radius: 50%;
  border: 1px solid rgba(253, 230, 138, 0.12);
  animation: hosOrbit 48s linear infinite;
  pointer-events: none;
}
@media (max-width: 991px) {
  .hero-floating-shapes::after {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-floating-shapes::after {
    animation: none;
  }
}

/* --- Homepage: floating listing mini-cards (stacked desktop + visible motion — gap protects overlap) --- */
@keyframes hosFloatStackGhost {
  0% {
    transform: translate3d(2px, -16px, 0) rotate(-0.55deg);
  }
  22% {
    transform: translate3d(14px, 8px, 0) rotate(0.42deg);
  }
  48% {
    transform: translate3d(-10px, 14px, 0) rotate(-0.28deg);
  }
  72% {
    transform: translate3d(-12px, -12px, 0) rotate(0.38deg);
  }
  100% {
    transform: translate3d(2px, -16px, 0) rotate(-0.55deg);
  }
}

@keyframes hosFloatCardBloomA {
  0%,
  100% {
    transform: translate3d(3px, -8px, 0);
  }
  50% {
    transform: translate3d(-10px, 9px, 0);
  }
}

@keyframes hosFloatCardBloomB {
  0%,
  100% {
    transform: translate3d(-11px, 5px, 0);
  }
  50% {
    transform: translate3d(9px, -10px, 0);
  }
}

@keyframes hosFloatCardBloomC {
  0%,
  100% {
    transform: translate3d(8px, 7px, 0);
  }
  50% {
    transform: translate3d(-13px, -9px, 0);
  }
}

@media (min-width: 1200px) {
  body.homepage-hero-upgrade .modern-hero .container {
    pointer-events: none;
  }
  body.homepage-hero-upgrade .modern-hero .hero-content,
  body.homepage-hero-upgrade .modern-hero .hero-search-box,
  body.homepage-hero-upgrade .modern-hero .quick-filters {
    pointer-events: auto;
  }
}

.hos-hero-floats {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

@media (min-width: 1200px) {
  .hos-hero-floats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-inline: clamp(22px, 5.2vw, 72px);
    padding-block: clamp(44px, 9vh, 100px);
    box-sizing: border-box;
  }

  .hos-float-stack {
    pointer-events: auto;
    flex-shrink: 0;
  }

  .hos-float-stack__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: clamp(30px, 4.5vh, 48px);
    animation: hosFloatStackGhost 21s cubic-bezier(0.42, 0, 0.58, 1) infinite;
    will-change: transform;
    transform-origin: 60% 40%;
  }

  .hos-float-stack .hos-float-card {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    will-change: transform;
    width: min(186px, 16.5vw);
    max-width: 204px;
  }

  .hos-float-stack .hos-float-card--1 {
    animation: hosFloatCardBloomA 18s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate !important;
  }

  .hos-float-stack .hos-float-card--2 {
    animation: hosFloatCardBloomB 22s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate !important;
    animation-delay: -5.5s !important;
  }

  .hos-float-stack .hos-float-card--3 {
    animation: hosFloatCardBloomC 26s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate !important;
    animation-delay: -12s !important;
  }

  .hos-float-stack .hos-float-card:hover {
    animation-play-state: paused !important;
  }

  .hos-hero-floats:has(.hos-float-card:hover) .hos-float-stack__inner {
    animation-play-state: paused;
  }

  @media (prefers-reduced-motion: reduce) {
    .hos-float-stack__inner {
      animation: none !important;
      will-change: auto;
    }

    .hos-float-stack .hos-float-card--1,
    .hos-float-stack .hos-float-card--2,
    .hos-float-stack .hos-float-card--3 {
      animation: none !important;
      will-change: auto;
    }
  }
}

.hos-float-card {
  margin: 0;
  pointer-events: auto;
  position: relative;
  width: min(178px, 18vw);
  max-width: 198px;
  filter: drop-shadow(0 14px 28px rgba(15, 23, 42, 0.28));
}

.hos-float-card__surface {
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.94) 100%);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 18px 40px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease,
    border-color 0.35s ease;
  transform-origin: 50% 60%;
}

.hos-float-card:hover {
  z-index: 30;
}

.hos-float-card:hover .hos-float-card__surface {
  transform: translateY(-5px) scale(1.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 28px 64px rgba(13, 148, 136, 0.22),
    0 0 0 1px rgba(13, 148, 136, 0.32);
  border-color: rgba(13, 148, 136, 0.45);
}

.hos-float-card__link {
  display: block;
  text-decoration: none !important;
  color: inherit;
  border-radius: 16px;
}

.hos-float-card__link:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 3px;
}

.hos-float-card__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
}

.hos-float-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.hos-float-card:hover .hos-float-card__thumb img {
  transform: scale(1.12);
}

.hos-float-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(120deg, #0f766e 0%, #0d9488 55%, #115e59 100%);
  box-shadow: 0 10px 20px rgba(13, 148, 136, 0.35);
}

.hos-float-card__badge .fa {
  font-size: 11px;
  opacity: 0.92;
}

.hos-float-card__meta {
  padding: 10px 11px 12px;
  display: grid;
  gap: 3px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.hos-float-card__eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.hos-float-card__price {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--hos-navy-deep);
  line-height: 1.15;
}

.hos-float-card__suffix {
  font-size: 0.55em;
  font-weight: 700;
  color: #64748b;
  margin-left: 2px;
}

.hos-float-card__sub {
  font-size: 10px;
  line-height: 1.38;
  color: #64748b;
}

@media (max-width: 1199px) {
  /* Stack hero: text/search first, listing strip full-width below (no side-by-side squeeze / overlap) */
  body.homepage-hero-upgrade .modern-hero {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
    padding-top: clamp(68px, 13vw, 96px);
    padding-bottom: clamp(36px, 8vw, 64px) !important;
    gap: 0;
  }

  body.homepage-hero-upgrade .modern-hero .container {
    order: 1;
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    padding-left: clamp(18px, 5vw, 28px);
    padding-right: clamp(18px, 5vw, 28px);
  }

  body.homepage-hero-upgrade .hero-content {
    max-width: none !important;
    width: 100%;
  }

  body.homepage-hero-upgrade .hero-search-box {
    max-width: none !important;
    width: 100%;
    box-sizing: border-box;
    padding: clamp(18px, 4.5vw, 26px);
    border-radius: clamp(18px, 4vw, 24px);
  }

  body.homepage-hero-upgrade .modern-hero h1 {
    font-size: clamp(1.75rem, 6.2vw, 2.65rem);
    line-height: 1.18;
    letter-spacing: -0.02em;
  }

  body.homepage-hero-upgrade .modern-hero .hos-headline-flip__inner {
    min-inline-size: min-content;
  }

  body.homepage-hero-upgrade .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.15rem);
    line-height: 1.65;
    max-width: 36rem;
  }

  body.homepage-hero-upgrade .hero-badge {
    font-size: clamp(13px, 3.6vw, 15px);
    padding: 10px clamp(16px, 4vw, 24px);
    margin-bottom: clamp(18px, 4vw, 26px);
  }

  .hos-float-stack,
  .hos-float-stack__inner {
    display: contents;
  }

  body.homepage-hero-upgrade .hos-hero-floats {
    order: 2;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: clamp(16px, 4vw, 20px);
    position: relative;
    inset: auto;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    z-index: 9;
    margin: clamp(22px, 5vw, 36px) clamp(12px, 3vw, 22px) 0;
    padding: clamp(16px, 4vw, 24px) clamp(14px, 4vw, 22px) clamp(10px, 2.5vw, 18px);
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-padding-inline: clamp(14px, 4vw, 22px);
    scroll-snap-type: x proximity;
    pointer-events: auto;
    flex-shrink: 0;
    background: linear-gradient(
      180deg,
      rgba(15, 23, 42, 0) 0%,
      rgba(15, 23, 42, 0.28) 35%,
      rgba(15, 23, 42, 0.5) 100%
    );
    border-radius: clamp(16px, 4vw, 22px);
    align-self: stretch;
    box-sizing: border-box;
  }

  body.homepage-hero-upgrade .hos-float-card {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    flex: 0 0 min(240px, 78vw);
    width: min(240px, 78vw);
    max-width: min(240px, 78vw);
    scroll-snap-align: start;
    animation: none !important;
    filter: drop-shadow(0 12px 28px rgba(15, 23, 42, 0.28));
    will-change: auto;
  }

  body.homepage-hero-upgrade .hos-float-card__surface {
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s ease;
  }

  body.homepage-hero-upgrade .hos-float-card:active .hos-float-card__surface,
  body.homepage-hero-upgrade .hos-float-card:focus-within .hos-float-card__surface {
    transform: translateY(-3px) scale(1.04);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.85) inset,
      0 18px 40px rgba(13, 148, 136, 0.2),
      0 0 0 1px rgba(13, 148, 136, 0.28);
  }
}

@media (max-width: 991px) {
  body.homepage-hero-upgrade .modern-hero {
    min-height: auto;
    background-position: center 42%;
  }

  body.homepage-hero-upgrade .hero-content {
    text-align: center;
    margin-inline: auto;
  }

  body.homepage-hero-upgrade .modern-hero h1.hos-hero-title {
    align-items: center;
    margin-inline: auto;
    text-align: center;
  }

  body.homepage-hero-upgrade .hero-subtitle {
    margin-inline: auto;
  }

  body.homepage-hero-upgrade .hero-badge {
    margin-inline: auto;
    display: inline-flex;
    max-width: 100%;
  }

  body.homepage-hero-upgrade .quick-filters {
    justify-content: center;
    gap: 10px;
  }

  body.homepage-hero-upgrade .search-tabs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  body.homepage-hero-upgrade .search-tabs button {
    font-size: 13px;
    padding: 9px 16px;
  }
}

@media (max-width: 767px) {
  body.homepage-hero-upgrade .modern-hero {
    padding: clamp(72px, 18vw, 110px) 0 clamp(32px, 9vw, 56px);
  }

  body.homepage-hero-upgrade .hos-hero-floats {
    margin-inline: clamp(10px, 2.8vw, 18px);
  }
}

@media (max-width: 1199px) and (prefers-reduced-motion: reduce) {
  body.homepage-hero-upgrade .hos-float-card:active .hos-float-card__surface,
  body.homepage-hero-upgrade .hos-float-card:focus-within .hos-float-card__surface {
    transform: none;
  }
}

/* Homepage: “Get listings first” newsletter — photo + frosted tray */
body.homepage-hero-upgrade .newsletter-section.hos-newsletter-photo {
  isolation: isolate;
  background-color: #0f172a;
  background-image:
    linear-gradient(118deg, rgba(15, 23, 42, 0.93) 0%, rgba(19, 78, 74, 0.48) 46%, rgba(15, 23, 42, 0.9) 100%),
    url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?fm=webp&auto=format&fit=crop&w=2400&q=82');
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position: center, center 40%;
}

body.homepage-hero-upgrade .hos-newsletter-photo::before,
body.homepage-hero-upgrade .hos-newsletter-photo::after {
  opacity: 0.18 !important;
}

body.homepage-hero-upgrade .hos-newsletter-photo .floating-shape.shape-1,
body.homepage-hero-upgrade .hos-newsletter-photo .floating-shape.shape-2 {
  opacity: 0.38 !important;
}

body.homepage-hero-upgrade .hos-newsletter-photo .newsletter-content {
  padding: clamp(1.35rem, 3.2vw, 2rem) clamp(1.25rem, 3vw, 2rem);
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 32px 90px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(13px) saturate(125%);
  -webkit-backdrop-filter: blur(13px) saturate(125%);
}

body.homepage-hero-upgrade .hos-newsletter-photo .newsletter-form-inline input {
  background: rgba(15, 23, 42, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
}

body.homepage-hero-upgrade .hos-newsletter-photo .privacy-note {
  color: rgba(241, 245, 249, 0.78) !important;
}

@media (prefers-reduced-motion: reduce) {
  body.homepage-hero-upgrade .newsletter-section.hos-newsletter-photo {
    background-position: center, center center;
  }
}

/* Legal / policy document pages --------------------------------------------- */
.blog-three.hos-legal-doc.all-sections {
  padding-top: 56px !important;
  padding-bottom: 72px !important;
  background: linear-gradient(185deg, #f8fafc 0%, #eef2ff 52%, #f1f5f9 100%);
}

.blog-three.hos-legal-doc .privacy-content > h3 {
  margin-top: 30px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid rgba(13, 148, 136, 0.15) !important;
  color: #0f766e !important;
  font-size: 1.15rem !important;
}

.hos-doc-effective-banner {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 22px;
  margin-bottom: 28px !important;
  border-radius: 16px;
  border: 1px solid rgba(13, 148, 136, 0.22);
  background: linear-gradient(145deg, rgba(240, 253, 250, 0.98), rgba(255, 255, 255, 0.96));
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.07);
}

.hos-doc-effective-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f766e;
}

.hos-doc-effective-banner time {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--hos-navy-deep);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hos-doc-lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #475569 !important;
  border-left: 3px solid rgba(13, 148, 136, 0.5);
  padding-left: 18px !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  margin-bottom: 24px !important;
}

.contact-hero .contact-hero-date {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 22px auto 0;
  padding: 10px 20px;
  font-size: 14px !important;
  color: rgba(255, 255, 255, 0.92) !important;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.contact-hero .contact-hero-date time {
  font-weight: 800;
}


/* Nav hovers read “premium” instead of all-red */
@media (min-width: 992px) {
  .main-header .navigation > li > a:hover,
  .main-header .navigation > li.current > a {
    color: #0d9488 !important;
  }
}

/* Category strip: balance red card with nuanced border */
.categories-section .category-card.category-red {
  border-color: rgba(13, 148, 136, 0.25) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12) !important;
}

/* =====================================================================
   Brand UI — SVG lockup, featured grid (home), shared components
   ===================================================================== */

/* SVG + wordmark lockup */
.hos-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  color: inherit;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.45s ease;
}

.hos-lockup:hover .hos-lockup__mark {
  transform: rotate(-3deg) scale(1.05);
  filter: drop-shadow(0 6px 14px rgba(13, 148, 136, 0.32));
}

@media (prefers-reduced-motion: reduce) {
  .hos-lockup:hover .hos-lockup__mark {
    transform: none;
    filter: none;
  }
}

.hos-lockup:focus {
  outline: 2px solid var(--hos-teal);
  outline-offset: 4px;
  border-radius: 8px;
}
.hos-lockup__mark {
  flex-shrink: 0;
  color: #0d9488;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
  transform-origin: 50% 55%;
}
.hos-lockup__text {
  display: flex;
  flex-direction: column;
  line-height: 1.14;
}
.hos-lockup__title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.035em;
  font-size: 1.125rem;
  color: var(--hos-navy-deep);
}
.hos-lockup__domain {
  display: inline-block;
  margin-top: 1px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.38;
  max-width: none;
  white-space: nowrap;
  text-transform: none;
  background: linear-gradient(118deg, #0f766e 0%, #0d9488 42%, #d97706 98%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hos-lockup--menu .hos-lockup__domain {
  font-size: 0.545rem;
  letter-spacing: 0.069em;
  max-width: none;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .hos-lockup:not(.hos-lockup--footer) .hos-lockup__domain {
    font-size: 0.548rem !important;
    max-width: 100%;
    letter-spacing: 0.054em !important;
    white-space: normal !important;
    text-wrap: balance;
  }
}

.hos-lockup--menu .hos-lockup__title {
  font-size: 1.02rem;
}
.hos-lockup--menu .hos-lockup__mark {
  width: 34px;
  height: 34px;
}

.hos-lockup--footer .hos-lockup__mark {
  color: #5eead4;
}
.hos-lockup--footer .hos-lockup__title {
  color: rgba(248, 250, 252, 0.98);
}
.hos-lockup--footer .hos-lockup__domain {
  background: none;
  -webkit-text-fill-color: unset;
  color: rgba(186, 230, 253, 0.95) !important;
  letter-spacing: 0.065em !important;
  font-weight: 600 !important;
  background-clip: border-box !important;
  max-width: 18rem;
}

.hos-footer-tagline {
  margin: 14px 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 22rem;
  color: rgba(255, 255, 255, 0.72);
}

/* Hero ring deco — calm, no spin */
body.homepage-hero-upgrade .hero-floating-shapes::after {
  animation: none;
  opacity: 0.7;
}


/* Header / mobile CTAs — primary teal */
.main-header.header-style-three .theme-btn.btn-style-one,
.mobile-menu .theme-btn.btn-style-one {
  background-color: #0d9488 !important;
}
.main-header.header-style-three .theme-btn.btn-style-one:before,
.mobile-menu .theme-btn.btn-style-one:before {
  background-color: #134e4a !important;
}

/* Featured listings strip */
.hos-featured-strip {
  background: linear-gradient(180deg, #eef2f7 0%, #f8fafc 50%, #ffffff 100%);
  padding-top: 5rem;
  padding-bottom: 5.5rem;
}
.hos-featured-strip .section-header h2 {
  letter-spacing: -0.03em;
}
.hos-featured-strip .section-header h2::after {
  background: linear-gradient(90deg, #0d9488, #67e8f9);
}

.hos-featured-strip .view-all {
  border-color: rgba(13, 148, 136, 0.4);
  color: #0f766e;
}
.hos-featured-strip .view-all:hover {
  background: #0f766e;
  color: #fff;
}

.hos-listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem 1.375rem;
  align-items: stretch;
}
.hos-grid-cell {
  min-width: 0;
}
@media (max-width: 1199px) {
.hos-listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
.hos-listing-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hos-listing-grid .property-card .card-features i {
  color: #0f766e;
}
.hos-listing-grid .property-card .card-price-row .list-date {
  color: #0f766e;
}
.hos-listing-grid .property-card .card-status {
  background: linear-gradient(135deg, #0f172a, #334155);
}
.hos-listing-grid .property-card .card-badges .badge-new,
.hos-listing-grid .property-card .card-badges .badge-featured,
.hos-listing-grid .property-card .card-badges .badge-open {
  background: #0f766e;
}
.hos-listing-grid .property-card .card-badges .badge-rent-to-own {
  background: linear-gradient(135deg, #b45309, #92400e);
}
.hos-listing-grid .property-card .card-last-sold {
  background: rgba(13, 148, 136, 0.1);
  border-left-color: #0f766e;
  color: #1e293b;
}
.hos-listing-grid .property-card .view-details-btn {
  background: linear-gradient(135deg, #0d9488, #134e4a);
}
.hos-listing-grid .property-card .view-details-btn:hover {
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.45);
}
.hos-listing-grid .property-card .card-favorite:hover {
  background: #0f766e;
}

.view-all-properties-btn--teal {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
  color: #fff !important;
  box-shadow: 0 14px 40px rgba(13, 148, 136, 0.3);
  border: 1px solid rgba(167, 243, 208, 0.22);
}

@keyframes hosSpin {
  to {
    transform: rotate(360deg);
  }
}
.hos-grid-placeholder {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2.75rem;
  text-align: center;
  color: #64748b;
  font-size: 0.975rem;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  border: 1px dashed rgba(13, 148, 136, 0.25);
}
.hos-spin {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.5rem;
  border: 2px solid rgba(13, 148, 136, 0.35);
  border-top-color: #0d9488;
  border-radius: 50%;
  animation: hosSpin 0.85s linear infinite;
  vertical-align: -0.15em;
}
@media (prefers-reduced-motion: reduce) {
  .hos-spin {
    animation: none;
    border: 2px solid #0d9488;
  }
}

.progress-wrap::after {
  color: #0d9488;
}
.progress-wrap svg.progress-circle path {
  stroke: #0d9488;
}

.main-footer .newsletter-box_two .form-group button {
  background-color: #0f766e !important;
}
.main-footer .newsletter-box_two .form-group button:hover {
  background-color: #115e59 !important;
}

.main-footer .footer-contact_list li span {
  color: #67e8f9;
  border-color: rgba(103, 232, 249, 0.45);
  background-color: rgba(15, 118, 110, 0.22);
}
.main-footer .footer-contact_list li a:hover {
  color: #67e8f9;
}

.main-footer .upper-box {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 2.75rem;
  margin-bottom: 3rem;
}

/* Mid-page newsletter + third hero shape — match teal system */
.newsletter-section .newsletter-form-inline button {
  background: linear-gradient(135deg, #0f766e, #0d9488) !important;
}
.newsletter-section .newsletter-form-inline button:hover {
  box-shadow: 0 10px 30px rgba(13, 148, 136, 0.45) !important;
}
.newsletter-section .newsletter-form-inline input:focus {
  border-color: #5eead4;
}
.newsletter-section .newsletter-text h3 .highlight {
  color: #5eead4 !important;
}


.main-footer .newsletter-box_two .form-group .icon {
  color: #5eead4;
}

/* CTA ribbon — swap red text for teal on white pill */
.cta-section .cta-btn-primary {
  color: #0f766e !important;
}
.cta-section .cta-btn-primary:hover {
  background: #0d9488 !important;
  color: #fff !important;
}

/* “Explore Listings Without Restrictions” — layered mesh replaces flat banner red */
.cta-section {
  background-color: #0f172a;
  background-image: var(--hos-cta-mesh);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.cta-section::before {
  opacity: 0.45;
  background: rgba(255, 255, 255, 0.06);
}

.cta-section::after {
  opacity: 0.4;
}

.cta-section .cta-badge {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(10px);
}

.cta-section h2 .highlight {
  color: #fde68a;
  background: linear-gradient(120deg, #fcd34d 0%, #fef3c7 60%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.listings-page .property-card .card-last-sold,
#listings-grid .property-card .card-last-sold {
  border-left-color: var(--hos-teal) !important;
  background: rgba(13, 148, 136, 0.08) !important;
}

/* Contact page hero — teal (not red); photo drift loads after theme + contact bundles */
@keyframes hosContactHeroPan {
  /* Two layers — keep gradient anchored, pan the photo layer for motion */
  0% {
    background-position: center center, 42% 30%;
  }
  100% {
    background-position: center center, 58% 52%;
  }
}

.contact-hero {
  padding: 150px 0 118px !important;
  background-color: #0f172a !important;
  background-image: linear-gradient(
      146deg,
      rgba(15, 23, 42, 0.93) 0%,
      rgba(19, 78, 74, 0.55) 46%,
      rgba(13, 148, 136, 0.48) 100%
    ),
    url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?fm=webp&auto=format&fit=crop&w=2200&q=85') !important;
  background-size: cover, cover !important;
  background-position: center center, 48% 38% !important;
  animation: hosContactHeroPan 46s ease-in-out infinite alternate;
  will-change: background-position;
}

@media (prefers-reduced-motion: reduce) {
  .contact-hero {
    animation: none !important;
    will-change: auto !important;
  }
}

.contact-hero .hero-decorative-lines span {
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(94, 234, 212, 0.5),
    transparent
  ) !important;
  opacity: 0.82;
}

.contact-hero .hero-label {
  border-color: rgba(94, 234, 212, 0.35) !important;
  background: rgba(13, 148, 136, 0.18) !important;
}

.contact-hero .hero-label i,
.contact-hero .hero-label span {
  color: #ecfdf5 !important;
}

.contact-hero .hero-main-title span {
  background: linear-gradient(120deg, #5eead4 0%, #fde68a 55%, #fef08a 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

.info-card-icon {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.14) 0%, rgba(45, 212, 191, 0.06) 100%) !important;
}

.info-card-icon i {
  color: #0f766e !important;
}

.mega-menu-links a:hover {
  color: #0f766e !important;
}

/* Desktop: stray dropdown chevron must not overlap mega panels */
@media (min-width: 992px) {
  li.mega-menu-item > .dropdown-btn {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    overflow: hidden !important;
    border: 0 !important;
  }
}

/* Custom cursor followers — shrink “active” ring so menus don’t look huge */
@media (pointer: fine) {
  body:not(.hos-cursor-simple) .cursor-follower {
    width: 22px !important;
    height: 22px !important;
    opacity: 0.75 !important;
  }

  body:not(.hos-cursor-simple) .cursor-follower.active,
  body:not(.hos-cursor-simple) .cursor-follower.menu-active {
    opacity: 0.92 !important;
    transform: scale(1.12) translate(2px, 2px) !important;
  }
}

/* Defeat template sticky header if another script toggles `.fixed-header` */
.main-header.header-style-three.fixed-header .header-lower {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 1001 !important;
  background-color: transparent !important;
  box-shadow: none !important;
  animation: none !important;
}

/* Full-width translucent header bar (premium, no floating pill capsule) — desktop */
@media (min-width: 992px) {
  .main-header.header-style-three .header-lower {
    background: transparent !important;
  }

  /* Let the chrome span the viewport edge-to-edge */
  .main-header.header-style-three .header-lower .auto-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .main-header.header-style-three .main-menu {
    border-radius: 0 !important;
    background: transparent !important;
  }

  .main-header.header-style-three .header-lower .inner-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding-left: clamp(1.2rem, 4vw, 2.85rem) !important;
    padding-right: clamp(1.2rem, 4vw, 2.85rem) !important;
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 12px 40px rgba(15, 23, 42, 0.05) !important;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.78) 0%,
      rgba(248, 250, 252, 0.66) 100%
    ) !important;
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
  }

  /* No sticky header anymore — soften “fixed-header” remnants if toggled elsewhere */
  .main-header.fixed-header .header-lower .inner-container {
    background: rgba(248, 250, 252, 0.9) !important;
  }

  .main-header.header-style-three .navigation > li > a {
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    padding: 0.42rem 0.65rem !important;
    border-radius: 999px !important;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  }

  .main-header.header-style-three .navigation > li:not(.current) > a:hover {
    background: rgba(13, 148, 136, 0.09);
    box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.14);
    color: #0f766e !important;
  }

  /* Smaller pill for active item only */
  .main-header.header-style-three .navigation > li.current > a {
    background: rgba(13, 148, 136, 0.12);
    box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.22);
  }
}
