/* =====================================================
   دکتر سحر عبادتی — استایل اصلی + تم دارک
   ===================================================== */

/* ============ RESET ============ */

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

/* ============ تم روشن (پیش‌فرض) ============ */

:root {
  color-scheme: light;

  /* رنگ اصلی */
  --primary: #6b46c1;
  --primary-dark: #553c9a;
  --primary-light: #9f7aea;
  --primary-soft: #f3efff;

  /* طلایی */
  --gold: #d69e2e;
  --gold-light: #ecc94b;

  /* رنگ‌های پایه */
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --bg-elev: #ffffff;
  --bg-dark: #1a1a2e;
  --text: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: #e2e8f0;
  --border-light: #edf2f7;

  /* وضعیت‌ها */
  --success: #38a169;
  --danger: #e53e3e;
  --warning: #dd6b20;
  --info: #3182ce;

  /* Shape */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 20px rgba(107, 70, 193, 0.08);
  --shadow-lg: 0 20px 60px rgba(107, 70, 193, 0.15);

  /* Font */
  --font: Vazirmatn, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transition */
  --t: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Header */
  --header-bg: rgba(255, 255, 255, 0.85);
}

/* ============ تم دارک ============ */

[data-theme="dark"] {
  color-scheme: dark;

  --primary: #9f7aea;
  --primary-dark: #805ad5;
  --primary-light: #b794f4;
  --primary-soft: #2d2452;

  --gold: #ecc94b;
  --gold-light: #f6e05e;

  --bg: #0f1017;
  --bg-soft: #1a1c2a;
  --bg-elev: #1a1c2a;
  --bg-dark: #050510;
  --text: #f5f6fa;
  --text-secondary: #b5b9c8;
  --text-muted: #7c8195;
  --border: #2a2d3f;
  --border-light: #232533;

  --success: #48bb78;
  --danger: #fc8181;
  --warning: #f6ad55;
  --info: #63b3ed;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);

  --header-bg: rgba(15, 16, 23, 0.85);
}

/* ============ BASE ============ */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t);
}

ul { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

input, select, textarea { font-family: inherit; }

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* ============ INPUTS (همه جا) ============ */

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="password"],
select,
textarea,
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  background-color: var(--bg-soft);
  color: var(--text);
  transition: all .2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 18px;
  padding-left: 40px;
}

input:focus,
select:focus,
textarea:focus,
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--bg-elev);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
}

[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

/* ============ HEADER ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--t), background var(--t);
}

.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-text strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.brand-text small {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  transition: color var(--t);
}

.main-nav a:hover { color: var(--primary); }

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  inset-inline: 50%;
  height: 2px;
  background: var(--primary);
  transition: inset-inline var(--t);
  border-radius: 2px;
}

.main-nav a:hover::after { inset-inline: 0; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: all var(--t);
  border: 1px solid var(--border-light);
}

.user-link:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-light);
}

/* ============ THEME TOGGLE ============ */

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  color: var(--text);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-light);
  transform: rotate(15deg);
}

.theme-toggle .icon-moon,
.theme-toggle .icon-sun {
  transition: transform 0.4s, opacity 0.3s;
  position: absolute;
}

.theme-toggle .icon-moon { transform: scale(1) rotate(0deg); opacity: 1; }
.theme-toggle .icon-sun { transform: scale(0) rotate(-90deg); opacity: 0; }

[data-theme="dark"] .theme-toggle .icon-moon {
  transform: scale(0) rotate(90deg);
  opacity: 0;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

.nav-toggle {
  display: none;
  background: none;
  font-size: 22px;
  color: var(--text);
  width: 40px;
  height: 40px;
}

/* ============ BUTTONS ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
  border: none;
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(107, 70, 193, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(107, 70, 193, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #fff;
  box-shadow: 0 4px 14px rgba(214, 158, 46, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(214, 158, 46, 0.4);
  color: #fff;
}

.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { display: flex; width: 100%; }

/* ============ MESSAGES ============ */

.messages-bar {
  padding: 16px 0;
  background: var(--bg-soft);
}

.alert {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.alert-success {
  background: rgba(56, 161, 105, 0.12);
  color: var(--success);
  border-inline-end: 3px solid var(--success);
}

.alert-error, .alert-danger {
  background: rgba(229, 62, 62, 0.1);
  color: var(--danger);
  border-inline-end: 3px solid var(--danger);
}

.alert-info {
  background: rgba(49, 130, 206, 0.12);
  color: var(--info);
  border-inline-end: 3px solid var(--info);
}

.alert-warning {
  background: rgba(221, 107, 32, 0.12);
  color: var(--warning);
  border-inline-end: 3px solid var(--warning);
}

/* ============ HERO ============ */

.hero {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 100%);
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}

.hero::before {
  content: "";
  position: absolute;
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 122, 234, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
}

.hero-content { max-width: 560px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-elev);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.hero-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text);
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 460px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  bottom: 30px;
  right: 30px;
  background: var(--bg-elev);
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border-light);
}

