/* ============================================
   SAJAL ARYAN — PREMIUM COMPONENTS
   MNC-Grade UI: Modals, Skeletons, Steppers,
   Blog, Enrollment, Admin CMS
   ============================================ */

/* --- Google Fonts (Inter for premium body text) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
  background: linear-gradient(90deg,
    var(--color-surface) 25%,
    var(--color-surface-hover) 50%,
    var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text { height: 14px; margin-bottom: 10px; border-radius: 4px; }
.skeleton-text.w-60 { width: 60%; }
.skeleton-text.w-80 { width: 80%; }
.skeleton-text.w-40 { width: 40%; }
.skeleton-title { height: 24px; width: 70%; margin-bottom: 16px; border-radius: 4px; }
.skeleton-image { width: 100%; aspect-ratio: 16/10; border-radius: 0; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.skeleton-btn { width: 140px; height: 48px; border-radius: 0; }

.skeleton-card {
  background: var(--color-surface);
  overflow: hidden;
}

@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================
   PREMIUM MODAL
   ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--duration-normal) var(--ease-spring);
  box-shadow: var(--shadow-xl);
}

.modal-backdrop.active .modal {
  transform: translateY(0) scale(1);
}

.modal-lg { max-width: 860px; }
.modal-sm { max-width: 440px; }
.modal-fullscreen {
  max-width: 100%;
  max-height: 100%;
  height: 100%;
  margin: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-surface);
  z-index: 2;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  text-transform: none;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all var(--duration-fast) var(--ease-out);
}

.modal-close:hover {
  border-color: var(--color-text-primary);
  color: var(--color-text-primary);
}

.modal-body {
  padding: var(--space-8);
}

.modal-footer {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  padding: var(--space-5) var(--space-8);
  border-top: 1px solid var(--color-border);
  position: sticky;
  bottom: 0;
  background: var(--color-surface);
}

/* ============================================
   MULTI-STEP STEPPER
   ============================================ */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  white-space: nowrap;
}

.stepper-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  transition: all var(--duration-normal) var(--ease-out);
  flex-shrink: 0;
}

.stepper-label {
  font-family: var(--font-overhead);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-muted);
  transition: color var(--duration-normal) var(--ease-out);
}

.stepper-line {
  width: 40px;
  height: 1px;
  background: var(--color-border);
  margin: 0 var(--space-3);
  transition: background var(--duration-normal) var(--ease-out);
  flex-shrink: 0;
}

/* Active step */
.stepper-step.active .stepper-number {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

.stepper-step.active .stepper-label {
  color: var(--color-text-primary);
}

/* Completed step */
.stepper-step.completed .stepper-number {
  border-color: var(--color-success);
  background: var(--color-success);
  color: #fff;
}

.stepper-step.completed .stepper-label {
  color: var(--color-text-secondary);
}

.stepper-step.completed + .stepper-line {
  background: var(--color-success);
}

/* ============================================
   FLOATING LABEL FORM
   ============================================ */
.form-floating {
  position: relative;
  margin-bottom: var(--space-5);
}

.form-floating input,
.form-floating textarea,
.form-floating select {
  height: 56px;
  padding: 24px var(--space-5) 8px;
  font-size: var(--text-base);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: all var(--duration-normal) var(--ease-out);
}

.form-floating textarea {
  height: 140px;
  padding-top: 28px;
}

.form-floating label {
  position: absolute;
  top: 50%;
  left: var(--space-5);
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: 0;
  pointer-events: none;
  transition: all var(--duration-normal) var(--ease-out);
  margin: 0;
}

.form-floating textarea ~ label {
  top: 20px;
  transform: none;
}

.form-floating input:focus,
.form-floating textarea:focus,
.form-floating select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
  background: var(--color-surface);
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label,
.form-floating textarea:focus ~ label,
.form-floating textarea:not(:placeholder-shown) ~ label,
.form-floating select:focus ~ label,
.form-floating select:valid ~ label {
  top: 8px;
  transform: none;
  font-size: 0.65rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-family: var(--font-overhead);
  font-weight: 600;
}

.form-floating .form-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: 4px;
  font-family: var(--font-body);
}

/* ============================================
   GLASSMORPHIC CARD
   ============================================ */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  transition: all var(--duration-normal) var(--ease-out);
}

.card-glass:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
}

