:root {
  --teal: #00b09e;
  --teal-dark: #008f7e;
  --teal-light: #e6f7f5;
  --navy: #003865;
  --warm: #f9a12e;
  --white: #ffffff;
  --gray-50: #f8fafb;
  --gray-100: #f0f4f6;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-500: #718096;
  --gray-700: #2d3748;
  --text: #1a202c;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(0, 56, 101, 0.1);
  --shadow-card: 0 8px 32px rgba(0, 56, 101, 0.13);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Vazirmatn", sans-serif;
  background: var(--gray-50);
  color: var(--text);
  min-height: 100vh;
  direction: rtl;
}

/* ── Header ── */
.header {
  background: var(--white);
  border-bottom: 2px solid var(--teal);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 56, 101, 0.08);
}
.logo-wrap img {
  height: 52px;
  width: auto;
  max-width: 200px;
  display: block;
  object-fit: contain;
}
.header-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--warm);
  background: rgba(249, 161, 46, 0.15);
  border: 1px solid rgba(249, 161, 46, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.support-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--teal-dark);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.support-link:hover {
  color: var(--teal);
}
.support-link .support-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.support-num {
  direction: ltr;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
@media (max-width: 380px) {
  .support-link span:not(.support-num) {
    display: none;
  }
}

/* ── Progress ── */
.progress-wrap {
  background: var(--white);
  padding: 12px 20px 0;
  border-bottom: 1px solid var(--gray-100);
}
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 12px;
}
.step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-300);
  transition: color 0.3s;
}
.step.active {
  color: var(--teal);
}
.step.done {
  color: var(--teal-dark);
}
.step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  transition: all 0.3s;
  flex-shrink: 0;
}
.step.active .step-dot {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}
.step.done .step-dot {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  color: var(--white);
}
.step-line {
  width: 40px;
  height: 2px;
  background: var(--gray-300);
  transition: background 0.3s;
  flex-shrink: 0;
}
.step-line.done {
  background: var(--teal-dark);
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #004f8a 100%);
  padding: 28px 20px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -40px;
  left: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(0, 176, 158, 0.2) 0%,
    transparent 70%
  );
  border-radius: 50%;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--warm);
  background: rgba(249, 161, 46, 0.15);
  border: 1px solid rgba(249, 161, 46, 0.3);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--warm);
  border-radius: 50%;
}
.hero h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.5;
  margin-bottom: 10px;
}
.hero h1 em {
  font-style: normal;
  color: var(--teal);
}
.hero p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  max-width: 300px;
  margin: 0 auto;
}

