body { font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f9f9f9; }
.header-static { 
    background: white; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    padding: 1rem 0;
    position: relative; /* Override absolute from base.css */
    height: auto; /* Override fixed height */
    display: block; /* Override flex from base.css .header */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%; /* Ensure full width */
}

.logo-img {
    height: 50px;
    width: auto;
}

.back-link {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.back-link:hover {
    color: var(--color-secondary);
}

.course-hero {
    position: relative;
    isolation: isolate;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    overflow: hidden;
}
.course-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.85), rgba(0, 0, 0, 0.6));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}
.course-hero.has-image::before {
    opacity: 1;
}
.course-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.course-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
}
.course-hero-content {
    position: relative;
    z-index: 1;
}
.course-hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.course-hero p { font-size: 1.2rem; opacity: 0.9; max-width: 800px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

.course-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .course-layout { grid-template-columns: 1fr; }
    .course-sidebar { 
        order: -1; 
        position: static;
        margin-bottom: 2rem;
    }
}

.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.video-player::before {
    content: '▶';
    font-size: 4rem;
    opacity: 0.7;
}

/* Course Image Player (replaces video in main content) */
.course-image-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.course-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgba(255,255,255,0.7);
    font-size: 1.2rem;
    text-align: center;
    padding: 2rem;
}

.course-tabs {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid #ddd;
    margin-bottom: 2rem;
    overflow-x: auto;
}
.tab-btn {
    padding: 1rem 0;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}
.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.content-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    display: none;
}
.content-section.is-visible {
    display: block;
}
.pdf-section {
    background: #fdfcf5;
}
.pdf-viewer {
    width: 100%;
    height: 600px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}
.pdf-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}
.content-section h2 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}
.content-text {
    line-height: 1.8;
    color: #333;
    white-space: normal;
}
.content-empty {
    display: none;
    padding: 1.5rem;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    text-align: center;
    color: #6b7280;
    font-weight: 600;
    background: #f8fafc;
}

.course-sidebar {
    position: sticky;
    top: 2rem;
}
.price-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}
.price-tag {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}
.price-sub {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.enroll-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: var(--color-primary);
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s;
    margin-bottom: 1rem;
}
.enroll-btn:hover {
    background: var(--color-secondary);
}
.course-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
    text-align: center;
}
.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 0.25rem;
    color: #555;
}
.meta-item i {
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}
.meta-item .meta-label {
    font-size: 0.85rem;
    color: #888;
}
.meta-item strong {
    color: var(--color-primary);
    font-size: 0.95rem;
}

@media (max-width: 480px) {
    .course-meta {
        flex-direction: column;
        align-items: stretch;
    }
    .meta-item {
        padding: 0.75rem 0;
        border-bottom: 1px solid #f0f0f0;
    }
    .meta-item:last-child {
        border-bottom: none;
    }
}

.share-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}
.share-links a {
    color: #666;
    font-size: 1.2rem;
    transition: color 0.3s;
}
.share-links a:hover { color: var(--color-primary); }

.footer-main {
    background: var(--color-footer);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}
