/* ═══════════════════════════════════════════════════
   listing-cards.css — Redesigned card system
   Prefix: lc- (listing-card)
   ═══════════════════════════════════════════════════ */

/* ── Reveal ───────────────────────────────────────── */
.lc-card.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.lc-card.reveal.visible,
.lc-card.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ── Grid ─────────────────────────────────────────── */
.lc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .lc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .lc-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Card ─────────────────────────────────────────── */
.lc-card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #E5E7EB);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.lc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

[data-theme="dark"] .lc-card {
    background: var(--bg-card, #1F2937);
    border-color: var(--border, #374151);
}

[data-theme="dark"] .lc-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ── Image ────────────────────────────────────────── */
.lc-card-img-link {
    position: relative;
    display: block;
    text-decoration: none;
}

.lc-card-img {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--bg-surface, #F3F4F6);
}

[data-theme="dark"] .lc-card-img {
    background: var(--bg-surface, #111827);
}

.lc-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lc-card:hover .lc-card-img img {
    transform: scale(1.04);
}

.lc-card-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-muted, #9CA3AF);
}

/* ── Badges ───────────────────────────────────────── */
.lc-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 2;
    pointer-events: none;
}

.lc-diff-beginner {
    background: #DCFCE7;
    color: #166534;
}

.lc-diff-intermediate {
    background: #FEF9C3;
    color: #854D0E;
}

.lc-diff-advanced {
    background: #FEE2E2;
    color: #991B1B;
}

[data-theme="dark"] .lc-diff-beginner {
    background: rgba(22, 101, 52, 0.3);
    color: #86EFAC;
}

[data-theme="dark"] .lc-diff-intermediate {
    background: rgba(133, 77, 14, 0.3);
    color: #FDE047;
}

[data-theme="dark"] .lc-diff-advanced {
    background: rgba(153, 27, 27, 0.3);
    color: #FCA5A5;
}

.lc-badge-version {
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    backdrop-filter: blur(4px);
}

/* ── Body ─────────────────────────────────────────── */
.lc-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

/* ── Tag ──────────────────────────────────────────── */
.lc-tag {
    display: inline-block;
    width: fit-content;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary, #2563EB);
    background: var(--bg-surface, #EFF6FF);
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

[data-theme="dark"] .lc-tag {
    background: rgba(37, 99, 235, 0.15);
    color: #93C5FD;
}

/* ── Title ────────────────────────────────────────── */
.lc-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lc-card-title a {
    color: var(--text-primary, #111827);
    text-decoration: none;
}

.lc-card-title a:hover {
    color: var(--primary, #2563EB);
}

/* ── Description ──────────────────────────────────── */
.lc-card-desc {
    font-size: 13px;
    color: var(--text-muted, #6B7280);
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Tech Pills ───────────────────────────────────── */
.lc-tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.lc-pill {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--bg-surface, #F3F4F6);
    color: var(--text-secondary, #4B5563);
    border: 1px solid var(--border, #E5E7EB);
}

[data-theme="dark"] .lc-pill {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border, #374151);
    color: var(--text-muted, #9CA3AF);
}

/* ── Author ───────────────────────────────────────── */
.lc-card-meta {
    display: flex;
    align-items: center;
    margin-top: auto;
    padding-top: 4px;
}

.lc-meta-author {
    display: flex;
    align-items: center;
    gap: 7px;
}

.lc-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.lc-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    background: var(--primary, #2563EB);
    color: #fff;
}

.lc-author-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #4B5563);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Stats row ────────────────────────────────────── */
.lc-card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px solid var(--border, #F3F4F6);
}

[data-theme="dark"] .lc-card-stats {
    border-color: var(--border, #374151);
}

.lc-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted, #6B7280);
    white-space: nowrap;
}

.lc-stat svg {
    flex-shrink: 0;
    color: var(--text-muted, #9CA3AF);
}

/* ── Stars ─────────────────────────────────────────── */
.lc-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.lc-stars svg {
    flex-shrink: 0;
}

.lc-stars-count {
    margin-left: 3px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted, #9CA3AF);
}

[data-theme="dark"] .lc-stars svg {
    --star-empty: #4B5563;
}

/* ── Footer ───────────────────────────────────────── */
.lc-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    gap: 8px;
}

.lc-date {
    font-size: 11.5px;
    color: var(--text-muted, #9CA3AF);
}

.lc-btn-view {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--font-primary, 'Inter', sans-serif);
    color: #fff;
    background: var(--primary, #2563EB);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.15s;
    white-space: nowrap;
}

.lc-btn-view:hover {
    background: var(--primary-hover, #1D4ED8);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.lc-card-actions {
    display: flex;
    gap: 4px;
}

.lc-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid var(--border, #E5E7EB);
    background: var(--bg-surface, #F9FAFB);
    color: var(--text-muted, #6B7280);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    padding: 0;
}

.lc-action-btn:hover {
    border-color: var(--primary, #2563EB);
    color: var(--primary, #2563EB);
    background: var(--bg-card, #fff);
}

[data-theme="dark"] .lc-action-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border, #374151);
}

/* ── Section Header ───────────────────────────────── */
.lc-section {
    padding: 48px 0;
}

.lc-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.lc-section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary, #111827);
    margin: 0;
}

.lc-section-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary, #2563EB);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}

.lc-section-link:hover {
    opacity: 0.8;
}

/* ── Filter bar ───────────────────────────────────── */
.lc-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.lc-filter-select {
    appearance: none;
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-primary, 'Inter', sans-serif);
    color: var(--text-primary, #111827);
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #E5E7EB);
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.lc-filter-select:focus {
    border-color: var(--primary, #2563EB);
}

[data-theme="dark"] .lc-filter-select {
    background-color: var(--bg-card, #1F2937);
    border-color: var(--border, #374151);
    color: var(--text-primary, #F9FAFB);
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.lc-filter-count {
    font-size: 13px;
    color: var(--text-muted, #6B7280);
    margin-left: auto;
}

/* ── Pagination ───────────────────────────────────── */
.lc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
}

.lc-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border, #E5E7EB);
    background: var(--bg-card, #fff);
    color: var(--text-secondary, #4B5563);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-primary, 'Inter', sans-serif);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.lc-page-btn:hover {
    border-color: var(--primary, #2563EB);
    color: var(--primary, #2563EB);
}

.lc-page-btn.active {
    background: var(--primary, #2563EB);
    border-color: var(--primary, #2563EB);
    color: #fff;
}

[data-theme="dark"] .lc-page-btn {
    background: var(--bg-card, #1F2937);
    border-color: var(--border, #374151);
}

/* ── Page Hero ────────────────────────────────────── */
.lc-page-hero {
    padding: 48px 0 0;
    text-align: center;
}

.lc-page-hero h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary, #111827);
    margin: 0 0 8px;
}

.lc-page-hero p {
    font-size: 15px;
    color: var(--text-muted, #6B7280);
    margin: 0;
}

/* ── Empty state ──────────────────────────────────── */
.lc-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #9CA3AF);
}

.lc-empty svg {
    margin-bottom: 12px;
    opacity: 0.5;
}

.lc-empty p {
    font-size: 14px;
    margin: 0;
}