/* ============================
   main.css — SuFramework v2.0
   Modern Design System + Dark Mode + Global Sections
   ============================ */

/* === ۱. ریست و جعبه‌سازی === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === ۲. ایمپورت فونت‌ها === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://cdn.fontcdn.ir/Font/Persian/B-NAZANIN/B-NAZANIN.css');

/* === ۳. پالت رنگی (Design Tokens) === */
:root {
  /* پس‌زمینه‌های اصلی */
  --bg-primary: #faf8f5;       /* کرم مه‌آلود */
  --bg-surface: #ffffff;       /* سفید کارت‌ها */
  --bg-dark: #1a2332;          /* سرمه‌ای مخملی (برای هدر و فوتر) */

  /* متن */
  --text-primary: #1e293b;     /* ذغالی نفتی */
  --text-secondary: #475569;   /* طوسی میانی */
  --text-on-dark: #f1f5f9;     /* متن روی زمینه تیره */

  /* تأکیدی و تعاملی */
  --accent-gold: #c9a84c;      /* طلایی ملایم */
  --accent-gold-hover: #b4922f;/* طلایی پررنگ‌تر */
  --accent-soft: rgba(201, 168, 76, 0.08); /* طلایی محو برای هایلایت */
  --success: #2e7d32;
  --error: #c62828;
  --warning: #e65100;

  /* سایه‌ها و حاشیه‌ها */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);
  --border-light: rgba(0,0,0,0.06);
  --border-accent: rgba(201,168,76,0.25);

  /* شعاع و گذار */
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition-fast: 0.15s ease;
  --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* فونت */
  --font-heading: "B Nazanin", "Poppins", Tahoma, sans-serif;
  --font-body: "Poppins", "B Nazanin", Tahoma, sans-serif;
}

/* === ۴. استایل‌های پایه === */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* بک‌گراند مدرن و سریع (جایگزین ویدیو و طلایی سنگین) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(201, 168, 76, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(201, 168, 76, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* لایهٔ محتوای اصلی */
.main-content {
  position: relative;
  z-index: 1;
  background: transparent;
  min-height: 100vh;
}

/* === ۴.۱ اسکرول‌بار طلایی (WebKit & Firefox) === */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-gold);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold-hover);
}
/* فایرفاکس */
html {
  scrollbar-color: var(--accent-gold) var(--bg-primary);
  scrollbar-width: thin;
}

/* === ۵. تایپوگرافی پایه === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
  color: var(--text-primary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--accent-gold-hover);
}

/* === ۶. کانتینر === */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

main.container {
  padding-top: 100px;
  padding-bottom: 3rem;
}

/* === ۷. تصاویر === */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  object-fit: cover;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
img:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-md);
}
img:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* === ۸. کارت‌های عمومی === */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* === ۹. دکمه‌ها === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-decoration: none;
  line-height: 1.5;
}
.btn-primary {
  background: var(--accent-gold);
  color: #fff;
  box-shadow: 0 2px 8px rgba(201,168,76,0.25);
}
.btn-primary:hover {
  background: var(--accent-gold-hover);
  box-shadow: 0 4px 16px rgba(201,168,76,0.35);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold);
}
.btn-outline:hover {
  background: var(--accent-soft);
  border-color: var(--accent-gold-hover);
}

/* === ۱۰. فوکوس و دسترسی‌پذیری === */
:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === ۱۱. حالت دارک مود === */
body.dark-mode {
  --bg-primary: #0f172a;
  --bg-surface: #1e293b;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --border-light: rgba(255,255,255,0.08);
  --border-accent: rgba(201,168,76,0.3);
  --accent-soft: rgba(201,168,76,0.12);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}

body.dark-mode::before {
  background:
    radial-gradient(ellipse at 15% 20%, rgba(201, 168, 76, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(201, 168, 76, 0.04) 0%, transparent 50%);
}

/* ================================================================
   ۱۲. سکشن‌های صفحه اصلی (الحاق‌شده از index.css بدون Scope)
   ================================================================ */

/* --- Hero --- */
.hero-section {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2.4rem 1.25rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  pointer-events: none;
  filter: saturate(0.98) contrast(0.98) brightness(1.02);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,10,14,0.18), rgba(6,10,14,0.34));
  mix-blend-mode: multiply;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  padding: 1.8rem 1rem;
}
.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.18;
  color: var(--text-primary);
  margin: 0 0 0.6rem;
}
.hero-content .lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 78ch;
  margin: 0.6rem auto 1.25rem;
  line-height: 1.7;
}
.hero-ctas {
  display: inline-flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Philosophy --- */
.philosophy-section {
  padding: 1.4rem;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
}
.philosophy-inner {
  display: grid;
  gap: 1rem;
  align-items: center;
}
.philosophy-copy h2 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-size: 1.48rem;
  margin: 0 0 0.5rem;
}
.philosophy-copy p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 0.7rem;
}
.values-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin: 0.4rem 0 0.9rem;
  padding: 0;
}
.values-list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  color: var(--text-secondary);
  font-weight: 500;
}
.link-more {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--accent-gold);
  font-weight: 600;
  text-decoration: underline;
  transition: color var(--transition-fast);
}
.link-more:hover {
  color: var(--accent-gold-hover);
}
.philosophy-figure img {
  width: 100%;
  max-width: 340px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  display: block;
  margin-inline-start: auto;
  margin-inline-end: auto;
}

