/* ============================================================
   POST CARD COMPONENT — cards.css
   YouTube-style vertical cards with 3 switchable variants.
   ============================================================ */

/* ── Card Grid ───────────────────────────────────────────────── */
.bcm-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    align-items: start;
}

/* ── Base Card ───────────────────────────────────────────────── */
.bcm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--bcm-radius-card);
    background: var(--bcm-surface, #fff);
    /* overflow:hidden clips children to rounded rect.
       box-shadow on .bcm-card itself is an outer decoration — NOT clipped by own overflow. */
    overflow: hidden;
    transition:
        box-shadow  var(--bcm-transition),
        transform   var(--bcm-transition),
        filter      var(--bcm-transition);
    cursor: pointer;
}

/* Glow on hover + Bulb-Click push on active */
.bcm-card:hover {
    /* Spec: 8px electric-blue glow on hover */
    filter: drop-shadow(0 0 8px var(--bcm-primary-glow));
    transform: translateY(-2px);
}

.bcm-card:active {
    transform: scale(1.05) translateY(0);
}

/* ── Variant: Shadow Only (default) ──────────────────────────── */
.bcm-card--shadow {
    box-shadow: var(--bcm-shadow);
    border: none;
}

/* ── Variant: Bordered ───────────────────────────────────────── */
.bcm-card--bordered {
    box-shadow: var(--bcm-shadow);
    border: 2px solid var(--bcm-border, #c0c0c0);
}

/* ── Variant: Minimalist ─────────────────────────────────────── */
.bcm-card--minimalist {
    box-shadow: none;
    border: 1px solid var(--bcm-border, #e0e0e0);
    border-radius: 12px;
}

.bcm-card--minimalist:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* ── Image Slider Container ─────────────────────────────────── */
.bcm-card__slider {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--bcm-radius-card) var(--bcm-radius-card) 0 0;
    background: #e0e0e0;
}

.bcm-card__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
}

/* Single slide (no JS slider) always visible */
.bcm-card__slider:not([data-slides]) .bcm-card__slide {
    opacity: 1;
}

.bcm-card__slide.is-active { opacity: 1; }

/* Link wrapper that fills the entire slide area */
.bcm-card__slide-link {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;   /* removes inline-block gap under img */
}

.bcm-card__slide img,
.bcm-card__slide-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* no-image placeholder as a block link */
a.bcm-card__no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    text-decoration: none;
    color: inherit;
}

/* Slider arrows */
.bcm-slider-prev,
.bcm-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    box-shadow: 3px 3px 0px var(--bcm-shadow-color);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter var(--bcm-transition), transform var(--bcm-transition);
    opacity: 0;
    pointer-events: none;
}

.bcm-card:hover .bcm-slider-prev,
.bcm-card:hover .bcm-slider-next {
    opacity: 1;
    pointer-events: auto;
}

.bcm-slider-prev { left: 8px; }
.bcm-slider-next { right: 8px; }

.bcm-slider-prev:hover,
.bcm-slider-next:hover {
    filter: drop-shadow(0 0 6px var(--bcm-primary-glow));
    transform: translateY(-50%) scale(1.1);
}

/* Slide counter dots */
.bcm-slider-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 10;
}

.bcm-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.3);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.bcm-slider-dot.is-active {
    background: #fff;
    transform: scale(1.3);
}

/* ── Card Body ───────────────────────────────────────────────── */
.bcm-card__body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* ── Title row: Access Badge + Title ─────────────────────────── */
.bcm-card__title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

/* Access Badge */
.bcm-access-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 40px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 2px 2px 0px var(--bcm-shadow-color);
    margin-top: 3px;
}

.bcm-badge--free {
    background: #00c853;
    color: #fff;
}

.bcm-badge--premium {
    /* Spec: Premium = #FFD700 Gold */
    background: var(--bcm-premium, #FFD700);
    color: var(--bcm-premium-text, #7a5c00);
    border: 1px solid #b8960a;
}

/* Post title */
.bcm-card__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--bcm-text);
    flex: 1;
    margin: 0;
}

.bcm-card__title a {
    color: inherit;
    text-decoration: none;
}

.bcm-card__title a:hover {
    color: var(--bcm-primary);
    text-decoration: none;
}

