/* ==========================================================================
   Properties Carousel Section ("Discover homes designed to inspire.")
   ========================================================================== */
.properties {
  background: #ffffff;
  padding: 120px 0 140px;
  overflow: hidden;
  position: relative;
}

/* Header: Headline Left + Subtitle Right */
.properties-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto 56px;
  padding: 0 48px;
  box-sizing: border-box;
}

.properties-head h2 {
  margin: 0;
  max-width: 480px;
  font-size: 48px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -2.4px;
  color: #000000;
}

.properties-sub {
  margin: 0 0 6px;
  max-width: 320px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.6px;
  color: rgba(0, 0, 0, 0.56);
  text-align: right;
}

/* Carousel Viewport with 3D Perspective and Edge Gradient Masks */
.property-viewport {
  position: relative;
  width: 100%;
  overflow: visible;
  perspective: 1200px;
  -webkit-mask: linear-gradient(90deg, transparent 0%, #000000 12% 88%, transparent 100%);
  mask: linear-gradient(90deg, transparent 0%, #000000 12% 88%, transparent 100%);
  padding: 30px 0;
}

/* Carousel Navigation Arrows: Overlaid on Left and Right of Center Card */
.carousel-nav-arrows {
  position: absolute;
  top: calc(600px * 9 / 16 / 2 + 30px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(600px + 36px);
  max-width: calc(85vw + 36px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 30;
}

.carousel-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #000000;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  pointer-events: auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.carousel-arrow:hover {
  transform: scale(1.12);
  background: #1e1e1e;
}

.carousel-arrow:active {
  transform: scale(0.95);
}

.carousel-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.carousel-arrow svg {
  display: block;
}

/* Property Track */
.property-track {
  display: flex;
  gap: 44px;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.22, 0.8, 0.2, 1);
  will-change: transform;
  padding: 0;
}

/* Property Card & 3D Coverflow Effects */
.property-card {
  flex: 0 0 600px;
  width: 600px;
  max-width: 85vw;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.22, 0.8, 0.2, 1), opacity 0.65s ease;
  opacity: 0;
  transform: scale(0.75);
  user-select: none;
  pointer-events: none;
}

/* Active Center Card */
.property-card.is-active {
  opacity: 1;
  transform: scale(1) rotateY(0deg);
  transform-origin: center center;
  z-index: 10;
  cursor: default;
  pointer-events: auto;
}

/* Left Card (Perspective Inward, significantly smaller scale) */
.property-card.is-prev {
  opacity: 0.35;
  transform: scale(0.65) rotateY(14deg);
  transform-origin: right center;
  z-index: 5;
  cursor: pointer;
  pointer-events: auto;
}

.property-card.is-prev:hover {
  opacity: 0.65;
}

/* Right Card (Perspective Inward, significantly smaller scale) */
.property-card.is-next {
  opacity: 0.35;
  transform: scale(0.65) rotateY(-14deg);
  transform-origin: left center;
  z-index: 5;
  cursor: pointer;
  pointer-events: auto;
}

.property-card.is-next:hover {
  opacity: 0.65;
}

/* Far Cards (beyond immediate prev and next) */
.property-card.is-far-prev {
  opacity: 0;
  transform: scale(0.75) rotateY(14deg);
  transform-origin: right center;
  z-index: 1;
  pointer-events: none;
}

.property-card.is-far-next {
  opacity: 0;
  transform: scale(0.65) rotateY(-14deg);
  transform-origin: left center;
  z-index: 1;
  pointer-events: none;
}

.property-card a {
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-decoration: none;
  color: inherit;
}

/* Card Image */
.property-image {
  overflow: hidden;
  border-radius: 16px;
  background: #e9e9e5;
  aspect-ratio: 16 / 9;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.property-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s ease;
}

.property-card.is-active:hover .property-image img {
  transform: scale(1.03);
}

/* Title & Price Row */
.property-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.property-title h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -1.2px;
  color: #000000;
}

/* Description & Specs Row */
.property-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.property-info p {
  margin: 0;
  max-width: 380px;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.45px;
  color: rgba(0, 0, 0, 0.56);
}

.property-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}

.property-specs span {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.35px;
  color: rgba(0, 0, 0, 0.56);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1199.98px) {
  .properties {
    padding: 80px 0 100px;
  }

  .properties-head {
    padding: 0 32px;
    margin-bottom: 40px;
  }

  .properties-head h2 {
    font-size: 40px;
    letter-spacing: -2px;
  }

  .properties-sub {
    font-size: 16px;
  }

  .property-card {
    flex: 0 0 520px;
    width: 520px;
  }

  .carousel-nav-arrows {
    width: calc(520px + 36px);
    top: calc(520px * 9 / 16 / 2 + 30px);
  }
}

@media (max-width: 809.98px) {
  .properties {
    padding: 64px 0 80px;
  }

  .properties-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 0 24px;
    margin-bottom: 28px;
  }

  .properties-head h2 {
    font-size: 32px;
    letter-spacing: -1.6px;
  }

  .properties-sub {
    text-align: left;
    font-size: 15px;
    max-width: 320px;
  }

  .property-viewport {
    -webkit-mask: none;
    mask: none;
    padding: 10px 0;
  }

  .property-card {
    flex: 0 0 85vw;
    width: 85vw;
    transform: scale(0.85) !important;
    transform-origin: center center !important;
    opacity: 0.4;
    pointer-events: auto;
  }

  .property-card.is-active {
    transform: scale(1) !important;
    opacity: 1;
  }

  .carousel-nav-arrows {
    width: calc(85vw + 24px);
    top: calc(85vw * 9 / 16 / 2 + 10px);
  }

  .property-title h3 {
    font-size: 22px;
    letter-spacing: -0.8px;
  }

  .property-info {
    flex-direction: column;
    gap: 10px;
  }

  .property-info p {
    max-width: none;
    font-size: 14px;
  }

  .property-specs {
    flex-direction: row;
    gap: 16px;
    text-align: left;
  }
}
