main.spg-page {
  width: 100%;
  margin: 0;
  padding: 0;
}

[data-spg-guide] {
  --spg-bg: #f7fbfe;
  --spg-bg-2: #eef4f8;
  --spg-surface: rgba(255, 255, 255, 0.97);
  --spg-surface-strong: #ffffff;
  --spg-text: #1f2d49;
  --spg-muted: #6f7f95;
  --spg-accent: #0ba6aa;
  --spg-accent-dark: #0a8f98;
  --spg-border: rgba(15, 23, 42, 0.1);
  --spg-shadow: 0 28px 68px rgba(15, 23, 42, 0.12), 0 10px 24px rgba(15, 23, 42, 0.05);
  direction: rtl;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: clamp(18px, 3vw, 36px) 16px clamp(24px, 4vw, 48px);
  color: var(--spg-text);
  background:
    radial-gradient(circle at 4% 1%, rgba(11, 166, 170, 0.12) 0, rgba(11, 166, 170, 0.08) 10%, transparent 28%),
    radial-gradient(circle at 98% 92%, rgba(11, 166, 170, 0.08) 0, transparent 20%),
    linear-gradient(180deg, var(--spg-bg), var(--spg-bg-2));
}

[data-spg-guide]::before,
[data-spg-guide]::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

[data-spg-guide]::before {
  top: -60px;
  left: -58px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(11, 166, 170, 0.12), rgba(11, 166, 170, 0) 70%);
}

[data-spg-guide]::after {
  right: 18px;
  top: 18%;
  width: 8px;
  height: 180px;
  opacity: 0.4;
  background:
    radial-gradient(circle, rgba(173, 189, 206, 0.42) 0 2px, transparent 2.7px) center/8px 22px repeat-y;
}

[data-spg-guide] *,
[data-spg-guide] *::before,
[data-spg-guide] *::after {
  box-sizing: border-box;
}

.spg-guide__shell {
  position: relative;
  z-index: 1;
  max-width: 1260px;
  margin: 0 auto;
  padding-top: 4px;
}

.spg-guide__intro {
  max-width: 940px;
  margin: 0 auto 22px;
  text-align: center;
}

.spg-guide__title {
  margin: 0 0 10px;
  color: #16223b;
  font-size: clamp(26px, 3vw, 46px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.spg-guide__lead {
  margin: 0;
  color: var(--spg-muted);
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.8;
  font-weight: 500;
}

.spg-guide__card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(18px, 2vw, 26px) clamp(16px, 2vw, 26px) clamp(20px, 2.2vw, 28px);
  border: 1px solid rgba(226, 232, 240, 0.98);
  border-radius: 28px;
  background: var(--spg-surface);
  box-shadow: var(--spg-shadow);
  backdrop-filter: blur(16px);
}

.spg-guide__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 88% 14%, rgba(11, 166, 170, 0.08), transparent 34%),
    radial-gradient(circle at 12% 96%, rgba(15, 23, 42, 0.035), transparent 26%);
}

.spg-guide__card > * {
  position: relative;
  z-index: 1;
}

.spg-guide__progress {
  width: 100%;
  height: 8px;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.spg-guide__progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--spg-accent), var(--spg-accent-dark));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  transition: width 0.28s ease;
}

.spg-step {
  position: relative;
}

.spg-step__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--spg-accent-dark);
  font-size: clamp(13px, 0.95vw, 16px);
  font-weight: 800;
  text-align: right;
}

.spg-step__meta-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--spg-accent);
  box-shadow: 0 0 0 6px rgba(11, 166, 170, 0.1);
  flex: 0 0 auto;
}

.spg-step__title {
  margin: 0 0 16px;
  color: var(--spg-text);
  font-size: clamp(22px, 2.1vw, 32px);
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-align: right;
}

