/* ============================================================
   ACADEMY - Premium Learning Platform Design
   Academic & scholarly aesthetic with cosmic spiritual elements
   ============================================================ */

:root {
    --academy-primary: #4f46e5;
    --academy-primary-light: #6366f1;
    --academy-primary-dark: #3730a3;
    --academy-secondary: #0d9488;
    --academy-accent: #f59e0b;
    --academy-dark: #1e1b4b;
    --academy-bg: #fafafa;
    --gradient-academy: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
    --gradient-academy-dark: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 12px 40px rgba(79, 70, 229, 0.15);
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* ===== ACADEMY HERO SECTION ===== */
.academy-hero {
    background: var(--gradient-academy-dark);
    padding: 48px 0 100px;
    margin-top: -1rem;
    position: relative;
    overflow: hidden;
}

.academy-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(124, 58, 237, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

/* Floating book/scroll decorations */
.academy-hero::after {
    content: '📚';
    position: absolute;
    font-size: 200px;
    opacity: 0.03;
    right: -30px;
    top: -30px;
    transform: rotate(-15deg);
}

/* Override mojibake content with a CSS unicode escape. */
.academy-hero::after {
    content: "\1F4DA";
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(255,255,255,0.08) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}

.academy-hero .hero-content {
    position: relative;
    z-index: 2;
}

.academy-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.academy-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.academy-hero .lead {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    line-height: 1.7;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat .number {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.hero-stat .label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

/* ===== MAIN CONTENT AREA ===== */
.academy-main {
    margin-top: -50px;
    position: relative;
    z-index: 10;
    padding-bottom: 60px;
}

/* ===== FILTER CARD ===== */
.academy-filter-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    box-shadow: var(--shadow-medium);
    margin-bottom: 36px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.academy-filter-card .form-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.85rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.academy-filter-card .form-label i {
    color: var(--academy-primary);
}

.academy-filter-card .form-select,
.academy-filter-card .form-control {
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.academy-filter-card .form-select:focus,
.academy-filter-card .form-control:focus {
    border-color: var(--academy-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn-filter {
    background: var(--gradient-academy);
    border: none;
    color: white;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    color: white;
}

.academy-filter-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    color: #64748b;
    font-size: 0.9rem;
}

.academy-filter-loading.htmx-indicator {
    display: none;
}

.htmx-request .academy-filter-loading.htmx-indicator,
.academy-filter-loading.htmx-request {
    display: inline-flex;
}

/* ===== COURSE CARDS ===== */
.course-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(79, 70, 229, 0.1);
}

.course-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.course-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.course-card:hover .course-card-image img {
    transform: scale(1.08);
}

.course-card-placeholder {
    height: 180px;
    background: var(--gradient-academy);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.course-card-placeholder i {
    font-size: 3rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

.course-card-placeholder span {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Course Badges */
.course-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    z-index: 5;
}

.badge-category {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-access {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-access.free {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.badge-access.premium {
    background: var(--gradient-gold);
    color: white;
}

/* Course Body */
.course-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-level {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 5px 12px;
    border-radius: 8px;
    width: fit-content;
}

.course-level.beginner {
    background: #ecfdf5;
    color: #065f46;
}

.course-level.intermediate {
    background: #fef3c7;
    color: #92400e;
}

.course-level.advanced {
    background: #fee2e2;
    color: #991b1b;
}

.course-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
    line-height: 1.4;
}

.course-card-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

/* Course Meta Info */
.course-meta {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 16px;
}

.course-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #64748b;
}

.course-meta-item i {
    color: var(--academy-primary);
    font-size: 1rem;
}

.course-meta-item strong {
    color: #374151;
    font-weight: 700;
}

/* Course Actions */
.course-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

#academy-course-results {
    transition: opacity 0.2s ease;
}

#academy-course-results.htmx-swapping {
    opacity: 0.55;
}

.btn-course-primary {
    flex: 1;
    background: var(--gradient-academy);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-course-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    color: white;
}

.btn-course-secondary {
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    background: #f8fafc;
    color: var(--academy-primary);
    border: 2px solid #e0e7ff;
    transition: all 0.3s ease;
}

.btn-course-secondary:hover {
    background: #e0e7ff;
    color: var(--academy-primary-dark);
}

.academy-empty-state {
    background: white;
    border-radius: var(--radius-xl);
    padding: 56px 32px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.academy-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--academy-primary);
    font-size: 1.8rem;
}

.academy-empty-state h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.academy-empty-state p {
    color: #64748b;
    margin: 0;
}

/* ===== COURSE DETAIL PAGE ===== */
.course-detail-hero {
    background: var(--gradient-academy-dark);
    padding: 48px 0 80px;
    margin-top: -1rem;
    position: relative;
    overflow: hidden;
}

.course-detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 10% 40%, rgba(99, 102, 241, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 60%, rgba(124, 58, 237, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.course-detail-content {
    position: relative;
    z-index: 2;
}

.course-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.course-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.course-breadcrumb a:hover {
    color: white;
}

.course-breadcrumb .separator {
    color: rgba(255, 255, 255, 0.4);
}

.course-breadcrumb .current {
    color: white;
    font-weight: 600;
}

.course-detail-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.9rem;
    color: white;
    font-weight: 500;
}

.detail-badge.premium {
    background: rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

.course-detail-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.course-detail-desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.course-detail-stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.detail-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.detail-stat i {
    font-size: 1.25rem;
    opacity: 0.8;
}

.detail-stat span {
    font-size: 0.95rem;
}

.detail-stat strong {
    font-weight: 700;
}

/* Course Detail Main */
.course-detail-main {
    margin-top: -40px;
    position: relative;
    z-index: 10;
    padding-bottom: 60px;
}

/* Course Cover Card */
.course-cover-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 100px;
}

.course-cover-image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.course-cover-body {
    padding: 24px;
}

.course-cta-primary {
    display: block;
    width: 100%;
    background: var(--gradient-academy);
    border: none;
    color: white;
    padding: 16px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.course-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.35);
    color: white;
}

.course-cta-secondary {
    display: block;
    width: 100%;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    color: #374151;
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.course-cta-secondary:hover {
    background: #f1f5f9;
    border-color: #d1d5db;
    color: #1f2937;
}

/* ===== MODULES & LESSONS ===== */
.modules-section {
    margin-top: 32px;
}

.modules-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.modules-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--gradient-academy);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.modules-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.module-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.module-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.module-number {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient-academy);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
}

.module-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.module-badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
}

.module-badge.draft {
    background: #fef3c7;
    color: #92400e;
}

/* Lesson List */
.lesson-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lesson-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-item:hover {
    background: #fafafa;
}

.lesson-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.lesson-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--academy-primary);
    font-size: 1rem;
}

.lesson-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 4px 0;
}

