/* ============================================
   Modern Course Template - Dark Theme
   ============================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.single-ahs-course {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
}

/* ============================================
   Header (Non-Sticky)
   ============================================ */
.course-header-top {
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    padding: 20px 40px;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo .logo-image {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.header-logo .brand-name {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4aa 0%, #4dd4ac 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* User Menu Dropdown */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu-dropdown {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-menu-toggle:hover {
    background: #333;
    border-color: #00d4aa;
}

.user-menu-toggle .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu-toggle .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-toggle .dashicons {
    color: #888;
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.user-menu-toggle[aria-expanded="true"] .dashicons {
    transform: rotate(180deg);
}

.user-menu-content {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    min-width: 200px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.user-menu-toggle[aria-expanded="true"] + .user-menu-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-content .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.user-menu-content .menu-item:hover {
    background: #2a2a2a;
}

.user-menu-content .menu-item.profile:hover {
    background: rgba(0, 212, 170, 0.1);
    color: #00d4aa;
}

.user-menu-content .menu-item.logout:hover {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
}

.user-menu-content .menu-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #888;
}

.user-menu-content .menu-item:hover .dashicons {
    color: #00d4aa;
}

.user-menu-content .menu-item.profile:hover .dashicons {
    color: #00d4aa;
}

.user-menu-content .menu-item.logout:hover .dashicons {
    color: #ff4757;
}

/* ============================================
   Main Container - Two Column Layout
   ============================================ */
.course-container-modern {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    display: flex;
    gap: 40px;
    min-height: calc(100vh - 81px);
}

/* ============================================
   Left Sidebar - Thumbnail & Progress
   ============================================ */
.course-sidebar {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.course-thumbnail-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
}

.course-thumbnail-wrapper {
    position: relative;
    overflow: hidden;
}

.course-thumbnail-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.course-thumbnail-wrapper:hover img {
    transform: scale(1.05);
}

.course-meta {
    padding: 20px;
}

.course-title-sidebar {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* Progress Section */
.course-progress-modern {
    margin-top: 8px;
}

.progress-bar-modern {
    width: 100%;
    height: 10px;
    background: #2a2a2a;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

.progress-fill-modern {
    height: 100%;
    background: linear-gradient(90deg, #00d4aa 0%, #4dd4ac 100%);
    border-radius: 5px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text-modern {
    font-size: 13px;
    color: #00d4aa;
    font-weight: 600;
    text-align: center;
}

/* Certificate Download Section */
.certificate-download-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
}

.certificate-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #00d4aa 0%, #4dd4ac 100%);
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.2);
}

.certificate-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 170, 0.35);
    color: #000;
}

.certificate-download-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ============================================
   Main Content Area - Right Side
   ============================================ */
.course-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Course Title */
.course-title-main {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 8px;
}

.course-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
}

/* Course Description */
.course-content-modern {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid #2a2a2a;
}

.course-content-modern h1,
.course-content-modern h2,
.course-content-modern h3 {
    color: #ffffff;
    margin-top: 24px;
    margin-bottom: 12px;
}

.course-content-modern h2 {
    font-size: 24px;
}

.course-content-modern h3 {
    font-size: 20px;
}

.course-content-modern p {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 16px;
}

.course-content-modern a {
    color: #00d4aa;
    text-decoration: none;
    transition: all 0.2s ease;
}

.course-content-modern a:hover {
    text-decoration: underline;
}

.course-content-modern ul,
.course-content-modern ol {
    color: #ccc;
    margin-left: 24px;
    margin-bottom: 16px;
}

.course-content-modern li {
    margin-bottom: 8px;
}

/* ============================================
   Lesson Lists Section
   ============================================ */
.lessons-section-modern {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid #2a2a2a;
}

.lessons-heading-modern {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
}

/* Next Lesson Highlight */
.next-lesson-highlight {
    background: linear-gradient(90deg, rgba(0, 212, 170, 0.15) 0%, rgba(77, 212, 172, 0.1) 100%);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 212, 170, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.next-lesson-info {
    flex: 1;
}

.next-lesson-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.next-lesson-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

.next-lesson-btn {
    padding: 10px 24px;
    background: #00d4aa;
    color: #0a0a0a;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.next-lesson-btn:hover {
    background: #00e5bb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

/* Category */
.lesson-category-modern {
    margin-bottom: 12px;
}

.category-header-modern {
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: #2a2a2a;
    border-radius: 8px;
    transition: all 0.3s ease;
    user-select: none;
}

.category-header-modern:hover {
    background: #3a3a3a;
    color: #00d4aa;
}

.category-header-modern .toggle-icon {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.category-header-modern.open .toggle-icon {
    transform: rotate(90deg);
}

/* Lesson Items */
.lessons-modern {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 6px;
}

.lessons-modern.open {
    max-height: 2000px;
}

.lesson-item-modern {
    position: relative;
}

.lesson-item-modern a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #888;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #0a0a0a;
    margin-bottom: 3px;
    border-radius: 6px;
    border-left: 3px solid transparent;
}

.lesson-item-modern a:hover {
    background: #1a1a1a;
    color: #fff;
    border-left-color: #00d4aa;
    transform: translateX(4px);
}

/* Lesson Icons */
.lesson-item-modern .lesson-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

/* Completed Lesson */
.lesson-item-modern.completed a {
    color: #00d4aa;
    background: rgba(0, 212, 170, 0.08);
}

.lesson-item-modern.completed .lesson-icon::before {
    content: '✓';
    color: #00d4aa;
    font-weight: bold;
}

/* Continue Lesson (Next to study) */
.lesson-item-modern.continue a {
    background: linear-gradient(90deg, rgba(0, 212, 170, 0.15) 0%, rgba(77, 212, 172, 0.1) 100%);
    color: #ffffff;
    border-left-color: #00d4aa;
    font-weight: 600;
}

.lesson-item-modern.continue .lesson-icon::before {
    content: '▶';
    color: #00d4aa;
    font-size: 10px;
}

/* Action Buttons in Lesson Items */
.lesson-action-btn {
    margin-left: auto;
    padding: 6px 16px;
    background: #00d4aa;
    color: #0a0a0a;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.lesson-action-btn:hover {
    background: #00e5bb;
}

.lesson-view-btn {
    background: #3a3a3a;
    color: #ffffff;
}

.lesson-view-btn:hover {
    background: #4a4a4a;
}

/* ============================================
   Access Denied Message
   ============================================ */
.access-denied-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #0a0a0a;
    color: #fff;
    text-align: center;
    padding: 40px;
}

.access-denied-modern .message {
    background: #1a1a1a;
    padding: 60px 40px;
    border-radius: 16px;
    max-width: 500px;
    border: 1px solid #2a2a2a;
}

.access-denied-modern h2 {
    color: #00d4aa;
    margin-bottom: 16px;
    font-size: 28px;
}

.access-denied-modern p {
    color: #ccc;
    font-size: 16px;
    line-height: 1.6;
}

.access-denied-modern a {
    color: #00d4aa;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.access-denied-modern a:hover {
    text-decoration: underline;
}

/* No Lessons Message */
.no-lessons-message {
    text-align: center;
    padding: 60px 40px;
    color: #888;
    font-size: 16px;
    background: #0a0a0a;
    border-radius: 12px;
    border: 1px dashed #2a2a2a;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .course-header-top {
        padding: 16px 30px;
    }
    
    .course-container-modern {
        padding: 30px;
        gap: 30px;
    }
    
    .course-sidebar {
        flex: 0 0 280px;
    }
    
    .course-title-main {
        font-size: 28px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .course-header-top {
        padding: 16px 20px;
    }
    
    .header-content {
        flex-direction: row;
        gap: 12px;
        align-items: center;
    }

    .user-menu-content .menu-item span:not(.dashicons) {
        font-size: 13px;
    }
    
    .course-container-modern {
        flex-direction: column;
        padding: 20px;
        gap: 24px;
    }
    
    .course-sidebar {
        flex: 1;
        width: 100%;
    }
    
    .course-title-main {
        font-size: 24px;
    }
    
    .course-subtitle {
        font-size: 13px;
    }
    
    .course-content-modern,
    .lessons-section-modern {
        padding: 24px;
    }
    
    .lessons-heading-modern {
        font-size: 20px;
    }
    
    .category-header-modern {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .lesson-item-modern a {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .next-lesson-highlight {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .next-lesson-btn {
        width: 100%;
        text-align: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .course-header-top {
        padding: 12px 15px;
    }
    
    .header-logo .logo-image {
        height: 32px;
    }
    
    .course-container-modern {
        padding: 15px;
        gap: 20px;
    }
    
    .course-title-main {
        font-size: 20px;
    }
    
    .course-content-modern,
    .lessons-section-modern {
        padding: 20px;
    }
    
    .lessons-heading-modern {
        font-size: 18px;
    }
    
    .back-to-courses-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .lesson-action-btn {
        padding: 4px 12px;
        font-size: 11px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}