.card-premium {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.card-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.card-premium:hover {
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-premium:hover::before {
  opacity: 1;
}

/* ============================================
   ANIMATED COUNTER
   ============================================ */
.counter-value {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1;
  transition: all var(--duration-slow);
}

.counter-label {
  font-family: var(--font-overhead);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

/* ============================================
   BADGE ANIMATED (pulse for urgency)
   ============================================ */
.badge-pulse {
  position: relative;
}

.badge-pulse::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 1px solid currentColor;
  opacity: 0;
  animation: badge-pulse-ring 2s ease-out infinite;
}

@keyframes badge-pulse-ring {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

.badge-live {
  border-color: var(--color-success);
  color: var(--color-success);
  background: rgba(76, 175, 80, 0.1);
}

.badge-urgent {
  border-color: var(--color-error);
  color: var(--color-error);
  background: rgba(239, 83, 80, 0.1);
}

/* ============================================
   BLOG — POST GRID
   ============================================ */
.blog-grid-dynamic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.blog-card-dynamic {
  background: var(--color-surface);
  border: 1px solid transparent;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.blog-card-dynamic:hover {
  border-color: var(--color-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card-dynamic .blog-card-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.blog-card-dynamic .blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.blog-card-dynamic:hover .blog-card-image img {
  transform: scale(1.06);
}

.blog-card-dynamic .blog-card-category {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
}

.blog-card-dynamic .blog-card-body {
  padding: var(--space-6);
}

.blog-card-dynamic .blog-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-overhead);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-3);
}

.blog-card-dynamic .blog-card-meta .dot {
  width: 3px;
  height: 3px;
  background: var(--color-text-muted);
  border-radius: 50%;
}

.blog-card-dynamic .blog-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
  text-transform: none;
  line-height: var(--leading-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-dynamic .blog-card-title a {
  color: inherit;
  transition: color var(--duration-fast);
}

.blog-card-dynamic .blog-card-title a:hover {
  color: var(--color-accent);
}

.blog-card-dynamic .blog-card-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: none;
}

/* Blog Featured Hero Card */
.blog-hero-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--color-surface);
  overflow: hidden;
  margin-bottom: var(--space-12);
  border: 1px solid transparent;
  transition: all var(--duration-normal) var(--ease-out);
}

.blog-hero-card:hover {
  border-color: var(--color-border);
}

.blog-hero-card .blog-hero-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.blog-hero-card .blog-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slower) var(--ease-out);
}

.blog-hero-card:hover .blog-hero-image img {
  transform: scale(1.04);
}

.blog-hero-card .blog-hero-content {
  padding: var(--space-10);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ============================================
   BLOG — SINGLE POST
   ============================================ */
.post-header {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-16) var(--space-6) var(--space-8);
}

.post-category {
  display: inline-block;
  margin-bottom: var(--space-4);
}

.post-title {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
  text-transform: none;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  font-family: var(--font-overhead);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-muted);
}

.post-meta .meta-sep {
  width: 4px;
  height: 4px;
  background: var(--color-border);
  border-radius: 50%;
}

.post-cover {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto var(--space-12);
  aspect-ratio: 21/9;
  overflow: hidden;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Rich Content Renderer */
.post-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  font-family: 'Inter', var(--font-body);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-text-secondary);
}

.post-content h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: var(--space-12) 0 var(--space-4);
  text-transform: none;
}

.post-content h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: var(--space-8) 0 var(--space-3);
  text-transform: none;
}

.post-content p {
  margin-bottom: var(--space-6);
  max-width: none;
}

.post-content img {
  width: 100%;
  margin: var(--space-8) 0;
}

.post-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  font-style: italic;
  color: var(--color-text-dim);
  background: var(--color-surface);
}

.post-content ul, .post-content ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-6);
}

.post-content li {
  margin-bottom: var(--space-2);
}

.post-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content a:hover {
  color: var(--color-accent-hover);
}

/* Post Navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  max-width: 720px;
  margin: var(--space-16) auto 0;
  padding: var(--space-8) var(--space-6);
  border-top: 1px solid var(--color-border);
}

.post-nav-item {
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
}

.post-nav-item:hover {
  border-color: var(--color-accent);
  background: var(--color-surface);
}

.post-nav-label {
  font-family: var(--font-overhead);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.post-nav-title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}

.post-nav-item.next {
  text-align: right;
}

/* Share Buttons */
.post-share {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  max-width: 720px;
  margin: var(--space-8) auto;
  padding: 0 var(--space-6);
}

.post-share-label {
  font-family: var(--font-overhead);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-muted);
}

.post-share a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  color: var(--color-text-dim);
  transition: all var(--duration-fast) var(--ease-out);
  font-size: 0.9rem;
}