.lesson-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.lesson-meta i {
    font-size: 0.75rem;
}

.lesson-badges {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.lesson-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.lesson-badge.preview {
    background: #dcfce7;
    color: #166534;
}

.lesson-badge.draft {
    background: #fef3c7;
    color: #92400e;
}

.btn-lesson {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    background: #f1f5f9;
    color: var(--academy-primary);
    border: 1px solid #e0e7ff;
    transition: all 0.2s ease;
}

.btn-lesson:hover {
    background: var(--gradient-academy);
    color: white;
    border-color: transparent;
}

/* ===== LESSON DETAIL PAGE ===== */
.lesson-hero {
    background: var(--gradient-academy-dark);
    padding: 40px 0 60px;
    margin-top: -1rem;
    position: relative;
}

.lesson-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.lesson-hero-content {
    position: relative;
    z-index: 2;
}

.lesson-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.lesson-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.lesson-breadcrumb a:hover {
    color: white;
}

.lesson-breadcrumb .separator {
    color: rgba(255, 255, 255, 0.4);
}

.lesson-module-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
}

.lesson-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.lesson-duration {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Lesson Content Area */
.lesson-main {
    padding: 40px 0 60px;
    background: #f8fafc;
    min-height: 60vh;
}

.content-block {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.content-block h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-block h2 i {
    color: var(--academy-primary);
}

.content-block p {
    font-size: 1rem;
    color: #374151;
    line-height: 1.8;
}

/* ===== LESSON DETAIL ENHANCEMENTS ===== */
.lesson-content-wrapper {
    padding: 40px 0 60px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 60vh;
}

.lesson-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lesson-hero-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.lesson-hero-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.lesson-hero-meta .meta-item.preview {
    color: #86efac;
}

/* Content Block Types */
.prose-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #374151;
}

.prose-content p {
    margin-bottom: 1rem;
}

/* Checklist Enhanced */
.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(34, 197, 94, 0.15);
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-checkbox {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.checklist-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #166534;
    margin: 0 0 4px 0;
}

.checklist-content p {
    font-size: 0.9rem;
    color: #15803d;
    margin: 0;
    line-height: 1.6;
}

/* Block Title */
.block-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.block-title i {
    font-size: 1.2rem;
    color: var(--academy-primary);
}

/* Mantra Block Enhanced */
.mantra-note {
    font-size: 0.95rem;
    color: #78350f;
    margin-bottom: 16px;
    line-height: 1.7;
}

.mantra-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.mantra-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--gradient-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    flex-shrink: 0;
}

.mantra-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #78350f;
    margin: 0 0 6px 0;
}

