/* Category / browse courses listing page */

.course-catalog-page {
    background: #f5f7fb;
}

.course-catalog-page main {
    margin-top: 0 !important;
}

.course-catalog {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.course-catalog__breadcrumb {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.course-catalog__breadcrumb a {
    color: #2f6fed;
    text-decoration: none;
}

.course-catalog__breadcrumb a:hover {
    text-decoration: underline;
}

.course-catalog__top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.course-catalog__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.course-catalog__sub {
    color: #6b7280;
    font-size: 1rem;
    max-width: 640px;
    margin: 0;
}

.course-catalog__lang {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.course-catalog__lang-label {
    font-size: 13px;
    color: #6b7280;
    margin-right: 4px;
}

.course-catalog__lang a {
    padding: 8px 18px;
    border: 1px solid #d1d9e6;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    background: #fff;
    transition: all 0.15s ease;
}

.course-catalog__lang a:hover {
    border-color: #2f6fed;
    color: #2f6fed;
}

.course-catalog__lang a.is-active {
    background: #2f6fed;
    border-color: #2f6fed;
    color: #fff;
}

.course-catalog__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    padding-bottom: 8px;
}

.course-catalog__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.course-catalog__chip:hover {
    border-color: #2f6fed;
    color: #2f6fed;
}

.course-catalog__chip.is-active {
    border-color: #2f6fed;
    background: #eff6ff;
    color: #2f6fed;
}

.course-catalog__chip i {
    color: #9ca3af;
    font-size: 14px;
}

.course-catalog__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.course-catalog__empty {
    text-align: center;
    padding: 48px 16px;
    color: #6b7280;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed #d1d9e6;
}

/* Rich course card */
.cc-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8ecf2;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cc-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.cc-card__head {
    padding: 16px 16px 14px;
    color: #fff;
    position: relative;
    min-height: 120px;
}

.cc-card__head--blue { background: linear-gradient(135deg, #1e5bb8 0%, #3b82f6 100%); }
.cc-card__head--teal { background: linear-gradient(135deg, #0d9488 0%, #2dd4bf 100%); }
.cc-card__head--purple { background: linear-gradient(135deg, #6d28d9 0%, #a78bfa 100%); }
.cc-card__head--orange { background: linear-gradient(135deg, #ea580c 0%, #fb923c 100%); }

.cc-card__head-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.cc-card__head-cat {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.95;
}

.cc-card__live-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.cc-card__head-sub {
    font-size: 13px;
    margin: 8px 0 6px;
    opacity: 0.92;
    line-height: 1.4;
}

.cc-card__head-date {
    font-size: 12px;
    opacity: 0.85;
    margin-bottom: 10px;
}

.cc-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cc-card__badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.cc-card__badge--live {
    background: #dc2626;
    color: #fff;
}

.cc-card__badge--lang {
    background: #16a34a;
    color: #fff;
}

.cc-card__body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cc-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.45;
    margin-bottom: 8px;
}

.cc-card__tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #2f6fed;
    background: #eff6ff;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.cc-card__meta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.cc-card__meta i {
    width: 18px;
    color: #9ca3af;
}

.cc-card__foot {
    padding: 14px 16px 16px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.cc-card__pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.cc-card__price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a1a2e;
}

.cc-card__price-old {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.cc-card__off {
    font-size: 12px;
    font-weight: 700;
    color: #16a34a;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 4px;
}

.cc-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cc-card__btn {
    display: block;
    text-align: center;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.cc-card__btn--outline {
    border: 1px solid #2f6fed;
    color: #2f6fed;
    background: #fff;
}

.cc-card__btn--outline:hover {
    background: #eff6ff;
    color: #1d5ad8;
}

.cc-card__btn--primary {
    background: #2f6fed;
    color: #fff;
    border: 1px solid #2f6fed;
}

.cc-card__btn--primary:hover {
    background: #1d5ad8;
    color: #fff;
}

@media (max-width: 576px) {
    .course-catalog__top {
        flex-direction: column;
    }

    .cc-card__actions {
        grid-template-columns: 1fr;
    }
}

/* —— Course detail page —— */
.course-detail-page {
    background: #f5f7fb;
}

.course-detail-page main {
    margin-top: 0 !important;
}

.course-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

/* Hero thumbnail on the Bootstrap course detail page: show full image */
.course-hero-media {
    background: #f4f6fb;
    min-height: 260px;
}

.course-hero-media img {
    object-fit: contain;
    max-height: 420px;
}

/* ===== Course detail page (cd-*) ===== */

.cd-page {
    --cd-ink: #142033;
    --cd-muted: #5b6b7c;
    --cd-line: #e4e9f0;
    --cd-green: #15803d;
    --cd-red: #dc2626;
    --cd-navy: #1e3a5f;
}

.cd-page .breadcrumb {
    font-size: 0.85rem;
}

.cd-hero {
    background: #fff;
    border: 1px solid var(--cd-line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(20, 32, 51, 0.06);
}

.cd-hero__media {
    background: #f4f6fb;
    min-height: 280px;
}

.cd-hero__media img {
    object-fit: contain;
    max-height: 440px;
}

.cd-hero__media--empty i {
    font-size: 4rem;
    color: #94a3b8;
}

.cd-hero__body {
    padding: 2rem 2.25rem;
}

.cd-hero__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cd-navy);
}

.cd-hero__title {
    margin: 0 0 1rem;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--cd-ink);
}

.cd-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.cd-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
}

.cd-chip i {
    font-size: 0.95rem;
}

.cd-chip--green {
    background: #ecfdf5;
    color: #047857;
}

.cd-chip--red {
    background: #fef2f2;
    color: #b91c1c;
}

.cd-hero__pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.cd-hero__price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--cd-green);
    line-height: 1;
}

.cd-hero__price-old {
    font-size: 1.05rem;
    color: #9ca3af;
}

.cd-hero__save {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.8rem;
    font-weight: 700;
}

.cd-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.cd-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.4rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cd-btn--buy {
    background: var(--cd-green);
    color: #fff;
}

.cd-btn--buy:hover {
    background: #166534;
    color: #fff;
}

.cd-btn--ghost {
    border-color: #cbd5e1;
    color: var(--cd-navy);
    background: #fff;
}

.cd-btn--ghost:hover {
    border-color: var(--cd-navy);
    color: var(--cd-navy);
    background: #f8fafc;
}

@media (max-width: 991px) {
    .cd-hero__body {
        padding: 1.4rem 1.25rem;
    }
}

.course-detail__hero {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8ecf2;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 24px;
}

.course-detail__hero-grid {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 0;
}

@media (max-width: 991px) {
    .course-detail__hero-grid {
        grid-template-columns: 1fr;
    }
}

.course-detail__media {
    position: relative;
    min-height: 260px;
    background: linear-gradient(135deg, #1e5bb8 0%, #3b82f6 100%);
}

.course-detail__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 260px;
}

.course-detail__media-placeholder {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 4rem;
}

.course-detail__body {
    padding: 28px 32px;
}

.course-detail__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.course-detail__cat {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: #eff6ff;
    color: #2f6fed;
    text-decoration: none;
}

.course-detail__cat:hover {
    background: #dbeafe;
    color: #1d5ad8;
}

.course-detail__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 12px;
    line-height: 1.25;
}

.course-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.course-detail__meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
}

.course-detail__meta-pill--live {
    background: #ecfdf5;
    color: #059669;
}

.course-detail__pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
}

.course-detail__price {
    font-size: 2rem;
    font-weight: 800;
    color: #dc2626;
}

.course-detail__price-old {
    font-size: 1.1rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.course-detail__off {
    font-size: 13px;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    padding: 4px 10px;
    border-radius: 6px;
}

.course-detail__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.course-detail__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.course-detail__btn--primary {
    background: #2f6fed;
    color: #fff;
    border: none;
}

.course-detail__btn--primary:hover {
    background: #1d5ad8;
    color: #fff;
}

.course-detail__btn--outline {
    background: #fff;
    color: #2f6fed;
    border: 2px solid #2f6fed;
}

.course-detail__btn--outline:hover {
    background: #eff6ff;
    color: #1d5ad8;
}

.course-detail__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 28px;
    border: 1px solid #e5e7eb;
}

.course-detail__stat {
    background: #fff;
    padding: 18px 16px;
    text-align: center;
}

.course-detail__stat-icon {
    font-size: 1.25rem;
    color: #2f6fed;
    margin-bottom: 6px;
}

.course-detail__stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    margin-bottom: 4px;
}

.course-detail__stat-value {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
}

/* Course detail page — equal-width stat cards with light gradients */
.course-detail-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 768px) {
    .course-detail-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .course-detail-stats {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.course-detail-stats__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 118px;
    padding: 1.15rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-detail-stats__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.course-detail-stats__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
    border-radius: 50%;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.55);
}