.post-share a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ============================================
   ENROLLMENT FORM
   ============================================ */
.enrollment-sidebar {
  position: sticky;
  top: 100px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-8);
}

.enrollment-price-display {
  text-align: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.enrollment-price-display .price-current {
  font-size: var(--text-4xl);
}

.enrollment-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6);
}

.enrollment-features li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.enrollment-features li::before {
  content: none;
}

.enrollment-seats {
  text-align: center;
  padding: var(--space-3) var(--space-4);
  background: rgba(239, 83, 80, 0.08);
  border: 1px solid rgba(239, 83, 80, 0.2);
  margin-bottom: var(--space-5);
}

.enrollment-seats span {
  font-family: var(--font-overhead);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-error);
  font-weight: 600;
}

/* Step content */
.step-content {
  display: none;
  animation: fadeInUp 0.3s var(--ease-out);
}

.step-content.active {
  display: block;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Batch selector */
.batch-selector {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.batch-option {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  background: transparent;
  width: 100%;
  text-align: left;
}

.batch-option:hover {
  border-color: var(--color-accent);
}

.batch-option.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-glow);
}

.batch-option-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  position: relative;
  flex-shrink: 0;
  transition: all var(--duration-fast);
}

.batch-option.selected .batch-option-radio {
  border-color: var(--color-accent);
}

.batch-option.selected .batch-option-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--color-accent);
  border-radius: 50%;
}

.batch-option-info {
  flex: 1;
}

.batch-option-name {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}

.batch-option-dates {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.batch-option-seats {
  font-family: var(--font-overhead);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* Payment Summary */
.payment-summary {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.payment-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.payment-summary-row.total {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-primary);
}

.payment-summary-row.discount {
  color: var(--color-success);
}

/* Enrollment Success */
.enrollment-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  border-radius: 50%;
  background: rgba(76, 175, 80, 0.1);
  border: 2px solid var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--color-success);
  animation: successPop 0.5s var(--ease-spring);
}

@keyframes successPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================
   COURSE DETAIL PAGE
   ============================================ */
.course-detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-10);
  align-items: start;
}

.curriculum-section {
  margin-bottom: var(--space-10);
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.accordion-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.accordion-item:hover {
  border-color: rgba(212, 165, 116, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.accordion-item.open {
  border-color: var(--color-accent);
  box-shadow: 0 4px 20px rgba(212, 165, 116, 0.05);
}

.accordion-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  padding: var(--space-5) var(--space-6);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--color-text-primary);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 500;
  transition: background var(--duration-fast);
}

.accordion-trigger:hover {
  background: var(--color-surface-hover);
}

.accordion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  color: var(--color-accent);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  margin-left: var(--space-3);
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.accordion-body {
  padding: 0 var(--space-6) var(--space-6);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: var(--space-4);
}


/* ============================================
   COURSE DETAIL PAGE SUB-COMPONENTS
   ============================================ */

.course-detail-hero {
  position: relative;
  padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-12);
  overflow: hidden;
}

.course-detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/images/misty_forest.png');
  background-size: cover;
  background-position: center;
  filter: blur(8px) brightness(0.25);
  transform: scale(1.05);
  z-index: 1;
}

.course-detail-hero .container {
  position: relative;
  z-index: 2;
}

.course-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-6);
}

.course-metric-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.course-metric-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
}

.course-preview-card {
  position: relative;
  aspect-ratio: 16/9;
  background-image: url('/assets/images/photography_masterclass.png');
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: none;
}

.course-preview-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  transition: background var(--duration-normal);
}

.course-preview-card:hover::before {
  background: rgba(0, 0, 0, 0.2);
}

.course-preview-play-btn {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  transition: all var(--duration-normal) var(--ease-spring);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.course-preview-play-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  margin-left: 2px;
}

.course-preview-card:hover .course-preview-play-btn {
  transform: scale(1.1);
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-inverse);
  box-shadow: 0 0 25px var(--color-accent-glow);
}

.course-preview-overlay-text {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-4);
  z-index: 2;
  font-size: var(--text-xs);
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  font-family: var(--font-overhead);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.enrollment-sidebar {
  position: sticky;
  top: 100px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-normal) var(--ease-out);
}

