/* =====================================================================
   OnlineTyari Pro — courses.css
   Course card + grid (shared with homepage), archive filters, and the
   full single-course-page layout (hero, curriculum, FAQ, reviews,
   sticky enrollment sidebar).
   ===================================================================== */

/* ---- Course card + grid (used on homepage, archive, taxonomy) ---- */
.ot-course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ot-space-6);
}
@media (min-width: 640px) { .ot-course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ot-course-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .ot-course-grid { grid-template-columns: repeat(4, 1fr); } }

.ot-course-card-thumb { position: relative; aspect-ratio: 3/2; background: var(--ot-border); overflow: hidden; }
.ot-course-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ot-course-card-thumb-placeholder { width: 100%; height: 100%; background: var(--ot-gradient); opacity: 0.15; }
.ot-course-card-badge { position: absolute; top: var(--ot-space-3); left: var(--ot-space-3); }
.ot-course-card-body { display: flex; flex-direction: column; gap: var(--ot-space-2); }
.ot-course-card-title { font-size: var(--ot-fs-base); margin: 0; }
.ot-course-card-title a { color: var(--ot-dark); }
.ot-course-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: var(--ot-fs-xs); color: var(--ot-muted); }
.ot-course-card-details { display: flex; gap: var(--ot-space-3); font-size: var(--ot-fs-xs); color: var(--ot-muted); }
.ot-course-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: var(--ot-space-2); padding-top: var(--ot-space-3); border-top: 1px solid var(--ot-border); }
.ot-course-card-price strong { font-size: var(--ot-fs-lg); color: var(--ot-dark); }
.ot-course-card-price del { color: var(--ot-muted); font-size: var(--ot-fs-xs); margin-left: var(--ot-space-2); }
.ot-price-free { color: var(--ot-success); }

.ot-rating { display: inline-flex; align-items: center; gap: 2px; }
.ot-star-full, .ot-star-half { color: var(--ot-warning); }
.ot-star-empty { color: var(--ot-border); }
.ot-rating-value { margin-left: 4px; color: var(--ot-text); font-weight: var(--ot-fw-medium); }

/* ---- Archive header + layout ---- */
.ot-archive-header {
  background: var(--ot-white);
  border-bottom: 1px solid var(--ot-border);
  padding-block: var(--ot-space-10);
  margin-bottom: var(--ot-space-10);
}
.ot-archive-header p { color: var(--ot-muted); margin: 0; }

.ot-archive-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ot-space-8);
  padding-bottom: var(--ot-space-16);
}
@media (min-width: 1024px) {
  .ot-archive-body { grid-template-columns: 260px 1fr; align-items: start; }
}

.ot-archive-filters {
  background: var(--ot-white);
  border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-lg);
  padding: var(--ot-space-5);
}
@media (min-width: 1024px) {
  .ot-archive-filters { position: sticky; top: calc(var(--ot-header-height) + var(--ot-space-4)); }
}
.ot-filter-group + .ot-filter-group { margin-top: var(--ot-space-5); padding-top: var(--ot-space-5); border-top: 1px solid var(--ot-border); }
.ot-filter-group-title { font-size: var(--ot-fs-sm); margin-bottom: var(--ot-space-3); }
.ot-filter-options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--ot-space-2); }
.ot-filter-options label { display: flex; align-items: center; gap: var(--ot-space-2); font-size: var(--ot-fs-sm); cursor: pointer; }
.ot-filter-count { color: var(--ot-muted); font-size: var(--ot-fs-xs); }
.ot-filter-form .ot-btn { margin-top: var(--ot-space-3); }

.ot-pagination { margin-top: var(--ot-space-10); display: flex; justify-content: center; gap: var(--ot-space-2); }
.ot-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px;
  border-radius: var(--ot-radius-md);
  border: 1px solid var(--ot-border);
  color: var(--ot-text);
  font-size: var(--ot-fs-sm);
}
.ot-pagination .page-numbers.current { background: var(--ot-gradient); color: var(--ot-white); border-color: transparent; }

/* =====================================================================
   Single course page
   ===================================================================== */

.ot-course-hero {
  background: var(--ot-dark);
  color: var(--ot-white);
  padding-block: var(--ot-space-12);
  margin-bottom: var(--ot-space-10);
}
.ot-course-hero-tags { display: flex; gap: var(--ot-space-2); margin-bottom: var(--ot-space-4); flex-wrap: wrap; }
.ot-course-hero-title { color: var(--ot-white); font-size: var(--ot-fs-3xl); max-width: 42ch; }
@media (min-width: 768px) { .ot-course-hero-title { font-size: var(--ot-fs-4xl); } }
.ot-course-hero-desc { color: rgba(255,255,255,0.75); max-width: 60ch; font-size: var(--ot-fs-lg); }
.ot-course-hero-meta { display: flex; flex-wrap: wrap; gap: var(--ot-space-5); margin-top: var(--ot-space-5); font-size: var(--ot-fs-sm); }
.ot-course-hero-meta-item { display: flex; align-items: center; gap: var(--ot-space-2); color: rgba(255,255,255,0.85); }
.ot-course-hero-meta-item a { color: var(--ot-white); text-decoration: underline; }

.ot-course-body-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ot-space-8);
  padding-bottom: var(--ot-space-20);
}
@media (min-width: 1024px) {
  .ot-course-body-grid { grid-template-columns: 1fr 360px; align-items: start; }
}

