/* ─────────────────────────────────────────────
   CalmStay – Hero Slider & Property Carousel
   ───────────────────────────────────────────── */

/* ══════════════════════════════════════════════
   HERO SLIDER
   ══════════════════════════════════════════════ */

.cs-hero-slider {
  position: relative;
  width: 100%;
  height: 88vh;
  min-height: 520px;
  max-height: 860px;
  overflow: hidden;
  background: #1c1a17;
}

/* ── Slides ───────────────────────────────────── */
.cs-hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}

.cs-hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Background image */
.cs-hero-slide__bg-img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.cs-hero-slide.is-active .cs-hero-slide__bg-img {
  transform: scale(1);
}

/* Gradient fallbacks when no image */
.cs-hero-slide__bg-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.cs-hero-slide__bg-gradient--0 {
  background: linear-gradient(135deg, #2d1a0e 0%, #6b3a1f 40%, #b8860b 100%);
}

.cs-hero-slide__bg-gradient--1 {
  background: linear-gradient(135deg, #0a2a3a 0%, #1a5276 45%, #148f77 100%);
}

.cs-hero-slide__bg-gradient--2 {
  background: linear-gradient(135deg, #1a2a1a 0%, #2d5a27 45%, #5d8233 100%);
}

/* Dark overlay for text legibility */
.cs-hero-slide__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(15, 12, 8, 0.72) 0%,
    rgba(15, 12, 8, 0.42) 55%,
    rgba(15, 12, 8, 0.18) 100%
  );
}

/* ── Slide content ────────────────────────────── */
.cs-hero-slide__content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.cs-hero-slide__inner {
  max-width: 580px;
}

.cs-hero-slide__location {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.75);
  margin: 0 0 12px;
  text-transform: uppercase;
}

.cs-hero-slide__title {
  font-size: 54px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.08;
  margin: 0 0 14px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);

  /* Animate in when active */
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.7s 0.3s cubic-bezier(.4,0,.2,1),
              opacity   0.7s 0.3s cubic-bezier(.4,0,.2,1);
}

.cs-hero-slide__sub {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
  margin: 0 0 28px;
  max-width: 440px;

  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.7s 0.45s cubic-bezier(.4,0,.2,1),
              opacity   0.7s 0.45s cubic-bezier(.4,0,.2,1);
}

.cs-hero-slide__cta {
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.7s 0.58s cubic-bezier(.4,0,.2,1),
              opacity   0.7s 0.58s cubic-bezier(.4,0,.2,1);
  border-radius: 999px;
  padding: 14px 30px;
  font-size: 15px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 24px rgba(189,158,67,.35);
}

.cs-hero-slide__cta:hover {
  background: #a88930;
  box-shadow: 0 8px 28px rgba(189,158,67,.45);
}

.cs-hero-slide.is-active .cs-hero-slide__title,
.cs-hero-slide.is-active .cs-hero-slide__sub,
.cs-hero-slide.is-active .cs-hero-slide__cta {
  transform: translateY(0);
  opacity: 1;
}

/* ── Navigation arrows ────────────────────────── */
.cs-hero-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  background: rgba(15,12,8,0.42);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
  backdrop-filter: blur(4px);
}

.cs-hero-slider__arrow:hover {
  background: rgba(189,158,67,0.82);
  border-color: transparent;
  transform: translateY(-50%) scale(1.08);
}

.cs-hero-slider__arrow--prev { left: 24px; }
.cs-hero-slider__arrow--next { right: 24px; }

/* ── Dot indicators ───────────────────────────── */
.cs-hero-slider__dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
}

.cs-hero-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.22s, width 0.22s, border-radius 0.22s;
}

.cs-hero-slider__dot.is-active {
  background: var(--brand);
  width: 24px;
  border-radius: 4px;
}

/* ── Progress bar ─────────────────────────────── */
.cs-hero-slider__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
  z-index: 10;
}

.cs-hero-slider__progress-fill {
  height: 100%;
  background: var(--brand);
  width: 0%;
}

