/* Course Detail Page Styles */

/* Course Hero Section */
.course-hero-section{padding-top:8px}
.course-hero{display:flex;flex-direction:column;gap:28px;max-width:1100px}
.course-hero-head .eyebrow{display:inline-block;margin-bottom:10px}
.course-hero-head h1{
  font-size:clamp(2rem,4.2vw,3rem);font-weight:700;line-height:1.15;letter-spacing:-.02em;margin:0;
}
.course-hero-media{
  position:relative;width:100%;aspect-ratio:21/9;border-radius:20px;overflow:hidden;
  border:1px solid var(--border);background:var(--surface-2);
  box-shadow:0 20px 60px -20px rgba(0,0,0,.6);
}
.course-hero-media img{width:100%;height:100%;object-fit:cover;display:block}
.course-hero-media::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,transparent 60%,rgba(0,0,0,.35) 100%);
  pointer-events:none;
}
.course-hero-body{display:flex;flex-direction:column;gap:20px}
.course-hero-desc{
  color:var(--muted);font-size:1.05rem;line-height:1.75;margin:0;max-width:780px;
}
.course-meta-row{
  display:flex;gap:18px;font-size:.95rem;color:var(--text);flex-wrap:wrap;align-items:center;
  padding:14px 18px;background:var(--surface);border:1px solid var(--border);
  border-radius:14px;width:fit-content;
}
.course-meta-item{display:inline-flex;align-items:center;gap:10px;color:var(--muted)}
.course-meta-item strong{color:var(--text);font-weight:600;font-size:1rem}
.course-meta-item svg{
  width:20px;height:20px;color:var(--accent);flex-shrink:0;
}
.course-meta-divider{width:1px;height:18px;background:var(--border)}
.course-meta-dot{width:4px;height:4px;border-radius:50%;background:var(--muted);opacity:.65;display:inline-block}

/* Instructor card polish */
.instructor-card{
  display:flex;gap:16px;align-items:center;padding:14px;border-radius:12px;
  background:var(--surface);border:1px solid var(--border);
}
.instructor-card::before{
  content:"";display:block;height:4px;border-radius:8px;margin:-14px -14px 8px  -14px;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  box-shadow:0 8px 20px -12px rgba(0,0,0,.45);pointer-events:none;
}
.instructor-img{width:84px;height:84px;object-fit:cover;border-radius:10px;flex-shrink:0}
.instructor-info h3{margin:0 0 6px;font-size:1.05rem}
.instructor-role{color:var(--muted);margin:0}
.course-action-row{
  display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;
}
.course-cta-btn{padding:14px 30px;font-size:.95rem;font-weight:600;margin-left:auto}

/* Progress */
.course-progress{display:flex;flex-direction:column;gap:8px;max-width:1100px}
.course-progress-head{
  display:flex;justify-content:space-between;font-size:.85rem;color:var(--muted);
}
.course-progress-head span:last-child{color:var(--accent);font-weight:600}
.course-progress-track{
  height:8px;background:var(--surface);border:1px solid var(--border);
  border-radius:999px;overflow:hidden;
}
.course-progress-bar{
  height:100%;background:linear-gradient(90deg,var(--accent),var(--accent-2));
  border-radius:999px;transition:width .4s ease;
}

/* Body content sections */
.section-group{margin-bottom:60px}
.section-group h2{
  font-size:1.6rem;margin-bottom:28px;font-weight:600;letter-spacing:-.01em;
}

/* Course Body (Markdown Content) */
.course-body{max-width:900px}
.course-body h2{
  font-size:1.35rem;font-weight:600;margin-top:40px;margin-bottom:20px;
  color:var(--text);letter-spacing:-.01em;
}
.course-body h2:first-child{margin-top:0}
.course-body h3{
  font-size:1.1rem;font-weight:600;margin-top:28px;margin-bottom:16px;
  color:var(--text);
}
.course-body p{
  color:var(--muted);line-height:1.8;margin-bottom:16px;font-size:.95rem;
}
.course-body p:last-child{margin-bottom:0}
.course-body img{
  max-width:100%;height:auto;border-radius:12px;border:1px solid var(--border);
  margin:28px 0;display:block;
}
.course-body em,.course-body i{
  color:var(--muted);font-style:italic;
}
.course-body ul,.course-body ol{
  margin:20px 0;padding-left:24px;
}
.course-body li{
  margin-bottom:12px;color:var(--muted);line-height:1.75;font-size:.95rem;
}
.course-body ul li::marker{
  color:var(--accent);font-weight:600;
}
.course-body ul li{
  list-style-type:disc;
}
.course-body ol li{
  list-style-type:decimal;
}
.course-body a{
  color:var(--accent);text-decoration:none;font-weight:500;
  border-bottom:1px solid transparent;transition:.2s;
}
.course-body a:hover{
  color:var(--accent-2);border-bottom-color:var(--accent-2);
}
.course-body blockquote{
  padding-left:16px;border-left:4px solid var(--accent);
  margin:24px 0;color:var(--muted);font-style:italic;
  background:var(--surface);padding:16px;border-radius:8px;
}
.course-body code{
  background:var(--surface-2);color:var(--accent);padding:2px 6px;
  border-radius:4px;font-family:monospace;font-size:.9em;
}
.course-body pre{
  background:var(--surface-2);border:1px solid var(--border);
  padding:16px;border-radius:8px;overflow-x:auto;margin:20px 0;
}
.course-body pre code{
  background:transparent;color:var(--muted);padding:0;border-radius:0;
}