/* ── Meta Info Row ───────────────────────────────────────────── */
.bcm-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Category Pill */
.bcm-category-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 40px;
    background: var(--bcm-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition: filter var(--bcm-transition);
    box-shadow: 2px 2px 0px var(--bcm-shadow-color);
}

.bcm-category-pill:hover {
    filter: brightness(1.15);
    text-decoration: none;
}

/* Star Rating */
.bcm-rating {
    display: flex;
    gap: 2px;
    font-size: 0.9rem;
    line-height: 1;
}

.bcm-star--full  { color: #ffc107; }
.bcm-star--half  { color: #ffc107; opacity: .55; }
.bcm-star--empty { color: #ddd; }
.bcm-rating-count { font-size: 0.75rem; color: #94a3b8; margin-left: 3px; align-self: center; }

/* Price */
.bcm-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--bcm-primary);
    background: var(--bcm-surface, #fff);
    border: 2px solid var(--bcm-primary);
    border-radius: 40px;
    padding: 2px 10px;
    box-shadow: 2px 2px 0px var(--bcm-shadow-color);
}
.bcm-price--free {
    color: #10b981;
    border-color: #10b981;
}

/* Feature Badge */
.bcm-feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 2px 2px 0px var(--bcm-shadow-color);
}

.bcm-feature-badge--new {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.bcm-feature-badge--hot {
    background: #fff3e0;
    color: #bf360c;
    border: 1px solid #ffcc02;
}

/* ── Excerpt ─────────────────────────────────────────────────── */
.bcm-card__excerpt {
    font-size: 0.82rem;
    color: var(--bcm-text-muted, #555);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* ── Card Footer: Read more link ─────────────────────────────── */
.bcm-card__footer {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--bcm-text-muted);
}

.bcm-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 40px;
    background: var(--bcm-metal-bg);
    box-shadow: 3px 3px 0px var(--bcm-shadow-color);
    color: var(--bcm-text);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: filter var(--bcm-transition), transform var(--bcm-transition);
}

.bcm-card__read-more:hover {
    filter: drop-shadow(0 0 var(--bcm-glow-intensity) var(--bcm-primary-glow));
    text-decoration: none;
}

.bcm-card__read-more:active { transform: scale(1.05); }

/* ── Single-image (no slider) — ensure image fills the slot ──── */
.bcm-card__slider:not([data-slides]) {
    aspect-ratio: 16 / 10;
}

.bcm-card__slider:not([data-slides]) .bcm-card__slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── No-image placeholder ────────────────────────────────────── */
.bcm-card__no-image {
    aspect-ratio: 16 / 10;
    background: var(--bcm-metal-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--bcm-text-muted);
    border-radius: var(--bcm-radius-card) var(--bcm-radius-card) 0 0;
}

/* ── Pagination ──────────────────────────────────────────────── */
.bcm-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.bcm-pagination .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.bcm-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 40px;
    background: var(--bcm-metal-bg);
    box-shadow: var(--bcm-shadow);
    color: var(--bcm-text);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: filter var(--bcm-transition), transform var(--bcm-transition);
}

.bcm-pagination .page-numbers.current,
.bcm-pagination .page-numbers:hover {
    background: var(--bcm-primary);
    color: #fff;
    filter: drop-shadow(0 0 6px var(--bcm-primary-glow));
}

.bcm-pagination .page-numbers:active { transform: scale(1.05); }

/* ══════════════════════════════════════════════════════════════
   COURSE CARD  — bcm-course-card specific extensions
   (.bcm-card base styles still apply)
══════════════════════════════════════════════════════════════ */

/* Tag pills row above title */
.bcm-course-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 7px;
}

/* Coloured tag chip (matches CC tag pill colours) */
.bcm-course-tag-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* Short description under title */
.bcm-course-card__desc {
    margin: 4px 0 8px;
    font-size: 0.82rem;
    color: var(--bcm-text-muted, #64748b);
    line-height: 1.5;
}

/* Student count chip */
.bcm-course-card__students {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--bcm-text-muted, #64748b);
    font-weight: 500;
}

/* Free / Premium badge already exists via .bcm-access-badge */
