/* ==========================================================================
   PIE Builders & Developers — FAQ section
   Editorial heading and a numbered accordion on the left, framed villa
   photograph on the right (thin gold L-shaped corners, translucent gold and
   cream panels behind it), faint architectural line art at the edges.
   Stacks below 1024px.

   Elementor widget copy of html/css/faq.css. Every selector is rooted at the
   widget's <section class="buildero-faq faq-section">, so Elementor Site
   Settings (h2/h3/p/button styles) cannot restyle it and these rules never
   reach other widgets. Additions for the widget are at the end.
   ========================================================================== */

.buildero-faq {
  /* Palette */
  --faq-bg: #F8F5EF;
  --faq-ink: #171C20;
  --faq-body: #747987;
  --faq-muted: #6A707D;
  --faq-gold: #B87908;
  --faq-gold-2: #C58A17;
  --faq-border: #E9E1D5;
  --faq-border-strong: #DCCFBB;
  --faq-pale: #F3EBDD;
  --faq-white: #FFFFFF;

  /* Typography */
  --faq-font-display: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --faq-font-body: "Manrope", "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  /* Layout */
  --faq-pad-inline: clamp(24px, 7vw, 170px);
  --faq-pad-block: clamp(56px, 5vw, 100px);
  --faq-gap: clamp(40px, 5vw, 120px);

  /* Heading: fluid between min and max; sized from the column width where
     container queries are supported (see the end of this file), else vw */
  --faq-title-min: 36px;
  --faq-title-fluid: 3.15vw;
  --faq-title-max: 66px;
  --faq-corner-offset: clamp(14px, 1.4vw, 28px);
  --faq-corner-size: clamp(64px, 5.2vw, 104px);

  /* Accordion */
  --faq-badge: clamp(42px, 2.4vw, 48px);
  --faq-item-pad-x: clamp(14px, 1vw, 20px);
  --faq-item-pad-y: clamp(7px, 0.45vw, 9px);
  --faq-badge-gap: clamp(16px, 1.1vw, 22px);
  --faq-icon: clamp(20px, 1.25vw, 24px);

  /* Motion */
  --faq-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --faq-duration: 0.5s;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--faq-pad-block);
  background: var(--faq-bg);
  color: var(--faq-body);
  font-family: var(--faq-font-body);
  -webkit-font-smoothing: antialiased;
}

.buildero-faq *,
.buildero-faq *::before,
.buildero-faq *::after {
  box-sizing: border-box;
}