/* Course Sections */
.course-sections{display:flex;flex-direction:column;gap:12px}
.course-section{
  padding:20px;background:var(--surface);border:1px solid var(--border);
  border-radius:12px;display:flex;justify-content:space-between;align-items:center;
  transition:.2s;cursor:pointer;
}
.course-section:hover{background:var(--surface-2);border-color:var(--accent)}
.course-section-title{font-weight:500;color:var(--text);flex:1}
.course-section-meta{
  display:flex;gap:16px;color:var(--muted);font-size:.85rem;
}

/* Skills */
.skills-list{
  display:flex;flex-wrap:wrap;gap:12px;
}
.skill{
  padding:8px 16px;background:var(--surface);border:1px solid var(--border);
  border-radius:20px;font-size:.9rem;color:var(--text);
}

/* Who this course is for */
.who-list{
  display:flex;flex-direction:column;gap:12px;
}
.who-item{
  padding:12px 0;border-bottom:1px solid var(--border);color:var(--text);
  font-size:.95rem;line-height:1.6;
}
.who-item:last-child{border-bottom:none}
.who-item::before{
  content:"✓ ";color:var(--accent);font-weight:600;margin-right:8px;
}

/* Instructor Section */
.instructor-card{
  padding:32px;background:linear-gradient(135deg,var(--surface) 0%,var(--surface-2) 100%);
  border:1px solid var(--border);border-radius:var(--radius);
  display:flex;gap:32px;align-items:stretch;min-height:340px;
}
.instructor-img{
  width:260px;height:auto;align-self:stretch;border-radius:16px;object-fit:cover;
  flex-shrink:0;border:1px solid var(--border);
  box-shadow:0 12px 40px -8px rgba(255,1,79,.35);
}
.instructor-info{flex:1;display:flex;flex-direction:column;justify-content:center}
.instructor-info h3{font-size:1.5rem;margin-bottom:4px;font-weight:600}
.instructor-role{color:var(--accent) !important;font-size:.9rem !important;font-weight:500;margin-bottom:14px !important;text-transform:uppercase;letter-spacing:.05em}
.instructor-info p{color:var(--muted);font-size:.95rem;line-height:1.7;margin-bottom:12px}
.instructor-stats{
  list-style:none;padding:16px 0;margin:8px 0 16px;display:flex;gap:28px;flex-wrap:wrap;
  border-top:1px solid var(--border);border-bottom:1px solid var(--border);
}
.instructor-stats li{display:flex;flex-direction:column;gap:2px}
.instructor-stats strong{font-size:1.25rem;color:var(--text);font-weight:600}
.instructor-stats span{font-size:.8rem;color:var(--muted)}
.instructor-link{color:var(--accent);font-size:.9rem;font-weight:500;text-decoration:none;border-bottom:1px solid transparent;transition:.2s;align-self:flex-start}
.instructor-link:hover{color:var(--accent-2);border-bottom-color:var(--accent-2)}

/* Related Courses */
.related-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:24px;
}
.related-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);overflow:hidden;transition:.3s;display:flex;flex-direction:column;
  text-decoration:none;color:inherit;
}
.related-card:hover{transform:translateY(-4px);border-color:var(--accent)}
.related-card-thumb{
  width:100%;aspect-ratio:16/9;background:var(--surface-2);
  overflow:hidden;
}
.related-card-thumb img{width:100%;height:100%;object-fit:cover;transition:.3s}
.related-card:hover .related-card-thumb img{transform:scale(1.05)}
.related-card-body{padding:16px;flex:1;display:flex;flex-direction:column}
.related-card h4{font-size:.95rem;font-weight:600;margin-bottom:8px;line-height:1.3}
.related-card p{color:var(--muted);font-size:.85rem;line-height:1.5;flex:1}
.related-card-footer{
  display:flex;justify-content:space-between;color:var(--muted);
  font-size:.8rem;margin-top:10px;padding-top:10px;border-top:1px solid var(--border);
}

/* Responsive */
@media (max-width:1100px){
  .related-grid{grid-template-columns:repeat(2,1fr)}
}

@media (max-width:900px){
  .course-hero{gap:22px}
  .course-hero-media{aspect-ratio:16/9;border-radius:16px}
  .course-hero-desc{font-size:1rem}
  .section-group{margin-bottom:40px}
  .section-group h2{font-size:1.4rem;margin-bottom:20px}
  .instructor-card{flex-direction:column;text-align:center;padding:24px;gap:20px;min-height:0}
  .instructor-img{width:100%;max-width:420px;height:280px;align-self:center}
  .instructor-info{align-items:center}
  .instructor-stats{justify-content:center}
  .instructor-link{align-self:center}
  .related-grid{grid-template-columns:1fr}
}

@media (max-width:640px){
  .course-hero-media{aspect-ratio:4/3;border-radius:14px}
  .course-meta-row{
    padding:12px 14px;gap:10px;width:100%;
  }
  .course-meta-divider{display:none}
  .course-meta-item{font-size:.9rem}
  .course-section{flex-direction:column;align-items:flex-start;gap:8px}
  .course-section-meta{flex-direction:column}
  .course-body h2{font-size:1.15rem;margin-top:28px;margin-bottom:16px}
  .course-body h3{font-size:.95rem;margin-top:20px;margin-bottom:12px}
  .course-body p{font-size:.9rem}
  .course-body img{margin:20px 0;border-radius:10px}
  .course-body ul,.course-body ol{padding-left:20px;margin:16px 0}
  .course-body li{margin-bottom:10px;font-size:.9rem}
  .course-body blockquote{padding:12px 16px;margin:16px 0;font-size:.9rem}
}
