/* === KNOWLEDGE EXCHANGE — COURSE FRONT PAGE === */

/* ── Course title block ── */
.course_title {
    margin-bottom: 1.5rem;
}

.course_title h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--dark-teal);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.course_title h6 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    color: #555;
    margin: 0.5rem 0 0;
    line-height: 1.6;
}

/* ── Course description ── */
.course_description {
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--dark-teal);
}

.course_description p {
    margin-bottom: 1rem;
}

.course_description ul,
.course_description ol {
    margin: 0 0 1rem 1.5rem;
}

.course_description h2,
.course_description h3,
.course_description h4 {
    font-family: var(--font-heading);
    color: var(--dark-teal);
    margin: 1.5rem 0 0.5rem;
}

/* Read more / less links */
a#more_desc,
a#less_desc {
    display: inline-block;
    margin-top: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--soft-teal);
    text-decoration: none;
    border-bottom: 2px solid var(--soft-teal);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

a#more_desc:hover,
a#less_desc:hover {
    color: var(--dark-teal);
    border-color: var(--dark-teal);
}

/* ── Curriculum section (rendered via do_action hook) ── */
.course_curriculum .course_title h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--dark-teal);
    padding: 0.75rem 0;
    margin: 1.5rem 0 0.5rem;
    border-bottom: 3px solid var(--soft-teal);
    background: none;
    text-align: left;
    text-transform: none;
}

.course_curriculum .accordion .section {
    background: var(--light-grey);
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.course_curriculum .accordion .section > h4,
.course_curriculum .accordion .section > a {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--dark-teal);
    padding: 0.75rem 1rem;
    display: block;
    border: none;
    background: none;
}

.course_curriculum .accordion .section > h4:hover,
.course_curriculum .accordion .section > a:hover {
    color: var(--soft-teal);
}

.course_curriculum ul.units {
    list-style: none;
    margin: 0;
    padding: 0 1rem 0.5rem;
}

.course_curriculum ul.units li {
    padding: 0.4rem 0;
    border-top: 1px solid #ececec;
    font-size: 0.9rem;
    color: var(--dark-teal);
}

.course_curriculum ul.units li a {
    color: var(--dark-teal);
    text-decoration: none;
}

.course_curriculum ul.units li a:hover {
    color: var(--soft-teal);
}

/* ── Students undertaking (hidden but preserve layout) ── */
.students_undertaking:empty {
    display: none;
}

/* ── Course reviews wrapper ── */
.course_reviews {
    margin-top: 1.5rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .course_title h1 {
        font-size: 1.5rem;
    }
}

/* ═══════════════════════════════════════════════
   KE CURRICULUM — custom styled curriculum list
   (replaces do_action('wplms_after_course_description'))
   ═══════════════════════════════════════════════ */

.ke-curriculum {
    margin: 2rem 0;
}

/* Section heading bar */
.ke-curriculum-heading {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--dark-teal);
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--soft-teal);
    margin: 0 0 1.25rem;
    text-align: left;
}

/* Each named section card */
.ke-curriculum-section {
    margin-bottom: 1rem;
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

/* Section header strip */
.ke-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--white);
    background: var(--dark-teal);
    margin: 0;
    padding: 0.7rem 1rem;
}

.ke-section-svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.8;
}

.ke-section-units {
    padding: 0;
}

/* Individual unit row */
.ke-unit-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.ke-unit-row:last-child {
    border-bottom: none;
}

.ke-unit-row:hover {
    background: var(--light-grey);
}

/* Type icon — sits flush beside the title text */
.ke-unit-icon {
    flex-shrink: 0;
    color: var(--soft-teal);
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.ke-unit-svg {
    width: 1em;      /* scales with the surrounding font-size */
    height: 1em;
    font-size: 1.05rem;
    vertical-align: middle;
}

/* Unit title */
.ke-unit-title {
    flex: 1;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--dark-teal);
    line-height: 1.4;
}

/* Right-side meta (duration + free badge) */
.ke-unit-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.ke-unit-duration {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: #666;
    white-space: nowrap;
}

.ke-clock-svg {
    width: 0.875em;
    height: 0.875em;
    color: #999;
    flex-shrink: 0;
}

.ke-free-badge {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dark-teal);
    background: var(--gold);
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
}

/* Responsive — collapse meta below title on narrow screens */
@media (max-width: 480px) {
    .ke-unit-row {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .ke-unit-meta {
        margin-left: calc(1em + 0.75rem); /* align with title */
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════
   KE COURSE HERO — course-header.php
   ═══════════════════════════════════════════════ */

.ke-course-hero {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* ── Top row: thumbnail + course title ── */
.ke-hero-top {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem 1.75rem 1.25rem;
    background: var(--dark-teal);
}

.ke-hero-thumb {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.15);
}

.ke-hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ke-hero-title-wrap {
    flex: 1;
    min-width: 0;
}

.ke-hero-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
    line-height: 1.2;
    word-break: break-word;
}

/* ── Meta row: author + facebook ── */
.ke-hero-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.75rem;
    background: rgba(14, 60, 68, 0.06);
    border-bottom: 1px solid #e8e8e8;
}

.ke-hero-author {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.ke-author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--soft-teal);
    flex-shrink: 0;
}

.ke-author-name {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark-teal);
}
.ke-author-description {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 300;
    font-style: italic;
    color: var(--dark-teal);
}
.ke-facebook-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.ke-facebook-link:hover {
    opacity: 0.8;
}

.ke-fb-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    color: #1877f2;
}

.ke-fb-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.ke-fb-headline {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    color: #1877f2;
    line-height: 1.2;
}

.ke-fb-sub {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: #666;
    line-height: 1.2;
}

/* ── Bottom row: excerpt + enrol button ── */
.ke-hero-bottom {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
}

.ke-hero-excerpt {
    flex: 3;
    font-family: var(--font-body);
    font-size: 0.975rem;
    line-height: 1.7;
    color: #444;
}

.ke-hero-enrol {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex-shrink: 0;
}

.ke-enrol-btn {
    display: inline-block;
    background: var(--gold);
    color: var(--dark-teal);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    text-align: center;
    line-height: 1.3;
    transition: background 0.2s ease, transform 0.15s ease;
}

.ke-enrol-btn:hover {
    background: #e5a800;
    color: var(--dark-teal);
    transform: translateY(-1px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .ke-hero-top {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }

    .ke-hero-thumb {
        width: 80px;
        height: 80px;
    }

    .ke-hero-title {
        font-size: 1.5rem;
    }

    .ke-hero-meta {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem 1.25rem;
    }

    .ke-hero-bottom {
        flex-direction: column;
        padding: 1.25rem;
    }

    .ke-hero-enrol {
        justify-content: flex-start;
        width: 100%;
    }

    .ke-enrol-btn {
        width: 100%;
        text-align: center;
    }
}
