/*
 * SC SHOW-ME FEATURED HOMES RAIL
 * Version: v0.2.9 — 2026-09-03 21:50 CST (Mobile-Only Swipe Performance Patch)
 *
 * SMOOTH + MOBILE PORTRAIT CANARY
 * - Desktop remains five-position CodePen stack (unchanged).
 * - Mobile uses isolated card transform, rAF frame coalescing, and center range guard.
 * - Mobile active slide scale is 1.65; mobile chrome compensated at 0.606x (1 / 1.65).
 * - Mobile nav arrow position set to --position: 5%.
 * - Full-screen All Homes app view styled matching Listing Peek modal shell.
 */

body.sc-area-grid-collapsed .container-fluid.footer {
  padding-top: 0 !important;
}

.sc-featured-homes-rail {
  position: relative;
  overflow: hidden;
  padding: 42px 0 74px;
  color: var(--sc-midnight-20);
  background: var(--sc-paper);
}

/*
 * Canonical SC Lux section-title treatment.
 */
.sc-featured-homes-rail__header {
  width: min(1600px, calc(100% - 48px));
  margin: 0 auto 10px;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.sc-featured-homes-rail .sc-lux-section-label {
  font-family: 'CompassSans', sans-serif;
  font-weight: 500;
  font-size: clamp(2.15rem, 2.45vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  color: var(--sc-midnight-20);
  margin: 0;
  flex-shrink: 0;
}

.sc-featured-homes-rail .sc-lux-section-label span {
  display: block;
}

.sc-featured-homes-rail .sc-lux-section-label__muted {
  color: var(--sc-over-ice, #89a5bb);
}

.sc-featured-homes-rail__hint {
  margin: 0;
  color: rgba(0, 18, 50, 0.68);
  font-family: var(--sc-font-body);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-align: right;
  max-width: 520px;
}

.sc-featured-homes-rail__hint-mobile {
  display: none;
}

/*
 * Stage & Swiper Container
 */
.sc-featured-homes-rail__stage {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 570px;
  display: flex;
  align-items: center;
  overflow: visible;
}

.sc-featured-homes-swiper {
  position: relative;
  width: 100%;
  height: 252px;
  overflow: visible;
}

.sc-featured-homes-swiper .swiper-wrapper {
  display: flex;
  align-items: center;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Base geometry: width calculated by Swiper (slidesPerView: 5). Fixed height 252px.
 * Dynamic scaling & z-index controlled in real-time by JS applyProgressScale.
 */
.sc-featured-homes-slide {
  position: relative;
  height: 252px;
  opacity: 1;
  will-change: transform;
}

.sc-featured-homes-slide__card,
.sc-featured-homes-rail .lux-collection-card,
.sc-featured-homes-rail .comingsoon-card-image-link,
.sc-featured-homes-rail .comingsoon-card-image,
.sc-featured-homes-rail .sc-looking-glass {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.sc-featured-homes-slide__card {
  position: relative;
}

.sc-featured-homes-rail .comingsoon-card-image,
.sc-featured-homes-rail .sc-looking-glass {
  aspect-ratio: auto !important;
  min-height: 0;
}

.sc-featured-homes-rail .lux-collection-card {
  transform: none !important;
  border-radius: 0.5rem;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.sc-featured-homes-rail .lux-collection-card:hover {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/*
 * UNIVERSAL SCRIM
 * The photo scrim overlay (.comingsoon-card-scrim) is ALWAYS visible on all slides.
 */
.sc-featured-homes-slide .comingsoon-card-scrim {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: opacity 220ms ease;
}

/*
 * DESKTOP ACTIVE-CHROME COMPENSATION & UN-FOCUS UNIFORMITY
 * Base scale(0.5) applies unconditionally to all rail chrome elements (pills, buttons, text).
 */
@media (min-width: 768px) {
  .sc-featured-homes-slide .sc-pill-cluster {
    top: 6px !important;
    left: 6px !important;
    transform: scale(0.5) !important;
    transform-origin: top left !important;
  }

  .sc-featured-homes-slide .lux-card-fav-btn {
    top: 6px !important;
    right: 6px !important;
    transform: scale(0.5) !important;
    transform-origin: top right !important;
  }

  .sc-featured-homes-slide .lux-card-action-cluster {
    right: 6px !important;
    bottom: 6px !important;
    transform: scale(0.5) !important;
    transform-origin: bottom right !important;
  }

  .sc-featured-homes-slide .comingsoon-card-body {
    padding: 5px 7px 6px !important;
    gap: 1.5px !important;
  }

  .sc-featured-homes-slide .lux-card-price {
    font-size: 0.675rem !important;
  }

  .sc-featured-homes-slide .comingsoon-card-address-line {
    font-size: 0.425rem !important;
  }

  .sc-featured-homes-slide .comingsoon-card-specs-line {
    font-size: 0.36rem !important;
  }

  .sc-featured-homes-slide .lux-card-content-wrap {
    gap: 6px !important;
  }

  .sc-featured-homes-slide .lux-card-info-col {
    gap: 1.5px !important;
  }

  .sc-featured-homes-slide .lux-spec-divider {
    margin-left: 3px !important;
    margin-right: 3px !important;
  }
}

/*
 * INACTIVE SLIDES = PHOTO + SCRIM MODE.
 * Hide pills, fav button, action buttons, and text shelf when inactive.
 * Fade in smoothly ONLY when active center focus is reached.
 */
.sc-featured-homes-slide:not(.swiper-slide-active) .sc-pill-cluster,
.sc-featured-homes-slide:not(.swiper-slide-active) .lux-card-fav-btn,
.sc-featured-homes-slide:not(.swiper-slide-active) .lux-card-action-cluster,
.sc-featured-homes-slide:not(.swiper-slide-active) .comingsoon-card-body {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.sc-featured-homes-slide:not(.swiper-slide-active) .lux-collection-card {
  pointer-events: none;
}

.sc-featured-homes-slide .sc-pill-cluster,
.sc-featured-homes-slide .lux-card-fav-btn,
.sc-featured-homes-slide .lux-card-action-cluster,
.sc-featured-homes-slide .comingsoon-card-body {
  transition: opacity 220ms ease, visibility 220ms linear;
}

.sc-featured-homes-slide.swiper-slide-active .sc-pill-cluster,
.sc-featured-homes-slide.swiper-slide-active .lux-card-fav-btn,
.sc-featured-homes-slide.swiper-slide-active .lux-card-action-cluster,
.sc-featured-homes-slide.swiper-slide-active .comingsoon-card-body {
  opacity: 1 !important;
  visibility: visible !important;
}

.sc-featured-homes-slide.swiper-slide-active .lux-card-fav-btn,
.sc-featured-homes-slide.swiper-slide-active .lux-card-action-cluster {
  pointer-events: auto;
  z-index: 12 !important;
}

/* Neighbor-selection hit target */
.sc-featured-homes-slide__focus {
  position: absolute;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.sc-featured-homes-slide.swiper-slide-active .sc-featured-homes-slide__focus {
  pointer-events: none;
  visibility: hidden;
}

/*
 * BORDERLESS CODEPEN ARROW DESIGN
 * 48px × 48px (3rem × 3rem), border-radius: 0.5rem (rounded rectangle box), --position: 17%.
 * Zero border outline.
 */
.sc-featured-homes-nav,
.sc-featured-homes-swiper .swiper-button-prev,
.sc-featured-homes-swiper .swiper-button-next {
  --position: 17%;
  position: absolute !important;
  top: 50% !important;
  z-index: 1000 !important;
  width: 3rem !important;
  height: 3rem !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  border: none !important;
  outline: none !important;
  appearance: none;
  background: rgba(0, 18, 50, 0.92) !important;
  box-shadow: 0 8px 22px rgba(0, 7, 18, 0.24) !important;
  transform: translateY(-50%) !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: background-color 180ms ease;
}

.sc-featured-homes-nav:hover,
.sc-featured-homes-swiper .swiper-button-prev:hover,
.sc-featured-homes-swiper .swiper-button-next:hover {
  background: rgba(0, 18, 50, 1.0) !important;
  box-shadow: 0 10px 28px rgba(0, 7, 18, 0.38) !important;
}

.sc-featured-homes-prev,
.sc-featured-homes-swiper .swiper-button-prev {
  left: var(--position) !important;
  right: auto !important;
}

.sc-featured-homes-next,
.sc-featured-homes-swiper .swiper-button-next {
  right: var(--position) !important;
  left: auto !important;
}

/* Swiper default pseudo icon override */
.sc-featured-homes-swiper .swiper-button-prev::after,
.sc-featured-homes-swiper .swiper-button-next::after {
  display: none !important;
}

.sc-featured-homes-nav .sc-glass__content {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--sc-paper);
  font-family: var(--sc-font-body);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
}

.sc-featured-homes-nav.swiper-button-disabled {
  opacity: 0.38 !important;
}

.sc-featured-homes-nav.swiper-button-lock {
  display: flex !important;
}

.sc-featured-homes-rail__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 4px 24px 0;
}

.sc-featured-homes-rail__cta {
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid rgba(0, 18, 50, 0.22);
  border-radius: var(--sc-radius-pill);
  background: var(--sc-midnight-20);
  color: var(--sc-paper);
  font-family: var(--sc-font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
}

.sc-featured-homes-rail__cta:hover,
.sc-featured-homes-rail__cta:focus-visible {
  border-color: rgba(0, 18, 50, 0.52);
  outline: none;
}

.sc-area-all-homes[hidden] {
  display: none !important;
}

.sc-area-all-homes {
  scroll-margin-top: clamp(70px, 8vh, 100px);
}

@media (max-width: 767px) {
  .sc-featured-homes-rail {
    padding: 24px 0 54px;
  }

  .sc-featured-homes-rail__header {
    width: calc(100% - 36px);
    margin-bottom: 6px;
    align-items: flex-end;
  }

  .sc-featured-homes-rail__hint {
    font-size: 0.74rem;
    max-width: 170px;
    line-height: 1.25;
    padding-bottom: 20px;
  }

  .sc-featured-homes-rail__hint-desktop {
    display: none;
  }

  .sc-featured-homes-rail__hint-mobile {
    display: inline;
    padding-bottom: 20px;
  }

  /*
   * MOBILE PORTRAIT RAIL
   * The carousel still travels horizontally. Only the slide crop changes.
   * Swiper calculates roughly 2.15 base slides across the viewport, which keeps
   * the focused portrait dominant while leaving both neighboring portraits visible.
   */
  .sc-featured-homes-rail__stage {
    min-height: 520px;
  }

  .sc-featured-homes-swiper {
    height: auto;
    padding: 32px 0;
  }

  .sc-featured-homes-slide {
    height: auto !important;
    aspect-ratio: 4 / 6 !important;
    transform-origin: center center;
    z-index: 1;
  }

  .sc-featured-homes-slide.swiper-slide-active {
    z-index: 10 !important;
  }

  .sc-featured-homes-slide.swiper-slide-prev,
  .sc-featured-homes-slide.swiper-slide-next {
    z-index: 5 !important;
  }

  .sc-featured-homes-slide__card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    transform: scale(0.95);
    transition: transform 250ms ease-in-out;
    will-change: transform;
  }

  .sc-featured-homes-slide.swiper-slide-active .sc-featured-homes-slide__card {
    transform: scale(1.65);
  }

  .sc-featured-homes-slide.swiper-slide-prev .sc-featured-homes-slide__card,
  .sc-featured-homes-slide.swiper-slide-next .sc-featured-homes-slide__card {
    transform: scale(1.25);
  }

  .sc-featured-homes-rail .lux-collection-card,
  .sc-featured-homes-rail .comingsoon-card-image-link,
  .sc-featured-homes-rail .comingsoon-card-image,
  .sc-featured-homes-rail .sc-looking-glass {
    height: 100%;
  }

  /*
   * RESTRAINED MOBILE STATUS PILL (Scale 0.5 inside 1.65 active card => ~25px height, ~12px text)
   */
  .sc-featured-homes-slide .sc-pill-cluster {
    top: 7px !important;
    left: 7px !important;
    transform: scale(0.5) !important;
    transform-origin: top left !important;
  }

  .sc-featured-homes-slide .lux-card-fav-btn {
    top: 7px !important;
    right: 7px !important;
    transform: scale(0.606) !important;
    transform-origin: top right !important;
  }

  /*
   * MOBILE CARD: ONLY INFO BUTTON VISIBLE
   * Hide SMS & Navigate on mobile rail cards; keep 44px Ice glass Info button.
   */
  .sc-featured-homes-slide .lux-card-action-cluster {
    right: 7px !important;
    bottom: 7px !important;
    transform: scale(0.606) !important;
    transform-origin: bottom right !important;
  }

  .sc-featured-homes-slide .lux-card-action-cluster .lux-card-action-btn:not(.js-listing-peek-trigger) {
    display: none !important;
  }

  .sc-featured-homes-slide .comingsoon-card-body {
    padding: 7px !important;
    gap: 2.5px !important;
  }

  .sc-featured-homes-slide .lux-card-price {
    font-size: 0.818rem !important;
  }

  .sc-featured-homes-slide .comingsoon-card-address-line {
    font-size: 0.515rem !important;
  }

  .sc-featured-homes-slide .comingsoon-card-specs-line {
    font-size: 0.436rem !important;
  }

  .sc-featured-homes-slide .lux-card-content-wrap {
    gap: 7px !important;
  }

  .sc-featured-homes-slide .lux-card-info-col {
    gap: 2px !important;
  }

  .sc-featured-homes-slide .lux-spec-divider {
    margin-left: 3px !important;
    margin-right: 3px !important;
  }

  .sc-featured-homes-nav,
  .sc-featured-homes-swiper .swiper-button-prev,
  .sc-featured-homes-swiper .swiper-button-next {
    --position: 5% !important;
    display: flex !important;
  }

  .sc-featured-homes-rail__actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .sc-featured-homes-rail__cta--all {
    width: 100%;
    max-width: 420px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .sc-featured-homes-slide,
  .sc-featured-homes-slide .sc-pill-cluster,
  .sc-featured-homes-slide .lux-card-fav-btn,
  .sc-featured-homes-slide .lux-card-action-cluster,
  .sc-featured-homes-slide .comingsoon-card-body {
    transition: none !important;
  }
}

/* ==========================================================
 * SHOW-ME ALL HOMES FULL-SCREEN APP VIEW (LISTING PEEK SHELL)
 * Version: v1.0.0 — 2026-09-03 CST
 * ========================================================== */

.sc-all-homes-view {
  position: fixed;
  inset: 0;
  z-index: 90000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 8, 24, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sc-all-homes-view.is-open,
.sc-all-homes-view:not([hidden]) {
  display: flex !important;
}

.sc-all-homes-view[hidden] {
  display: none !important;
}

.sc-all-homes-view__panel {
  width: 100%;
  height: 100%;
  max-width: 1500px;
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #000f28;
  border: 1px solid rgba(16, 185, 129, 0.55);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.sc-all-homes-view__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(0, 15, 40, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.sc-all-homes-view__title-group {
  display: flex;
  flex-direction: column;
}

.sc-all-homes-view__eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #10b981;
  font-weight: 700;
  margin-bottom: 2px;
  display: block;
}

.sc-all-homes-view__title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  font-family: 'ZacbelX', sans-serif;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
  line-height: 1.2;
}

.sc-all-homes-view__header-right {
  display: flex;
  align-items: center;
}

.sc-all-homes-view__cue {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-right: 16px;
  font-family: 'CompassSans', sans-serif;
}

.sc-all-homes-view__close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, outline 0.2s ease;
}

.sc-all-homes-view__close:hover,
.sc-all-homes-view__close:focus {
  background: rgba(255, 255, 255, 0.2);
  outline: 2px solid #10b981;
}

.sc-all-homes-view__body {
  flex-grow: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #000f28;
  position: relative;
  padding: 16px 0;
}

@media (max-width: 900px) {
  .sc-all-homes-view {
    padding: 0;
  }

  .sc-all-homes-view__panel {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: none;
  }
}

@media (min-width: 901px) {
  .sc-all-homes-view__panel {
    width: 95vw;
    height: 95vh;
    height: 95dvh;
    max-width: none;
    max-height: none;
  }
}

/* ==========================================================
 * SHOW-ME AREA CONTENT SECTION & COPY LINK BUTTON
 * MOVED — 2026-09-07 CST
 * These rules are now owned by assets/css/sc-brand-system.css (v1.3.0)
 * and load globally on all pages. Do NOT redeclare here.
 * ========================================================== */

/* MOBILE "SEE ALL HOMES" INLINE EXPANSION */
.sc-desktop-header {
  display: flex;
}
.sc-mobile-header-btn {
  display: none;
}

@media (max-width: 767px) {
  .sc-desktop-header {
    display: none !important;
  }
  
  .sc-mobile-header-btn {
    display: flex !important;
    position: sticky;
    top: 0;
    z-index: 90000;
    width: 100%;
    margin: 0;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: 0;
  }

  .sc-mobile-header-btn:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: -2px;
  }
  
  .sc-all-homes-view {
    position: static !important;
    padding: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
  }
  
  .sc-all-homes-view.is-open {
    display: block !important;
  }
  
  .sc-all-homes-view__panel {
    position: static !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    transform: none !important;
  }
  
  .sc-all-homes-view__body {
    position: static !important;
    background: transparent !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    transform: none !important;
  }
}