/* Soft diagonal light band rising behind the columns */
.buildero-faq::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 44%;
  z-index: -1;
  width: 22%;
  height: 46%;
  background: linear-gradient(180deg, rgba(233, 225, 213, 0) 0%, rgba(233, 225, 213, 0.55) 100%);
  clip-path: polygon(62% 0, 100% 0, 38% 100%, 0 100%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Line art
   -------------------------------------------------------------------------- */
.buildero-faq .faq-section__lineart {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.buildero-faq .faq-section__lineart-img {
  position: absolute;
  display: block;
  height: auto;
  user-select: none;
}

.buildero-faq .faq-section__lineart-img--left {
  top: 14%;
  left: clamp(-260px, -11vw, -80px);
  width: clamp(300px, 22vw, 440px);
  opacity: 0.1;
}

.buildero-faq .faq-section__lineart-img--right {
  right: clamp(-300px, -12vw, -90px);
  bottom: 2%;
  width: clamp(320px, 24vw, 480px);
  opacity: 0.09;
  transform: scaleX(-1);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.buildero-faq .faq-section__container {
  display: grid;
  grid-template-columns: minmax(0, 49fr) minmax(0, 51fr);
  align-items: center;
  column-gap: var(--faq-gap);
  max-width: calc(1720px + 2 * var(--faq-pad-inline));
  margin-inline: auto;
  padding-inline: var(--faq-pad-inline);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.buildero-faq .faq-section__content {
  min-width: 0;
  container-type: inline-size;
}

.buildero-faq .faq-section__line {
  display: block;
  width: clamp(56px, 3.3vw, 64px);
  height: 2px;
  margin-bottom: clamp(16px, 1.2vw, 22px);
  background: var(--faq-gold);
  transform-origin: left center;
}

.buildero-faq .faq-section__eyebrow {
  margin: 0;
  color: var(--faq-muted);
  font-size: clamp(12px, 0.75vw, 15px);
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.buildero-faq .faq-section__title {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.26em;
  margin: clamp(10px, 0.9vw, 18px) 0 0;
  color: var(--faq-ink);
  font-family: var(--faq-font-display);
  font-size: clamp(var(--faq-title-min), var(--faq-title-fluid), var(--faq-title-max));
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

/* Each part is a mask for its own upward reveal */
.buildero-faq .faq-section__title-mask {
  display: block;
  max-width: 100%;
  overflow: hidden;
  padding-block: 0.02em 0.12em;
}

.buildero-faq .faq-section__title-main,
.buildero-faq .faq-section__title-accent {
  display: block;
}

.buildero-faq .faq-section__title-accent {
  color: var(--faq-gold);
}

.buildero-faq .faq-section__intro {
  max-width: 34em;
  margin: clamp(12px, 1vw, 20px) 0 0;
  color: var(--faq-body);
  font-size: clamp(16px, 0.95vw, 19px);
  line-height: 1.5;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Accordion
   -------------------------------------------------------------------------- */
.buildero-faq .faq-section__accordion {
  display: grid;
  gap: clamp(6px, 0.4vw, 8px);
  margin-top: clamp(24px, 2vw, 40px);
}

.buildero-faq .faq-section__item {
  border: 1px solid var(--faq-border);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.42);
  transition: border-color 0.35s var(--faq-ease), background-color 0.35s var(--faq-ease);
}

.buildero-faq .faq-section__item:hover,
.buildero-faq .faq-section__item.is-open {
  border-color: var(--faq-border-strong);
}

.buildero-faq .faq-section__item.is-open {
  background: rgba(255, 255, 255, 0.6);
}

.buildero-faq .faq-section__heading {
  margin: 0;
  font: inherit;
}

.buildero-faq .faq-section__trigger {
  display: flex;
  align-items: center;
  gap: var(--faq-badge-gap);
  width: 100%;
  margin: 0;
  padding: var(--faq-item-pad-y) calc(var(--faq-item-pad-x) + 2px) var(--faq-item-pad-y) var(--faq-item-pad-x);
  border: 0;
  border-radius: 2px;
  background: none;
  color: var(--faq-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.buildero-faq .faq-section__trigger:focus-visible {
  outline: 2px solid var(--faq-gold);
  outline-offset: 2px;
}

.buildero-faq .faq-section__number {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--faq-badge);
  height: var(--faq-badge);
  background: var(--faq-pale);
  color: var(--faq-muted);
  font-family: var(--faq-font-body);
  font-size: clamp(14px, 0.85vw, 16px);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background-color 0.35s var(--faq-ease), color 0.35s var(--faq-ease);
}

.buildero-faq .faq-section__item.is-open .faq-section__number {
  background: var(--faq-gold);
  color: var(--faq-white);
}

.buildero-faq .faq-section__question {
  flex: 1 1 auto;
  min-width: 0;
  padding-block: 4px;
  font-family: var(--faq-font-display);
  font-size: clamp(17px, 1.05vw, 21px);
  font-weight: 500;
  line-height: 1.35;
  transition: color 0.35s var(--faq-ease);
}

.buildero-faq .faq-section__trigger:hover .faq-section__question {
  color: #3A3122;
}

/* Plus / minus drawn with two bars; the vertical bar folds away when open */
.buildero-faq .faq-section__icon {
  position: relative;
  flex: none;
  width: var(--faq-icon);
  height: var(--faq-icon);
  margin-left: auto;
  color: var(--faq-gold-2);
}

.buildero-faq .faq-section__icon::before,
.buildero-faq .faq-section__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: var(--faq-icon-bar, 2px);
  margin-top: calc(var(--faq-icon-bar, 2px) / -2);
  background: currentColor;
  transition: transform 0.4s var(--faq-ease), opacity 0.4s var(--faq-ease);
}

.buildero-faq .faq-section__icon::after {
  transform: rotate(90deg);
}

.buildero-faq .faq-section__item.is-open .faq-section__icon::after {
  opacity: 0;
  transform: rotate(180deg);
}

/* Answer, aligned with the question text rather than the badge */
.buildero-faq .faq-section__panel-inner {
  min-height: 0;
  overflow: hidden;
}

.buildero-faq .faq-section__answer {
  max-width: 46em;
  margin: 0;
  padding: clamp(6px, 0.5vw, 10px) calc(var(--faq-item-pad-x) + var(--faq-icon) + 8px) clamp(20px, 1.4vw, 28px) calc(var(--faq-item-pad-x) + var(--faq-badge) + var(--faq-badge-gap));
  color: var(--faq-body);
  font-size: clamp(15px, 0.85vw, 17px);
  line-height: 1.6;
  text-wrap: pretty;
}

/* Collapsing applies once JS is available (html.pie-js, or faq.js marks the
   section). Without JS every answer stays visible. Rows animate 0fr <-> 1fr,
   so the panel follows its real content height with no measuring. */
.pie-js .buildero-faq .faq-section__panel,
.buildero-faq.is-enhanced .faq-section__panel {
  display: grid;
  grid-template-rows: 0fr;
}

.pie-js .buildero-faq .faq-section__panel-inner,
.buildero-faq.is-enhanced .faq-section__panel-inner {
  visibility: hidden;
}

.pie-js .buildero-faq .faq-section__item.is-open .faq-section__panel,
.buildero-faq.is-enhanced .faq-section__item.is-open .faq-section__panel {
  grid-template-rows: 1fr;
}

.pie-js .buildero-faq .faq-section__item.is-open .faq-section__panel-inner,
.buildero-faq.is-enhanced .faq-section__item.is-open .faq-section__panel-inner {
  visibility: visible;
}

/* Transitions only after faq.js has settled the initial state */
.buildero-faq.is-enhanced .faq-section__panel {
  transition: grid-template-rows var(--faq-duration) var(--faq-ease);
}

.buildero-faq.is-enhanced .faq-section__panel-inner {
  /* Stay visible until the close has finished, then leave the a11y tree */
  transition: visibility 0s linear var(--faq-duration);
}

.buildero-faq.is-enhanced .faq-section__item.is-open .faq-section__panel-inner {
  transition-delay: 0s;
}

/* --------------------------------------------------------------------------
   Visual
   -------------------------------------------------------------------------- */
.buildero-faq .faq-section__visual {
  position: relative;
  min-width: 0;
  padding: var(--faq-corner-offset) calc(var(--faq-corner-offset) + 6px);
}

/* Translucent panels peeking out behind the photo */
.buildero-faq .faq-section__panel-accent {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.buildero-faq .faq-section__panel-accent--gold {
  top: 21%;
  left: calc(var(--faq-corner-offset) - clamp(20px, 1.9vw, 38px));
  width: clamp(40px, 3vw, 60px);
  height: 42%;
  background: linear-gradient(180deg, rgba(197, 138, 23, 0.72), rgba(184, 121, 8, 0.6));
}

.buildero-faq .faq-section__panel-accent--cream {
  right: 0;
  bottom: calc(var(--faq-corner-offset) - clamp(10px, 1vw, 20px));
  width: clamp(48px, 3.6vw, 72px);
  height: 52%;
  background: var(--faq-pale);
  opacity: 0.85;
}

.buildero-faq .faq-section__frame {
  position: relative;
  z-index: 1;
}

.buildero-faq .faq-section__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.38;
  background: var(--faq-pale);
}

.buildero-faq .faq-section__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--faq-focal, 50% 50%);
}

/* Thin gold L-shaped corners, just outside the photo */
.buildero-faq .faq-section__corner {
  position: absolute;
  width: var(--faq-corner-size);
  height: calc(var(--faq-corner-size) * 0.62);
  pointer-events: none;
}

.buildero-faq .faq-section__corner--top {
  top: calc(-1 * var(--faq-corner-offset));
  left: calc(-1 * var(--faq-corner-offset));
  border-top: 2px solid var(--faq-gold-2);
  border-left: 2px solid var(--faq-gold-2);
  transform-origin: top left;
}

.buildero-faq .faq-section__corner--bottom {
  right: calc(-1 * var(--faq-corner-offset));
  bottom: calc(-1 * var(--faq-corner-offset));
  height: var(--faq-corner-size);
  border-right: 2px solid var(--faq-gold-2);
  border-bottom: 2px solid var(--faq-gold-2);
  transform-origin: bottom right;
}

/* --------------------------------------------------------------------------
   Entrance-animation guard
   Hidden only while JS is running (html.pie-js) until faq.js has set the
   animation start states. The failsafe shows everything if it never runs.
   -------------------------------------------------------------------------- */
.pie-js .buildero-faq:not(.is-ready) [data-faq-reveal],
.pie-js .buildero-faq:not(.is-ready) [data-faq-word],
.pie-js .buildero-faq:not(.is-ready) [data-faq-visual] {
  opacity: 0;
  animation: buildero-faq-failsafe 0.4s ease 2.5s forwards;
}

@keyframes buildero-faq-failsafe {
  to { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* iPad landscape / small laptops: two columns, tighter */
@media (max-width: 1199px) {
  .buildero-faq {
    --faq-pad-inline: clamp(32px, 4.5vw, 56px);
    --faq-gap: clamp(36px, 4vw, 48px);
    --faq-badge: 42px;
    --faq-item-pad-x: 14px;
    --faq-badge-gap: 16px;
    --faq-icon: 20px;
    --faq-title-min: 40px;
    --faq-title-fluid: 3.9vw;
    --faq-title-max: 50px;
  }

  .buildero-faq .faq-section__container {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .buildero-faq .faq-section__intro {
    font-size: 16px;
  }

  .buildero-faq .faq-section__question {
    font-size: 17px;
  }

  .buildero-faq .faq-section__answer {
    font-size: 15px;
  }

  .buildero-faq .faq-section__media {
    aspect-ratio: 1.2;
  }
}

/* iPad portrait and below: content and accordion first, then the photo */
@media (max-width: 1023px) {
  .buildero-faq {
    --faq-pad-inline: clamp(20px, 6vw, 56px);
    --faq-corner-offset: 12px;
    --faq-corner-size: 72px;
    --faq-title-min: 42px;
    --faq-title-fluid: 6vw;
    --faq-title-max: 52px;
  }

  .buildero-faq .faq-section__container {
    grid-template-columns: minmax(0, 1fr);
    row-gap: clamp(44px, 7vw, 64px);
    max-width: 800px;
  }

  .buildero-faq .faq-section__question {
    font-size: 18px;
  }

  .buildero-faq .faq-section__answer {
    font-size: 16px;
  }

  .buildero-faq .faq-section__media {
    aspect-ratio: 1.45;
  }

  .buildero-faq::before {
    display: none;
  }

  .buildero-faq .faq-section__lineart-img--left {
    top: 2%;
    left: -120px;
    width: 300px;
    opacity: 0.07;
  }

  .buildero-faq .faq-section__lineart-img--right {
    display: none;
  }
}

/* Phones */
@media (max-width: 767px) {
  .buildero-faq {
    --faq-pad-block: 56px;
    --faq-badge: 38px;
    --faq-item-pad-x: 12px;
    --faq-item-pad-y: 8px;
    --faq-badge-gap: 12px;
    --faq-icon: 18px;
    --faq-corner-offset: 10px;
    --faq-corner-size: 60px;
    --faq-title-min: clamp(32px, 9.4vw, 40px);
    --faq-title-fluid: 9.4vw;
    --faq-title-max: 44px;
  }

  .buildero-faq .faq-section__eyebrow {
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  .buildero-faq .faq-section__intro {
    font-size: 15px;
    line-height: 1.6;
  }

  .buildero-faq .faq-section__number {
    font-size: 14px;
  }

  .buildero-faq .faq-section__question {
    font-size: 16px;
  }

  .buildero-faq .faq-section__answer {
    padding-right: var(--faq-item-pad-x);
    font-size: 15px;
    line-height: 1.65;
  }

  .buildero-faq .faq-section__media {
    aspect-ratio: 1.3;
  }

  .buildero-faq .faq-section__lineart {
    display: none;
  }
}

/* Narrow phones: reclaim width for the answer text */
@media (max-width: 400px) {
  .buildero-faq {
    --faq-badge: 34px;
    --faq-item-pad-x: 10px;
    --faq-badge-gap: 10px;
  }

  .buildero-faq .faq-section__question {
    font-size: 15px;
  }

  .buildero-faq .faq-section__number {
    font-size: 13px;
  }
}

/* Keep the heading on one line whenever its column is wide enough:
   7.7cqi of the text column fits the full heading with a small margin */
@supports (width: 1cqi) {
  .buildero-faq {
    --faq-title-fluid: 7.7cqi;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion: faq.js skips the entrance; panels open without animating
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .buildero-faq {
    --faq-duration: 0s;
  }

  .buildero-faq .faq-section__item,
  .buildero-faq .faq-section__number,
  .buildero-faq .faq-section__question,
  .buildero-faq .faq-section__icon::before,
  .buildero-faq .faq-section__icon::after {
    transition: none;
  }

  .pie-js .buildero-faq:not(.is-ready) [data-faq-reveal],
  .pie-js .buildero-faq:not(.is-ready) [data-faq-word],
  .pie-js .buildero-faq:not(.is-ready) [data-faq-visual] {
    opacity: 1;
    animation: none;
  }
}

/* ==========================================================================
   Widget additions
   ========================================================================== */

/* Answers come from Elementor's text editor: paragraphs, lists and links */
.buildero-faq .faq-section__answer > * {
  margin: 0;
}

.buildero-faq .faq-section__answer > * + * {
  margin-top: 0.8em;
}

.buildero-faq .faq-section__answer ul,
.buildero-faq .faq-section__answer ol {
  padding-left: 1.25em;
}

.buildero-faq .faq-section__answer li + li {
  margin-top: 0.3em;
}

.buildero-faq .faq-section__answer a {
  color: var(--faq-gold);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.buildero-faq .faq-section__answer img {
  max-width: 100%;
  height: auto;
}

/* Long words or URLs wrap instead of widening the column */
.buildero-faq .faq-section__question,
.buildero-faq .faq-section__answer {
  overflow-wrap: break-word;
}

/* Keep the trigger unstyled if other CSS styles buttons on hover/focus */
.buildero-faq .faq-section__trigger:hover,
.buildero-faq .faq-section__trigger:focus,
.buildero-faq .faq-section__trigger:active {
  background: none;
  box-shadow: none;
}

/* "Allow closing the open question" off: the open question cannot close */
.buildero-faq .faq-section__trigger[aria-disabled="true"] {
  cursor: default;
}

/* "No accordion": questions are plain headings, every answer is shown */
.buildero-faq.faq-section--static .faq-section__trigger {
  cursor: auto;
}

/* Number badges hidden: answers align with the question text */
.buildero-faq.faq-section--no-numbers .faq-section__answer {
  padding-left: var(--faq-item-pad-x);
}

/* Icon hidden: no space reserved for it beside the answer */
.buildero-faq.faq-section--no-icon .faq-section__answer {
  padding-right: var(--faq-item-pad-x);
}

/* Photograph hidden: one column */
.buildero-faq.faq-section--no-visual .faq-section__container {
  grid-template-columns: minmax(0, 1fr);
  max-width: calc(1100px + 2 * var(--faq-pad-inline));
}

/* Reduced motion: the panel duration can be set from Elementor (a stronger
   selector than the --faq-duration reset above), so drop the transitions */
@media (prefers-reduced-motion: reduce) {
  .buildero-faq.is-enhanced .faq-section__panel,
  .buildero-faq.is-enhanced .faq-section__panel-inner {
    transition: none;
  }
}
