/* ── PAGE-SPECIFIC STYLES ─────────────────────────────────────────── */

/* ── INDEX PAGE (Homepage) ─────────────────────────────────────────── */

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--brand-lighter) 0%, var(--panel) 50%, var(--brand-lighter) 100%);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  margin-bottom: 4rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(67, 97, 238, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(67, 97, 238, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 0%, var(--brand-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.35rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 500;
}

/* Filter Section */
.filter-section {
  margin-bottom: 3rem;
}

.filter-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Updated Filter Chips - Two-level filtering system */
.filter-chip {
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-muted);
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.filter-chip:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
}

/* Regular Category Chips */
.filter-chip-category.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

/* Golden Field Chips - Updated with better inactive/active contrast */
.filter-chip-field {
  background: rgba(255, 215, 0, 0.15);
  color: #a16207;
  border-color: rgba(217, 119, 6, 0.3);
  font-weight: 600;
}

.filter-chip-field:hover {
  background: rgba(255, 215, 0, 0.25);
  border-color: rgba(217, 119, 6, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(255, 215, 0, 0.2);
}

.filter-chip-field.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border-color: #92400e;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.filter-chip-field:focus {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

/* Updated Chip Count */
.chip-count {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  min-width: 1.5rem;
  text-align: center;
}

.filter-chip-field .chip-count {
  background: rgba(255, 255, 255, 0.6);
  color: #92400e;
}

.filter-chip-field.active .chip-count {
  background: rgba(255, 255, 255, 0.9);
  color: #92400e;
}

.filter-chip-category.active .chip-count {
  background: rgba(255, 255, 255, 0.2);
}

.filter-chip:not(.active) .chip-count {
  background: var(--border-light);
  color: var(--text-light);
}

/* Course Cards */
.courses-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.course-card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  position: relative;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.4s ease-out;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--brand);
}

.course-header {
  padding: 2rem;
  background: linear-gradient(135deg, var(--brand-lighter) 0%, var(--panel) 100%);
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.course-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}

.course-content {
  flex: 1;
}

.course-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.3;
}

.course-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.price-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--gold);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* ── COURSE PAGE ─────────────────────────────────────────── */

/* Layout */
.course-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  padding: 2rem;
  min-height: calc(100vh - var(--header-height));
}

/* Welcome Back Section */
.welcome-back {
  text-align: center;
  padding: 3rem 2rem;
}

.welcome-back h2 {
  font-size: 2rem;
  color: var(--brand-dark);
  margin-bottom: 1rem;
}

.welcome-back p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.last-lesson-card {
  background: var(--brand-lighter);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
}

.last-lesson-card h3 {
  color: var(--brand-dark);
  margin-bottom: 1rem;
}

.continue-lesson-btn {
  margin-top: 1rem;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Lesson Actions */
.lesson-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.complete-lesson-btn.completed {
  background: var(--success);
  color: white;
  opacity: 0.8;
}

.course-complete {
  color: var(--success);
  font-weight: 600;
  font-size: 1.1rem;
}

/* Progress Indicators */
.lesson.completed {
  background: var(--success-light);
  color: var(--success);
  border-left-color: var(--success);
}

.lesson.completed::before {
  background: var(--success);
}

.completion-check {
  margin-left: auto;
  color: var(--success);
  font-weight: bold;
  font-size: 0.9rem;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1rem);
  height: fit-content;
  max-height: calc(100vh - var(--header-height) - 2rem);
  overflow-y: auto;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--brand-lighter);
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 0.25rem;
}

.sidebar-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.sidebar-content {
  overflow-y: auto;
  max-height: calc(100vh - 220px);
}

/* Course Sections */
.section {
  border: none;
  border-bottom: 1px solid var(--border-light);
}

.section:last-child {
  border-bottom: none;
}

.section > summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  user-select: none;
}

.section > summary:hover {
  background: var(--brand-lighter);
  color: var(--brand-dark);
}

.section[open] > summary {
  background: var(--brand-lighter);
  color: var(--brand-dark);
  border-bottom: 1px solid var(--border-light);
}

.section summary::-webkit-details-marker {
  display: none;
}

.section-icon {
  width: 16px;
  height: 16px;
  transform: rotate(-90deg);
  transition: var(--transition);
  color: var(--text-light);
}

.section[open] .section-icon {
  transform: rotate(0deg);
  color: var(--brand);
}

/* Lessons */
.lessons {
  background: var(--panel);
}

.lesson {
  padding: 1rem 1.5rem 1rem 2.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lesson::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-light);
  flex-shrink: 0;
  transition: var(--transition);
}

.lesson:hover {
  background: var(--brand-lighter);
  color: var(--brand-dark);
  border-left-color: var(--brand);
}

.lesson:hover::before {
  background: var(--brand);
  transform: scale(1.2);
}

.lesson.active {
  background: var(--brand-light);
  color: var(--brand-dark);
  border-left-color: var(--brand);
  font-weight: 600;
}

.lesson.active::before {
  background: var(--brand);
  transform: scale(1.2);
}

.lesson-number {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

.lesson.active .lesson-number {
  color: var(--brand);
}

/* Content Area */
.content {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  height: fit-content;
}

.content-header {
  padding: 2rem 2.5rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, var(--brand-lighter) 0%, var(--panel) 100%);
}

