/* ==========================================================================
   rembg.ir - سامانه هوشمند ساخت آنلاین سرتیفیکیت و تقدیرنامه
   استایل‌های اختصاصی تم لایت هماهنگ با هویت بصری سایت اصلی
   ========================================================================== */

:root {
  --font-family: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* پالت رنگی اصلی */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border-light: #e2e8f0;
  --border-focus: #194bfb;

  /* رنگ‌های اصلی اکشن */
  --primary: #194bfb;
  --primary-hover: #103ecb;
  --primary-light: #eef3ff;
  --primary-glow: rgba(25, 75, 251, 0.16);

  --success: #10b981;
  --success-light: #ecfdf5;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --warning: #f59e0b;

  /* سایه‌ها */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 28px -6px rgba(15, 23, 42, 0.09);
  --shadow-float: 0 20px 40px -12px rgba(25, 75, 251, 0.14);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   هدر و نوار ناوبری
   ========================================================================== */
.site-header {
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  color: inherit;
  outline: none;
}

.brand-link:hover,
.brand-link:focus,
.brand-link:active,
.brand-link:visited {
  text-decoration: none !important;
  color: inherit;
}

.brand-link * {
  text-decoration: none !important;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #194bfb, #3b82f6);
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(25, 75, 251, 0.25);
  flex-shrink: 0;
}

.brand-shape-img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

.brand-logo-img {
  height: 24px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
}

.brand-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(25, 75, 251, 0.15);
  white-space: nowrap;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   منوی کشویی ابزارها و قابلیت‌ها در هدر
   ========================================================================== */
.tools-menu-wrapper {
  position: relative;
}

.tools-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.tools-menu-btn:hover {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  color: var(--primary);
}

.tools-menu-btn.active {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  color: var(--primary);
}

.dropdown-arrow {
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.tools-menu-btn.active .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

/* کارت پاپ‌اوور منو */
.tools-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 320px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.16);
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

.tools-dropdown.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   ریسپانسیو هدر و منوی ابزارها در موبایل و تبلت
   ========================================================================== */
.desktop-only {
  display: inline;
}

@media (max-width: 640px) {
  .desktop-only {
    display: none;
  }

  .site-header {
    padding: 10px 0;
  }

  .container {
    padding: 0 14px;
  }

  .header-container {
    gap: 8px;
  }

  /* تنظیم متناسب برند و لوگو در موبایل */
  .brand-link {
    gap: 8px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
  }

  .brand-shape-img {
    width: 20px;
    height: 20px;
  }

  .brand-text {
    gap: 6px;
  }

  .brand-logo-img {
    height: 20px;
    max-width: 115px;
  }

  .brand-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 12px;
  }

  /* بهینه‌سازی دکمه منوی ابزارها در موبایل */
  .tools-menu-btn {
    padding: 6px 10px;
    font-size: 12px;
    gap: 6px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
  }

  .dropdown-arrow {
    width: 11px;
    height: 11px;
  }

  /* تنظیم هوشمند و بدون اسکرول افقی کارت کشویی در موبایل */
  .tools-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    width: min(300px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    max-height: calc(85vh - 60px);
    overflow-y: auto;
    padding: 8px;
    border-radius: var(--radius-md);
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.08);
    transform: translateY(-6px);
  }

  .tools-dropdown.show {
    transform: translateY(0);
  }

  .dropdown-header {
    padding: 6px 8px 8px;
  }

  .dropdown-item {
    padding: 8px;
    gap: 10px;
  }

  .item-icon-box {
    width: 32px;
    height: 32px;
  }

  .item-icon-box svg {
    width: 16px;
    height: 16px;
  }

  .item-title {
    font-size: 12.5px;
  }

  .item-desc {
    font-size: 11px;
    line-height: 1.4;
  }
}