.ot-course-section { margin-bottom: var(--ot-space-6); }
.ot-course-section h2 { font-size: var(--ot-fs-xl); margin-bottom: var(--ot-space-4); }
.ot-course-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--ot-space-4); }
.ot-course-section-header h2 { margin-bottom: 0; }
.ot-muted-text { color: var(--ot-muted); font-size: var(--ot-fs-sm); }
.ot-course-description { color: var(--ot-text); line-height: var(--ot-lh-relaxed); }

.ot-outcomes-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--ot-space-3); }
@media (min-width: 640px) { .ot-outcomes-list { grid-template-columns: repeat(2, 1fr); } }
.ot-outcomes-list li { display: flex; align-items: flex-start; gap: var(--ot-space-2); font-size: var(--ot-fs-sm); }
.ot-outcomes-list svg { color: var(--ot-success); flex-shrink: 0; margin-top: 2px; }

/* ---- Curriculum accordion (native <details>, no JS) ---- */
.ot-curriculum-accordion { border: 1px solid var(--ot-border); border-radius: var(--ot-radius-md); overflow: hidden; }
.ot-curriculum-item { border-bottom: 1px solid var(--ot-border); }
.ot-curriculum-item:last-child { border-bottom: none; }
.ot-curriculum-item summary {
  cursor: pointer;
  padding: var(--ot-space-4) var(--ot-space-5);
  font-weight: var(--ot-fw-semibold);
  display: flex; justify-content: space-between; align-items: center;
  list-style: none;
  background: var(--ot-white);
}
.ot-curriculum-item summary::-webkit-details-marker { display: none; }
.ot-curriculum-item[open] summary { background: var(--ot-bg); }
.ot-lesson-list { list-style: none; margin: 0; padding: 0 var(--ot-space-5) var(--ot-space-4); }
.ot-lesson-list li { display: flex; align-items: center; gap: var(--ot-space-3); padding: var(--ot-space-2) 0; font-size: var(--ot-fs-sm); color: var(--ot-text); }
.ot-lesson-icon { color: var(--ot-primary); flex-shrink: 0; }
.ot-lesson-title { flex: 1; }
.ot-lesson-duration { color: var(--ot-muted); font-size: var(--ot-fs-xs); }
.ot-lesson-preview-badge { font-size: 10px; padding: 0.15rem 0.5rem; }

/* ---- FAQ accordion ---- */
.ot-faq-accordion { display: flex; flex-direction: column; gap: var(--ot-space-3); }
.ot-faq-item { border: 1px solid var(--ot-border); border-radius: var(--ot-radius-md); padding: var(--ot-space-4) var(--ot-space-5); }
.ot-faq-item summary { cursor: pointer; font-weight: var(--ot-fw-medium); list-style: none; }
.ot-faq-item summary::-webkit-details-marker { display: none; }
.ot-faq-answer { margin-top: var(--ot-space-3); color: var(--ot-muted); font-size: var(--ot-fs-sm); }
.ot-faq-answer p:last-child { margin-bottom: 0; }

/* ---- Reviews ---- */
.ot-reviews-summary { display: flex; align-items: center; gap: var(--ot-space-4); margin-bottom: var(--ot-space-6); }
.ot-reviews-summary > strong { font-size: var(--ot-fs-4xl); font-family: var(--ot-font-heading); color: var(--ot-dark); }
.ot-reviews-form { margin-top: var(--ot-space-6); }
.ot-reviews-list { list-style: none; margin: var(--ot-space-6) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--ot-space-5); }
.ot-review-item { border-top: 1px solid var(--ot-border); padding-top: var(--ot-space-5); }
.ot-review-header { display: flex; align-items: center; gap: var(--ot-space-3); margin-bottom: var(--ot-space-2); }
.ot-review-header img { border-radius: var(--ot-radius-full); }
.ot-review-header time { margin-left: auto; color: var(--ot-muted); font-size: var(--ot-fs-xs); }
.ot-review-content { color: var(--ot-text); font-size: var(--ot-fs-sm); }

/* ---- Sticky enrollment sidebar ---- */
.ot-course-sidebar { position: relative; }
.ot-enroll-card { overflow: hidden; }
@media (min-width: 1024px) {
  .ot-enroll-card { position: sticky; top: calc(var(--ot-header-height) + var(--ot-space-4)); }
}
.ot-enroll-card-thumb { aspect-ratio: 16/9; overflow: hidden; }
.ot-enroll-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ot-enroll-card-price { margin-bottom: var(--ot-space-4); }
.ot-enroll-card-price strong { font-size: var(--ot-fs-2xl); color: var(--ot-dark); }
.ot-enroll-card-price del { color: var(--ot-muted); margin-left: var(--ot-space-2); }
.ot-enroll-unavailable { text-align: center; }
.ot-enroll-unavailable p { color: var(--ot-muted); font-size: var(--ot-fs-sm); }
.ot-enroll-card-facts { list-style: none; margin: var(--ot-space-5) 0 0; padding: var(--ot-space-4) 0 0; border-top: 1px solid var(--ot-border); display: flex; flex-direction: column; gap: var(--ot-space-3); }
.ot-enroll-card-facts li { display: flex; justify-content: space-between; font-size: var(--ot-fs-sm); }
.ot-enroll-card-facts span { color: var(--ot-muted); }