.mantra-info p {
    font-size: 0.9rem;
    color: #a16207;
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.mantra-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--academy-accent);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.mantra-link:hover {
    gap: 10px;
    color: #d97706;
}

/* Video Block */
.video-block .block-title i {
    color: #ef4444;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 16px 28px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.video-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
    color: white;
}

.video-link i {
    font-size: 1.5rem;
}

/* Audio Block */
.audio-block .block-title i {
    color: #8b5cf6;
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #ddd6fe;
    border-radius: 16px;
    padding: 24px;
}

.audio-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.audio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6d28d9;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.audio-link:hover {
    color: #5b21b6;
}

/* PDF Block */
.pdf-block .block-title i {
    color: #f97316;
}

.pdf-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    border: 1px solid #fdba74;
    border-radius: 16px;
    padding: 24px;
}

.pdf-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.pdf-info {
    flex: 1;
}

.pdf-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #9a3412;
    margin: 0 0 4px 0;
}

.pdf-info p {
    font-size: 0.85rem;
    color: #c2410c;
    margin: 0;
}

.pdf-download {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f97316;
    font-size: 1.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid #fdba74;
}

.pdf-download:hover {
    background: #f97316;
    color: white;
    border-color: #f97316;
}

/* Image Block */
.image-block {
    padding: 0;
    overflow: hidden;
}

.lesson-image {
    width: 100%;
    display: block;
    border-radius: var(--radius-lg);
}

/* Embed Block */
.embed-block {
    padding: 0;
}

.embed-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.embed-container iframe,
.embed-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Attribution Box Enhanced */
.attribution-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    margin-top: 24px;
}

.attribution-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #475569;
}

.attribution-header i {
    font-size: 1.1rem;
}

.attribution-content {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.7;
}

.attribution-content a {
    color: var(--academy-primary);
}

/* Lesson Navigation */
.lesson-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-btn.back {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.nav-btn.back:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Lesson Sidebar */
.lesson-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.sidebar-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #64748b;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-lessons {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-lessons li {
    margin-bottom: 8px;
}

.sidebar-lessons li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    color: #64748b;
    font-size: 0.9rem;
}

.sidebar-lessons li a:hover {
    background: #f1f5f9;
    color: var(--academy-primary);
}

.sidebar-lessons li.active a {
    background: var(--gradient-academy);
    color: white;
}

.lesson-num {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-lessons li.active .lesson-num {
    background: rgba(255, 255, 255, 0.2);
}

.lesson-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-card-mini h5 {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .academy-hero,
    .course-detail-hero,
    .lesson-hero {
        padding-top: 36px;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .course-detail-stats {
        gap: 16px;
    }
    
    .course-cover-card {
        position: relative;
        top: 0;
        margin-bottom: 32px;
    }
}

@media (max-width: 768px) {
    .academy-hero h1,
    .course-detail-title,
    .lesson-title {
        font-size: 1.75rem;
    }
    
    .academy-filter-card {
        padding: 20px;
    }
    
    .course-card-body {
        padding: 20px;
    }
    
    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .lesson-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .lesson-badges {
        margin-left: 0;
        margin-top: 8px;
    }
    
    .content-block {
        padding: 24px;
    }
}

@media (max-width: 576px) {
    .lesson-content-wrapper {
        padding: 30px 0 40px;
    }
    
    .content-block {
        padding: 20px;
        border-radius: 16px;
    }
    
    .sidebar-card {
        padding: 20px;
    }
}

/* ===== UPSELL PAGE ===== */
.upsell-hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: var(--gradient-academy-dark);
    position: relative;
    overflow: hidden;
    margin-top: -1rem;
}

.upsell-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 40%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(245, 158, 11, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.upsell-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 20px;
}

.upsell-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(234, 88, 12, 0.2) 100%);
    border: 2px solid rgba(245, 158, 11, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    animation: pulse-glow 2s ease-in-out infinite;
}

.upsell-icon i {
    font-size: 2.5rem;
    color: #fcd34d;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(245, 158, 11, 0.4);
    }
}

.upsell-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upsell-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.upsell-desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 36px;
}

.upsell-features {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.upsell-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.upsell-feature i {
    font-size: 1.25rem;
    color: #a5b4fc;
}

.upsell-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.upsell-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 280px;
}

.upsell-btn.primary {
    background: var(--gradient-academy);
    color: white;
    border: none;
}

.upsell-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4);
    color: white;
}

.upsell-btn.gold {
    background: var(--gradient-gold);
    color: white;
    border: none;
}

.upsell-btn.gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.4);
    color: white;
}

.upsell-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.upsell-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

@media (max-width: 576px) {
    .upsell-features {
        flex-direction: column;
        gap: 16px;
    }
    
    .upsell-btn {
        min-width: 100%;
        padding: 14px 24px;
    }
}