.content-title {
  font-weight: 700;
  color: var(--brand-dark);
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.content-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.content-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.content-body {
  padding: 2rem 2.5rem;
}

.content-placeholder {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.content-placeholder-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  opacity: 0.5;
}

/* Lesson Content */
.lesson-content {
  animation: fadeIn 0.3s ease-out;
}

.lesson-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.lesson-content p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Video Wrapper */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 2rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Suggestion Button */
.suggestion-button {
  width: 100%;
  padding: 1rem 1.5rem;
  margin-top: 1rem;
  background: var(--brand-lighter);
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.suggestion-button:hover {
  background: var(--brand);
  color: white;
}

.suggestion-button svg {
  width: 18px;
  height: 18px;
}

/* ── ABOUT PAGE ─────────────────────────────────────────── */

/* Instructor Section */
.instructor-section {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 3rem;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
}

.instructor-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%);
}

.instructor-content {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.instructor-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--panel);
  box-shadow: var(--shadow-xl);
  flex-shrink: 0;
}

.instructor-info {
  flex: 1;
}

.instructor-name {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text);
  line-height: 1.2;
}

.instructor-role {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-light);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  margin-bottom: 2rem;
  border: 1px solid var(--brand);
}

.instructor-bio {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  font-size: 1.15rem;
}

.instructor-bio strong {
  color: var(--brand-dark);
  font-weight: 700;
}

.instructor-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--border-light);
  padding-top: 2rem;
}

.stat {
  text-align: center;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.stat:hover {
  background: var(--brand-lighter);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── RESPONSIVE DESIGN ─────────────────────────────────────────── */

@media (max-width: 1024px) {
  .course-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .sidebar {
    position: static;
    max-height: none;
    order: 2;
  }
  
  .content {
    order: 1;
  }
  
  .sidebar-content {
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .hero {
    margin-bottom: 3rem;
    padding: 3rem 1.5rem;
  }
  
  .course-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }
  
  .course-icon {
    margin-bottom: 1rem;
  }
  
  .filters {
    gap: 0.5rem;
  }
  
  .filter-chip {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    gap: 0.4rem;
  }
  
  .chip-count {
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
  }
  
  .content-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  
  .content-body {
    padding: 1.5rem;
  }
  
  .sidebar-header {
    padding: 1rem;
  }
  
  .section > summary {
    padding: 1rem;
  }
  
  .lesson {
    padding: 0.875rem 1rem 0.875rem 2rem;
  }
  
  .instructor-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }
  
  .instructor-img {
    width: 160px;
    height: 160px;
  }
  
  .instructor-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .filter-chip .chip-count {
    display: none;
  }
  
  .stat-number {
    font-size: 1.75rem;
  }
}

/* Course card badges */

.course-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
}

.badge-free {
  background: #10b981;
  color: white;
}

.badge-paid {
  background: #3b82f6;
  color: white;
}



/* Course Number Badges */

/* Course Number Badges */
.course-number-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.course-number-badge.start-here {
  background: rgba(30, 58, 138, 0.1);
  color: #1e3a8a;
  border: 1px solid rgba(30, 58, 138, 0.2);
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.7rem;
}

.course-number-badge.course-number {
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.2);
  min-width: 28px;
  text-align: center;
  font-weight: 600;
  font-size: 0.7rem;
}

/* Hover effects */
.course-card:hover .course-number-badge.start-here {
  background: rgba(30, 58, 138, 0.15);
  color: #1e40af;
  border-color: rgba(30, 58, 138, 0.3);
  transform: scale(1.02);
  transition: all 0.2s ease;
}

.course-card:hover .course-number-badge.course-number {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.3);
  transform: scale(1.02);
  transition: all 0.2s ease;
}



/* ── COURSE PAGE ADD-ONS ───────────────────────────────────── */
/* "Continue where you left off" banner */
.continue-banner{
  background: var(--brand-light);
  border: 1px solid var(--brand);
  border-radius: .75rem;
  padding: 2rem 2.25rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
.continue-banner h2{margin-bottom:.5rem}
.continue-banner p{margin-bottom:1.25rem;color:var(--text-muted)}
.continue-banner .btn{min-width:180px}

/* Rotate the caret when a <details> section is open */
.section[open] summary .section-icon{
  transform: rotate(180deg);
  transition: transform .2s ease;
}

.oauth-buttons{
  display:flex;flex-direction:column;gap:.75rem;margin-bottom:1.25rem
}
.oauth-btn{
  display:flex;align-items:center;justify-content:center;
  gap:.5rem;padding:.75rem 1rem;font-weight:600;font-size:.9rem;
  border:1px solid var(--border);border-radius:var(--radius-sm);
  cursor:pointer;transition:var(--transition);background:#fff
}
.oauth-btn img{width:18px;height:18px}
.oauth-btn.google{border-color:#4285f4;color:#4285f4}
.oauth-btn.microsoft{border-color:#2f2f2f;color:#2f2f2f}
.oauth-btn.github{border-color:#000;color:#000}
.oauth-btn:hover{transform:translateY(-1px);box-shadow:var(--shadow-md)}

.divider{display:flex;align-items:center;gap:.5rem;margin:1rem 0;color:var(--text-light);font-size:.85rem}
.divider::before,.divider::after{content:'';flex:1;height:1px;background:var(--border-light)}