/* ==========================================================
   Course Info Catalog — Premium Card Style
   Theme: MB2NL DreamCom
   ========================================================== */

/* Subtitle */
.ci-catalog-subtitle {
    font-size: 1rem;
    color: #6c6a6e;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 640px;
}

/* Grid */
.ci-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
    margin-top: 0.5rem;
}

/* ── Card ────────────────────────────────────────────────── */
.ci-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 30, 98, 0.06);
    transition: transform 0.25s cubic-bezier(.4,0,.2,1),
                box-shadow 0.25s cubic-bezier(.4,0,.2,1);
    text-decoration: none !important;
    color: inherit !important;
}

.ci-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 30, 98, 0.13);
    text-decoration: none !important;
    color: inherit !important;
}

/* ── Image area ──────────────────────────────────────────── */
.ci-card-visual {
    position: relative;
    overflow: hidden;
}

.ci-card-img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(.4,0,.2,1);
}

.ci-card:hover .ci-card-img {
    transform: scale(1.04);
}

.ci-card-img--empty {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #e8ecf2 0%, #d1d9e6 100%);
}

/* Overlay badges */
.ci-card-badges {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.ci-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 2rem;
    line-height: 1.4;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ci-badge--cat {
    background: rgba(0, 30, 98, 0.82);
    color: #fff;
}

.ci-badge--free {
    background: rgba(0, 200, 151, 0.88);
    color: #fff;
}

/* ── Body ────────────────────────────────────────────────── */
.ci-card-body {
    flex: 1;
    padding: 1rem 1.1rem 0.6rem;
}

.ci-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: #242027;
    margin: 0 0 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Meta pills ──────────────────────────────────────────── */
.ci-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.ci-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 500;
    border-radius: 2rem;
    background: #f0f2f5;
    color: #403D42;
    white-space: nowrap;
}

.ci-pill i {
    font-size: 0.75rem;
    opacity: 0.65;
}

.ci-pill--ecm {
    background: rgba(184, 0, 28, 0.08);
    color: #b8001c;
    font-weight: 600;
}

.ci-pill--ecm i {
    opacity: 0.85;
}

/* ── Detail rows ─────────────────────────────────────────── */
.ci-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ci-detail {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #6c6a6e;
    line-height: 1.45;
}

.ci-detail i {
    flex-shrink: 0;
    width: 0.9rem;
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.55;
}

/* ── Footer / CTA ────────────────────────────────────────── */
.ci-card-footer {
    padding: 0.7rem 1.1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

.ci-card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #b8001c;
    transition: gap 0.2s;
}

.ci-card:hover .ci-card-cta {
    gap: 0.55rem;
}

.ci-card-cta i {
    font-size: 0.85rem;
    transition: transform 0.2s;
}

.ci-card:hover .ci-card-cta i {
    transform: translateX(2px);
}

/* ── View page ───────────────────────────────────────────── */
.ci-view-content {
    margin-bottom: 2rem;
    line-height: 1.7;
}

.ci-view-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.ci-attachments {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.ci-attachment-list {
    list-style: none;
    padding: 0;
}

.ci-attachment-list li {
    padding: 0.4rem 0;
}

.ci-attachment-list li a::before {
    content: "\1F4CE";
    margin-right: 0.3rem;
}

.ci-back {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* ── Auth gate (not logged in) ───────────────────────────── */
.ci-auth-gate {
    text-align: center;
    padding: 3rem 1.5rem;
    margin: 2rem auto;
    max-width: 480px;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 20px rgba(0, 30, 98, 0.08);
}

.ci-auth-gate-icon {
    font-size: 2.5rem;
    color: #b8001c;
    margin-bottom: 1rem;
}

.ci-auth-gate h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #242027;
    margin: 0 0 0.6rem;
}

.ci-auth-gate p {
    font-size: 0.92rem;
    color: #6c6a6e;
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

.ci-auth-gate-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ci-auth-gate-buttons .btn {
    min-width: 140px;
    border-radius: 0.6rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 576px) {
    .ci-grid {
        grid-template-columns: 1fr;
    }

    .ci-search-wrap {
        flex-direction: column;
        max-width: 100%;
    }
}