.enrollment-sidebar:hover {
  border-color: rgba(212, 165, 116, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.enrollment-sidebar-content {
  padding: var(--space-6) var(--space-8) var(--space-8);
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 992px) {
  .learn-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .learn-grid {
    grid-template-columns: 1fr;
  }
}

.learn-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.learn-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.learn-card:hover {
  border-color: rgba(212, 165, 116, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.learn-card:hover::before {
  opacity: 1;
}

.learn-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(212, 165, 116, 0.08);
  margin-bottom: var(--space-4);
  color: var(--color-accent);
}

.learn-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.learn-card h4 {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.learn-card p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin: 0;
}

.instructor-section {
  padding: var(--space-16) 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.instructor-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-12);
  align-items: center;
}

@media (max-width: 768px) {
  .instructor-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

.instructor-image-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
}

.instructor-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.instructor-image-container:hover img {
  transform: scale(1.03);
}

.instructor-tag {
  font-family: var(--font-overhead);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-accent);
  margin-bottom: var(--space-2);
  display: inline-block;
}

.instructor-name {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.instructor-bio {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.instructor-awards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (max-width: 480px) {
  .instructor-awards {
    grid-template-columns: 1fr;
  }
}

.award-badge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
}

.award-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
}

.award-badge-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.award-badge-text {
  font-size: var(--text-xs);
  line-height: 1.3;
  color: var(--color-text-primary);
}

/* ============================================
   ADMIN — BLOG EDITOR
   ============================================ */
.admin-blog-grid {
  display: grid;
  gap: var(--space-4);
}

.admin-blog-row {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: background var(--duration-fast);
}

.admin-blog-row:hover {
  background: var(--color-surface-hover);
}

.admin-blog-thumb {
  width: 80px;
  height: 50px;
  object-fit: cover;
  background: var(--color-bg-alt);
}

.admin-blog-title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}

.admin-blog-date {
  font-family: var(--font-overhead);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Rich Text Editor Container */
.editor-container {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-bottom: var(--space-5);
}

/* Quill overrides for dark theme */
.ql-toolbar.ql-snow {
  border: none !important;
  border-bottom: 1px solid var(--color-border) !important;
  background: var(--color-bg-alt) !important;
}

.ql-container.ql-snow {
  border: none !important;
  font-family: 'Inter', var(--font-body) !important;
  font-size: 1rem !important;
  color: var(--color-text-secondary) !important;
  min-height: 400px;
}

.ql-editor {
  padding: var(--space-6) !important;
  line-height: 1.8 !important;
}

.ql-editor.ql-blank::before {
  color: var(--color-text-muted) !important;
  font-style: normal !important;
}

.ql-snow .ql-stroke {
  stroke: var(--color-text-muted) !important;
}

.ql-snow .ql-fill {
  fill: var(--color-text-muted) !important;
}

.ql-snow .ql-picker-label {
  color: var(--color-text-muted) !important;
}

.ql-snow .ql-picker-options {
  background: var(--color-surface) !important;
  border-color: var(--color-border) !important;
}

.ql-snow .ql-active .ql-stroke {
  stroke: var(--color-accent) !important;
}

.ql-snow .ql-active .ql-fill {
  fill: var(--color-accent) !important;
}

.ql-snow .ql-active {
  color: var(--color-accent) !important;
}

.ql-snow button:hover .ql-stroke {
  stroke: var(--color-text-primary) !important;
}

.ql-snow button:hover .ql-fill {
  fill: var(--color-text-primary) !important;
}

/* ============================================
   ADMIN — ENROLLMENT TABLE
   ============================================ */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  font-family: var(--font-overhead);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-muted);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  white-space: nowrap;
}

.admin-table td {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: var(--color-surface);
}

.admin-table .status-paid {
  color: var(--color-success);
}

.admin-table .status-pending {
  color: var(--color-warning);
}

.admin-table .status-failed {
  color: var(--color-error);
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar {
  position: relative;
  max-width: 400px;
}

.search-bar input {
  height: 44px;
  padding: 0 var(--space-5) 0 44px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.search-bar input:focus {
  border-color: var(--color-accent);
}

.search-bar-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

/* ============================================
   FILTER TABS (premium variant)
   ============================================ */
.filter-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.filter-tab {
  font-family: var(--font-overhead);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-5);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.filter-tab:hover {
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

.filter-tab.active {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-accent-glow);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
}

.pagination-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  transition: all var(--duration-fast);
}

.pagination-btn:hover {
  border-color: var(--color-text-primary);
  color: var(--color-text-primary);
}

.pagination-btn.active {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-glow);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.3;
}

.empty-state-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
  text-transform: none;
}

