/**
 * Single course page (CPT: courser)
 */

.course-single-page {
  background: var(--bg-gray);
  padding-bottom: 64px;
}

.course-single-top {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 14px 0;
  margin-top: 70px;
}

.course-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
}

.course-breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}

.course-breadcrumb a:hover {
  color: var(--primary);
}

.course-breadcrumb span {
  opacity: 0.45;
}

.course-breadcrumb__current {
  color: var(--dark);
  font-weight: 600;
  opacity: 1;
}

/* Hero */
.course-single-hero {
  background: linear-gradient(135deg, #fff8f5 0%, #fff0ea 50%, #ffffff 100%);
  padding: 40px 5% 48px;
  border-bottom: 1px solid rgba(232, 78, 27, 0.08);
}

.course-single-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.course-single-hero__badge {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.course-single-hero__title {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.15;
  margin-bottom: 14px;
}

.course-single-hero__tagline {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 540px;
}

.course-single-hero__stats {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.course-single-hero__stats li {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.course-single-hero__stat-icon {
  font-size: 18px;
  display: block;
  margin-bottom: 4px;
}

.course-single-hero__stat-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 2px;
}

.course-single-hero__stats strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--dark);
}

.course-single-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.course-single-hero__visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(232, 78, 27, 0.18);
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ff9a56, #e84e1b);
}

.course-single-hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-single-hero__visual-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

.course-single-hero__visual-chip {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Layout */
.course-single-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-top: 36px;
  align-items: start;
}

@media (min-width: 1024px) {
  .course-single-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 36px;
  }

  .course-single-sidebar {
    position: sticky;
    top: 90px;
  }
}

.course-single-main > * {
  scroll-margin-top: 100px;
}

/* Sections */
.course-single-section {
  background: #fff;
  border-radius: 18px;
  padding: 28px 28px 32px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.course-single-section__title {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-light);
}

.course-single-lead {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  margin: 0;
}

.course-single-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.course-single-content p {
  margin-bottom: 1em;
}

/* Highlights */
.course-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.course-highlight-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 14px;
  background: var(--bg-light);
  border: 1px solid rgba(232, 78, 27, 0.1);
}

.course-highlight-card__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-highlight-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

/* Lists */
.course-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.course-check-list li {
  position: relative;
  padding: 12px 0 12px 28px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.course-check-list li:last-child {
  border-bottom: 0;
}

.course-check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 14px;
  color: var(--primary);
  font-weight: 800;
}

/* Career tags */
.course-career-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.course-career-tag {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bg-gray);
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

/* FAQ */
.course-faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-faq-item {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-gray);
}

.course-faq-item summary {
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  list-style: none;
}

.course-faq-item summary::-webkit-details-marker {
  display: none;
}

.course-faq-item summary::after {
  content: '+';
  float: right;
  font-weight: 800;
  color: var(--primary);
}

.course-faq-item[open] summary::after {
  content: '−';
}

.course-faq-item p {
  padding: 0 18px 16px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-light);
}

/* CTA band */
.course-single-cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
  margin-top: 8px;
}

.course-single-cta-band h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.course-single-cta-band p {
  font-size: 15px;
  opacity: 0.92;
  line-height: 1.6;
  margin: 0;
  max-width: 520px;
}

.course-single-cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.course-single-cta-band .btn-outline {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

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

/* Sidebar */
.course-single-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.course-sidebar-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}

.course-sidebar-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
}

.course-sidebar-card--dark {
  background: linear-gradient(135deg, var(--dark) 0%, #2d2d4e 100%);
  color: #fff;
  border: 0;
}

.course-sidebar-card--dark h3 {
  color: #fff;
}

.course-sidebar-card--dark p {
  font-size: 13px;
  line-height: 1.65;
  opacity: 0.88;
  margin-bottom: 16px;
}

.course-sidebar-btn-light {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.course-sidebar-btn-light:hover {
  background: #fff !important;
  color: var(--dark) !important;
}

.course-facts-list {
  margin: 0 0 18px;
}

.course-facts-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
}

.course-facts-list div:last-child {
  border-bottom: 0;
}

.course-facts-list dt {
  color: var(--text-light);
  font-weight: 600;
}

.course-facts-list dd {
  margin: 0;
  font-weight: 700;
  color: var(--dark);
  text-align: right;
}

.course-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.course-related-list li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.course-related-list li:last-child {
  border-bottom: 0;
}

.course-related-list a {
  display: block;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.course-related-list a:hover {
  color: var(--primary);
}

.btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

@media (max-width: 900px) {
  .course-single-hero__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .course-single-hero__visual {
    order: -1;
    max-height: 280px;
    aspect-ratio: auto;
  }

  .course-single-hero__actions .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .course-single-cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .course-single-cta-band__actions {
    width: 100%;
  }

  .course-single-cta-band__actions .btn {
    flex: 1;
    justify-content: center;
  }
}
