/* How it works — process section */

.hiw-process .hiw-journey-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 5vw;
}

.hiw-journey-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.hiw-journey-head .eyebrow {
  color: var(--blue);
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.hiw-journey-head h2 {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hiw-journey-head > p {
  color: var(--n5);
  font-size: 18px;
  line-height: 1.65;
  margin: 0 0 28px;
}

.hiw-progress-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 280px;
}

.hiw-progress-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.hiw-progress-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--n1);
  overflow: hidden;
}

.hiw-progress-fill {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiw-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: stretch;
}

/* Sticky editorial stage */
.hiw-stage {
  position: sticky;
  top: 120px;
  align-self: stretch;
  border-radius: 4px;
  padding: 40px 36px 44px;
  background: var(--blue);
  color: #fff;
  overflow: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-left: 6px solid var(--cyan);
  box-shadow: 0 20px 48px -20px rgba(37, 47, 199, 0.35);
}

.hiw-stage-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vh, 36px);
  width: 100%;
  margin-top: auto;
}

.hiw-stage-num {
  font-family: "Urbanist", system-ui, sans-serif;
  font-size: clamp(72px, 11vw, 104px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: #fff;
  margin: 0;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiw-stage.is-changing .hiw-stage-num {
  opacity: 0;
  transform: translateY(12px);
}

.hiw-stage-help {
  margin: 0;
  padding-top: clamp(20px, 3vh, 28px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hiw-stage-help-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00d2ff;
  margin-bottom: 12px;
}

.content-body .hiw-stage .hiw-stage-help-text {
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.6;
  color: #fff;
  margin: 0;
  max-width: 100%;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiw-stage.is-changing .hiw-stage-help-text {
  opacity: 0;
  transform: translateY(8px);
}

/* Stepper — bold editorial cards */
.hiw-stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hiw-step {
  display: block;
  position: relative;
}

.hiw-step-body {
  border: 1px solid rgba(3, 7, 18, 0.12);
  border-left: 4px solid transparent;
  border-radius: 4px;
  background: #fff;
  margin-bottom: 0;
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.hiw-step-trigger {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 8px 20px;
  width: 100%;
  text-align: start;
  background: none;
  border: none;
  padding: 24px 24px 24px 20px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.hiw-step-index {
  font-family: "Urbanist", system-ui, sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--n3);
  transition: color 0.35s ease;
}

.hiw-step-copy {
  min-width: 0;
}

.hiw-step-trigger h3 {
  margin: 0;
  font-family: "Urbanist", system-ui, sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.15;
}

.hiw-step-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiw-step-detail-inner {
  overflow: hidden;
}

.hiw-step-detail p {
  margin: 0;
  padding: 0 24px 26px 92px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--n5);
  max-width: 58ch;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease 0.08s, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.06s;
}

.hiw-step.is-active .hiw-step-body {
  border-left-color: var(--blue);
  box-shadow: 0 14px 36px -24px rgba(3, 7, 18, 0.35);
}

.hiw-step.is-active .hiw-step-index {
  color: var(--blue);
}

.hiw-step.is-done .hiw-step-index {
  color: var(--blue);
  opacity: 0.55;
}

.hiw-step.is-active .hiw-step-detail {
  grid-template-rows: 1fr;
}

.hiw-step.is-active .hiw-step-detail p {
  opacity: 1;
  transform: translateY(0);
}

/* Post-sale — separate section */
.hiw-postsale {
  background: var(--blue-lightest);
  padding: clamp(72px, 10vw, 100px) 0;
  border-top: 1px solid rgba(37, 47, 199, 0.1);
}

.hiw-postsale-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 5vw;
}

.hiw-postsale-head {
  max-width: 720px;
  margin-bottom: 40px;
}

.hiw-postsale-head .eyebrow {
  color: var(--blue);
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.hiw-postsale-head h2 {
  font-family: "Urbanist", system-ui, sans-serif;
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 16px;
}

.hiw-postsale-head p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--n5);
  margin: 0;
  max-width: 52ch;
}

.hiw-postsale-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: start;
}

.hiw-postsale-item {
  background: #fff;
  border: 1px solid rgba(37, 47, 199, 0.12);
  border-left: 4px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 12px 32px -24px rgba(37, 47, 199, 0.22);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hiw-postsale-item.is-open {
  border-left-color: var(--blue);
  box-shadow: 0 18px 40px -20px rgba(37, 47, 199, 0.3);
}

/* Lead card — after base item rules so blue background wins */
.hiw-postsale-item.hiw-postsale-item--lead {
  grid-column: 1 / -1;
  background: var(--blue);
  border-color: rgba(37, 47, 199, 0.2);
  box-shadow: 0 16px 40px -24px rgba(37, 47, 199, 0.45);
}

.hiw-postsale-item.hiw-postsale-item--lead.is-open {
  border-left-color: var(--cyan);
  box-shadow: 0 18px 40px -20px rgba(37, 47, 199, 0.45);
}

.hiw-postsale-item.hiw-postsale-item--lead .hiw-postsale-title {
  color: #fff;
  font-size: clamp(20px, 2.6vw, 26px);
}

.hiw-postsale-item.hiw-postsale-item--lead .hiw-postsale-trigger:hover .hiw-postsale-title,
.hiw-postsale-item.hiw-postsale-item--lead.is-open .hiw-postsale-title {
  color: #fff;
}

.hiw-postsale-item.hiw-postsale-item--lead .hiw-postsale-icon {
  border-color: rgba(255, 255, 255, 0.35);
}

.hiw-postsale-item.hiw-postsale-item--lead .hiw-postsale-icon::before,
.hiw-postsale-item.hiw-postsale-item--lead .hiw-postsale-icon::after {
  background: #fff;
}

.hiw-postsale-item.hiw-postsale-item--lead.is-open .hiw-postsale-icon {
  background: var(--cyan);
  border-color: var(--cyan);
  transform: rotate(45deg);
}

.hiw-postsale-item.hiw-postsale-item--lead.is-open .hiw-postsale-icon::before,
.hiw-postsale-item.hiw-postsale-item--lead.is-open .hiw-postsale-icon::after {
  background: var(--ink);
}

.hiw-postsale-item.hiw-postsale-item--lead .hiw-postsale-detail p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 62ch;
  padding-top: 4px;
}

.hiw-postsale-item.hiw-postsale-item--lead.is-open .hiw-postsale-detail p {
  opacity: 1;
  transform: translateY(0);
}

.hiw-postsale-item.hiw-postsale-item--lead.is-open .hiw-postsale-trigger {
  padding-bottom: 8px;
}

.hiw-postsale-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

html[dir="rtl"] .hiw-postsale-trigger {
  text-align: right;
}

.hiw-postsale-trigger:hover .hiw-postsale-title {
  color: var(--blue);
}

.hiw-postsale-title {
  font-family: "Urbanist", system-ui, sans-serif;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  transition: color 0.2s ease;
}

.hiw-postsale-item.is-open .hiw-postsale-title {
  color: var(--blue);
}

.hiw-postsale-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(37, 47, 199, 0.18);
  position: relative;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.3s ease;
}

