/* ============================================================
   OUR HOMES — page-specific styles
   ============================================================ */

/* ------------------------------------------------------------
   PAGE HERO
   ------------------------------------------------------------ */
.homes-hero {
  background: linear-gradient(135deg, #eef4f8 0%, #f9f6f2 60%, #fdf5ee 100%);
  padding-block: var(--space-2xl);
  border-bottom: 1px solid var(--color-border);
}
.homes-hero h1 { margin-bottom: var(--space-sm); }
.homes-hero .lead { max-width: 56ch; }

.homes-hero-nav {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}
.homes-hero-nav a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid var(--color-primary);
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.homes-hero-nav a:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ------------------------------------------------------------
   FACILITY SECTION
   ------------------------------------------------------------ */
.home-showcase {
  padding-block: var(--space-2xl);
  background: #f7fafd;
}
.home-showcase-alt {
  background: var(--color-white);
}

/* Two-column layout */
.hs-layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-xl);
  align-items: start;
}
/* Papillon: slider left, info right on desktop */
.hs-layout-reverse {
  grid-template-columns: 7fr 5fr;
}
.hs-layout-reverse .hs-info  { order: 2; }
.hs-layout-reverse .hs-slider-wrap { order: 1; }

/* ------------------------------------------------------------
   INFO COLUMN
   ------------------------------------------------------------ */
.hs-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: sticky;
  top: calc(80px + var(--space-md)); /* below sticky header */
}

.hs-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.hs-eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.hs-name {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  color: var(--color-dark);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

.hs-desc {
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.7;
  max-width: 44ch;
  margin: 0;
}

/* Feature list */
.hs-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hs-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--color-white);
  border: 1px solid #e2ecf4;
  border-radius: var(--radius-md);
  transition: border-color 0.15s;
}
.home-showcase-alt .hs-feature {
  background: #f7fafd;
}
.hs-feature:hover { border-color: rgba(58,124,165,0.35); }

.hs-feature-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(58,124,165,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.05rem;
}
.hs-feature-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hs-feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.hs-feature-text strong {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.3;
}
.hs-feature-text span {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* Footer: license + CTA */
.hs-footer {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding-top: var(--space-sm);
  border-top: 1px solid #e2ecf4;
  margin-top: var(--space-xs);
}
.hs-license {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  flex: 1;
  min-width: 0;
  margin: 0;
  max-width: none;
}

/* ------------------------------------------------------------
   SLIDER COLUMN
   ------------------------------------------------------------ */
.hs-slider-wrap {
  min-width: 0;
}

.hs-slider {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Stage: clips the sliding track */
.hs-slider-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(28,44,58,0.14), 0 2px 8px rgba(28,44,58,0.08);
  background: #dde8f0;
  /* 16:10 aspect ratio — prevents layout shift */
  aspect-ratio: 16 / 10;
}

/* Track holds all slides side by side */
.hs-slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .hs-slider-track { transition: none; }
}

.hs-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.hs-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Prev / Next arrows */
.hs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: 1.5px solid rgba(255,255,255,0.6);
  box-shadow: 0 2px 12px rgba(28,44,58,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  z-index: 10;
}
.hs-arrow:hover {
  background: var(--color-white);
  box-shadow: 0 4px 20px rgba(28,44,58,0.22);
  transform: translateY(-50%) scale(1.07);
}
.hs-arrow:active { transform: translateY(-50%) scale(0.97); }
.hs-arrow svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-dark);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hs-arrow-prev { left: 14px; }
.hs-arrow-next { right: 14px; }

/* Counter badge */
.hs-counter {
  position: absolute;
  bottom: 14px;
  right: 16px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: rgba(20,35,48,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* Inline caption */
.hs-caption {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: center;
  padding: 0.35rem 0.5rem;
  min-height: 1.5em;
  letter-spacing: 0.01em;
}

/* Thumbnails */
.hs-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.hs-thumbs::-webkit-scrollbar { display: none; }

.hs-thumb {
  flex: 0 0 calc((100% - 5 * 6px) / 6);
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 2.5px solid transparent;
  padding: 0;
  background: #dde8f0;
  cursor: pointer;
  transition: border-color 0.15s, opacity 0.15s, transform 0.15s;
  opacity: 0.62;
}
.hs-thumb:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}
.hs-thumb-active,
.hs-thumb[aria-selected="true"] {
  border-color: var(--color-accent);
  opacity: 1;
}
.hs-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* ------------------------------------------------------------
   LIGHTBOX MODAL
   ------------------------------------------------------------ */
.lx-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lx-modal[hidden] { display: none; }

.lx-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 22, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lx-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: min(92vw, 1100px);
  padding: 0;
}

