/* ============================================================
   COURSE DETAILS PAGE  — course-details.css
   Scoped under cd-* namespace to avoid any global conflicts
   ============================================================ */

/* ===== HERO SECTION ===== */
.cd-hero {
    background: linear-gradient(160deg, #f0fdf9 0%, #e6f7f5 40%, #f8fafc 100%);
    padding: 64px 0 72px;
    border-bottom: 1px solid #e2e8f0;
    overflow: hidden;
}

.cd-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Back Link */
.cd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 28px;
    transition: color 0.2s;
}
.cd-back-link:hover { color: #0d9488; }

/* Category Badge */
.cd-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 148, 136, 0.08);
    border: 1px solid rgba(13, 148, 136, 0.2);
    color: #0d9488;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    width: fit-content;
}
.cd-category-badge__icon { font-size: 15px; }

/* Title */
.cd-hero__title {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    margin: 0 0 18px 0;
    letter-spacing: -0.03em;
}

.cd-title-accent {
    color: #0d9488;
}

/* Description */
.cd-hero__desc {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.7;
    margin: 0 0 28px 0;
    max-width: 480px;
}

/* Meta Pills */
.cd-hero__meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.cd-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.cd-meta-pill svg { color: #0d9488; }

/* CTA Button */
.cd-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: var(--teal-primary, #0d9488);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.25);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}
.cd-cta-btn:hover {
    background: var(--teal-dark, #0f766e);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(13, 148, 136, 0.30);
}
.cd-cta-btn:active { transform: scale(0.98); }

/* Hero Image */
.cd-hero__image-wrap {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(255,255,255,0.8);
}
.cd-hero__image-wrap img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
}

/* Doodle overlay on image */
.cd-hero__doodle {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: 12px;
    padding: 10px 16px;
    font-family: var(--font-doodle, 'Caveat', cursive);
    font-size: 15px;
    line-height: 1.4;
    color: #0f766e;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: rotate(3deg);
}

/* ===== SUBJECTS SECTION ===== */
.cd-subjects {
    background: #ffffff;
    padding: 80px 0 90px;
}

.cd-subjects__header {
    text-align: center;
    margin-bottom: 52px;
}

.cd-section-label {
    font-size: 13px;
    font-weight: 700;
    color: #0d9488;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.cd-subjects__title {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin: 0 0 14px 0;
}

.cd-subjects__sub {
    color: #64748b;
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Subjects Grid */
.cd-subjects__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Subject Card */
.cd-subject-card {
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 24px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    cursor: default;
}
.cd-subject-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    border-color: #c7dfe8;
}

.cd-subject-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    margin-bottom: 4px;
}

.cd-subject-card__title {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
}

.cd-subject-card__desc {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.cd-subject-card__arrow {
    margin-top: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.25s ease;
}
.cd-subject-card:hover .cd-subject-card__arrow {
    transform: translateX(3px);
}

/* ===== DOODLE BANNER ===== */
.cd-doodle-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-top: 60px;
    padding: 36px 48px;
    background: linear-gradient(120deg, #f0fdf9 0%, #fefce8 100%);
    border-radius: 20px;
    border: 1px solid #d1fae5;
}

.cd-doodle-text {
    font-family: var(--font-doodle, 'Caveat', cursive);
    font-size: 2.6rem;
    line-height: 1.2;
    color: #0f172a;
    text-align: center;
}

/* Emoji icon row inside banner */
.cd-doodle-icons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cd-doodle-icon {
    font-size: 28px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
}

.cd-doodle-plane {
    width: 90px;
    height: auto;
    opacity: 0.85;
}

/* Floating animation on subject card icons */
.cd-float-icon {
    animation: floatGentleSubtle 4s ease-in-out infinite;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .cd-subjects__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .cd-hero__inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .cd-hero__image-wrap {
        order: -1;
    }
    .cd-hero__title {
        font-size: 2.2rem;
    }
    .cd-subjects__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cd-subjects__title {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .cd-hero {
        padding: 44px 0 52px;
    }
    .cd-hero__title {
        font-size: 1.85rem;
    }
    .cd-subjects__grid {
        grid-template-columns: 1fr;
    }
    .cd-doodle-banner {
        flex-direction: column;
    }
    .cd-doodle-text {
        font-size: 2rem;
    }
}