.hiw-postsale-icon::before,
.hiw-postsale-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hiw-postsale-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.hiw-postsale-item.is-open .hiw-postsale-icon {
  background: var(--blue);
  border-color: var(--blue);
  transform: rotate(45deg);
}

.hiw-postsale-item.is-open .hiw-postsale-icon::before,
.hiw-postsale-item.is-open .hiw-postsale-icon::after {
  background: #fff;
}

.hiw-postsale-item.is-open .hiw-postsale-icon::after {
  opacity: 0;
}

.hiw-postsale-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiw-postsale-item.is-open .hiw-postsale-detail {
  grid-template-rows: 1fr;
}

.hiw-postsale-detail-inner {
  overflow: hidden;
}

.hiw-postsale-detail p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--n5);
  margin: 0;
  padding: 0 24px 22px;
  max-width: 48ch;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease 0.05s, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
}

.hiw-postsale-item.is-open .hiw-postsale-detail p {
  opacity: 1;
  transform: translateY(0);
}

.hiw-start-cta {
  margin-top: 48px;
  margin-bottom: 0;
}

/* Ready to find your Den — CTA */
.hiw-den-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--blue-darker, #0e124f);
  padding: clamp(88px, 11vw, 120px) 0 clamp(96px, 12vw, 128px);
  border-top: none;
}

