/* ============================================================================
   WrightHaven Homes — model detail page hero + dark re-theme
   ----------------------------------------------------------------------------
   Two jobs, both for the Pasture Edge model detail pages:

   1. The redesigned top section (.wh-home-hero): a dominant hero carousel
      (exterior photo ↔ floor-plan images — plans always object-fit:contain
      on white, never crop-filled) with a sticky spec/CTA panel alongside.
      Mobile: stacks vertically, CTA buttons become a sticky bottom bar.

   2. A dark re-theme (.wh-dark …) for the EXISTING Elementor content that
      stays below the hero (Standard Features tabs, Design-is-in-the-details
      gallery, Download PDF, Browse Similar Plans) so it matches the site's
      dark palette. Scoped to the page's single-post wrapper — the shared
      header / footer / testimonials boilerplate is untouched.

   Tokens from :root (see DESIGN.md); dark-card values shared with
   wh-collection.css / wh-siteplan.css.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. Hero
   ------------------------------------------------------------------------- */
.wh-home-hero {
  --wh-hero-line: rgba(192, 181, 155, 0.32);
  --wh-hero-line-soft: rgba(192, 181, 155, 0.18);
  --wh-hero-card-bg: #1d1e1e;
  --wh-hero-text: rgba(255, 255, 255, 0.92);
  --wh-hero-text-dim: rgba(255, 255, 255, 0.6);
  --wh-hero-ease: cubic-bezier(0.22, 0.72, 0.22, 1);

  background: var(--wh-ink, #141414);
  font-family: var(--wh-font-body, "Poppins", sans-serif);
  color: var(--wh-hero-text);
  padding: 40px 24px 56px;
}

.wh-home-hero__inner {
  display: flex;
  align-items: flex-start;
  gap: 36px;
  max-width: 1240px;
  margin: 0 auto;
}

/* --- carousel --- */
.wh-home-hero__carousel {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 16 / 10;
  background: #101111;
  border: 1px solid var(--wh-hero-line-soft);
  border-radius: var(--wh-radius, 3px);
  overflow: hidden;
}

.wh-home-hero__carousel:focus-visible {
  outline: 2px solid var(--wh-gold, #9a8c57);
  outline-offset: 2px;
}

.wh-home-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.wh-home-hero__slide.is-active {
  opacity: 1;
}

.wh-home-hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Floor plans are wide technical drawings — contain on white, never crop. */
.wh-home-hero__slide--plan {
  background: #ffffff;
}

.wh-home-hero__slide--plan img {
  object-fit: contain;
  padding: 18px;
  box-sizing: border-box;
}

.wh-home-hero .wh-home-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  appearance: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border: 1px solid var(--wh-hero-line);
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.72);
  color: var(--wh-white, #ffffff);
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 4px;
  opacity: 0;
  transition: opacity 0.2s, border-color 0.2s, background-color 0.2s;
}

.wh-home-hero .wh-home-hero__arrow--prev { left: 14px; }
.wh-home-hero .wh-home-hero__arrow--next { right: 14px; }

.wh-home-hero__carousel:hover .wh-home-hero__arrow,
.wh-home-hero .wh-home-hero__arrow:focus-visible {
  opacity: 1;
}

.wh-home-hero .wh-home-hero__arrow:hover {
  border-color: var(--wh-gold, #9a8c57);
  background: rgba(20, 20, 20, 0.9);
}

@media (hover: none) {
  .wh-home-hero .wh-home-hero__arrow { opacity: 1; }
}

.wh-home-hero__dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}

.wh-home-hero .wh-home-hero__dot {
  appearance: none;
  cursor: pointer;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: transparent;
  transition: background-color 0.2s, border-color 0.2s;
}

.wh-home-hero .wh-home-hero__dot.is-active {
  background: var(--wh-gold, #9a8c57);
  border-color: var(--wh-gold, #9a8c57);
}

.wh-home-hero__tag {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 2;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.72);
  color: var(--wh-tan, #c0b59b);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- spec / CTA panel --- */
.wh-home-hero__panel {
  position: sticky;
  top: calc(var(--wh-ribbon-h, 0px) + 16px);
  flex: 0 0 340px;
  padding: 28px;
  background: var(--wh-hero-card-bg);
  border: 1px solid var(--wh-hero-line-soft);
  border-radius: var(--wh-radius, 3px);
}

.wh-home-hero__eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wh-gold, #9a8c57);
}

.wh-home-hero__title {
  margin: 0 0 12px;
  font-family: var(--wh-font-heading, "Lato", sans-serif);
  font-weight: 300;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wh-hero-text);
}

.wh-home-hero__price {
  margin: 0 0 20px;
  font-family: var(--wh-font-heading, "Lato", sans-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--wh-gold, #9a8c57);
}

.wh-home-hero__specs {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--wh-hero-line-soft);
  border: 1px solid var(--wh-hero-line-soft);
  border-radius: var(--wh-radius, 3px);
  overflow: hidden;
}

.wh-home-hero__spec {
  background: var(--wh-hero-card-bg);
  padding: 12px 14px;
}

.wh-home-hero__spec-value {
  display: block;
  font-size: 18px;
  font-weight: 500;
  color: var(--wh-hero-text);
}

.wh-home-hero__spec-label {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wh-hero-text-dim);
}

.wh-home-hero__ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wh-home-hero .wh-home-hero__btn {
  appearance: none;
  cursor: pointer;
  display: block;
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--wh-radius, 3px);
  font-family: var(--wh-font-body, "Poppins", sans-serif);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  box-sizing: border-box;
}

