/* ╔══════════════════════════════════════════════════╗
   ║              Term Page CSS                       ║
   ║    استایل مشترک صفحات ترم‌ها                     ║
   ╚══════════════════════════════════════════════════╝ */

/* ════════════════════════════════════════
   Hero ترم
   ════════════════════════════════════════ */

.term-hero {
  position: relative;
  padding: 52px 0 74px;
  overflow: hidden;
  color: white;
}

.term-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image:
    radial-gradient(circle at 30% 35%, white 0%, transparent 45%),
    radial-gradient(circle at 70% 60%, white 0%, transparent 45%);
}

.term-hero-content {
  position: relative;
  text-align: center;
  animation: fadeInUp 0.7s ease backwards;
}

.term-hero-badge {
  display: inline-block;
  padding: 5px 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50px;
  font-size: 0.82em;
  font-weight: 600;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}

.term-hero-title {
  font-size: clamp(1.7em, 4.5vw, 2.5em);
  font-weight: 900;
  margin-bottom: 10px;
}

.term-hero-subtitle {
  font-size: clamp(0.9em, 2.2vw, 1.05em);
  font-weight: 300;
  opacity: 0.8;
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.85;
}

.term-hero-info {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 14px 28px;
  backdrop-filter: blur(10px);
  font-size: 0.88em;
  flex-wrap: wrap;
  justify-content: center;
}

.term-hero-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.85;
}

.term-hero-info-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
}

.term-hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
}

.term-hero-wave svg {
  width: 100%;
  height: 50px;
}

/* ════════════════════════════════════════
   لیست جلسات
   ════════════════════════════════════════ */

.sessions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.sessions-title {
  font-size: 1.2em;
  font-weight: 800;
  color: var(--text);
}

.sessions-count {
  padding: 5px 15px;
  background: var(--bg-white);
  border-radius: 50px;
  font-size: 0.82em;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ════════════════════════════════════════
   کارت جلسه
   ════════════════════════════════════════ */

.session-item {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  animation: fadeInUp 0.5s ease backwards;
}

.session-item:nth-child(1)  { animation-delay: 0.03s; }
.session-item:nth-child(2)  { animation-delay: 0.06s; }
.session-item:nth-child(3)  { animation-delay: 0.09s; }
.session-item:nth-child(4)  { animation-delay: 0.12s; }
.session-item:nth-child(5)  { animation-delay: 0.15s; }
.session-item:nth-child(6)  { animation-delay: 0.18s; }
.session-item:nth-child(7)  { animation-delay: 0.21s; }
.session-item:nth-child(8)  { animation-delay: 0.24s; }
.session-item:nth-child(9)  { animation-delay: 0.27s; }
.session-item:nth-child(10) { animation-delay: 0.30s; }
.session-item:nth-child(11) { animation-delay: 0.33s; }
.session-item:nth-child(12) { animation-delay: 0.36s; }
.session-item:nth-child(13) { animation-delay: 0.39s; }
.session-item:nth-child(14) { animation-delay: 0.42s; }
.session-item:nth-child(15) { animation-delay: 0.45s; }
.session-item:nth-child(16) { animation-delay: 0.48s; }
.session-item:nth-child(17) { animation-delay: 0.51s; }
.session-item:nth-child(18) { animation-delay: 0.54s; }
.session-item:nth-child(19) { animation-delay: 0.57s; }
.session-item:nth-child(20) { animation-delay: 0.60s; }
.session-item:nth-child(21) { animation-delay: 0.63s; }
.session-item:nth-child(22) { animation-delay: 0.66s; }
.session-item:nth-child(23) { animation-delay: 0.69s; }
.session-item:nth-child(24) { animation-delay: 0.72s; }

.session-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateX(-4px);
}

/* شماره جلسه */
.session-num {
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.92em;
  flex-shrink: 0;
  transition: var(--transition);
}

.session-item:hover .session-num {
  background: var(--accent);
  color: white;
}

/* محتوای جلسه */
.session-content {
  flex: 1;
  min-width: 0;
}

.session-title-fa {
  font-size: 1em;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.6;
}

.session-title-en {
  font-size: 0.8em;
  color: var(--text-muted);
  font-weight: 400;
  direction: ltr;
  display: inline-block;
  line-height: 1.5;
}

/* ════════════════════════════════════════
   ناوبری بین ترم‌ها
   ════════════════════════════════════════ */

.term-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}

.term-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88em;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.term-nav-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-md);
}

.term-nav-link svg {
  flex-shrink: 0;
}

.term-nav-link.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ════════════════════════════════════════
   Responsive
   ════════════════════════════════════════ */

@media (max-width: 768px) {
  .term-hero {
    padding: 40px 0 58px;
  }

  .term-hero-info {
    gap: 12px;
    padding: 12px 20px;
    font-size: 0.82em;
  }

  .session-item {
    padding: 16px 18px;
    gap: 14px;
  }

  .session-num {
    min-width: 36px;
    height: 36px;
    font-size: 0.82em;
    border-radius: 10px;
  }

  .session-title-fa {
    font-size: 0.92em;
  }

  .term-nav {
    flex-direction: column;
  }

  .term-nav-link {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .term-hero-info {
    flex-direction: column;
    gap: 8px;
  }

  .term-hero-info-divider {
    width: 40px;
    height: 1px;
  }
}