/* =========================================================
   RENTAL LISTING PAGE – HERO + HEADER
   Applies only on: body.site.listing.template27
   ========================================================= */

body.site.listing.template27 {
  background: #f5f6f8;
  color: #111827;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Sticky header only on this page */
body.site.listing.template27 .md-header.layout3 .header-container {
  position: sticky;
  top: 0;
  z-index: 50;
}

body.site.listing.template27 .md-header.layout3 .header-placeholder {
  display: none;
}

/* Allow hero custom code to span full width */
body.site.listing.template27 .md-custom-code.html-code .mg-container {
  max-width: 100%;
  padding: 0;
}

/* =========================================================
   HERO SECTION
   ========================================================= */

.rent-hero[data-rent-hero] {
  position: relative;
  min-height: calc(90vh - 88px); /* full viewport height */
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  color: #ffffff;
}

/* Background image will be switched by JS */
.rent-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  transform: scale(1.03);
  transition: transform 0.8s ease-out;
  will-change: transform;
}

/* Slight zoom on hover for a premium feel */
.rent-hero[data-rent-hero]:hover .rent-hero__bg {
  transform: scale(1.06);
}

/* Dark overlay */
.rent-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.88),
    rgba(15, 23, 42, 0.55),
    rgba(15, 23, 42, 0.3)
  );
}

/* Inner layout */
.rent-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 18px 80px; /* little extra bottom so controls fit nicely */
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

/* Text block */
.rent-hero__eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.78);
  margin-bottom: 8px;
}

.rent-hero__title {
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.rent-hero__subtitle {
  font-size: 15px;
  line-height: 1.5;
  max-width: 460px;
  color: rgba(241, 245, 249, 0.88);
}

/* Right side: featured info + controls */

.rent-hero__content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-end;
}

.rent-hero__info {
  background: rgba(15, 23, 42, 0.92);
  border-radius: 18px;
  padding: 14px 18px;
  min-width: 260px;
  max-width: 360px;
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.65);
}

.rent-hero__price {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  cursor: pointer; /* price is clickable */
}

.rent-hero__meta {
  font-size: 13px;
  color: #cbd5f5;
  margin: 0 0 4px;
}

.rent-hero__address {
  font-size: 13px;
  color: #e5e7eb;
  margin: 0 0 4px;
}

.rent-hero__count {
  font-size: 12px;
  color: #9ca3af;
  margin: 2px 0 0;
}

/* Message when there are no results yet */
.rent-hero__empty {
  display: none;
  font-size: 13px;
  color: #e5e7eb;
  margin: 0;
}

/* Controls row – bottom center pill with arrows + dots + button */
.rent-hero__controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.7);
}

/* Left / right arrows */
.rent-hero__nav {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.85);
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.12s ease;
}

.rent-hero__nav:hover {
  background: #f9fafb;
  color: #111827;
  border-color: #f9fafb;
  transform: translateY(-1px);
}

.rent-hero__nav:active {
  transform: translateY(0);
}

/* Slider dots */
.rent-hero__dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
  overflow: hidden;
}

.rent-hero__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  background: rgba(148, 163, 184, 0.7);
  padding: 0;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, width 0.16s ease;
}

.rent-hero__dot.is-active {
  width: 16px;
  background: #ffffff;
  transform: translateY(-1px);
}

/* View Listing button */
.rent-hero__view {
  border-radius: 999px;
  border: none;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.55);
  white-space: nowrap; /* keep “View Listing” on one line */
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease,
    box-shadow 0.18s ease;
}

.rent-hero__view:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

.rent-hero__view:active {
  transform: translateY(0);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.4);
}

/* When hero has no items */
.rent-hero--empty .rent-hero__price,
.rent-hero--empty .rent-hero__meta,
.rent-hero--empty .rent-hero__address,
.rent-hero--empty .rent-hero__count,
.rent-hero--empty .rent-hero__controls {
  display: none;
}

.rent-hero--empty .rent-hero__empty {
  display: block;
}

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

@media (max-width: 1024px) {
  .rent-hero[data-rent-hero] {
    min-height: 100vh; /* still full height on tablet */
  }

  .rent-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 50px 16px 72px;
  }

  .rent-hero__content {
    align-items: flex-start;
  }

  .rent-hero__info {
    max-width: 100%;
  }

  .rent-hero__title {
    font-size: 30px;
  }
}

@media (max-width: 640px) {
  .rent-hero__inner {
    padding: 40px 14px 64px;
  }

  .rent-hero__title {
    font-size: 26px;
  }

  .rent-hero__controls {
    bottom: 20px;
    padding: 6px 10px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .rent-hero__view {
    font-size: 12px;
    padding: 8px 12px;
  }
}
