/* Sahtain Water Plan — matches sahtain.sa #plan */

.sahtain-plan {
  --navy: #061b36;
  --brand: #0756a8;
  --blue: #3f9ae5;
  --muted: #71869d;
  --line: rgba(26, 94, 160, 0.14);
  --paper: #f5faff;
  --card: rgba(255, 255, 255, 0.86);
  --choice: #fbfdff;
  --shadow: 0 30px 90px rgba(3, 35, 72, 0.14);
  --success: #1a7a4c;
  /* Zid html/body is 12px — lock 16px so rem matches sahtain.sa */
  font-size: 16px;
  line-height: 1.5;
  position: relative;
  padding: clamp(48px, 7vw, 108px) 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 28%, rgba(73, 173, 237, 0.12), transparent 32rem),
    linear-gradient(#f7fbff 0%, #eef8ff 100%);
  isolation: isolate;
  color: #0b2340;
  font-family: inherit;
}

.sahtain-plan::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.04;
  pointer-events: none;
  background: radial-gradient(circle at 20% 80%, rgba(7, 86, 168, 0.2), transparent 40%);
}

.plan-intro {
  width: min(1320px, 100% - 48px);
  margin: 0 auto 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 40px;
  align-items: end;
}

.plan-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brand);
  font-size: 0.84rem; /* 13.44px */
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 11px;
}

.plan-eyebrow::after {
  content: "";
  width: 50px;
  height: 1px;
  background: currentColor;
}

.sahtain-plan.is-ltr .plan-eyebrow {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.plan-intro-title {
  margin: 0;
  font-size: clamp(3.4rem, 6vw, 7rem); /* 54.4 → 112; ~86.4 @1440 */
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 900;
  color: #0b2340;
}

.plan-intro p {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.9;
  font-size: clamp(0.98rem, 1.15vw, 1.12rem); /* ~15.7 → 17.9; ~16.56 @1440 */
  font-weight: 400;
}

.plan-shell {
  position: relative;
  z-index: 2;
  width: min(1320px, 100% - 48px);
  min-height: 720px;
  margin: auto;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 38px;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.plan-visual {
  position: relative;
  min-height: 720px;
  display: block;
  overflow: hidden;
  background: #eaf6ff;
  isolation: isolate;
}

.plan-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.08) 56%, rgba(231, 244, 253, 0.42) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 46%, rgba(255, 255, 255, 0.06));
}

.plan-visual-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(0.96) contrast(1.02);
}

.plan-progress {
  position: absolute;
  z-index: 7;
  top: 32px;
  right: 34px;
  left: 34px;
  display: flex;
  gap: 8px;
  direction: rtl;
}

.plan-progress i {
  height: 4px;
  flex: 1 1 0%;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(25, 101, 176, 0.12);
}

.plan-progress i::after {
  content: "";
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.32s;
}

.plan-progress i.on::after {
  width: 100%;
}

.plan-panel {
  padding: clamp(42px, 5vw, 70px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 85% 14%, rgba(88, 181, 239, 0.08), transparent 18rem),
    rgba(255, 255, 255, 0.86);
}

.plan-panel .eyebrow {
  color: var(--brand);
  font-size: 1rem; /* 16px */
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 8px;
}

.plan-panel-title {
  margin: 0 0 12px;
  font-size: clamp(3.1rem, 5.1vw, 5.7rem); /* 49.6 → 91.2 */
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 900;
  color: #0b2340;
}

.plan-panel .lead {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 1.12rem; /* 17.92px */
  font-weight: 400;
  line-height: 1.85;
}

.plan-step {
  display: none;
}

.plan-step.active {
  display: block;
  animation: planIn 0.38s cubic-bezier(0.2, 0.78, 0.2, 1) both;
}

@keyframes planIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-title {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 2.5vw, 2.25rem); /* 28.8 → 36 */
  line-height: 1.35;
  font-weight: 900;
  color: #0b2340;
}

.question-title.success-title {
  color: var(--success);
}

.question-sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.12rem; /* 17.92px */
  font-weight: 400;
  line-height: 1.75;
}

.counter {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 30px;
  direction: ltr;
}

.counter button {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-size: 2.5rem;
  font-weight: 400;
  transition: 0.2s;
  line-height: 1;
}

.counter button:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
}

.counter strong {
  min-width: 126px;
  text-align: center;
  color: var(--brand);
  font-size: 4rem; /* 64px */
  line-height: 0.9;
  font-weight: 700;
}

.counter small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.84rem; /* 13.44px */
  font-weight: 700;
  line-height: 0.9;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 28px;
}

.choice {
  min-height: 114px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--choice);
  color: var(--navy);
  cursor: pointer;
  text-align: right;
  transition: 0.22s;
  font-family: inherit;
  font-size: 1.2rem;
}

.sahtain-plan.is-ltr .choice {
  text-align: left;
}