.spg-step__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.spg-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.spg-option {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: var(--spg-surface-strong);
  color: var(--spg-text);
  padding: 12px 14px;
  text-align: center;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.spg-option:hover,
.spg-option:focus-visible,
.spg-option.is-active {
  transform: translateY(-1px);
  border-color: rgba(11, 166, 170, 0.4);
  background: linear-gradient(180deg, #fff, rgba(240, 253, 255, 0.88));
  color: var(--spg-accent-dark);
  outline: none;
  box-shadow: 0 14px 30px rgba(11, 166, 170, 0.12);
}

.spg-input {
  width: 100%;
  min-height: 62px;
  padding: 14px 16px;
  border: 2px solid rgba(209, 221, 232, 0.98);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 253, 0.96));
  color: var(--spg-text);
  font: inherit;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.4;
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.spg-input::placeholder {
  color: #99a4b4;
}

.spg-input:focus {
  outline: none;
  border-color: rgba(11, 166, 170, 0.5);
  box-shadow:
    0 14px 26px rgba(11, 166, 170, 0.1),
    0 0 0 4px rgba(11, 166, 170, 0.1);
}

.spg-input[data-spg-phone] {
  padding-inline-end: 56px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230ba6aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.66A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.92.33 1.82.61 2.69a2 2 0 0 1-.45 2.11L8.09 9.62a16 16 0 0 0 6.29 6.29l1.1-1.18a2 2 0 0 1 2.11-.45c.87.28 1.77.49 2.69.61A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 16px) 50%;
  background-size: 20px 20px;
}

.spg-step__error {
  min-height: 22px;
  margin: 0;
  color: #b42318;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.spg-step__actions,
.spg-step__actions--end {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.spg-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #13b7ba, var(--spg-accent-dark));
  color: #fff;
  padding: 12px 18px;
  min-height: 50px;
  min-width: 156px;
  font: inherit;
  font-size: clamp(15px, 1vw, 17px);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(11, 166, 170, 0.18);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.spg-button:hover,
.spg-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.02);
  outline: none;
  box-shadow: 0 20px 34px rgba(11, 166, 170, 0.24);
}

.spg-button::after {
  content: "←";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  line-height: 1;
}

.spg-button--ghost {
  min-width: 0;
  min-height: 50px;
  padding-inline: 16px;
  background: rgba(30, 41, 59, 0.07);
  color: var(--spg-text);
  box-shadow: none;
}

.spg-button--ghost::after {
  content: none;
}

.spg-loading,
.spg-empty {
  padding: 20px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--spg-muted);
  text-align: center;
}

.spg-complete {
  padding: 22px 18px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(11, 166, 170, 0.12), transparent 28%),
    rgba(11, 166, 170, 0.06);
  text-align: center;
}

.spg-complete__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--spg-accent), #0b6f78);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 16px 28px rgba(11, 166, 170, 0.2);
}

.spg-complete__title {
  margin: 0 0 8px;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.45;
}

.spg-complete__text {
  margin: 0 0 14px;
  color: var(--spg-muted);
  line-height: 1.8;
}

.spg-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.spg-result {
  overflow: hidden;
  border: 1px solid var(--spg-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.spg-result__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
}

.spg-result__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spg-result__body {
  padding: 14px;
}

.spg-result__title {
  margin: 0 0 8px;
  font-size: 16px;
}

@media (max-width: 1024px) {
  .spg-guide__shell {
    max-width: 100%;
  }

  .spg-guide__card {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  [data-spg-guide] {
    padding: 16px 12px 36px;
  }

  [data-spg-guide]::before {
    top: -42px;
    left: -36px;
    width: 140px;
    height: 140px;
  }

  [data-spg-guide]::after {
    right: 10px;
    top: 20%;
    height: 120px;
    opacity: 0.28;
  }

  .spg-guide__intro {
    margin-bottom: 18px;
  }

  .spg-guide__title {
    font-size: clamp(24px, 7vw, 34px);
    margin-bottom: 8px;
  }

  .spg-guide__lead {
    font-size: 14px;
    line-height: 1.75;
  }

  .spg-guide__card {
    padding: 14px 12px 16px;
    border-radius: 20px;
  }

  .spg-guide__progress {
    margin-bottom: 18px;
  }

  .spg-step__body {
    gap: 12px;
  }

  .spg-step__title {
    margin-bottom: 12px;
    font-size: clamp(20px, 5.2vw, 28px);
  }

  .spg-step__meta {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .spg-input {
    min-height: 56px;
    font-size: 15px;
    padding: 13px 14px;
    border-radius: 14px;
  }

  .spg-input[data-spg-phone] {
    padding-inline-end: 48px;
    background-position: calc(100% - 14px) 50%;
    background-size: 18px 18px;
  }

  .spg-button,
  .spg-button--ghost {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  .spg-button {
    padding: 11px 16px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .spg-options {
    grid-template-columns: 1fr;
  }

  .spg-step__actions,
  .spg-step__actions--end {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
