@import url("../new_layout_style.4bbc7b96f812.css");
.course-detail {
    max-width: 1350px;
    margin: 2rem auto;
    padding: 2rem;
    background: #f9fff9;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    box-sizing: border-box;
    width: calc(100% - 2rem);
}

/* ==== Banner with Overlay ==== */
.course-detail > header.banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16/6;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 0.75rem;
}

.course-detail > header.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.course-detail > header.banner .banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.25));
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 2rem;
    color: white;
    text-align: left;
}

.course-detail > header.banner .banner-overlay h1 {
    margin: 0;
    font-weight: 750;
    text-shadow: 0 3px 6px rgba(0,0,0,0.6);
    font-size: clamp(1.7rem, 4.5vw, 3.4rem);
    line-height: 1.25;
    max-width: 90%;
    word-break: break-word;
}

/* ==== Responsive Banner ==== */
@media (max-width: 768px) {
    .course-detail > header.banner {
        aspect-ratio: 16/7;
    }
    .course-detail > header.banner .banner-overlay {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .course-detail > header.banner {
        aspect-ratio: 16/9;
    }
    .course-detail > header.banner .banner-overlay h1 {
        font-size: clamp(1.3rem, 5.5vw, 2rem);
        text-align: center;
        max-width: 100%;
    }
    .course-detail > header.banner .banner-overlay {
        align-items: flex-end;
        justify-content: center;
        text-align: center;
    }
}

/* ==== Course Content ==== */
.course-content {
    padding: 2rem;
}

.course-content .description {
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* CKEditor content block */
.course-content .description .ck-content {
    background: #f9fff9;
    border-radius: 12px;
}

/* Lists inside ck-content */
.course-content .description .ck-content ul,
.course-content .description .ck-content ol {
    margin-left: 0;
    padding-left: 1.2rem;
    list-style-position: inside;
}

.course-content .description .ck-content li {
    margin-bottom: 0.5rem;
    text-align: justify;
}


/* === Generic images === */
.course-content .description .ck-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

/* === Block images (centered) === */
.course-content .description .ck-content figure.image {
    display: block;
    margin: 1rem auto;
    text-align: center;
}

.course-content .description .ck-content figure.image img {
    display: block;
    margin: 0 auto;
}

/* === Image captions (toggleImageCaption) === */
.course-content .description .ck-content figcaption {
    font-size: 0.9rem; /* slightly smaller than body text */
    line-height: 1.4;
    color: #666; /* softer text */
    text-align: center; /* match block image alignment */
    margin-top: 0.5rem;
    padding: 0 0.5rem; /* breathing space */
    word-break: break-word; /* handle long words */
    font-style: italic;
}

/* === Responsive === */
@media (max-width: 768px) {
    .course-content .description .ck-content img {
        max-height: 350px;
        width: 100%;
    }

    .course-content .description .ck-content figcaption {
        font-size: 0.8rem; /* shrink text */
        line-height: 1.3;
        padding: 0 0.25rem;
    }
}

/* ==== Pricing Section ==== */
.pricing-section {
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
}

.pricing-section h2 {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    text-align: center;
    color: #004d00;
    margin-bottom: 2rem;
}

.pricing-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-list li {
    background-color: #fff;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-list li:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.pricing-title {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #333;
}

.pricing-amount {
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    font-weight: 700;
    color: #00c853;
    margin-bottom: 0.5rem;
}

/* ==== Buttons ==== */
.enroll-button {
    display: inline-block;
    padding: 12px 24px;
    background: #00c853;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.2s ease;
    border: none;
}

.enroll-button:hover {
    background: #009f44;
    transform: translateY(-2px);
}

/* ==== Back Link ==== */
.back-link {
    margin-top: 1.3rem;
    padding: 2rem;
    text-align: center;
}

.back-link a {
    display: inline-block;
    padding: 10px 18px;
    background: #f1f1f1;
    color: #004d00;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.back-link a:hover {
    background: #00c853;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ==== Responsive Layout ==== */
@media (max-width: 768px) {
    .course-content {
        padding: 1rem 0.25rem;
    }
    .pricing-section {
        padding: 1.5rem;
    }
    .course-detail {
        width: 98%;
        margin: 1rem auto;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .course-detail {
        width:95%;
        margin: 0.8rem auto;
        padding: 1rem;
    }
    .pricing-list {
        gap: 1.2rem;
    }
}
