/* =========================================================
   How Page Scoped Styling
   صفحة طريقة العمل
========================================================= */

body.reham-how-page .reham-how-main {
  background:
    radial-gradient(circle at 15% 12%, rgba(226, 223, 215, .28), transparent 34%),
    linear-gradient(180deg, #FBF9F6 0%, #F8F5F0 46%, #fff 100%);
}

/* ===== Hero ===== */

body.reham-how-page .how-page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 150px 0 82px !important;
  background:
    radial-gradient(circle at 16% 24%, rgba(232, 224, 212, .14), transparent 24%),
    radial-gradient(circle at 86% 70%, rgba(232, 224, 212, .10), transparent 24%),
    linear-gradient(135deg, #6B2138 0%, #5A1B30 48%, #4A1426 100%) !important;
}

body.reham-how-page .how-page-hero::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(232, 224, 212, .10);
  border-radius: 34px;
  pointer-events: none;
  z-index: 0;
}

body.reham-how-page .how-page-hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  left: -150px;
  bottom: -170px;
  background: radial-gradient(circle, rgba(232, 224, 212, .10), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

body.reham-how-page .how-page-hero .container {
  position: relative;
  z-index: 2;
}

body.reham-how-page .how-page-hero .section-head {
  max-width: 860px;
  margin-bottom: 0 !important;
}

body.reham-how-page .how-page-hero .section-label,
body.reham-how-page .how-page-hero .section-title,
body.reham-how-page .how-page-hero .section-sub {
  color: var(--identity-beige, #E2DFD7) !important;
}

body.reham-how-page .how-page-hero .section-label::before,
body.reham-how-page .how-page-hero .section-label::after {
  background: rgba(226, 223, 215, .60) !important;
}

body.reham-how-page .how-page-hero .section-title {
  font-size: clamp(38px, 4.2vw, 64px) !important;
  line-height: 1.22 !important;
  margin-bottom: 18px !important;
}

body.reham-how-page .how-page-hero .section-sub {
  max-width: 780px;
  margin-inline: auto;
  color: rgba(232, 224, 212, .90) !important;
  line-height: 2 !important;
}

/* =========================================================
   Steps Section
   نفس تصميم خطوات الصفحة الرئيسية لكن فوق خلفية بيج
========================================================= */

body.reham-how-page .how-page-process {
  position: relative;
  overflow: hidden;
  padding: 88px 0 92px !important;
  background:
    radial-gradient(circle at 12% 18%, rgba(107, 33, 56, .045), transparent 28%),
    radial-gradient(circle at 88% 90%, rgba(209, 201, 190, .32), transparent 34%),
    linear-gradient(180deg, #FBF9F6 0%, #F8F5F0 100%) !important;
}

body.reham-how-page .how-page-process::before {
  content: "";
  position: absolute;
  inset: auto -120px -180px auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107, 33, 56, .055), transparent 68%);
  pointer-events: none;
}

body.reham-how-page .how-page-process .container {
  position: relative;
  z-index: 2;
}

body.reham-how-page .how-page-process .section-head {
  margin-bottom: 72px !important;
}

body.reham-how-page .how-page-process .section-title {
  color: var(--primary, #6B2138) !important;
}

/* نفس timeline-steps من الصفحة الرئيسية */
body.reham-how-page .how-page-process .timeline-steps {
  z-index: 1;
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 0 !important;
  position: relative !important;
  isolation: isolate !important;
}

/* نفس خط الربط مع لون مناسب للخلفية البيج */
body.reham-how-page .how-page-process .timeline-steps::before {
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;
  top: 43px !important;
  right: calc(10% + 43px) !important;
  left: calc(10% + 43px) !important;
  height: 2px !important;
  background: linear-gradient(
    90deg,
    rgba(107, 33, 56, .18),
    rgba(107, 33, 56, .44),
    rgba(107, 33, 56, .18)
  ) !important;
}

body.reham-how-page .how-page-process .timeline-step {
  text-align: center !important;
  padding: 0 18px !important;
  position: relative !important;
  z-index: 2 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* نفس تصميم الدوائر من الصفحة الرئيسية */
body.reham-how-page .how-page-process .timeline-num {
  width: 86px !important;
  height: 86px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 auto 28px !important;
  font-family: Georgia, serif !important;
  transition: .35s ease !important;
  border-color: rgba(226, 223, 215, .42) !important;
  color: var(--identity-beige) !important;
  position: relative !important;
  z-index: 3 !important;
  background: linear-gradient(135deg, rgba(107, 33, 56, .98), rgba(90, 27, 48, .98)) !important;
  border: 1px solid rgba(226, 223, 215, .46) !important;
  box-shadow:
    0 0 0 10px rgba(107, 33, 56, .98),
    0 10px 24px rgba(0, 0, 0, .08) !important;
}

body.reham-how-page .how-page-process .timeline-num::before {
  content: "" !important;
  position: absolute !important;
  inset: -8px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(226, 223, 215, .12) !important;
  pointer-events: none !important;
}

/* نفس hover الصفحة الرئيسية مع الحفاظ على الإطار الخارجي */
body.reham-how-page .how-page-process .timeline-step:hover .timeline-num {
  transform: translateY(-6px) !important;
  border-color: rgba(213, 194, 164, .72) !important;
  box-shadow:
    0 0 0 10px rgba(107, 33, 56, .98),
    0 22px 60px rgba(0, 0, 0, .18) !important;
}

/* عنوان ووصف الخطوات بالبيرغندي في كل الأحجام */
body.reham-how-page .how-page-process .timeline-step h3 {
  font-family: 'Noto Kufi Arabic', sans-serif !important;
  font-size: 17px !important;
  margin: 0 0 12px !important;
  color: var(--primary, #6B2138) !important;
}

body.reham-how-page .how-page-process .timeline-step p {
  font-size: 14px !important;
  line-height: 1.9 !important;
  color: rgba(107, 33, 56, .78) !important;
}

/* الفقرة أسفل الخطوات: كونتينر بيرغندي والنص بيج */
.how-extra-note {
  margin: 50px auto 0;
  max-width: 890px;
  border-radius: 30px;
  padding: 28px 32px;
  background:
    radial-gradient(circle at 14% 20%, rgba(226, 223, 215, .09), transparent 28%),
    linear-gradient(135deg, #6B2138 0%, #5A1B30 48%, #4A1426 100%) !important;
  border: 1px solid rgba(226, 223, 215, .14);
  color: rgba(226, 223, 215, .92);
  line-height: 2;
  text-align: center;
  box-shadow: 0 20px 54px rgba(107, 33, 56, .14);
}

.how-extra-note strong {
  display: block;
  color: var(--identity-beige, #E2DFD7);
  font-family: 'Zain', sans-serif;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.35;
  margin-bottom: 8px;
}

/* ===== Details Cards ===== */

body.reham-how-page .how-page-details {
  padding-top: 0 !important;
  padding-bottom: 92px !important;
}

.how-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.how-detail-card {
  border-radius: 30px;
  border: 1px solid rgba(107, 33, 56, .12);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(248, 245, 240, .96));
  box-shadow: 0 20px 58px rgba(107, 33, 56, .065);
  padding: 30px 26px;
  position: relative;
  overflow: hidden;
}

.how-detail-card::before {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  left: -74px;
  bottom: -86px;
  background: radial-gradient(circle, rgba(107, 33, 56, .08), transparent 70%);
  pointer-events: none;
}

.how-detail-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.how-detail-icon {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #6B2138, #8A3652);
  color: #E2DFD7;
  box-shadow: 0 14px 30px rgba(107, 33, 56, .16);
}

.how-detail-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.how-detail-head h3 {
  margin: 0 !important;
  color: var(--primary, #6B2138) !important;
  line-height: 1.35 !important;
}

.how-detail-card p {
  position: relative;
  z-index: 1;
  color: rgba(86, 53, 65, .78) !important;
  line-height: 1.95;
  font-size: 14px;
}

/* ===== CTA ===== */

body.reham-how-page .how-page-cta {
  padding-top: 0 !important;
  padding-bottom: 98px !important;
}

/* ===== Responsive ===== */

@media (max-width: 980px) {
  body.reham-how-page .how-page-hero {
    padding: 136px 0 72px !important;
  }

  body.reham-how-page .how-page-process {
    padding: 72px 0 78px !important;
  }

  body.reham-how-page .how-page-process .section-head {
    margin-bottom: 52px !important;
  }

  body.reham-how-page .how-page-process .timeline-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0 !important;
  }

  body.reham-how-page .how-page-process .timeline-steps::before {
    top: 34px !important;
    right: calc(10% + 31px) !important;
    left: calc(10% + 31px) !important;
  }

  body.reham-how-page .how-page-process .timeline-step {
    padding: 0 6px !important;
  }

  body.reham-how-page .how-page-process .timeline-num {
    width: 68px !important;
    height: 68px !important;
    margin: 0 auto 20px !important;
    font-size: 18px !important;
    box-shadow:
      0 0 0 8px rgba(107, 33, 56, .98),
      0 10px 24px rgba(0, 0, 0, .08) !important;
  }

  body.reham-how-page .how-page-process .timeline-step:hover .timeline-num {
    transform: translateY(-6px) !important;
    border-color: rgba(213, 194, 164, .72) !important;
    box-shadow:
      0 0 0 8px rgba(107, 33, 56, .98),
      0 22px 60px rgba(0, 0, 0, .18) !important;
  }

  body.reham-how-page .how-page-process .timeline-num::before {
    inset: -6px !important;
  }

  body.reham-how-page .how-page-process .timeline-step h3 {
    color: var(--primary, #6B2138) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  body.reham-how-page .how-page-process .timeline-step p {
    color: rgba(107, 33, 56, .78) !important;
    font-size: 12px !important;
    line-height: 1.75 !important;
  }

  .how-details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body.reham-how-page .how-page-hero {
    padding: 122px 0 62px !important;
  }

  body.reham-how-page .how-page-hero::before {
    inset: 12px;
    border-radius: 26px;
  }

  body.reham-how-page .how-page-hero .section-title {
    font-size: clamp(34px, 9vw, 44px) !important;
  }

  body.reham-how-page .how-page-hero .section-sub {
    font-size: 14px !important;
    line-height: 1.9 !important;
  }

  body.reham-how-page .how-page-process .container {
    width: min(var(--container), calc(100% - 28px));
  }

  body.reham-how-page .how-page-process .timeline-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  body.reham-how-page .how-page-process .timeline-steps::before {
    top: 26px !important;
    right: calc(10% + 24px) !important;
    left: calc(10% + 24px) !important;
  }

  body.reham-how-page .how-page-process .timeline-step {
    padding: 0 3px !important;
  }

  body.reham-how-page .how-page-process .timeline-num {
    width: 52px !important;
    height: 52px !important;
    margin: 0 auto 16px !important;
    font-size: 15px !important;
    box-shadow:
      0 0 0 6px rgba(107, 33, 56, .98),
      0 8px 18px rgba(0, 0, 0, .08) !important;
  }

  body.reham-how-page .how-page-process .timeline-step:hover .timeline-num {
    transform: translateY(-4px) !important;
    border-color: rgba(213, 194, 164, .72) !important;
    box-shadow:
      0 0 0 6px rgba(107, 33, 56, .98),
      0 16px 42px rgba(0, 0, 0, .16) !important;
  }

  body.reham-how-page .how-page-process .timeline-num::before {
    inset: -5px !important;
  }

  body.reham-how-page .how-page-process .timeline-step h3 {
    color: var(--primary, #6B2138) !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
  }

  body.reham-how-page .how-page-process .timeline-step p {
    display: none !important;
  }

  .how-extra-note {
    margin-top: 36px;
    padding: 22px 18px;
    font-size: 13px;
    border-radius: 24px;
  }

  .how-detail-card {
    padding: 26px 22px;
    border-radius: 26px;
  }

  .how-detail-head {
    gap: 12px;
  }

  .how-detail-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
  }

  body.reham-how-page .how-page-cta .cta-luxury {
    padding: 34px 22px !important;
  }
}

/* =========================================================
   FINAL MOBILE FIX
   تثبيت لون عناوين الخطوات على الجوال + نص الفقرة السفلى
========================================================= */

body.reham-how-page .how-page-process .timeline-step h3,
body.reham-how-page .how-page-process .timeline-step h3 *,
body.reham-how-page .how-page-process .timeline-step h3 a {
  color: var(--primary, #6B2138) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body.reham-how-page .how-page-process .timeline-step p,
body.reham-how-page .how-page-process .timeline-step p * {
  color: rgba(107, 33, 56, .78) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body.reham-how-page .how-extra-note {
  color: var(--identity-beige, #E2DFD7) !important;
  font-weight: 500 !important;
}

body.reham-how-page .how-extra-note strong {
  display: none !important;
}

@media (max-width: 980px) {
  body.reham-how-page .how-page-process .timeline-step h3,
  body.reham-how-page .how-page-process .timeline-step h3 *,
  body.reham-how-page .how-page-process .timeline-step h3 a {
    color: var(--primary, #6B2138) !important;
    opacity: 1 !important;
    text-shadow: none !important;
  }
}

@media (max-width: 640px) {
  body.reham-how-page .how-page-process .timeline-step h3,
  body.reham-how-page .how-page-process .timeline-step h3 *,
  body.reham-how-page .how-page-process .timeline-step h3 a {
    color: var(--primary, #6B2138) !important;
    opacity: 1 !important;
    text-shadow: none !important;
  }
}


/* =========================================================
   FINAL HARD FIX - Mobile step title burgundy
   حل نهائي: تثبيت لون عنوان الخطوات على الجوال
========================================================= */

body.reham-how-page .how-page-process .timeline-step > h3.how-step-title,
body.reham-how-page .how-page-process .timeline-step > h3.how-step-title *,
body.reham-how-page .how-page-process .timeline-step > .how-step-title {
  color: var(--primary, #6B2138) !important;
  -webkit-text-fill-color: var(--primary, #6B2138) !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none !important;
  filter: none !important;
}

body.reham-how-page .how-page-process .timeline-step > p.how-step-desc,
body.reham-how-page .how-page-process .timeline-step > p.how-step-desc * {
  color: rgba(107, 33, 56, .78) !important;
  -webkit-text-fill-color: rgba(107, 33, 56, .78) !important;
  opacity: 1 !important;
  text-shadow: none !important;
  filter: none !important;
}

@media (max-width: 980px) {
  body.reham-how-page .how-page-process .timeline-step > h3.how-step-title,
  body.reham-how-page .how-page-process .timeline-step > h3.how-step-title *,
  body.reham-how-page .how-page-process .timeline-step > .how-step-title {
    color: var(--primary, #6B2138) !important;
    -webkit-text-fill-color: var(--primary, #6B2138) !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: none !important;
    filter: none !important;
  }

  body.reham-how-page .how-page-process .timeline-step > p.how-step-desc,
  body.reham-how-page .how-page-process .timeline-step > p.how-step-desc * {
    color: rgba(107, 33, 56, .78) !important;
    -webkit-text-fill-color: rgba(107, 33, 56, .78) !important;
    opacity: 1 !important;
    text-shadow: none !important;
    filter: none !important;
  }
}

@media (max-width: 640px) {
  body.reham-how-page .how-page-process .timeline-step > h3.how-step-title,
  body.reham-how-page .how-page-process .timeline-step > h3.how-step-title *,
  body.reham-how-page .how-page-process .timeline-step > .how-step-title {
    color: var(--primary, #6B2138) !important;
    -webkit-text-fill-color: var(--primary, #6B2138) !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: none !important;
    filter: none !important;
  }
}
