/* ================================
   Global
================================ */
body {
    background-color: #0e0d11;
    color: #f2f2f2;
    font-family: 'Vazirmatn', sans-serif;
    margin: 0;
    padding: 0;
}

a { color: inherit; text-decoration: none; transition: color 0.3s; }
a:hover { color: #ff50b8; }

/* ================================
   Hero Section
================================ */
.course-page .course-hero {
    position: relative;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 2px solid #241b35;
    border-radius: 0 0 20px 20px;
}

.course-page .course-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(50%);
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s ease;
}

.course-page .course-hero:hover img { transform: scale(1.05); }

.course-page .course-hero .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10, 6, 20, 0.3), rgba(10, 6, 20, 0.95));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 38px;
    margin-bottom: 15px;
    color: #e86bff;
    font-weight: 700;
}

.hero-content p {
    color: #d4cce0;
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.8;
}

.btn-enroll {
    background: linear-gradient(90deg, #a14ffb, #ff50b8);
    padding: 14px 36px;
    border-radius: 30px;
    color: #fff;
    font-weight: bold;
    display: inline-block;
    transition: 0.3s;
    text-align: center;
}

.btn-enroll:hover { box-shadow: 0 0 25px rgba(214, 86, 255, 0.4); }

.already-enrolled {
    display: block;
    text-align: center;
    margin: 20px auto;
    color: #10b981;
    font-weight: bold;
    background: rgba(16,185,129,0.15);
    padding: 12px 20px;
    border-radius: 12px;
    width: fit-content;
}

/* ================================
   Course Info
================================ */
.course-info-container {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.course-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.course-meta p {
    background: #18141f;
    padding: 14px 18px;
    border-radius: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid #221a33;
}

.course-meta i { color: #cf8bff; }

/* ================================
   Description
================================ */
.course-description-section {
    background: #16131e;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 0 24px rgba(150, 50, 250, 0.1);
}

.course-description-section h2 {
    color: #e69aff;
    margin-bottom: 15px;
    border-bottom: 1px solid #2c2237;
    padding-bottom: 8px;
    font-size: 22px;
}

.course-description-section p { line-height: 1.9; color: #dcdcdc; }

/* ================================
   Lessons + Video Cards
================================ */
.lesson-card {
    background: #1c172b;
    border-radius: 15px;
    margin-bottom: 15px;
    border: 1px solid #2a1f3a;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.lesson-card:hover { box-shadow: 0 6px 15px rgba(214, 86, 255, 0.2); }

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 17px;
    color: #e69aff;
    cursor: pointer;
    transition: background 0.3s;
}

.lesson-header:hover { background: #2c2237; }

.lesson-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    padding: 0 20px;
}

.lesson-card.active .lesson-body { max-height: 2000px; padding: 15px 20px; }
.lesson-card.active .lesson-header i { transform: rotate(180deg); }

/* Video Card inside Lesson */
.video-card {
    background: #241b35;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #2c1f3a;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.video-card:hover { box-shadow: 0 6px 15px rgba(214, 86, 255, 0.2); }

.video-card.locked {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.video-card.locked::after {
    content: "🔒";
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 18px;
}

.video-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    font-weight: 600;
    color: #e69aff;
    transition: background 0.3s;
}

.video-card-header:hover { background: #2c2237; }

.video-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 15px;
}

.video-card-body video {
    width: 100%;
    border-radius: 12px;
    margin: 10px 0;
}

.video-card.active .video-card-body { max-height: 500px; padding: 12px 15px; }

.video-card-header i, .lesson-header i { transition: transform 0.3s; }
.video-card-header .duration { font-size: 13px; color: #aaa; }

/* Buttons inside lesson/video */
.btn-small, .btn-xsmall {
    background: #6d28d9;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    font-weight: 500;
    color: white;
    text-decoration: none;
    transition: 0.2s;
}

.btn-small:hover, .btn-xsmall:hover { background: #7c3aed; }

/* ================================
   Badges
================================ */
.detail-badge, .price-badge {
    display: inline-block;
    padding: 6px 14px;
    background: #2c2c3f;
    color: #e5e7eb;
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
}

.detail-badge a { color: #d18bff; }
.detail-badge a:hover { color: #ff50b8; }

.price-badge--free {
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.35);
    color: #10b981 !important;
    font-weight: 700;
}

/* ================================
   Responsive
================================ */
@media (max-width: 1024px) {
    .course-info-container { padding: 0 15px; }
    .course-meta { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
    .hero-content h1 { font-size: 32px; }
    .hero-content p { font-size: 15px; }
    .lessons-section { padding: 25px; }
    .lessons-section h2 { font-size: 20px; }
    .btn-enroll { padding: 12px 28px; font-size: 14px; }
}

@media (max-width: 768px) {
    .course-page .course-hero { height: 350px; }
    .hero-content h1 { font-size: 26px; }
    .hero-content p { font-size: 14px; }
    .video-card-body video { width: 100% !important; }
    .lesson-header, .video-card-header { flex-direction: column; align-items: flex-start; gap: 5px; }
    .btn-enroll, .btn-small, .btn-xsmall { width: 100%; text-align: center; font-size: 14px; padding: 10px 0; }
}

@media (max-width: 480px) {
    .course-page .course-hero { height: 280px; }
    .hero-content h1 { font-size: 22px; }
    .hero-content p { font-size: 13px; }
    .lessons-section { padding: 20px; }
    .lessons-section h2 { font-size: 18px; }
}
