/* =========================================================
   آکادمی علوم استاد رزمی — سیستم طراحی صفحات محصول
   Dark Premium EdTech (بدون دست زدن به لندینگ)
   ========================================================= */
:root {
  --rz-bg: #070b14;
  --rz-bg-soft: #0b1220;
  --rz-surface: #121a2b;
  --rz-surface-2: #182235;
  --rz-border: rgba(196, 155, 74, 0.16);
  --rz-border-soft: rgba(255, 255, 255, 0.06);
  --rz-gold: #c49b4a;
  --rz-gold-2: #d4af6a;
  --rz-gold-dark: #a67c2d;
  --rz-text: #e8eef7;
  --rz-muted: #94a3b8;
  --rz-success: #10b981;
  --rz-danger: #ef4444;
  --rz-warning: #f59e0b;
  --rz-info: #3b82f6;
  --rz-radius: 20px;
  --rz-radius-sm: 14px;
  --rz-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --rz-ease: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode {
  --rz-bg: #f4f6fb;
  --rz-bg-soft: #ffffff;
  --rz-surface: #ffffff;
  --rz-surface-2: #f8fafc;
  --rz-border: rgba(196, 155, 74, 0.28);
  --rz-border-soft: #e2e8f0;
  --rz-text: #0f172a;
  --rz-muted: #64748b;
  --rz-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

body.light-mode .rz-hero {
  background:
    radial-gradient(900px 280px at 80% -20%, rgba(196, 155, 74, 0.12), transparent 60%),
    linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
}

body.light-mode .rz-btn-primary { color: #0a0f1a; }
body.light-mode .rz-alert-ok { color: #065f46; background: #d1fae5; border-color: #a7f3d0; }
body.light-mode input,
body.light-mode textarea,
body.light-mode select {
  color: #0f172a;
}

/* ---------- Layout ---------- */
.rz-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

.rz-page--wide {
  max-width: 1320px;
}

.rz-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rz-border);
  background:
    radial-gradient(900px 280px at 80% -20%, rgba(196, 155, 74, 0.18), transparent 60%),
    linear-gradient(160deg, var(--rz-surface) 0%, var(--rz-bg-soft) 100%);
  border-radius: 28px;
  padding: 36px 32px;
  margin-bottom: 28px;
  box-shadow: var(--rz-shadow);
}

.rz-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--rz-text);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.rz-hero p {
  color: var(--rz-muted);
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.8;
  max-width: 52ch;
}

.rz-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rz-gold);
  background: rgba(196, 155, 74, 0.12);
  border: 1px solid var(--rz-border);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 14px;
}

.rz-section {
  margin-bottom: 36px;
}

.rz-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.rz-section-head h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--rz-text);
  margin: 0;
}

.rz-section-head a {
  color: var(--rz-gold);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.rz-section-head a:hover {
  color: var(--rz-gold-2);
}

/* ---------- Cards / grid ---------- */
.rz-grid {
  display: grid;
  gap: 20px;
}

.rz-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rz-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rz-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rz-grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.rz-card {
  background: var(--rz-surface);
  border: 1px solid var(--rz-border-soft);
  border-radius: var(--rz-radius);
  box-shadow: var(--rz-shadow);
  overflow: hidden;
  transition: transform var(--rz-ease), border-color var(--rz-ease), box-shadow var(--rz-ease);
}

.rz-card:hover {
  transform: translateY(-3px);
  border-color: var(--rz-border);
}

.rz-card-body {
  padding: 20px;
}

.rz-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--rz-text);
  margin: 0 0 8px;
  line-height: 1.5;
}

.rz-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--rz-muted);
  font-size: 0.8rem;
  margin-bottom: 14px;
}

.rz-thumb {
  height: 150px;
  background:
    linear-gradient(135deg, rgba(196, 155, 74, 0.18), rgba(15, 23, 42, 0.2)),
    var(--rz-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rz-gold);
  font-size: 2rem;
  position: relative;
  background-size: cover;
  background-position: center;
}

.rz-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 11, 20, 0.55), transparent 55%);
  pointer-events: none;
}

/* ---------- Stats ---------- */
.rz-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--rz-surface);
  border: 1px solid var(--rz-border-soft);
  border-radius: var(--rz-radius);
  box-shadow: var(--rz-shadow);
}

.rz-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(196, 155, 74, 0.12);
  color: var(--rz-gold);
  font-weight: 800;
  flex-shrink: 0;
}

.rz-stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--rz-gold);
  font-weight: 900;
  line-height: 1.2;
}

.rz-stat span {
  color: var(--rz-muted);
  font-size: 0.82rem;
}

/* ---------- Progress ---------- */
.rz-progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

body.light-mode .rz-progress {
  background: #e2e8f0;
}

.rz-progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--rz-gold-dark), var(--rz-gold-2));
  border-radius: inherit;
}

.rz-progress-label {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--rz-muted);
}

/* ---------- Buttons ---------- */
.rz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--rz-ease), box-shadow var(--rz-ease), background var(--rz-ease), color var(--rz-ease);
}

.rz-btn:focus-visible {
  outline: 2px solid var(--rz-gold);
  outline-offset: 2px;
}

.rz-btn-primary {
  background: linear-gradient(135deg, var(--rz-gold), var(--rz-gold-dark));
  color: #0a0f1a;
  box-shadow: 0 10px 24px rgba(196, 155, 74, 0.25);
}

.rz-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(196, 155, 74, 0.35);
}

.rz-btn-ghost {
  background: transparent;
  color: var(--rz-gold);
  border: 1px solid var(--rz-border);
}

.rz-btn-ghost:hover {
  background: rgba(196, 155, 74, 0.08);
}

