.pricing-page {
  background:
    radial-gradient(circle at 14% 4%, rgba(110, 193, 228, 0.18), transparent 26%),
    radial-gradient(circle at 86% 10%, rgba(82, 124, 193, 0.12), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 42%, #eef6fc 100%);
}

.pricing-page main {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.pricing-hero {
  max-width: 930px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 118px) 0 42px;
  text-align: center;
}

.pricing-badge,
.pricing-section-label {
  display: inline-flex;
  margin: 0 0 16px;
  padding: 8px 13px;
  border: 1px solid rgba(110, 193, 228, 0.3);
  border-radius: var(--radius-pill);
  background: rgba(110, 193, 228, 0.14);
  color: var(--color-royal);
  font-size: 0.86rem;
  font-weight: 700;
}

.pricing-hero h1 {
  margin: 0;
  color: var(--color-navy);
  font-size: clamp(2.7rem, 6vw, 4.45rem);
  line-height: 1.04;
}

.pricing-hero-text {
  max-width: 760px;
  margin: 24px auto 0;
  color: var(--color-muted);
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  line-height: 1.72;
}

.pricing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.pricing-trust {
  margin: 20px 0 0;
  color: var(--color-soft-text);
  font-weight: 650;
}

.section-heading-row,
.comparison-section,
.ai-addons-section,
.pricing-faq,
.final-pricing-cta {
  margin-top: clamp(34px, 5vw, 64px);
}

.section-heading-row h2,
.center-heading h2,
.final-pricing-cta h2 {
  margin: 0;
  color: var(--color-navy);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.12;
}

.section-heading-row p,
.center-heading p,
.final-pricing-cta p {
  margin: 12px 0 0;
  color: var(--color-muted);
  line-height: 1.65;
}

.plan-feature,
.tier-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-heading-row {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.plans-heading-copy {
  max-width: 820px;
}

.plans-billing-control {
  display: grid;
  width: min(100%, 520px);
  justify-items: stretch;
  padding: 8px;
  border: 1px solid rgba(110, 193, 228, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(110, 193, 228, 0.16), rgba(82, 124, 193, 0.08)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 42px rgba(54, 89, 168, 0.12);
}

.segmented-control {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(216, 230, 242, 0.85);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.segment-wrap {
  display: grid;
  flex: 1;
  justify-items: center;
  gap: 3px;
}

.yearly-note {
  min-height: 14px;
  color: var(--color-success);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.segment-button {
  width: 100%;
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-soft-text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 750;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.segment-button[aria-checked="true"] {
  background: var(--gradient-button);
  color: var(--color-white);
  box-shadow: 0 10px 24px rgba(54, 89, 168, 0.18);
}

.segment-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(82, 124, 193, 0.14);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.price-card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 25px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 600ms ease,
    transform 600ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
  transition-delay: calc(var(--card-index) * 80ms);
}

.price-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.price-card:hover {
  border-color: rgba(110, 193, 228, 0.55);
  box-shadow: 0 24px 64px rgba(54, 89, 168, 0.16);
  transform: translateY(-6px);
}

.price-card.popular {
  border-color: rgba(82, 124, 193, 0.55);
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    var(--gradient-brand) border-box;
  border: 1px solid transparent;
}

.popular-badge {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  background: var(--gradient-button);
  color: var(--color-white);
  font-size: 0.76rem;
  font-weight: 800;
}

.plan-top h3 {
  margin: 0;
  color: var(--color-navy);
  font-size: 1.35rem;
}

.plan-subtitle {
  min-height: 72px;
  margin: 10px 0 0;
  color: var(--color-muted);
  line-height: 1.55;
}

.plan-price {
  margin: 24px 0 0;
}

.price-value {
  color: var(--color-navy);
  font-size: clamp(2.2rem, 3vw, 3rem);
  font-weight: 850;
  line-height: 1;
}

.price-suffix {
  color: var(--color-muted);
  font-weight: 700;
}

.price-badge {
  display: inline-flex;
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: var(--color-success-bg);
  color: var(--color-success);
  font-size: 0.78rem;
  font-weight: 800;
}

.plan-features {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.plan-feature {
  color: var(--color-soft-text);
  font-size: 0.94rem;
  line-height: 1.4;
}

.plan-feature::before {
  content: "";
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background:
    linear-gradient(var(--color-success), var(--color-success)) center/8px 8px no-repeat,
    var(--color-success-bg);
}

.plan-unavailable,
.multi-details {
  display: grid;
  gap: 9px;
  margin: 0 0 20px;
  padding: 12px;
  border-radius: 16px;
  list-style: none;
}

.multi-details {
  background: rgba(110, 193, 228, 0.12);
  color: var(--color-royal);
  font-size: 0.9rem;
  font-weight: 750;
}

.plan-unavailable {
  background: #f8fafc;
  color: #94a3b8;
  font-size: 0.9rem;
}

.plan-unavailable li,
.multi-details li {
  display: inline-flex;
  gap: 8px;
}

.plan-unavailable li::before {
  content: "-";
  color: #94a3b8;
  font-weight: 900;
}

.plan-cta {
  width: 100%;
  margin-top: auto;
}

.tier-list {
  display: grid;
  gap: 7px;
  margin: 16px 0 22px;
  padding: 12px;
  border-radius: 16px;
  background: var(--color-soft-blue);
  color: var(--color-soft-text);
  font-size: 0.86rem;
  list-style: none;
}

.example-pricing {
  max-width: 780px;
  margin: 22px auto 0;
}

.example-pricing-panel {
  border: 1px solid rgba(110, 193, 228, 0.32);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.example-pricing-panel summary {
  padding: 16px 18px;
  color: var(--color-royal);
  font-weight: 850;
  cursor: pointer;
}

.example-table-wrap {
  overflow-x: auto;
  padding: 0 18px 18px;
}

.example-table {
  width: 100%;
  border-collapse: collapse;
}

.example-table th,
.example-table td {
  padding: 11px 10px;
  border-top: 1px solid var(--color-border);
  text-align: left;
}

.example-table th {
  color: var(--color-navy);
  font-size: 0.9rem;
}

.example-table td {
  color: var(--color-muted);
}

.center-heading {
  max-width: 850px;
  margin: 0 auto 28px;
  text-align: center;
}

.comparison-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
}

.comparison-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  background: #f8fbff;
  color: var(--color-navy);
  font-size: 0.92rem;
}

.comparison-table thead th {
  position: static;
}

.comparison-table th:nth-child(3),
.comparison-table td:nth-child(3) {
  background: rgba(110, 193, 228, 0.08);
}

.feature-group-row th {
  position: static;
  background: var(--color-soft-blue);
  color: var(--color-navy);
  font-size: 1rem;
  padding: 16px 18px;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.comparison-table td {
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.comparison-feature {
  color: var(--color-text);
  font-weight: 750;
}

.comparison-icon,
.comparison-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.comparison-text {
  color: var(--color-soft-text);
  font-weight: 650;
}

.comparison-icon {
  width: 24px;
  height: 24px;
}

.comparison-icon.comparison-yes::before {
  display: block;
  content: "✓";
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: rgba(22, 163, 74, 0.1);
  color: var(--color-success);
  font-weight: 900;
  line-height: 24px;
  text-align: center;
}

.comparison-icon.comparison-no::before {
  content: "—";
  display: block;
  color: #94a3b8;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.addon-card {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.addon-card h3 {
  margin: 0;
  color: var(--color-navy);
  font-size: 1.25rem;
}

.addon-card p {
  margin: 12px 0 0;
  color: var(--color-royal);
  font-size: 1.5rem;
  font-weight: 850;
}

.addon-note {
  max-width: 740px;
  margin: 20px auto 0;
  padding: 13px 16px;
  border: 1px solid rgba(110, 193, 228, 0.32);
  border-radius: 18px;
  background: rgba(110, 193, 228, 0.12);
  color: var(--color-royal);
  text-align: center;
  font-weight: 700;
}

.faq-list {
  display: grid;
  max-width: 940px;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  margin: 0;
}

.faq-question {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  color: var(--color-navy);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.faq-question:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(82, 124, 193, 0.14);
}

.faq-chevron {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-royal);
  border-bottom: 2px solid var(--color-royal);
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(225deg);
}

.faq-panel p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--color-muted);
  line-height: 1.65;
}

.final-pricing-cta {
  margin-bottom: 80px;
  padding: clamp(36px, 5vw, 58px);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 18%, rgba(110, 193, 228, 0.28), transparent 30%),
    var(--gradient-brand);
  color: var(--color-white);
  text-align: center;
  box-shadow: var(--shadow-blue);
}

.final-pricing-cta h2,
.final-pricing-cta p {
  color: var(--color-white);
}

.final-pricing-cta p {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.88;
}

.light-primary {
  background: var(--color-white);
  color: var(--color-royal);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.light-primary:hover {
  background: var(--color-soft-blue);
  color: var(--color-royal);
}

.light-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.45);
}

.light-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--color-white);
  border-color: var(--color-white);
}

[dir="rtl"] .comparison-table th,
[dir="rtl"] .comparison-table td {
  text-align: right;
}

@media (max-width: 1180px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .faq-list,
  .addon-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .pricing-page {
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }

  .pricing-page main {
    width: min(100% - 30px, var(--container));
  }

  .pricing-actions,
  .plan-cta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    width: 100%;
    overflow-x: auto;
  }

  .segment-button {
    flex: 1 0 max-content;
  }
}

@media (prefers-reduced-motion: reduce) {
  .price-card,
  .price-card:hover {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