/* --- Services --- */
.services-section {
  padding: 1.2rem;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
}
.section-head h2 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-size: 1.38rem;
  margin: 0 0 0.35rem;
}
.section-head .muted {
  color: var(--text-secondary);
  font-size: 1rem;
}
.services-grid {
  display: grid;
  gap: 1rem;
}
.service-card {
  padding: 1rem;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
}
.service-card p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.66;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* --- Doctor credentials --- */
.doctor-credentials {
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}
.credentials-inner {
  display: grid;
  gap: 0.9rem;
  align-items: center;
}
.credentials-copy h2 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-size: 1.32rem;
  margin: 0 0 0.45rem;
}
.credentials-copy p {
  color: var(--text-secondary);
  line-height: 1.68;
}
.credentials-card {
  display: flex;
  justify-content: center;
  align-items: center;
}
.credentials-card img {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(201,168,76,0.06);
  object-fit: cover;
}

/* --- Video & Gallery --- */
.video-gallery-section {
  padding: 1.2rem;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
}
.video-gallery {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}
.media-item {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #0c0c0c;
  color: #fff;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border: 1px solid rgba(201,168,76,0.05);
}
.media-item video,
.media-item img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}
.media-item figcaption {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.92);
  padding-top: 0.18rem;
}
.media-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* --- Blog preview --- */
.blog-preview {
  padding: 1.2rem;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
}
.blog-cards {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}
.blog-card {
  padding: 0.95rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.blog-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.blog-card a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.blog-card a:hover {
  color: var(--accent-gold);
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ================================================
   ۱۳. سکشن فوتر (section-footer) برای دکمه‌های CTA
   ================================================ */
.section-footer {
  text-align: center;
  margin-top: 2rem;
}

/* ================================================
   ۱۴. کلاس‌های کمکی (Utilities)
   ================================================ */
.text-center { text-align: center; }
.muted { color: var(--text-secondary); }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ================================================
   ۱۵. ریسپانسیو (Mobile-First) — از index.css
   ================================================ */

/* ---- خیلی کوچک (≤359px) ---- */
@media (max-width: 359px) {
  .container { padding: 0 0.65rem; }
  .hero-content h1 { font-size: 1.6rem; }
  .hero-content .lead { font-size: 0.92rem; }
  .btn { padding: 0.5rem 0.9rem; border-radius: 10px; }
  .service-card, .blog-card, .media-item { padding: 0.6rem; border-radius: 10px; }
}

/* ---- موبایل (≤600px) ---- */
@media (max-width: 600px) {
  html { font-size: 14px; }
  main.container { padding-top: 70px; }
  .btn { padding: 0.6rem 1rem; border-radius: var(--radius-lg); }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-content .lead { font-size: 1rem; }
  .services-grid,
  .video-gallery,
  .blog-cards { grid-template-columns: 1fr; }
  .philosophy-figure img,
  .credentials-card img { width: 100%; }
}

/* ---- تبلت کوچک (601–767px) ---- */
@media (min-width: 601px) and (max-width: 767px) {
  .hero-content h1 { font-size: 2.1rem; }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 0.95rem; }
  .video-gallery { grid-template-columns: repeat(2, 1fr); }
  .blog-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ---- تبلت بزرگ (768–899px) ---- */
@media (min-width: 768px) and (max-width: 899px) {
  html { font-size: 15px; }
  main.container { padding-top: 100px; }
  .hero-content { padding: 2.2rem; }
  .hero-content h1 { font-size: 2.4rem; }
  .philosophy-inner { grid-template-columns: 1fr 320px; gap: 1.6rem; }
  .credentials-inner { grid-template-columns: 1fr 320px; gap: 1.6rem; }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
}

/* ---- دسکتاپ (≥900px) ---- */
@media (min-width: 900px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 1.15rem; }
  .video-gallery { grid-template-columns: repeat(3, 1fr); }
  .blog-cards { grid-template-columns: repeat(3, 1fr); }
  .philosophy-inner { grid-template-columns: 1fr 380px; gap: 2rem; }
  .credentials-inner { grid-template-columns: 1fr 360px; gap: 2rem; }
  .hero-content h1 { font-size: 2.8rem; }
  .hero-content .lead { font-size: 1.12rem; }
}

/* ---- خیلی بزرگ (≥1200px) ---- */
@media (min-width: 1200px) {
  .philosophy-figure img { max-width: 380px; }
  .credentials-card img { max-width: 420px; }
}

/* ================================================
   ۱۶. کاهش انیمیشن (Accessibility)
   ================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}