/* assets/css/banners.css — Home banner-card styles (copied from index.php) + main-category cards.
   Shared by category.php and templates.php. */
    /* ---------------- HOME CATEGORY BANNERS ---------------- */
    .home-categories {
        max-width: 1200px;
        margin: 0 auto;
        padding: 4px 20px 6px;
    }
    .home-cat-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .home-cat-card {
        display: flex;
        flex-direction: column;
        border-radius: 0;
        overflow: hidden;
        background: var(--glass-bg);
        border: 2px solid var(--border);
        transition: transform 0.2s ease, border-color 0.2s ease;
    }
    .home-cat-card:hover { transform: translateY(-2px); }
    /* Border color codes the content type — same color wraps image + text
       as one joined box, so Prompt vs Template vs App is recognisable at
       a glance without reading the badge text. */
    .home-cat-card.type-prompt   { border-color: #3b82f6; }
    .home-cat-card.type-template { border-color: #a78bfa; }
    .home-cat-card.type-app      { border-color: #10b981; }
    .home-cat-card.type-ai_video { border-color: #f97316; }
    .home-cat-card.type-ai_story { border-color: #06b6d4; }
    .home-cat-card.type-new      { border-color: var(--border); }
    .home-cat-banner {
        width: 100%;
        flex-shrink: 0;
        aspect-ratio: 16/9;
        background: var(--bg-tertiary, #10112a);
        overflow: hidden;
        position: relative;
    }
    .home-cat-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .home-cat-fallback {
        width: 100%; height: 100%;
        display: flex; align-items: center; justify-content: center;
        font-size: 22px; opacity: 0.5;
    }
    .home-cat-body { padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
    .home-cat-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
    .home-cat-desc {
        font-size: 12px;
        color: var(--text-secondary);
        line-height: 1.4;
        margin-bottom: 6px;
        white-space: pre-wrap;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .home-cat-tags { display: flex; flex-wrap: wrap; gap: 4px; }
    .home-cat-tag {
        font-size: 10px;
        padding: 2px 7px;
        border-radius: 999px;
        background: var(--menu-bg, rgba(255,255,255,0.06));
        border: 1px solid var(--border);
        color: var(--text-secondary);
        white-space: nowrap;
    }

    /* ---------------- TYPE BADGE (over banner image, top-left) ----------------
       Same color family as the card border above, so the badge and the
       border always agree — Prompt = blue, Template = purple, App = green. */
    .type-badge {
        position: absolute;
        top: 8px;
        left: 8px;
        z-index: 2;
        font-size: 11px;
        font-weight: 700;
        padding: 4px 11px;
        border-radius: 999px;
        letter-spacing: 0.3px;
        color: #fff;
        border: 1px solid rgba(255,255,255,0.35);
        backdrop-filter: blur(4px);
    }
    .type-badge.type-prompt   { background: rgba(59,130,246,0.9); }
    .type-badge.type-template { background: rgba(167,139,250,0.9); }
    .type-badge.type-app      { background: rgba(16,185,129,0.9); }
    .type-badge.type-ai_video { background: rgba(249,115,22,0.9); }
    .type-badge.type-ai_story { background: rgba(6,182,212,0.9); }
    .type-badge.type-new      { background: rgba(16,18,31,0.75); }
    [data-theme="light"] .type-badge.type-new {
        background: rgba(255,255,255,0.9);
        color: #10121f;
        border: 1px solid rgba(0,0,0,0.15);
    }

/* section title (same as Home) */
.section-title { font-size: clamp(18px, 3vw, 22px); font-weight: 800; margin-bottom: 16px; letter-spacing: -0.3px; }

/* Compact page heading for Categories / Templates banner pages */
.bp-head { max-width: 1200px; margin: 0 auto; padding: 14px 20px 4px; }
.bp-head h1 { font-size: clamp(20px, 4vw, 26px); font-weight: 800; letter-spacing: -0.5px; margin: 6px 0 0; }
.bp-crumb { font-size: 12.5px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 6px; }
.bp-crumb a { color: var(--text-secondary); }
.bp-crumb a:hover { color: var(--accent-blue, #60a5fa); }
.bp-empty { text-align: center; padding: 50px 20px; color: var(--text-secondary); }

/* Banner cards: one column on phones (like Home), grid on wider screens */
@media (min-width: 640px)  { .home-cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px)  { .home-cat-grid { grid-template-columns: repeat(3, 1fr); } }
.home-categories { padding-bottom: 28px; }

/* ---- Main category cards (Categories landing) ---- */
.mc-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .mc-grid { grid-template-columns: repeat(2, 1fr); } }
.mc-card {
    position: relative; display: flex; align-items: center; gap: 16px; overflow: hidden;
    padding: 22px 20px; border-radius: 18px; color: #fff;
    background: linear-gradient(135deg, var(--mc-a, #3b82f6), var(--mc-b, #8b5cf6));
    box-shadow: 0 10px 26px rgba(0,0,0,0.22);
    transition: transform .2s ease, box-shadow .2s ease;
}
.mc-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(0,0,0,0.3); }
.mc-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,0.14); }
.mc-icon { font-size: 40px; line-height: 1; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.mc-text { min-width: 0; position: relative; z-index: 1; }
.mc-title { font-size: clamp(20px, 4.6vw, 26px); font-weight: 800; letter-spacing: -0.5px; line-height: 1.15; text-shadow: 0 1px 3px rgba(0,0,0,.25); }
.mc-sub { font-size: 13px; opacity: .92; margin-top: 4px; }
.mc-go { margin-left: auto; font-size: 22px; font-weight: 700; position: relative; z-index: 1; }
.mc-card.mc-prompt   { --mc-a: #2563eb; --mc-b: #7c3aed; }
.mc-card.mc-ai_video { --mc-a: #e11d48; --mc-b: #f97316; }
.mc-card.mc-ai_story { --mc-a: #0891b2; --mc-b: #06b6d4; }
.mc-card.mc-template { --mc-a: #7c3aed; --mc-b: #db2777; }
.mc-card.mc-more     { --mc-a: #059669; --mc-b: #0ea5e9; }