/* ── Slide counter ────────────────────────────── */
.cs-hero-slider__counter {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 10;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════
   SEARCH BAR (below hero)
   ══════════════════════════════════════════════ */

.cs-home-search {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.cs-home-search__inner {
  display: flex;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
  transform: translateY(-28px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  padding: 6px 6px 6px 22px;
}

.cs-home-search__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  padding: 10px 0;
  min-width: 0;
}

.cs-home-search__input::placeholder { color: var(--muted-light); }

.cs-home-search__btn {
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 14px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   PROPERTY CAROUSEL
   ══════════════════════════════════════════════ */

.cs-prop-carousel-section {
  padding: 8px 0 60px;
}

.cs-prop-carousel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.cs-prop-carousel-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 4px;
}

.cs-prop-carousel-sub {
  font-size: 14px;
  margin: 0;
}

.cs-prop-carousel-all {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 16px;
}
.cs-prop-carousel-all:hover { color: #a88930; }

/* Outer clipping wrapper */
.cs-prop-carousel {
  position: relative;
}

.cs-prop-carousel__viewport {
  overflow: hidden;
}

/* Sliding track */
.cs-prop-carousel__track {
  display: flex;
  gap: 20px;
  transition: transform 0.42s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* Each card keeps the listing-card base styles but gets a fixed flex width */
.cs-prop-carousel__item {
  flex: 0 0 calc(33.333% - 14px);
  min-width: 0;
}

/* ── Carousel arrows ──────────────────────────── */
.cs-prop-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border-dark);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: background 0.15s, border-color 0.15s, opacity 0.2s, transform 0.15s;
}

.cs-prop-carousel__arrow:hover {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  transform: translateY(-60%) scale(1.06);
}

.cs-prop-carousel__arrow:disabled {
  opacity: 0.3;
  pointer-events: none;
}

.cs-prop-carousel__arrow--prev { left: -20px; }
.cs-prop-carousel__arrow--next { right: -20px; }

/* ══════════════════════════════════════════════
   HOME SECTIONS
   ══════════════════════════════════════════════ */

.cs-home-section {
  padding: 52px 0;
}

.cs-home-section + .cs-home-section {
  border-top: 1px solid var(--border);
}

.cs-home-section__eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 8px;
}

.cs-home-section__title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 6px;
}

.cs-home-section__sub {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 30px;
  line-height: 1.55;
}

/* Location chips */
.cs-location-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cs-location-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid var(--border-dark);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.cs-location-chip:hover {
  border-color: var(--brand);
  background: #fdf8ee;
  color: var(--brand);
}

.cs-location-chip__icon { font-size: 18px; }

/* Host CTA band */
.cs-host-band {
  background: linear-gradient(135deg, #1c1a17 0%, #2d2820 50%, #3d3020 100%);
  padding: 60px 0;
  text-align: center;
}

.cs-host-band__title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.15;
}

.cs-host-band__sub {
  font-size: 17px;
  color: rgba(255,255,255,0.68);
  margin: 0 auto 28px;
  max-width: 480px;
  line-height: 1.55;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 1060px) {
  .cs-prop-carousel__item         { flex: 0 0 calc(50% - 10px); }
  .cs-prop-carousel__arrow--prev  { left: -14px; }
  .cs-prop-carousel__arrow--next  { right: -14px; }
}

@media (max-width: 700px) {
  /* Slider sizing */
  .cs-hero-slider        { height: 88vh; min-height: 500px; }

  /* Switch overlay to bottom-up so the image shows clearly at top
     and text at the bottom is readable */
  .cs-hero-slide__overlay {
    background: linear-gradient(
      to top,
      rgba(15, 12, 8, 0.85) 0%,
      rgba(15, 12, 8, 0.45) 45%,
      rgba(15, 12, 8, 0.10) 100%
    );
  }

  /* Pin content to the bottom of the slide */
  .cs-hero-slide__content {
    align-items: flex-end;
    padding-bottom: 72px;
  }

  /* Typography */
  .cs-hero-slide__title  { font-size: 32px; }
  .cs-hero-slide__sub    { font-size: 15px; margin-bottom: 20px; }
  .cs-hero-slide__cta    { padding: 12px 24px; font-size: 14px; }

  /* Arrows — smaller, closer to edges */
  .cs-hero-slider__arrow          { width: 38px; height: 38px; top: 42%; }
  .cs-hero-slider__arrow--prev    { left: 12px; }
  .cs-hero-slider__arrow--next    { right: 12px; }

  /* Search bar */
  .cs-home-search__inner { transform: translateY(-20px); margin: 0 16px; }

  /* Carousel — swipeable single-card on mobile */
  .cs-prop-carousel__item  { flex: 0 0 calc(82% - 10px); }
  .cs-prop-carousel__arrow { display: none; }
  .cs-prop-carousel__track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .cs-prop-carousel__track::-webkit-scrollbar { display: none; }
  .cs-prop-carousel__item  { scroll-snap-align: start; }

  .cs-host-band__title    { font-size: 26px; }
  .cs-prop-carousel-title { font-size: 22px; }
}