/* ── Section ── */
.section {
  padding: 20px 14px;
}
@media (min-width: 768px) {
  .section {
    padding: 28px 24px;
  }
}
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.section-sub {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ── Package Cards Grid ── */
.packages {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .packages {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

/* ── Card ── */
.pkg-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 2px solid var(--gray-100);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pkg-card:active {
  transform: scale(0.98);
}
.pkg-card.selected {
  border-color: var(--teal);
  background: var(--teal-light);
  box-shadow: var(--shadow-card);
}
.pkg-card.featured {
  border-color: #4db8d4;
}

/* Card badge */
.pkg-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--teal);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.pkg-badge.gold {
  background: #d4af37;
}

/* Card inner padding */
.pkg-inner {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
@media (min-width: 640px) {
  .pkg-inner {
    padding: 18px 16px;
  }
}

/* Header row */
.pkg-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.pkg-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.pkg-price {
  text-align: left;
}
.pkg-amount {
  font-size: 17px;
  font-weight: 800;
  color: var(--teal-dark);
  direction: ltr;
  line-height: 1.2;
}
.pkg-period {
  font-size: 10px;
  color: var(--gray-500);
  display: block;
  text-align: left;
}

/* Total ceiling pill */
.pkg-ceiling {
  display: inline-block;
  /* font-size: 11px; */
  font-weight: 600;
  color: var(--navy);
  background: var(--gray-100);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 12px;
}
.pkg-card.selected .pkg-ceiling {
  background: rgba(0, 176, 158, 0.15);
  color: var(--teal-dark);
}

/* Features list — always shows 3 items, rest hidden */
.pkg-features {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
}
.pkg-features li {
  font-size: 12px;
  color: var(--gray-700);
  padding: 4px 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.pkg-features li:last-child {
  border-bottom: none;
}
.pkg-features li .check {
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.pkg-features li .cross {
  color: #e53e3e;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Extra items hidden by default */
.pkg-features li.extra {
  display: none;
}
.pkg-features.open li.extra {
  display: flex;
}

/* Toggle button */
.pkg-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0 8px;
  font-family: "Vazirmatn", sans-serif;
  transition: color 0.2s;
  width: 100%;
}
.pkg-toggle:hover {
  color: var(--teal-dark);
}
.pkg-toggle .toggle-arrow {
  width: 16px;
  height: 16px;
  background: var(--teal-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  flex-shrink: 0;
}
.pkg-features.open ~ .pkg-toggle .toggle-arrow {
  transform: rotate(180deg);
}
.pkg-toggle svg {
  width: 10px;
  height: 10px;
}

/* Divider */
.pkg-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 4px 0 10px;
}

/* Note */
.pkg-note {
  font-size: 10px;
  color: var(--gray-500);
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Bottom row */
.pkg-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 4px;
}
.pkg-select-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  background: none;
  border: 1.5px solid var(--teal);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "Vazirmatn", sans-serif;
  flex: 1;
  margin-left: 10px;
}
.pkg-card.selected .pkg-select-btn {
  background: var(--teal);
  color: var(--white);
}
.pkg-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.pkg-card.selected .pkg-check {
  background: var(--teal);
  border-color: var(--teal);
}

/* CTA */
.cta-btn {
  width: 100%;
  padding: 16px;
  background: var(--teal);
  color: var(--white);
  font-family: "Vazirmatn", sans-serif;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0, 176, 158, 0.3);
}
.cta-btn:active {
  transform: scale(0.98);
  background: var(--teal-dark);
}
.cta-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Form ── */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: var(--shadow);
}
.form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100);
}
.form-group {
  margin-bottom: 16px;
}

/* دو ستونه روی دسکتاپ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }
  .form-col-full {
    grid-column: 1 / -1;
  }
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}
.form-input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: "Vazirmatn", sans-serif;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
  direction: rtl;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 176, 158, 0.12);
}
.form-input::placeholder {
  color: var(--gray-300);
}
.form-input.error {
  border-color: #e53e3e;
}
.field-error {
  font-size: 11px;
  color: #e53e3e;
  margin-top: 5px;
  display: none;
}
.field-error.show {
  display: block;
}
.radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.radio-option {
  flex: 1;
  min-width: 80px;
}
.radio-option input {
  display: none;
}
.radio-label {
  display: block;
  text-align: center;
  padding: 10px 8px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}
.radio-option input:checked + .radio-label {
  border-color: var(--teal);
  background: var(--teal-light);
  color: var(--teal-dark);
  font-weight: 700;
}
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 36px;
}

/* ── Footer ── */
.footer {
  background: var(--navy);
  padding: 18px 20px;
  text-align: center;
  margin-top: 8px;
}
.footer img {
  height: 64px;
  width: auto;
  max-width: 220px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* ── Popup ── */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.popup-overlay.show {
  display: flex;
}
.popup-box {
  background: var(--white);
  border-radius: 20px;
  padding: 28px 22px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: popIn 0.3s ease;
}
@keyframes popIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.popup-check {
  width: 60px;
  height: 60px;
  background: var(--teal-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.popup-box h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}
.popup-box p {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 16px;
}
.popup-logo {
  margin-bottom: 16px;
}
.popup-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}
@media (min-width: 400px) {
  .popup-logo img {
    height: 56px;
    max-width: 200px;
  }
}

/* Share */
.share-section {
  margin-top: 14px;
}
.share-title {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.share-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.share-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
  border: none;
}
.share-icon:hover,
.share-icon:active {
  transform: scale(1.12);
}
.share-icon svg {
  width: 24px;
  height: 24px;
}
.share-icon.telegram {
  background: #0088cc;
}
.share-icon.bale {
  background: #8bf3d9;
}
.share-icon.whatsapp {
  background: #25d366;
}
.share-icon.copy {
  background: var(--gray-200);
}

/* Toast */
.copy-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 300;
  white-space: nowrap;
  pointer-events: none;
}
.copy-toast.show {
  opacity: 1;
}

.hidden {
  display: none !important;
}