.choice:hover {
  transform: translateY(-2px);
}

.choice.active {
  border-color: var(--brand);
  box-shadow: rgba(7, 86, 168, 0.07) 0 0 0 3px;
  background: #fff;
}

.choice b {
  display: block;
  margin-bottom: 5px;
  font-size: 1.32rem; /* 21.12px */
  font-weight: 700;
  line-height: 1.3;
}

.choice span {
  color: var(--muted);
  font-size: 1.05rem; /* 16.8px */
  font-weight: 400;
  line-height: 1.4;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 18px;
}

.result-card {
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.result-card span {
  display: block;
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.result-card strong {
  display: block;
  font-size: 2.35rem;
  color: var(--brand);
  line-height: 1;
}

.result-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.plan-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand), #1a73e8);
  color: #fff;
}

.plan-price small {
  display: block;
  opacity: 0.76;
  font-size: 0.9rem;
}

.plan-price strong {
  display: block;
  font-size: 2rem;
  font-weight: 900;
}

.plan-price-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: 0.22s;
  white-space: nowrap;
}

.plan-price-btn:hover {
  transform: translateY(-2px);
}

.plan-price-btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.plan-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  text-align: start;
}

.plan-back {
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 12px 14px;
  font-family: inherit;
}

.plan-back:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Matches sahtain.sa rebuild control under disclaimer */
.plan-reset {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: 0.22s;
}

.plan-reset:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.plan-form {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.plan-field {
  display: grid;
  gap: 8px;
}

.plan-field > span {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--navy);
}

.plan-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.plan-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(7, 86, 168, 0.12);
}

.plan-form-error {
  margin: 0;
  color: #b42318;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.5;
}

.plan-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.plan-form-actions .plan-btn {
  flex: 1 1 auto;
  min-width: 140px;
}

.plan-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  align-items: center;
}

.plan-actions .plan-btn,
.plan-actions .plan-back {
  font-size: 1.25rem;
}

.plan-actions--success {
  flex-direction: column;
  align-items: stretch;
}

.plan-btn {
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  background: var(--brand);
  color: #fff;
  font-size: 1.1rem; /* 17.6px */
  font-weight: 900;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: rgba(7, 86, 168, 0.18) 0 12px 28px;
  transition: 0.22s;
  font-family: inherit;
}

.plan-btn:hover {
  transform: translateY(-2px);
}

.plan-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: rgba(26, 122, 76, 0.12);
  color: var(--success);
  font-size: 1.6rem;
  font-weight: 900;
}

@media (max-width: 900px) {
  .plan-intro {
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: center;
  }

  .plan-eyebrow {
    justify-content: center;
  }

  .plan-intro p {
    margin: auto;
  }

  .plan-shell {
    grid-template-columns: 1fr;
  }

  .plan-panel {
    order: 1;
  }

  .plan-visual {
    order: 2;
    min-height: 500px;
  }

  .plan-visual-image {
    object-position: center 48%;
  }
}

@media (max-width: 600px) {
  .sahtain-plan {
    padding: 48px 0 28px;
    font-size: 16px; /* keep rem base stable on mobile too */
  }

  .plan-intro,
  .plan-shell {
    width: min(100% - 22px, 1320px);
  }

  .plan-intro-title {
    font-size: 3.55rem; /* 56.8px — exact sahtain.sa mobile */
    letter-spacing: -0.035em;
    line-height: 1.06;
  }

  .plan-intro p {
    font-size: 0.98rem; /* ~15.68px */
    line-height: 1.9;
  }

  .plan-shell {
    border-radius: 28px;
    min-height: 0;
  }

  .plan-panel {
    padding: 34px 20px 30px;
  }

  .plan-panel-title {
    font-size: 3.55rem; /* 56.8px */
    letter-spacing: -0.035em;
    line-height: 1.08;
  }

  .plan-panel .lead,
  .question-sub {
    font-size: 1.12rem; /* 17.92px */
  }

  .plan-actions .plan-btn,
  .plan-actions .plan-back {
    font-size: 1.25rem;
  }

  .question-title {
    font-size: 1.8rem; /* 28.8px */
    line-height: 1.35;
  }

  .counter strong {
    font-size: 4rem; /* 64px stays */
  }

  .choices {
    grid-template-columns: 1fr;
  }

  .choice {
    min-height: 88px;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .plan-price {
    align-items: stretch;
    flex-direction: column;
  }

  .plan-price strong {
    font-size: 1.8rem;
  }

  .plan-visual {
    min-height: 430px;
  }

  .plan-progress {
    top: 22px;
    right: 22px;
    left: 22px;
  }

  .plan-visual-image {
    object-position: center 45%;
  }

  .plan-actions {
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plan-step.active,
  .plan-btn,
  .choice,
  .counter button,
  .plan-price-btn {
    animation: none;
    transition: none;
  }
}