/* در گوشی‌های بسیار باریک (زیر ۴۰۰ پیکسل) */
@media (max-width: 400px) {
  .container {
    padding: 0 10px;
  }

  .brand-badge {
    display: none !important;
  }

  .brand-logo-img {
    height: 19px;
    max-width: 95px;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
  }

  .brand-shape-img {
    width: 18px;
    height: 18px;
  }

  .tools-menu-btn {
    padding: 5px 8px;
    font-size: 11px;
    gap: 4px;
  }

  .tools-dropdown {
    width: min(280px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
  }
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 6px;
}

.dropdown-header-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.dropdown-header-count {
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 10px;
}

.dropdown-items-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--bg-subtle);
}

.dropdown-item.current-tool {
  background: var(--primary-light);
  border: 1px solid rgba(25, 75, 251, 0.15);
}

.item-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.item-icon-box.bg-blue {
  background: #dbeafe;
  color: #194bfb;
}

.item-icon-box.bg-purple {
  background: #ede9fe;
  color: #6366f1;
}

.item-text-box {
  flex: 1;
  min-width: 0;
}

.item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.dropdown-item.current-tool .item-title {
  color: var(--primary);
}

.item-badge-current {
  font-size: 10px;
  font-weight: 600;
  background: rgba(25, 75, 251, 0.12);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.item-badge-new {
  font-size: 10px;
  font-weight: 700;
  background: #ef4444;
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

.item-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background-color: var(--bg-subtle);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
}

.meta-dot {
  width: 7px;
  height: 7px;
  background-color: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   بخش هیرو (Hero)
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 36px 0 60px;
}

.hero-section {
  text-align: center;
  margin-bottom: 32px;
}

.hero-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(25, 75, 251, 0.18);
  padding: 4px 14px;
  border-radius: 30px;
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-highlight {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 20px;
  line-height: 1.8;
}

.hero-features-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-chip svg {
  color: var(--success);
}

/* ==========================================================================
   طرح‌بندی استودیو سرتیفیکیت (Workspace Grid)
   ========================================================================== */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 48px;
}

@media (min-width: 992px) {
  .workspace-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.panel-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  padding: 24px;
  transition: var(--transition);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-num {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.panel-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.panel-header-action {
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light);
  border: none;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.panel-header-action:hover {
  background: #dbeafe;
}

/* ==========================================================================
   شبکه قالب‌ها (Template Grid)
   ========================================================================== */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 640px) {
  .templates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .templates-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.template-card {
  position: relative;
  background: var(--bg-subtle);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.template-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.template-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-md);
  background: #ffffff;
}

.template-thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 70%; /* نسبت افقی سرتیفیکیت */
  background: #e2e8f0;
  overflow: hidden;
}

.template-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.template-card:hover .template-thumb {
  transform: scale(1.04);
}

.template-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  z-index: 2;
}

.template-zoom-btn {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
  cursor: pointer;
}

.template-card:hover .template-zoom-btn {
  opacity: 1;
}

.template-zoom-btn:hover {
  background: #ffffff;
  color: var(--primary);
  transform: scale(1.1);
}

.template-info {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.template-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: var(--transition);
  flex-shrink: 0;
}

.template-card.active .template-check {
  background: var(--primary);
  border-color: var(--primary);
}

.template-check svg {
  opacity: 0;
  transition: var(--transition);
}

.template-card.active .template-check svg {
  opacity: 1;
}

/* ==========================================================================
   فرم و ورودی‌ها (Form Controls)
   ========================================================================== */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-label span.req {
  color: var(--danger);
  margin-right: 2px;
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-input, .form-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  background: var(--bg-body);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: var(--transition);
  outline: none;
}

.form-textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.6;
}