.rz-btn-block { width: 100%; }
.rz-btn:disabled,
.rz-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- Badges ---------- */
.rz-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.rz-badge-gold {
  color: var(--rz-gold);
  background: rgba(196, 155, 74, 0.12);
  border-color: var(--rz-border);
}

.rz-badge-ok {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

.rz-badge-warn {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
}

.rz-badge-danger {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ---------- Forms / checkout / cart ---------- */
.rz-panel {
  background: var(--rz-surface);
  border: 1px solid var(--rz-border-soft);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--rz-shadow);
}

.rz-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rz-border-soft);
}

.rz-list-row:last-child { border-bottom: none; }

.rz-price {
  color: var(--rz-gold);
  font-weight: 800;
  white-space: nowrap;
}

.rz-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--rz-border-soft);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--rz-text);
}

.rz-total .rz-price { font-size: 1.2rem; }

.rz-alert {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.rz-alert-error {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

body.light-mode .rz-alert-error {
  color: #991b1b;
  background: #fee2e2;
}

.rz-alert-ok {
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.rz-bank {
  background: var(--rz-surface-2);
  border: 1px solid var(--rz-border-soft);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.15rem;
  color: var(--rz-text);
  margin: 14px 0 8px;
}

.rz-upload {
  border: 1.5px dashed rgba(196, 155, 74, 0.4);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  cursor: pointer;
  color: var(--rz-muted);
  transition: border-color var(--rz-ease), background var(--rz-ease);
  margin: 18px 0;
}

.rz-upload:hover {
  border-color: var(--rz-gold);
  background: rgba(196, 155, 74, 0.05);
}

.rz-empty {
  text-align: center;
  padding: 64px 20px;
  background: var(--rz-surface);
  border: 1px solid var(--rz-border-soft);
  border-radius: 24px;
  color: var(--rz-muted);
}

.rz-empty h3 {
  color: var(--rz-text);
  margin: 10px 0 8px;
  font-size: 1.3rem;
}

.rz-quick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.rz-quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 100px;
  text-decoration: none;
  color: var(--rz-text);
  background: var(--rz-surface);
  border: 1px solid var(--rz-border-soft);
  border-radius: 18px;
  font-weight: 700;
  font-size: 0.86rem;
  transition: transform var(--rz-ease), border-color var(--rz-ease);
}

.rz-quick a:hover {
  transform: translateY(-2px);
  border-color: var(--rz-border);
}

.rz-quick .qi {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(196, 155, 74, 0.12);
  color: var(--rz-gold);
  font-size: 1.1rem;
}

/* ---------- Course detail ---------- */
.rz-detail {
  display: grid;
  grid-template-columns: 1.5fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.rz-detail-main,
.rz-detail-side {
  background: var(--rz-surface);
  border: 1px solid var(--rz-border-soft);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--rz-shadow);
}

.rz-detail-main h1 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 900;
  color: var(--rz-text);
  margin: 0 0 14px;
}

.rz-detail-desc {
  color: var(--rz-muted);
  line-height: 1.9;
  font-size: 0.95rem;
}

.rz-side-price {
  text-align: center;
  margin-bottom: 18px;
}

.rz-side-price .lbl {
  color: var(--rz-muted);
  font-size: 0.85rem;
}

.rz-side-price .val {
  font-size: 2rem;
  font-weight: 900;
  color: var(--rz-gold);
  margin-top: 4px;
}

.rz-chapter {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  margin-bottom: 10px;
}

body.light-mode .rz-chapter {
  background: #f8fafc;
}

.rz-chapter:hover {
  border-color: var(--rz-border);
}

.rz-chapter-num {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(196, 155, 74, 0.12);
  color: var(--rz-gold);
  font-weight: 800;
  flex-shrink: 0;
}

.rz-chapter-title {
  font-weight: 700;
  color: var(--rz-text);
}

.rz-chapter-desc {
  font-size: 0.8rem;
  color: var(--rz-muted);
  margin-top: 2px;
}

.rz-profile-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.rz-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--rz-gold);
  background: var(--rz-surface-2);
}

.rz-profile-bar h1 {
  margin: 6px 0 4px;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--rz-text);
}

.rz-profile-bar h1 span { color: var(--rz-gold); }

.rz-profile-bar .sub {
  color: var(--rz-muted);
  font-size: 0.9rem;
}

.rz-mini-stats {
  display: flex;
  gap: 10px;
  margin-right: auto;
}

.rz-mini-stat {
  min-width: 84px;
  text-align: center;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--rz-border-soft);
}

.rz-mini-stat b {
  display: block;
  color: var(--rz-gold);
  font-size: 1.4rem;
  font-weight: 900;
}

.rz-mini-stat span {
  color: var(--rz-muted);
  font-size: 0.72rem;
}

.rz-notif {
  background: var(--rz-surface);
  border: 1px solid var(--rz-border-soft);
  border-radius: 20px;
  padding: 20px;
}

.rz-notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rz-border-soft);
}

.rz-notif-item:last-child { border-bottom: none; }

.rz-actions-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .rz-detail { grid-template-columns: 1fr; }
  .rz-grid-4, .rz-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rz-mini-stats { margin-right: 0; width: 100%; }
}

@media (max-width: 640px) {
  .rz-page { padding: 24px 16px 48px; }
  .rz-hero { padding: 24px 18px; border-radius: 20px; }
  .rz-grid-4, .rz-grid-3, .rz-grid-2 { grid-template-columns: 1fr; }
  .rz-panel { padding: 20px; }
  .rz-list-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .rz-card,
  .rz-btn,
  .rz-quick a {
    transition: none;
  }
  .rz-card:hover,
  .rz-btn-primary:hover,
  .rz-quick a:hover {
    transform: none;
  }
}