.course-detail-stats__label {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(15, 23, 42, 0.55);
}

.course-detail-stats__value {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.35;
    word-break: break-word;
}

.course-detail-stats__card--start {
    background: linear-gradient(145deg, #dbeafe 0%, #eff6ff 55%, #f8fafc 100%);
}

.course-detail-stats__card--start .course-detail-stats__icon {
    color: #2563eb;
}

.course-detail-stats__card--end {
    background: linear-gradient(145deg, #cffafe 0%, #ecfeff 55%, #f8fafc 100%);
}

.course-detail-stats__card--end .course-detail-stats__icon {
    color: #0891b2;
}

.course-detail-stats__card--mode {
    background: linear-gradient(145deg, #d1fae5 0%, #ecfdf5 55%, #f8fafc 100%);
}

.course-detail-stats__card--mode .course-detail-stats__icon {
    color: #059669;
}

.course-detail-stats__card--seats {
    background: linear-gradient(145deg, #fef3c7 0%, #fffbeb 55%, #f8fafc 100%);
}

.course-detail-stats__card--seats .course-detail-stats__icon {
    color: #d97706;
}

.course-detail-stats__card--sections {
    background: linear-gradient(145deg, #ede9fe 0%, #f5f3ff 55%, #f8fafc 100%);
}

.course-detail-stats__card--sections .course-detail-stats__icon {
    color: #7c3aed;
}

.course-detail__layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 991px) {
    .course-detail__layout {
        grid-template-columns: 1fr;
    }
}

.course-detail__panel {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8ecf2;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    overflow: hidden;
}

.course-detail__panel-head {
    padding: 14px 20px;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(135deg, #1e5bb8 0%, #3b82f6 100%);
}

.course-detail__panel-body {
    padding: 20px;
}

.course-detail__highlight {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.course-detail__highlight:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.course-detail__highlight-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2f6fed;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.course-detail__highlight-text {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 2px;
}

.course-detail__highlight-sub {
    font-size: 12px;
    color: #6b7280;
}

.course-detail__fact {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.course-detail__fact:last-child {
    border-bottom: none;
}

.course-detail__fact-label {
    color: #6b7280;
}

.course-detail__fact-value {
    font-weight: 600;
    color: #1a1a2e;
    text-align: right;
}

.course-detail__enroll {
    position: sticky;
    top: 90px;
}

.course-detail__enroll-price {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.course-detail__enroll-price .course-detail__price {
    font-size: 1.75rem;
}

.course-detail__content-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8ecf2;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.course-detail__content-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eff6ff;
}

.course-detail__content-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #6b7280;
}

.course-detail__content-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.course-detail__content-body {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
}

.course-detail__related {
    margin-top: 40px;
}

.course-detail__related-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 20px;
}

.course-detail__related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.course-detail__empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed #d1d9e6;
}