/* Close button */
.lx-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  color: #fff;
}
.lx-close:hover { background: rgba(255,255,255,0.22); }
.lx-close svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* Stage */
.lx-stage {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  cursor: default;
}

.lx-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .lx-track { transition: none; }
}

.lx-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a1016;
}
.lx-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Prev / Next arrows */
.lx-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  z-index: 2;
}
.lx-arrow:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-50%) scale(1.08);
}
.lx-arrow:active { transform: translateY(-50%) scale(0.96); }
.lx-arrow svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lx-arrow-prev { left: -64px; }
.lx-arrow-next { right: -64px; }

/* Counter */
.lx-counter {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
  align-self: flex-end;
  margin-top: -0.25rem;
}

/* Caption */
.lx-caption {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-align: center;
  letter-spacing: 0.01em;
  min-height: 1.4em;
  margin-top: -0.25rem;
}

/* Thumbnails */
.lx-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  padding-bottom: 2px;
}
.lx-thumbs::-webkit-scrollbar { display: none; }

.lx-thumb {
  flex: 0 0 calc((100% - 5 * 6px) / 6);
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: 2.5px solid transparent;
  padding: 0;
  background: #1a2530;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s, border-color 0.15s, transform 0.15s;
}
.lx-thumb:hover { opacity: 0.8; transform: translateY(-2px); }
.lx-thumb-active,
.lx-thumb[aria-selected="true"] {
  border-color: var(--color-accent);
  opacity: 1;
}
.lx-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Responsive: tuck arrows inside on smaller screens */
@media (max-width: 1280px) {
  .lx-arrow-prev { left: -52px; }
  .lx-arrow-next { right: -52px; }
}
@media (max-width: 1100px) {
  .lx-content { width: min(96vw, 1100px); }
  .lx-arrow-prev { left: 8px; }
  .lx-arrow-next { right: 8px; }
  .lx-arrow { background: rgba(0,0,0,0.45); border-color: rgba(255,255,255,0.15); }
}
@media (max-width: 600px) {
  .lx-stage { border-radius: 8px; }
  .lx-arrow { width: 38px; height: 38px; }
  .lx-arrow svg { width: 16px; height: 16px; }
  .lx-thumb { flex: 0 0 calc((100% - 4 * 6px) / 5); }
  .lx-close { top: -44px; }
}

/* ------------------------------------------------------------
   CONTACT SECTION
   ------------------------------------------------------------ */
.homes-contact {
  padding-block: var(--space-2xl);
  background: var(--color-dark);
  color: var(--color-white);
}
.homes-contact-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-xl);
  align-items: center;
}
.homes-contact h2 { color: var(--color-white); margin-bottom: var(--space-xs); }
.homes-contact p  { color: rgba(255,255,255,0.75); max-width: 52ch; }
.homes-contact-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-end;
  flex-shrink: 0;
}
.homes-contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-end;
}
.homes-contact-links a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}
.homes-contact-links a:hover { color: var(--color-white); text-decoration: underline; }
.homes-contact-links span {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  margin-right: 0.35rem;
}

/* ------------------------------------------------------------
   RESPONSIVE — TABLET (≤ 960px)
   ------------------------------------------------------------ */
@media (max-width: 960px) {
  .hs-layout,
  .hs-layout-reverse {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .hs-layout-reverse .hs-info  { order: 1; }
  .hs-layout-reverse .hs-slider-wrap { order: 2; }

  .hs-info { position: static; }
  .hs-desc { max-width: none; }

  .homes-contact-inner { grid-template-columns: 1fr; gap: var(--space-lg); }
  .homes-contact-actions { align-items: flex-start; }
  .homes-contact-links  { align-items: flex-start; }
}

/* ------------------------------------------------------------
   RESPONSIVE — MOBILE (≤ 600px)
   ------------------------------------------------------------ */
@media (max-width: 600px) {
  .home-showcase { padding-block: var(--space-xl); }

  .hs-slider-stage { border-radius: 12px; }

  .hs-arrow {
    width: 38px;
    height: 38px;
  }
  .hs-arrow svg { width: 16px; height: 16px; }
  .hs-arrow-prev { left: 8px; }
  .hs-arrow-next { right: 8px; }

  .hs-thumb {
    flex: 0 0 calc((100% - 4 * 6px) / 5);
  }

  .homes-hero-nav { gap: 0.5rem; }
  .hs-footer { flex-direction: column; align-items: flex-start; }
}