.wh-home-hero .wh-home-hero__btn--primary {
  border: 1px solid var(--wh-gold, #9a8c57);
  background: var(--wh-gold, #9a8c57);
  color: var(--wh-ink, #141414);
  font-weight: 600;
}

.wh-home-hero .wh-home-hero__btn--primary:hover {
  background: transparent;
  color: var(--wh-gold, #9a8c57);
}

.wh-home-hero .wh-home-hero__btn--primary.is-added {
  background: transparent;
  color: var(--wh-gold, #9a8c57);
}

@keyframes wh-hero-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.wh-home-hero .wh-home-hero__btn--primary.is-full {
  animation: wh-hero-shake 0.3s ease;
  border-color: #b0563e;
  background: transparent;
  color: var(--wh-hero-text-dim);
}

.wh-home-hero .wh-home-hero__btn--secondary {
  border: 1px solid var(--wh-hero-line);
  background: transparent;
  color: var(--wh-hero-text);
}

.wh-home-hero .wh-home-hero__btn--secondary:hover {
  border-color: var(--wh-gold, #9a8c57);
  color: var(--wh-gold, #9a8c57);
}

.wh-home-hero .wh-home-hero__btn:focus-visible {
  outline: 2px solid var(--wh-gold, #9a8c57);
  outline-offset: 2px;
}

.wh-home-hero__pdf {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wh-hero-text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wh-home-hero__pdf:hover {
  color: var(--wh-gold, #9a8c57);
}

/* ---------------------------------------------------------------------------
   2. Responsive hero — stack + sticky bottom CTA bar
   ------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .wh-home-hero__inner {
    flex-direction: column;
  }

  .wh-home-hero__carousel {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .wh-home-hero__panel {
    position: static;
    flex: none;
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 720px) {
  .wh-home-hero {
    padding: 20px 16px 40px;
  }

  /* CTA buttons become a sticky bottom bar */
  .wh-home-hero__ctas {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    flex-direction: row;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(20, 20, 20, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(192, 181, 155, 0.32);
  }

  .wh-home-hero__btn {
    flex: 1;
    padding: 12px 8px;
    font-size: 11px;
  }

  /* Keep page content clear of the fixed bar */
  body.wh-has-hero-bar {
    padding-bottom: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wh-home-hero__slide,
  .wh-home-hero__arrow,
  .wh-home-hero__btn {
    transition: none;
  }

  .wh-home-hero__btn--primary.is-full {
    animation: none;
  }
}

/* ---------------------------------------------------------------------------
   3. Dark re-theme for the existing Elementor sections below the hero.
      Scoped to the page's single-post wrapper (add class="wh-dark" to it) —
      header, footer and testimonials live outside it and stay untouched.
   ------------------------------------------------------------------------- */
.wh-dark > section,
.wh-dark section.elementor-top-section {
  background-color: var(--wh-ink, #141414) !important;
  background-image: none !important;
}

.wh-dark .elementor-background-overlay {
  display: none !important;
}

.wh-dark h2.elementor-heading-title,
.wh-dark h3,
.wh-dark h4,
.wh-dark h5 {
  color: rgba(255, 255, 255, 0.92) !important;
}

.wh-dark p,
.wh-dark li,
.wh-dark .elementor-widget-text-editor {
  color: rgba(255, 255, 255, 0.68) !important;
}

.wh-dark .elementor-divider-separator {
  border-color: var(--wh-gold, #9a8c57) !important;
}

/* "Design is in the details" plan nav */
.wh-dark #planNav .planNavItem a {
  color: rgba(255, 255, 255, 0.68) !important;
  border-color: rgba(192, 181, 155, 0.32) !important;
}

.wh-dark #planNav .planNavItem a span {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* The per-floor marketing plan images (#planImages) are WHITE linework on
   transparency — they need a dark background, NOT white. (The white
   background/contain treatment is only for the dark-linework combined
   plan images used in the carousels.) */
.wh-dark #planImages .planItem {
  background: var(--wh-dark-gray, #2b2c2c);
  border-radius: var(--wh-radius, 3px);
}

/* Elementor buttons (Download this plan, etc.) */
.wh-dark .elementor-button {
  background-color: transparent !important;
  border: 1px solid var(--wh-gold, #9a8c57) !important;
  color: var(--wh-gold, #9a8c57) !important;
}

.wh-dark .elementor-button:hover {
  background-color: var(--wh-gold, #9a8c57) !important;
  color: var(--wh-ink, #141414) !important;
}

/* Browse Similar Plans thumbs */
.wh-dark #allfloorplans .floorplanthumb {
  background: #1d1e1e !important;
  border: 1px solid rgba(192, 181, 155, 0.18);
  border-radius: var(--wh-radius, 3px);
  overflow: hidden;
}

.wh-dark #allfloorplans .floorplanthumb .copy {
  background: #1d1e1e !important;
}

.wh-dark #allfloorplans .floorplanthumb .copy p,
.wh-dark #allfloorplans .floorplanthumb .copy .listingdetails div {
  color: rgba(255, 255, 255, 0.6) !important;
}

.wh-dark #allfloorplans .floorplanthumb .copy h4 {
  color: rgba(255, 255, 255, 0.92) !important;
}

.wh-dark #allfloorplans .floorplanthumb .copy a {
  color: var(--wh-gold, #9a8c57) !important;
}

.wh-dark .fancybtn a {
  color: var(--wh-gold, #9a8c57) !important;
  border-color: var(--wh-gold, #9a8c57) !important;
}