.hero-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
}

.hero-badge-text strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.hero-badge-text small {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ SECTIONS ============ */

.section { padding: 80px 0; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.section h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text);
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ============ STATS ============ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.stat-card {
  background: var(--bg-elev);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border-light);
  transition: all var(--t);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.stat-icon {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 12px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ============ SERVICES ============ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--border-light);
  transition: all var(--t);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 4px;
  height: 60px;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 0 4px 4px 0;
  transition: height var(--t);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.service-card:hover::before { height: 100%; }

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.service-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.service-card p {
  font-size: 14px;
  color: var(--text-secondary);
  flex: 1;
}

.service-meta {
  display: flex;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-muted);
}

.service-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.service-meta strong {
  color: var(--primary);
  font-weight: 700;
}

/* ============ CATEGORIES ============ */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.category-card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--t);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border: 2px solid transparent;
}

.category-card:hover {
  background: var(--bg-elev);
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-icon { font-size: 36px; }

.category-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* ============ GALLERY ============ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item:hover img { transform: scale(1.1); }

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
  opacity: 0;
  transition: opacity var(--t);
}

.gallery-item:hover::after { opacity: 1; }

.gallery-caption {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  padding: 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(10px);
  opacity: 0;
  transition: all var(--t);
  z-index: 2;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
  opacity: 1;
}

/* ============ CTA ============ */

.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 80px 0;
  border-radius: var(--radius-lg);
  margin: 60px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 16px;
  color: #fff;
}

.cta-content p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
}

/* ============ FOOTER ============ */

.site-footer {
  background: var(--bg-dark);
  color: #cbd5e0;
  padding: 60px 0 0;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-col h4 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: #a0aec0;
  font-size: 14px;
  transition: color var(--t);
}

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

.brand-footer { margin-bottom: 16px; }
.brand-footer .brand-text strong { color: #fff; }
.brand-footer .brand-text small { color: #a0aec0; }

.footer-text {
  font-size: 14px;
  color: #a0aec0;
  line-height: 1.9;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #a0aec0;
}

.contact-list i {
  color: var(--primary-light);
  width: 16px;
}

.socials {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  transition: all var(--t);
}

.socials a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: #718096;
}

/* ============ REVEAL ============ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.in { opacity: 1; transform: none; }

/* ============ PILLS ============ */

.pill, .dash-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.pill-ok, .dash-pill.ok {
  background: rgba(56, 161, 105, 0.15);
  color: var(--success);
}

.pill-wait, .dash-pill.wait {
  background: rgba(221, 107, 32, 0.15);
  color: var(--warning);
}

.pill-danger, .dash-pill.danger {
  background: rgba(229, 62, 62, 0.15);
  color: var(--danger);
}

.pill-info, .dash-pill.info {
  background: rgba(49, 130, 206, 0.15);
  color: var(--info);
}

/* ============ RESPONSIVE ============ */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-image { order: -1; }
  .hero-image img { max-width: 340px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 76px;
    inset-inline: 0;
    background: var(--bg-elev);
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow);
  }

  .main-nav.open { display: flex; }

  .main-nav a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }

  .main-nav a:hover { background: var(--primary-soft); }
  .main-nav a::after { display: none; }

  .nav-toggle { display: flex; }
}

@media (max-width: 600px) {
  .container { width: 94%; }
  .brand-text strong { font-size: 14px; }
  .brand-text small { display: none; }
  .header-actions .btn span { display: none; }
  .hero { padding: 50px 0 60px; }

  .hero-badge {
    right: 16px;
    bottom: 16px;
    padding: 12px 16px;
  }

  .section { padding: 50px 0; }
  .footer-grid { grid-template-columns: 1fr; }
}