:root {
  --bg: #0d0f14;
  --surface: #161820;
  --surface2: #1e2028;
  --accent: #1e88e5;
  --accent2: #42a5f5;
  --accent-dark: #1565c0;
  --text: #f0ede8;
  --text-muted: #8a8794;
  --border: rgba(30, 136, 229, 0.15);
  --radius: 12px;
}

[data-theme="light"] {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface2: #f0f2f5;
  --accent: #1e88e5;
  --accent2: #42a5f5;
  --accent-dark: #1565c0;
  --text: #1a1a2e;
  --text-muted: #6c757d;
  --border: rgba(30, 136, 229, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: 'iOS-Emoji';
  src: url('./fonts/ios/iOS16_14.ttf') format('truetype');
  unicode-range: U+1F300-1F5FF, U+1F900-1F9FF, U+1F600-1F64F, U+1F680-1F6FF, U+2600-26FF, U+2700-27BF;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 100;
  src: url('./fonts/vazirmatn/Vazirmatn-Thin.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 200;
  src: url('./fonts/vazirmatn/Vazirmatn-ExtraLight.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 300;
  src: url('./fonts/vazirmatn/Vazirmatn-Light.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 500;
  src: url('./fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 600;
  src: url('./fonts/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 700;
  src: url('./fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 800;
  src: url('./fonts/vazirmatn/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 900;
  src: url('./fonts/vazirmatn/Vazirmatn-Black.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 100 900;
  src: url('./fonts/vazirmatn/Vazirmatn[wght].woff2') format('woff2-variations');
  font-display: swap;
}

body {
  font-family: 'Vazirmatn', 'iOS-Emoji', sans-serif !important;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.blog-post-card p a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.5s ease;
}

.social-channels a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.5s ease;
}

a.btn-primary,
a.btn-outline,
a.back-btn,
.product-btn,
button {
  text-decoration: none;
}

/* Navigation */
nav {
  font-family: 'Vazirmatn', 'iOS-Emoji', sans-serif !important;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

button {
  font-family: 'Vazirmatn';
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
}

.logo span {
  color: var(--accent);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-tabs {
  display: flex;
  gap: 6px;
  list-style: none;
}

.nav-tabs li button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.22s;
}

.nav-tabs li button:hover {
  background: var(--surface2);
  color: var(--text);
}

.nav-tabs li button.active {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* Pages */
.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadein 0.4s ease;
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(30, 136, 229, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(66, 165, 245, 0.06) 0%, transparent 60%),
    var(--bg);
}

.hero-content {
  position: relative;
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  background: rgba(30, 136, 229, 0.12);
  border: 1px solid rgba(30, 136, 229, 0.3);
  color: var(--accent2);
  font-size: 0.82rem;
  padding: 5px 16px;
  border-radius: 30px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 20px;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 13px 32px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 10px;
}

.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 136, 229, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  padding: 13px 32px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Gallery */
.gallery-header {
  text-align: center;
  padding: 64px 24px 40px;
}

.section-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 14px;
}

.gallery-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding: 0 24px;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 7px 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 0 40px 80px;
  max-width: 1300px;
  margin: 0 auto;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.28s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(30, 136, 229, 0.4);
  box-shadow: 0 16px 40px #1e88e51c;
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface2);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface2) 0%, #252830 100%);
  color: var(--text-muted);
  font-size: 3rem;
  gap: 12px;
}

.product-image-placeholder span {
  font-size: 0.85rem;
}

.product-info {
  padding: 18px 20px 20px;
}

.product-cat {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.product-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-badge {
  background: rgba(30, 136, 229, 0.1);
  border: 1px solid rgba(30, 136, 229, 0.2);
  color: var(--accent2);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.product-badge.coming {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.product-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.product-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Product Detail Page */
.detail-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  padding: 8px 20px;
  border-radius: 30px;
  cursor: pointer;
  margin-bottom: 24px;
  transition: all 0.2s;
}

.back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.detail-image-section {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 30px;
}

.detail-main-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  background: var(--surface2);
}

.detail-thumbnails {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.detail-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.detail-thumb:hover,
.detail-thumb.active {
  border-color: var(--accent);
}

.detail-content {
  padding: 0 40px 40px 40px;
}

.detail-cat {
  display: inline-block;
  background: rgba(30, 136, 229, 0.15);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 5px 14px;
  border-radius: 30px;
  margin-bottom: 16px;
}

.detail-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 20px 0;
}

.detail-desc {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 24px;
}

.detail-features,
.detail-specs {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.detail-features li,
.detail-specs li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.detail-features li::before {
  content: "✓";
  color: var(--accent);
  font-weight: bold;
}

.detail-specs li::before {
  content: "▹";
  color: var(--accent2);
}

.detail-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* Contact Section */
.contact-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.contact-header {
  text-align: center;
  margin-bottom: 56px;
}

.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

@media (max-width: 640px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
}

.info-card:hover {
  border-color: #00B2FF;
  background: rgba(0, 178, 255, 0.05);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px #1e88e51c;
}

.info-icon {
  width: 40px;
  height: 40px;
  background: rgba(30, 136, 229, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-card>div {
  text-align: right;
  word-break: break-word;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  direction: rtl;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.form-submit:hover {
  background: var(--accent2);
}

.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-item .num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.83rem;
}

/* ========== دکمه تغییر تم ========== */
.theme-toggle {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 10px;
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

.theme-toggle svg path {
  fill: var(--text);
  transition: fill 0.3s ease;
}

.theme-toggle:hover {
  background: var(--accent);
  transform: scale(1.05);
}

.theme-toggle:hover svg path {
  fill: white;
}

/* ========== دکمه همبرگر ========== */
.hamburger {
  display: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  order: 0;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger:hover {
  background: var(--accent);
}

.hamburger:hover span {
  background: white;
}

/* انیمیشن تبدیل به X وقتی منو بازه */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== استایل موبایل ========== */
@media (max-width: 768px) {
  nav {
    padding: 0 16px;
  }

  .products-grid {
    padding: 0 16px 60px;
    gap: 16px;
  }

  .detail-content {
    padding: 0 20px 30px 20px;
  }

  .detail-image-section {
    padding: 20px;
  }

  /* دکمه همبرگر در موبایل نمایش داده میشه */
  .hamburger {
    display: flex;
  }

  /* مخفی کردن متن لوگو در موبایل */
  .logo span {
    display: none;
  }

  /* کوچک کردن آیکون لوگو */
  .logo-icon {
    width: 40px;
    height: 40px;
  }

  .logo-icon svg {
    width: 30px;
    height: 30px;
  }

  /* منوی اصلی - در موبایل به حالت کشویی */
  .nav-tabs {
    position: fixed;
    top: 68px;
    right: -280px;
    width: 280px;
    height: calc(100vh - 68px);
    background: var(--surface);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 20px;
    gap: 10px;
    transition: right 0.3s ease;
    z-index: 1000;
    margin: 0;
  }

  .nav-tabs.open {
    right: 0;
  }

  .nav-tabs li {
    width: 100%;
  }

  .nav-tabs li button {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    font-size: 1rem;
  }

  /* تنظیم لوگو و دکمه‌ها در موبایل */
  .logo {
    margin-right: auto;
    margin-left: 10px;
  }

  .theme-toggle {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  .nav-tabs {
    width: 100%;
    right: -100%;
  }
}

/* ========== استایل بخش ویدیو آپارات ========== */
.detail-video-section {
  margin: 30px 0 20px 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.detail-video-title {
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.h_iframe-aparat_embed_frame {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface2);
}

.h_iframe-aparat_embed_frame .ratio {
  display: block;
  width: 100%;
  height: auto;
}

.h_iframe-aparat_embed_frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* تنظیم نسبت 16:9 برای ویدیو */
.detail-video-section .h_iframe-aparat_embed_frame {
  padding-top: 0;
}

.detail-video-section .h_iframe-aparat_embed_frame span {
  display: block;
  padding-top: 56.25%;
}

.detail-video-section .h_iframe-aparat_embed_frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* حالت موبایل */
@media (max-width: 768px) {
  .detail-video-section {
    margin: 20px 0 15px 0;
    padding: 15px 0;
  }

  .detail-video-title {
    font-size: 1rem;
    margin-bottom: 12px;
  }
}

/* استایل‌های جدید برای صفحه تماس */
.social-channels {
  background: var(--surface);
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid var(--border);
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
  animation: colorShadow 4s ease infinite;
}

@keyframes colorShadow {
  0% {
    box-shadow: 0 10px 30px rgba(30, 136, 229, 0.3),
      0 0 20px rgba(30, 136, 229, 0.2);
  }

  25% {
    box-shadow: 0 10px 35px rgba(156, 39, 176, 0.35),
      0 0 25px rgba(156, 39, 176, 0.25);
  }

  50% {
    box-shadow: 0 10px 40px rgba(233, 30, 99, 0.4),
      0 0 30px rgba(233, 30, 99, 0.3);
  }

  75% {
    box-shadow: 0 10px 35px rgba(76, 175, 80, 0.35),
      0 0 25px rgba(76, 175, 80, 0.25);
  }

  100% {
    box-shadow: 0 10px 30px rgba(30, 136, 229, 0.3),
      0 0 20px rgba(30, 136, 229, 0.2);
  }
}



.social-channels h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: var(--bg);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.social-card:hover {
  border-color: #00B2FF;
  background: rgba(0, 178, 255, 0.05);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px #1e88e51c;
}

.social-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.social-icon svg {
  width: 40px;
  height: 40px;
}

.social-name {
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.social-id {
  font-size: 0.9rem;
  color: #1E88E5;
  direction: ltr;
  font-family: monospace;
}


@media (max-width: 768px) {
  .contact-page {
    padding: 40px 16px 60px;
  }

  .contact-header {
    margin-bottom: 32px;
  }

  .contact-grid {
    gap: 4rem;
  }

  .info-card {
    flex-direction: row;
    text-align: right;
    padding: 16px;
    margin-bottom: 12px;
  }

  .info-card>div {
    text-align: right;
  }

  .info-icon {
    width: 36px;
    height: 36px;
  }

  .social-channels {
    padding: 1.5rem;
  }

  .social-channels h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .social-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }

  .social-card {
    padding: 0.8rem;
  }

  .social-icon {
    width: 40px;
    height: 40px;
  }

  .social-icon svg {
    width: 30px;
    height: 30px;
  }

  .social-name {
    font-size: 0.8rem;
  }
}

/* ========== استایل‌های کوییز انتخاب روکش ========== */
.quiz-page {
  min-height: calc(100vh - 68px);
  background: var(--bg);
  padding: 40px 24px;
}

.quiz-hero {
  text-align: center;
  margin-bottom: 40px;
}

.quiz-hero-badge {
  display: inline-block;
  background: rgba(30, 136, 229, 0.12);
  border: 1px solid rgba(30, 136, 229, 0.3);
  color: var(--accent2);
  font-size: 0.82rem;
  padding: 5px 16px;
  border-radius: 30px;
  margin-bottom: 20px;
}

.quiz-hero h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.quiz-hero p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* کارت اصلی کوییز */
.quiz-main-card {
  max-width: 750px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.quiz-wrapper {
  padding: 32px;
}

/* نوار پیشرفت */
.quiz-header-area {
  margin-bottom: 32px;
}

.quiz-progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.quiz-progress-label {
  font-weight: 500;
}

.quiz-progress-percent {
  font-weight: 700;
  color: var(--accent);
}

.quiz-progress-bg {
  background: var(--surface2);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}

.quiz-progress-fill {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  width: 0%;
  height: 100%;
  border-radius: 20px;
  transition: width 0.3s ease;
}

/* محتوای سوال */
.quiz-question-container {
  min-height: 400px;
}

.quiz-question-header {
  margin-bottom: 28px;
}

.quiz-category-badge {
  display: inline-block;
  background: rgba(30, 136, 229, 0.1);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 30px;
  margin-bottom: 16px;
}

.quiz-question-text {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.quiz-question-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* گزینه‌ها */
.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0 32px;
}

.quiz-option {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text);
}

.quiz-option:hover {
  border-color: var(--accent);
  transform: translateX(-4px);
  background: rgba(30, 136, 229, 0.05);
}

.quiz-option-active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: white !important;
}

.quiz-option-active .quiz-option-icon {
  color: white;
}

.quiz-option-icon {
  font-size: 1.3rem;
}

/* دکمه‌ها */
.quiz-nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.quiz-btn {
  padding: 12px 28px;
  border-radius: 40px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.quiz-btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.quiz-btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
}

.quiz-btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.quiz-btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* صفحه نتیجه */
.quiz-result-area {
  text-align: center;
  padding: 20px 0;
}

.quiz-result-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.quiz-result-title {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}

.quiz-result-badge {
  display: inline-block;
  background: rgba(30, 136, 229, 0.12);
  padding: 6px 20px;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--accent2);
}

.quiz-result-desc {
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 24px;
  text-align: justify;
}

.quiz-result-offer {
  background: rgba(30, 136, 229, 0.08);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin: 20px 0;
  font-size: 0.9rem;
}

.quiz-result-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* موبایل */
@media (max-width: 768px) {
  .quiz-page {
    padding: 24px 16px;
  }

  .quiz-wrapper {
    padding: 20px;
  }

  .quiz-question-text {
    font-size: 1.3rem;
  }

  .quiz-option {
    padding: 12px 16px;
  }

  .quiz-btn {
    padding: 10px 20px;
  }

  .quiz-result-title {
    font-size: 1.4rem;
  }
}

/* انیمیشن ظهور کلمه به کلمه با بلور */
.word-animate {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(8px);
  animation: fadeInBlur 1s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

@keyframes fadeInBlur {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

/* برای هدر اصلی (در صورت نیاز به نگهدارنده خطوط) */
.animated-title {
  line-height: 1.3;
}

.animated-title .word {
  display: inline-block;
  margin-left: 0.2em;
  margin-right: 0.2em;
}

/* ========== بلاگ ========== */
.blog-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.blog-header {
  text-align: center;
  margin-bottom: 48px;
}

.blog-list-container {
  width: 100%;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.blog-card-link {
  text-decoration: none;
  display: block;
}

.blog-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(30, 136, 229, 0.2);
}


.blog-card-content {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.blog-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.blog-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.blog-read-more {
  align-self: flex-start;
  margin-top: auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
  text-align: center;
}

.blog-read-more:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* صفحه نمایش مطلب در blog-post.html */
.blog-post-card {
  background: var(--surface);
  border-radius: 24px;
  border: 1px solid var(--border);
  padding: 30px;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.8;
  color: var(--text);
}

.blog-post-card h1,
.blog-post-card h2,
.blog-post-card h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 700;
}

.blog-post-card p {
  margin-bottom: 1.2em;
}

.blog-post-card img {
  width: 100%;
  border-radius: 12px;
  margin: 20px 0;
  display: block;
  border: 1px solid var(--border);
}

.blog-post-card ul,
.blog-post-card ol {
  margin-right: 1.5rem;
  margin-bottom: 1.2rem;
}

.blog-post-card li {
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .blog-page {
    padding: 24px 16px 60px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-post-card {
    padding: 20px;
  }
}
