/* =====================================================
   BD COURSES PAGE  (Tutor LMS Pro integration)
   ===================================================== */

/* Dark mode transitions */
.bd-courses-page, .bd-courses-page * { transition: background-color .3s ease, color .3s ease, border-color .3s ease; }

.bd-courses-page { padding: 40px 0 80px; background: var(--page-bg, #f8fafc); }

/* ── Hero ─────────────────────────────────────────── */
.bd-cp-hero { text-align: center; padding: 48px 0 28px; }
.bd-cp-hero-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #2563eb);
    color: #fff; font-size: 34px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 12px 36px rgba(99,102,241,.28);
}
.bd-cp-hero h1 { font-size: 2.2rem; font-weight: 800; color: #0f172a; margin: 0 0 10px; }
.bd-cp-hero p  { font-size: .95rem; color: #64748b; }

/* ── Stats bar ───────────────────────────────────── */
.bd-cp-stats {
    display: flex; background: #fff; border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.06); overflow: hidden; margin-bottom: 32px;
}
.bd-cp-stat {
    flex: 1; display: flex; align-items: center; gap: 12px;
    padding: 20px 24px; border-right: 1px solid #f1f5f9;
    font-size: .88rem; color: #475569;
}
.bd-cp-stat:last-child { border-right: none; }
.bd-cp-stat i { font-size: 1.4rem; color: #6366f1; }
.bd-cp-stat strong { color: #0f172a; font-size: 1.1rem; }

/* ── Toolbar ─────────────────────────────────────── */
.bd-cp-toolbar { margin-bottom: 32px; }
.bd-cp-filters {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 16px;
}
.bd-cp-filter {
    padding: 7px 18px; border-radius: 50px; font-size: .83rem; font-weight: 600;
    background: #f1f5f9; color: #475569; text-decoration: none;
    transition: background .2s, color .2s; display: flex; align-items: center; gap: 6px;
}
.bd-cp-filter:hover, .bd-cp-filter.active {
    background: linear-gradient(135deg, #6366f1, #2563eb); color: #fff;
}
.bd-cp-count {
    background: rgba(255,255,255,.25); padding: 0 7px; border-radius: 999px; font-size: .72rem;
}
.bd-cp-filter:not(.active) .bd-cp-count { background: #e2e8f0; color: #64748b; }

.bd-cp-sort-wrap {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.bd-cp-sort-form { display: flex; gap: 10px; flex-wrap: wrap; }
.bd-cp-select {
    padding: 8px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px;
    font-size: .83rem; font-weight: 600; color: #374151; cursor: pointer;
    background: #fff;
}
.bd-cp-select:focus { outline: none; border-color: #6366f1; }
.bd-cp-result-count {
    margin-left: auto; font-size: .82rem; color: #94a3b8; font-weight: 600;
}

/* ── Course Grid ─────────────────────────────────── */
.bd-course-grid {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 28px; margin-bottom: 48px;
}

/* ── Course Card ─────────────────────────────────── */
.bd-course-card {
    background: #fff; border-radius: 20px; overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.06); border: 1px solid #f1f5f9;
    position: relative; display: flex; flex-direction: column;
    transition: transform .25s, box-shadow .25s;
}
.bd-course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 52px rgba(99,102,241,.14);
}

/* Badge */
.bd-cc-badge {
    position: absolute; top: 12px; left: 12px; z-index: 3;
    padding: 3px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700;
}
.bd-cc-badge-free { background: #d1fae5; color: #065f46; }
.bd-cc-badge-off  { background: #ff4da6; color: #fff; }

/* Thumbnail */
.bd-cc-thumb-link { display: block; position: relative; overflow: hidden; }
.bd-cc-thumb {
    width: 100% !important; height: 210px !important; object-fit: cover;
    display: block; transition: transform .4s;
}
.bd-course-card:hover .bd-cc-thumb { transform: scale(1.05); }
.bd-cc-thumb-placeholder {
    height: 210px; background: linear-gradient(135deg, #eff6ff, #dbeafe);
    display: flex; align-items: center; justify-content: center;
    font-size: 64px; color: #93c5fd;
}

/* Video play overlay */
.bd-cc-play-btn {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.25);
    transition: background .2s;
}
.bd-cc-play-btn i {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(255,255,255,.92); color: #6366f1;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; transition: transform .2s, box-shadow .2s;
    padding-left: 4px; /* optical center */
}
.bd-course-card:hover .bd-cc-play-btn { background: rgba(0,0,0,.35); }
.bd-course-card:hover .bd-cc-play-btn i {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(99,102,241,.4);
}

/* Category chip */
.bd-cc-cat {
    position: absolute; bottom: 12px; left: 12px; z-index: 2;
    background: rgba(99,102,241,.9); color: #fff;
    padding: 3px 12px; border-radius: 999px;
    font-size: .72rem; font-weight: 700; backdrop-filter: blur(4px);
}

/* Card body */
.bd-cc-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }

/* Level badge */
.bd-cc-level {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 6px; font-size: .72rem; font-weight: 700;
}
.bd-cc-level-beginner     { background: #d1fae5; color: #065f46; }
.bd-cc-level-intermediate { background: #fef3c7; color: #92400e; }
.bd-cc-level-expert       { background: #fee2e2; color: #991b1b; }
.bd-cc-level-all_levels   { background: #eff6ff; color: #1d4ed8; }

/* Title */
.bd-cc-title { font-size: .98rem; font-weight: 700; margin: 0; line-height: 1.4; }
.bd-cc-title a { color: #0f172a; text-decoration: none; }
.bd-cc-title a:hover { color: #6366f1; }

/* Rating */
.bd-cc-rating {
    display: flex; align-items: center; gap: 3px; font-size: .82rem;
}
.bd-cc-rating .fas.fa-star,
.bd-cc-rating .fas.fa-star-half-stroke { color: #f59e0b; }
.bd-cc-rating .far.fa-star { color: #d1d5db; }
.bd-cc-rating-avg   { font-weight: 700; color: #f59e0b; margin-left: 4px; }
.bd-cc-rating-count { color: #94a3b8; font-size: .78rem; }

/* Meta row */
.bd-cc-meta {
    display: flex; flex-wrap: wrap; gap: 10px;
    font-size: .78rem; color: #94a3b8;
}
.bd-cc-meta span { display: flex; align-items: center; gap: 4px; }
.bd-cc-meta i { color: #6366f1; }

/* Footer */
.bd-cc-footer {
    margin-top: auto; padding-top: 14px; border-top: 1px solid #f1f5f9;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.bd-cc-price { display: flex; align-items: baseline; gap: 6px; }
.bd-cc-free  { font-size: 1.1rem; font-weight: 800; color: #10b981; }
.bd-cc-paid  { font-size: 1.1rem; font-weight: 800; color: #6366f1; }
.bd-cc-paid del { font-size: .82rem; color: #94a3b8; font-weight: 400; }

/* Buttons */
.bd-cc-btn {
    padding: 9px 18px; border-radius: 50px;
    background: linear-gradient(135deg, #6366f1, #2563eb);
    color: #fff; font-size: .8rem; font-weight: 700;
    text-decoration: none; white-space: nowrap;
    display: flex; align-items: center; gap: 6px;
    transition: transform .2s, box-shadow .2s;
}
.bd-cc-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(99,102,241,.35); color: #fff; }
.bd-cc-btn-enrolled {
    background: linear-gradient(135deg, #10b981, #059669);
}
.bd-cc-btn-enrolled:hover { box-shadow: 0 6px 18px rgba(16,185,129,.35); }

/* ── Empty state ─────────────────────────────────── */
.bd-cp-empty {
    text-align: center; padding: 80px 20px;
    background: #fff; border-radius: 20px; border: 2px dashed #e2e8f0;
}
.bd-cp-empty i { font-size: 64px; color: #c7d2fe; margin-bottom: 16px; display: block; }
.bd-cp-empty h3 { font-size: 1.3rem; color: #1e293b; }
.bd-cp-empty p, .bd-cp-empty a { color: #64748b; }
.bd-cp-empty a { color: #6366f1; }

/* ── Pagination ──────────────────────────────────── */
.bd-cp-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.bd-cp-pagination .page-numbers {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #f1f5f9; color: #475569; text-decoration: none;
    font-weight: 600; font-size: .9rem; transition: background .2s, color .2s;
}
.bd-cp-pagination .page-numbers.current,
.bd-cp-pagination .page-numbers:hover {
    background: linear-gradient(135deg, #6366f1, #2563eb); color: #fff;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1100px) { .bd-course-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px) {
    .bd-course-grid { grid-template-columns: 1fr; }
    .bd-cp-stats { flex-direction: column; }
    .bd-cp-sort-form { width: 100%; }
    .bd-cp-select { flex: 1; }
    .bd-cp-result-count { margin-left: 0; }
}

/* ── Course card instructor line ─────────────────── */
.bd-cc-instructor {
    font-size: .78rem; color: #64748b;
    margin: 0 0 6px; display: flex; align-items: center; gap: 5px;
}
.bd-cc-instructor i { color: #6366f1; }
.bd-cc-paid-old { font-size: .78rem; color: #94a3b8; text-decoration: line-through; margin-left: 4px; }

/* ─────────────────────────────────────────────
   TAXONOMY CATEGORY HERO  (.bd-tax-hero)
   Used in taxonomy-course_category.php
   and woocommerce/taxonomy-product_cat.php
───────────────────────────────────────────── */
.bd-tax-hero {
    background: linear-gradient(135deg, #6366f1 0%, #2563eb 100%);
    border-radius: 22px;
    padding: 36px 40px;
    margin-bottom: 32px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(99,102,241,.28);
}
.bd-tax-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    pointer-events: none;
}
.bd-tax-hero::after {
    content: '';
    position: absolute;
    bottom: -80px; left: 20%;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    pointer-events: none;
}

.bd-tax-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    opacity: .85;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}
.bd-tax-breadcrumb a { color: #fff; text-decoration: none; font-weight: 600; }
.bd-tax-breadcrumb a:hover { text-decoration: underline; }
.bd-tax-breadcrumb i.fa-chevron-right { font-size: .65rem; opacity: .7; }

.bd-tax-hero-body {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    position: relative;
    z-index: 1;
}
.bd-tax-hero-icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}
.bd-tax-hero-text h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #fff;
    line-height: 1.25;
}
.bd-tax-hero-text p {
    font-size: .9rem;
    opacity: .88;
    margin: 0 0 14px;
    max-width: 600px;
    line-height: 1.6;
    color: #fff;
}
.bd-tax-hero-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.bd-tax-hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 600;
    background: rgba(255,255,255,.18);
    padding: 4px 12px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

/* Product cat hero: has thumbnail image */
.bd-pcat-hero { display: flex; align-items: center; gap: 28px; }
.bd-pcat-thumb {
    flex-shrink: 0;
    width: 120px; height: 120px;
    border-radius: 18px;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,.3);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.bd-pcat-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bd-pcat-hero .bd-tax-hero-body { flex: 1; }
.bd-pcat-hero .bd-tax-breadcrumb { margin-bottom: 14px; }

@media (max-width: 640px) {
    .bd-tax-hero { padding: 24px 20px; }
    .bd-tax-hero-text h1 { font-size: 1.4rem; }
    .bd-pcat-hero { flex-direction: column; }
    .bd-pcat-thumb { width: 80px; height: 80px; }
    .bd-tax-hero-body { flex-direction: column; gap: 12px; }
}

/* ── Dark mode ───────────────────────────────────── */
body.dark-mode .bd-tax-hero { box-shadow: 0 16px 48px rgba(0,0,0,.4); }
body.dark-mode .bd-cp-hero h1 { color: #f1f5f9; }
body.dark-mode .bd-course-card,
body.dark-mode .bd-cp-stats { background: #1e293b; border-color: #334155; }
body.dark-mode .bd-cc-title a { color: #e2e8f0; }
body.dark-mode .bd-cc-footer { border-color: #334155; }
body.dark-mode .bd-cp-stat { border-color: #334155; }
body.dark-mode .bd-cp-filter { background: #1e293b; color: #94a3b8; }
body.dark-mode .bd-cp-select { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.dark-mode .bd-cp-empty { background: #1e293b; border-color: #334155; }
body.dark-mode .bd-cp-empty h3 { color: #e2e8f0; }