.hiw-den-cta-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(180deg, rgba(3, 7, 18, 0.52) 0%, rgba(3, 7, 18, 0.78) 100%),
    linear-gradient(115deg, rgba(37, 47, 199, 0.42) 0%, rgba(14, 18, 79, 0.18) 58%),
    url("assets/featured-villa.jpg");
  background-size: cover;
  background-position: center 42%;
}

.hiw-den-cta-in {
  position: relative;
  z-index: 1;
}

.hiw-den-cta-block {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.hiw-den-cta-block .eyebrow {
  color: var(--cyan);
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.hiw-den-cta-block h2 {
  font-family: "Urbanist", system-ui, sans-serif;
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #fff;
  margin: 0 0 16px;
}

.hiw-den-cta-block h2 .accent {
  background: linear-gradient(120deg, #5b74ff 0%, var(--cyan) 58%, #67e8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hiw-den-cta-block p {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 auto 32px;
  max-width: 46ch;
}

html[lang="ar"] .hiw-den-cta-block p {
  font-family: "Tajawal", system-ui, sans-serif;
}

/* Responsive */
@media (max-width: 640px) {
  .hiw-postsale-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {

  .hiw-stage-help {
    padding-top: 18px;
  }

  .hiw-layout {
    grid-template-columns: 1fr;
  }

  .hiw-stage {
    position: relative;
    top: auto;
    min-height: auto;
    justify-content: flex-start;
    order: -1;
    padding: 32px 28px 36px;
  }

  .hiw-stage-inner {
    margin-top: 0;
    gap: 20px;
  }


  .hiw-step-detail p {
    padding: 0 20px 22px 20px;
  }

  .hiw-step-trigger {
    grid-template-columns: 56px 1fr;
    padding: 20px 18px;
  }
}

@media (max-width: 700px) {
  .hiw-step-trigger {
    grid-template-columns: 48px 1fr;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hiw-stage-num,
  .hiw-stage-help-text,
  .hiw-step-body,
  .hiw-step-detail,
  .hiw-step-detail p,
  .hiw-progress-fill,
  .hiw-step-index {
    transition: none;
    animation: none;
  }
}

html[lang="ar"] .hiw-journey-head > p,
html[lang="ar"] .hiw-step-detail p,
html[lang="ar"] .hiw-stage-help-text,
html[lang="ar"] .hiw-postsale-head p,
html[lang="ar"] .hiw-postsale-detail p {
  font-family: "Tajawal", system-ui, sans-serif;
}

html[dir="rtl"] .hiw-postsale-item {
  border-left: none;
  border-right: 4px solid transparent;
}

html[dir="rtl"] .hiw-postsale-item.is-open {
  border-right-color: var(--blue);
}

html[dir="rtl"] .hiw-postsale-item--lead.is-open {
  border-right-color: var(--cyan);
}

@media (prefers-reduced-motion: reduce) {
  .hiw-postsale-detail,
  .hiw-postsale-detail p,
  .hiw-postsale-icon,
  .hiw-postsale-icon::before,
  .hiw-postsale-icon::after {
    transition: none;
  }
}

html[dir="rtl"] .hiw-stage {
  border-left: none;
  border-right: 6px solid var(--cyan);
}


html[dir="rtl"] .hiw-step-body {
  border-left: none;
  border-right: 4px solid transparent;
}

html[dir="rtl"] .hiw-step.is-active .hiw-step-body {
  border-right-color: var(--blue);
}

