/* ==========================================================================
   طراحی وب‌سایت شخصی برنامه تمرینی ۵ روزه فیتامین در منزل
   تم تیره مدرن ورزشی با لهجه‌های زمردی و آبی الکتریک
   راست‌چین (RTL) و کاملاً واکنش‌گرا (Responsive)
   ========================================================================== */

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #1f2937;
  --bg-card-hover: #283548;
  --border-color: #374151;
  --border-accent: #10b981;

  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  --accent-blue: #3b82f6;
  --accent-blue-light: #60a5fa;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.25);

  --font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, Tahoma, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-blue));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(59, 130, 246, 0.2));
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: var(--shadow-sm);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.3rem;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.main-content {
  flex: 1;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-card {
  background: linear-gradient(145deg, #162032, #101826);
  border: 1px solid rgba(55, 65, 81, 0.8);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.8rem;
  line-height: 1.35;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent-emerald-light), var(--accent-blue-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 820px;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Quick Stats Grid
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.15rem;
  margin-bottom: 2.5rem;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 44px;
  height: 44px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-item:nth-child(2) .stat-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald-light);
}

.stat-item:nth-child(3) .stat-icon {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.stat-item:nth-child(4) .stat-icon {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   Section & Section Header
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(to bottom, var(--accent-emerald), var(--accent-blue));
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Days Cards Grid (On Home Page)
   ========================================================================== */
.days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.4rem;
  margin-bottom: 2.5rem;
}

.day-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.day-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-emerald);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
}

.day-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.day-number {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-emerald-light);
  background: rgba(16, 185, 129, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.day-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.day-card-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.2rem;
  flex: 1;
}

.day-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.85rem;
  font-size: 0.88rem;
  color: var(--accent-blue-light);
  font-weight: 600;
}

/* ==========================================================================
   Movement Cards (On Daily Pages)
   ========================================================================== */
.movements-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.movement-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.movement-card:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.movement-card-header {
  padding: 1.35rem 1.65rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.movement-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.movement-badge-num {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-blue));
  color: #fff;
  font-weight: 800;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.movement-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.movement-meta-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.meta-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.meta-pill.pill-amount {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald-light);
  border-color: rgba(16, 185, 129, 0.3);
}

.meta-pill.pill-level {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue-light);
  border-color: rgba(59, 130, 246, 0.3);
}

.movement-body {
  display: grid;
  grid-template-columns: minmax(380px, 480px) 1fr;
  gap: 1.75rem;
  padding: 1.75rem;
  align-items: stretch;
}

/* Video Wrapper */
.video-wrapper {
  background: #050811;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.8);
  height: 100%;
  min-height: 480px;
  align-self: stretch;
}

.movement-video {
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: contain;
  display: block;
  background: #050811;
}

@media (max-width: 960px) {
  .movement-body {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }
  .video-wrapper {
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }
  .movement-video {
    max-height: none;
  }
}

/* Movement Details */
.movement-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.2rem;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.details-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.details-table tr:last-child {
  border-bottom: none;
}

.details-table td {
  padding: 0.55rem 0.3rem;
}

.details-table .td-label {
  color: var(--text-muted);
  width: 120px;
  font-weight: 500;
}

.details-table .td-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Steps list */
.steps-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1.1rem;
}

.steps-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-emerald-light);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.steps-list {
  padding-right: 1.2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.steps-list li {
  margin-bottom: 0.4rem;
}

.steps-list li:last-child {
  margin-bottom: 0;
}

/* Checkbox Set Tracker */
.set-tracker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tracker-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-secondary);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: var(--transition);
}

.custom-checkbox input[type="checkbox"]::before {
  content: "✔";
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  transform: scale(0);
  transition: var(--transition);
}

.custom-checkbox input[type="checkbox"]:checked {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

.custom-checkbox input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.fitamin-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--accent-blue-light);
  text-decoration: none;
  transition: var(--transition);
}

.fitamin-link-btn:hover {
  text-decoration: underline;
  color: #fff;
}

/* ==========================================================================
   Rest Timer Widget
   ========================================================================== */
.timer-widget {
  background: linear-gradient(145deg, #182234, #121b2b);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.timer-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.timer-icon {
  width: 52px;
  height: 52px;
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.timer-text h4 {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.timer-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.timer-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.timer-display {
  font-size: 2rem;
  font-weight: 900;
  font-family: monospace;
  color: var(--accent-emerald-light);
  min-width: 85px;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.timer-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.timer-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.timer-btn.active {
  background: var(--accent-rose);
  border-color: var(--accent-rose);
}

/* ==========================================================================
   Instruction Callout Boxes
   ========================================================================== */
.callout-box {
  background: rgba(30, 41, 59, 0.7);
  border-right: 4px solid var(--accent-emerald);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  margin: 1.8rem 0;
}

.callout-box.warning {
  border-right-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.08);
}

.callout-title {
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.callout-content {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ==========================================================================
   Day Navigation (Footer Nav)
   ========================================================================== */
.day-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  gap: 1rem;
  flex-wrap: wrap;
}

.day-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.day-nav-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-emerald);
  transform: translateY(-2px);
  color: #fff;
}

.day-nav-btn.primary {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  border-color: transparent;
  color: #fff;
}

.day-nav-btn.primary:hover {
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #080c14;
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  margin-top: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.footer-source {
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.footer-source a {
  color: var(--accent-emerald-light);
  text-decoration: none;
}

/* ==========================================================================
   Responsive Queries
   ========================================================================== */
@media (max-width: 900px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: rgba(17, 24, 39, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
  }

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

  .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-title {
    font-size: 1.6rem;
  }
}