.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 40ch;
  margin: 0 auto var(--space-6);
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .course-detail-layout {
    grid-template-columns: 1fr;
  }

  .enrollment-sidebar {
    position: static;
  }

  .blog-hero-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .blog-grid-dynamic {
    grid-template-columns: 1fr;
  }

  .post-title {
    font-size: var(--text-3xl);
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .admin-blog-row {
    grid-template-columns: 1fr auto;
  }

  .admin-blog-thumb {
    display: none;
  }

  .stepper-label {
    display: none;
  }
}

/* ============================================
   3D SCROLL REVEAL EFFECT
   ============================================ */
.reveal-3d {
  opacity: 0;
  transform: perspective(1200px) translateY(50px) rotateX(-12deg);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
  will-change: transform, opacity;
}

.reveal-3d.revealed {
  opacity: 1;
  transform: perspective(1200px) translateY(0) rotateX(0deg);
}

/* ============================================
   FLOATING LEVITATION
   Gentle hovering animation — subtle, not bouncy
   ============================================ */
@keyframes float-levitate {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.float-3d {
  animation: float-levitate 4s ease-in-out infinite;
  will-change: transform;
}

/* Back-to-top gets a gentler, slower float */
.back-to-top.visible .float-3d,
.back-to-top.float-3d.visible {
  animation-duration: 3s;
}

/* ============================================
   3D FLIP CARDS
   Flip on hover to reveal back content
   ============================================ */
.flip-card-3d {
  perspective: 800px;
  cursor: default;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  transform-style: preserve-3d;
}

.flip-card-3d:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.flip-card-back {
  transform: rotateY(180deg);
  background: var(--color-accent);
  color: var(--color-bg);
  border-radius: inherit;
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
  text-align: center;
}

.flip-card-back strong {
  font-size: var(--text-sm);
  display: block;
  margin-bottom: var(--space-1);
}

/* ============================================
   DEPTH PARALLAX (Inner Image Shift)
   Image moves inside card on hover — window effect
   ============================================ */
.depth-3d {
  overflow: hidden;
}

.depth-3d img {
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

/* Fallback: simple scale on hover when JS is disabled */
.depth-3d:hover img {
  transform: scale(1.04);
}

/* ============================================
   MAGNETIC BUTTON
   Base style — JS applies translate3d on hover
   ============================================ */
.magnetic-btn {
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

/* ============================================
   SCROLL-LINKED 3D SECTION TILT
   Wrapper that gets subtle rotateX via JS
   ============================================ */
.scroll-tilt-3d {
  perspective: 1200px;
}

.scroll-tilt-3d > * {
  transition: transform 0.1s linear;
  will-change: transform;
}

/* ============================================
   MOBILE: Disable heavy 3D on touch devices
   ============================================ */
@media (hover: none) {
  .flip-card-3d:hover .flip-card-inner {
    transform: none;
  }
  .float-3d {
    animation: none;
  }
  .scroll-tilt-3d > * {
    transform: none !important;
  }
}

/* ============================================
   MICRO-POLISH — Subtle enhancements
   ============================================ */

/* Images fade in when lazy-loaded (only when JS is active) */
body.js-loaded img[loading="lazy"]:not(.loaded) {
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.js-loaded img[loading="lazy"].loaded {
  opacity: 1;
}

/* Subtle golden glow on primary button hover */
.btn-primary:hover {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.06);
}

.btn-accent:hover {
  box-shadow: 0 0 20px var(--color-accent-glow);
}

/* Service card — top accent line on hover */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.service-card:hover::before {
  opacity: 1;
}

/* Gallery caption — smoother slide up */
.gallery-caption {
  transition: transform var(--duration-slow) var(--ease-out),
              opacity var(--duration-slow) var(--ease-out) !important;
}

/* Timeline items — subtle left border accent on hover */
.timeline-item:hover {
  border-left-color: var(--color-accent) !important;
}

/* Award items — subtle scale on hover */
.award-item {
  transition: transform var(--duration-normal) var(--ease-out);
}

.award-item:hover {
  transform: translateX(4px);
}

/* Gear items — subtle highlight on hover */
.gear-item {
  transition: background var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}

.gear-item:hover {
  background: var(--color-surface-hover);
}

/* Footer links — subtle accent color on hover */
.footer-links a {
  transition: color var(--duration-normal) var(--ease-out),
              padding-left var(--duration-normal) var(--ease-out);
}

.footer-links a:hover {
  color: var(--color-accent);
  padding-left: 4px;
}

/* Back-to-top — golden accent ring */
.back-to-top a {
  transition: border-color var(--duration-normal) var(--ease-out),
              color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.back-to-top a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: 0 0 15px var(--color-accent-glow);
}
