/* استایل‌های بخش درس‌ها */

/* صفحه اصلی درس‌ها */
.lesson-page {
  animation: fadeIn 0.4s;
}

.section-title {
  font-size: 28px;
  color: white;
  margin-bottom: 25px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* گرید درس‌ها */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
}

/* کارت درس */
.lesson-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 25px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: var(--shadow);
  position: relative;
}

.lesson-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.lesson-level {
  position: absolute;
  top: 15px;
  left: 15px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: bold;
}

.lesson-complete-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #27ae60;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.lesson-card h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 20px;
  padding-right: 60px;
}

.lesson-card p {
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.lesson-progress {
  margin: 15px 0;
}

.lesson-progress .progress-track {
  background: #e0e0e0;
  height: 6px;
  border-radius: 10px;
  overflow: hidden;
}

.lesson-progress .progress-fill {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  height: 100%;
  width: 0%;
  transition: width 0.3s;
}

.open-lesson-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  width: 100%;
  font-family: "Vazirmatn", sans-serif;
  font-weight: 600;
  transition: 0.3s;
}

.open-lesson-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* صفحه جزئیات درس */
.lesson-detail-page {
  background: white;
  border-radius: 24px;
  padding: 35px;
  box-shadow: var(--shadow);
  animation: fadeIn 0.4s;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

.back-btn {
  background: var(--light);
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Vazirmatn", sans-serif;
  transition: 0.3s;
}

.back-btn:hover {
  background: var(--primary);
  color: white;
}

.detail-header h2 {
  color: var(--dark);
  font-size: 24px;
}

/* بخش‌های مختلف درس */
.detail-section {
  margin-bottom: 35px;
}

.detail-section h4 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-text {
  background: var(--light);
  padding: 20px;
  border-radius: 16px;
  line-height: 1.9;
}

/* لیست لغات */
.vocab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.vocab-item {
  background: var(--light);
  padding: 10px 18px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.vocab-item strong {
  color: var(--primary);
}

.vocab-item span:first-child {
  font-size: 18px;
}

/* مکالمه */
.dialogue-list {
  background: var(--light);
  border-radius: 16px;
  padding: 20px;
}

.dialogue-item {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.dialogue-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.dialogue-speaker {
  font-weight: bold;
  color: var(--primary);
  min-width: 70px;
}

.dialogue-text {
  color: var(--dark);
}

/* گرامر باکس */
.grammar-box {
  background: var(--light);
  padding: 20px;
  border-radius: 16px;
}

.grammar-item {
  margin-bottom: 25px;
}

.grammar-item:last-child {
  margin-bottom: 0;
}

.grammar-item h5 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 16px;
}

.grammar-table {
  overflow-x: auto;
  margin-top: 15px;
}

.grammar-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.grammar-table th {
  background: var(--primary);
  color: white;
  padding: 12px;
  text-align: center;
}

.grammar-table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

/* تمرین‌ها */
.exercise-item {
  background: white;
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.exercise-item p {
  margin-bottom: 12px;
  font-weight: 500;
}

.exercise-options {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.exercise-option-btn {
  background: var(--light);
  padding: 8px 20px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  font-family: "Vazirmatn", sans-serif;
}

.exercise-option-btn:hover {
  background: var(--primary);
  color: white;
}

.exercise-input {
  width: 70%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 30px;
  font-family: "Vazirmatn", sans-serif;
  margin-top: 10px;
}

.exercise-input:focus {
  outline: none;
  border-color: var(--primary);
}

.check-fill-btn,
.check-exercise {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 30px;
  cursor: pointer;
  margin-right: 10px;
  font-family: "Vazirmatn", sans-serif;
  transition: 0.3s;
}

.check-fill-btn:hover,
.check-exercise:hover {
  background: var(--secondary);
}

.feedback {
  margin-top: 10px;
  font-size: 13px;
}

/* نکته فرهنگی */
.extra-reading {
  background: rgba(249, 199, 79, 0.15);
  border-right: 4px solid var(--warning);
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .lesson-grid {
    grid-template-columns: 1fr;
  }

  .lesson-detail-page {
    padding: 20px;
  }

  .exercise-input {
    width: 100%;
    margin-bottom: 10px;
  }

  .vocab-item {
    width: 100%;
    justify-content: space-between;
  }

  .dialogue-item {
    flex-direction: column;
    gap: 5px;
  }
}
