/* ============================================
   COURSE DETAIL PAGE STYLES
   ============================================ */

.course-hero {
    position: relative;
    color: var(--footer-text-color);
    background-color: var(--text-dark);
    background-image: url("../images/background/typing.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* scroll effect */
    padding-block: var(--space-2xl);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.course-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--footer-overlay-color);
    pointer-events: none;
    z-index: 0;
}

.course-hero .container {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .course-hero {
        background-attachment: scroll; /* mobile-friendly fallback */
    }
}

.course-hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

@media (min-width: 968px) {
    .course-hero-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }
}

.course-hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    order: 2;
}

@media (min-width: 968px) {
    .course-hero-image {
        order: 1;
    }
}

.coach-image-placeholder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--lavender-light) 0%, var(--lavender-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: var(--font-size-2xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

/* Optional image inside the placeholder (editable via HTML) */
.coach-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none; /* only show after it successfully loads */
}

.coach-image-placeholder .coach-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
    padding: var(--space-md);
    text-align: center;
    line-height: 1.2;
}

.coach-image-placeholder[data-img-loaded="true"] {
    background: none;
}

.coach-image-placeholder[data-img-loaded="true"] img {
    display: block;
}

.coach-image-placeholder[data-img-loaded="true"] .coach-initials {
    display: none;
}

.course-hero-text {
    order: 1;
    text-align: center;
}

@media (min-width: 968px) {
    .course-hero-text {
        order: 2;
        text-align: left;
    }
}

.course-subtitle {
    font-size: var(--font-size-sm);
    color: inherit;
    opacity: 0.9;
    margin-block-end: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.course-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: inherit;
    margin-block-end: var(--space-md);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .course-title {
        font-size: var(--font-size-3xl);
    }
}

.course-enrollment {
    font-size: var(--font-size-sm);
    color: inherit;
    opacity: 0.9;
    margin-block-end: var(--space-lg);
    font-weight: 500;
}

.course-quote {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: #f79ce6;
    margin-block: var(--space-lg);
    font-style: italic;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .course-quote {
        font-size: clamp(1.5rem, 2rem + 1vw, 2.5rem);
    }
}

.coach-intro {
    margin-block: var(--space-lg);
}

.coach-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: inherit;
    margin-block-end: var(--space-xs);
}

.coach-role {
    font-size: var(--font-size-base);
    color: inherit;
    opacity: 0.9;
    margin-block-end: 0;
}

.btn-enroll {
    margin-block-start: var(--space-lg);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-base);
    font-weight: 600;
    display: inline-block;
}

.btn-login {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-sm);
    min-width: fit-content;
}

.course-section {
    padding-block: var(--space-xl);
    border-top: 1px solid var(--lavender-lighter);
}

.course-section-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-dark);
    margin-block-end: var(--space-lg);
    padding-block-end: var(--space-md);
    border-bottom: 2px solid var(--lavender-primary);
}

.course-section-content {
    max-width: 900px;
}

.course-description-text {
    font-size: var(--font-size-base);
    color: var(--text-light);
    line-height: 1.8;
    margin-block-end: var(--space-lg);
}

.course-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-list li {
    font-size: var(--font-size-base);
    color: var(--text-light);
    line-height: 1.8;
    padding-block: var(--space-sm);
    padding-inline-start: var(--space-xl);
    position: relative;
}

.course-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--lavender-primary);
    font-weight: 700;
    font-size: var(--font-size-lg);
}

/* Dark mode adjustments */
[data-theme="dark"] .course-section {
    border-top-color: var(--lavender-lighter);
}

[data-theme="dark"] .course-section-title {
    border-bottom-color: var(--lavender-primary);
}

@media (max-width: 767px) {
    .course-hero {
        padding-block: var(--space-xl);
        min-height: auto;
    }
    
    .course-quote {
        font-size: var(--font-size-lg);
    }
    
    .course-title {
        font-size: var(--font-size-xl);
    }
}