.form-input:focus, .form-textarea:focus {
  background: #ffffff;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 480px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* چیپ‌های انتخاب فرمت */
.format-chips-wrap {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.format-chip {
  flex: 1;
  padding: 9px 12px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
}

.format-chip:hover {
  border-color: #cbd5e1;
  color: var(--text-main);
}

.format-chip.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.format-chip-badge {
  font-size: 10px;
  background: rgba(25, 75, 251, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ==========================================================================
   دکمه ارسال و استیت‌های پردازش
   ========================================================================== */
.submit-btn-wrap {
  margin-top: 24px;
}

.btn-generate {
  width: 100%;
  padding: 13px 20px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(25, 75, 251, 0.28);
}

.btn-generate:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(25, 75, 251, 0.35);
}

.btn-generate:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* نوار پیشرفت رندرینگ */
.progress-wrap {
  display: none;
  margin-top: 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.progress-wrap.show {
  display: block;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
}

.progress-txt {
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-pct {
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 7px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #194bfb, #3b82f6);
  border-radius: 10px;
  transition: width 0.3s ease;
}

/* ==========================================================================
   باکس نتیجه و دانلود (Result Card)
   ========================================================================== */
.result-wrap {
  display: none;
  margin-top: 20px;
  background: var(--success-light);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 18px;
  animation: slideDown 0.3s ease;
}

.result-wrap.show {
  display: block;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.result-icon {
  width: 32px;
  height: 32px;
  background: var(--success);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.result-title {
  font-size: 14px;
  font-weight: 700;
  color: #166534;
}

.result-desc {
  font-size: 12px;
  color: #15803d;
}

.result-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid rgba(22, 101, 52, 0.15);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.result-filename {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  direction: ltr;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-filesize {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.result-preview-box {
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(22, 101, 52, 0.2);
  background: #ffffff;
  max-height: 240px;
  display: none;
  justify-content: center;
  align-items: center;
}

.result-preview-img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  display: block;
}

.result-actions {
  display: flex;
  gap: 10px;
}

.btn-download {
  flex: 2;
  padding: 10px 16px;
  background: var(--success);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: var(--transition);
}

.btn-download:hover {
  background: #059669;
}

.btn-reset {
  flex: 1;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid rgba(22, 101, 52, 0.25);
  color: #166534;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-reset:hover {
  background: #f0fdf4;
}

/* ==========================================================================
   ویژگی‌ها و مزایا (Features)
   ========================================================================== */
.features-section {
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-box {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  transition: var(--transition);
}

.feature-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.feature-icon-wrap {
  width: 50px;
  height: 50px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.feature-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   پرسش‌های متداول (FAQ)
   ========================================================================== */
.faq-section {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin-bottom: 48px;
}

.faq-header {
  text-align: center;
  margin-bottom: 24px;
}

.faq-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.faq-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 840px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  text-align: right;
  gap: 12px;
}

.faq-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
  padding: 0 18px;
}

.faq-item.active .faq-answer {
  padding: 0 18px 16px;
  max-height: 200px;
}

/* ==========================================================================
   لایت‌باکس بزرگنمایی قالب (Modal Lightbox)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-backdrop.show .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.modal-body {
  padding: 16px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 70vh;
  overflow: hidden;
}

.modal-img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-footer {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-body);
}

.modal-template-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-select-template {
  padding: 8px 16px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   فوتر (Footer)
   ========================================================================== */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 28px 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-light);
}

/* ==========================================================================
   سامانه توست و اعلان‌ها (Toast System)
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-right: 4px solid var(--primary);
}

.toast.ok {
  border-right-color: var(--success);
  color: #166534;
}

.toast.err {
  border-right-color: var(--danger);
  color: #991b1b;
}

@keyframes toastIn {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* انیمیشن اسپینر */
.spin {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   بخش محتوای جامع سئو (SEO Detailed Section)
   ========================================================================== */
.seo-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  margin-bottom: 36px;
}

.seo-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
  line-height: 1.5;
}

.seo-paragraph {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 18px;
}

.seo-highlight-box {
  background-color: var(--bg-subtle);
  border-right: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.seo-highlight-box h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.seo-highlight-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* کلمات کلیدی ابری */
.keywords-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-light);
}

.keyword-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  background-color: var(--bg-subtle);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.keyword-badge:hover {
  color: var(--primary);
  border-color: #cbd5e1;
}

