/* info ============================================================
   CATEGORIES PAGE — matches index.php design system
   ============================================================ */
section { padding: 3.5rem 0; position: relative; }

/* ---------- SECTION HEADER VARIANTS (same as index) ---------- */
.head-center { text-align: center; margin-bottom: 2.5rem; }
.head-center .head-pill {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .35rem 1rem; border-radius: 50px;
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(168,85,247,.12));
    color: var(--primary);
    font-size: .72rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .1em;
    margin-bottom: .85rem;
}
.head-center h2 {
    font-weight: 800; font-size: 2.25rem;
    letter-spacing: -.02em; margin-bottom: .5rem;
    color: #0f172a; position: relative;
    display: inline-block; padding: 0 1.5rem;
}
.head-center h2::before,
.head-center h2::after {
    content: ''; position: absolute; top: 55%; transform: translateY(-50%);
    height: 2px; width: 45px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,.4));
}
.head-center h2::before { left: -40px; }
.head-center h2::after { right: -40px; transform: translateY(-50%) scaleX(-1); }
.head-center h2 .text-grad {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.head-center p { color: #64748b; font-size: 1rem; max-width: 560px; margin: 0 auto; }

/* ---------- SECTION BACKGROUNDS ---------- */
.bg-hero {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    color: #fff;
    padding: 3.5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.bg-hero::before {
    content: ''; position: absolute;
    top: -150px; right: -150px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,.12), transparent 65%);
    border-radius: 50%; pointer-events: none;
}
.bg-hero::after {
    content: ''; position: absolute;
    bottom: -180px; left: -180px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(168,85,247,.18), transparent 65%);
    border-radius: 50%; pointer-events: none;
}
.bg-hero .container { position: relative; z-index: 2; }

.bg-stats { background: transparent; margin-top: -3rem; padding: 0 0 2.5rem; position: relative; z-index: 5; }
.bg-grid { background: #ffffff; }
.bg-grid-alt {
    background:
        radial-gradient(circle at 20% 10%, rgba(99,102,241,.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(168,85,247,.05) 0%, transparent 40%),
        #f8fafc;
}
.bg-cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 4rem 0;
}

.bg-how {
    background-color: #fff;
    background-image:
        linear-gradient(rgba(15,23,42,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15,23,42,.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ---------- HERO ---------- */
.cat-hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #fff;
}
.cat-hero-title .accent {
    background: linear-gradient(135deg, #fbbf24, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cat-hero-lead {
    font-size: 1.1rem;
    color: rgba(255,255,255,.82);
    line-height: 1.6;
    margin-bottom: 1.75rem;
    font-weight: 300;
    max-width: 620px;
}
.cat-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,.1);
}
.cat-hero-stat { display: flex; align-items: center; gap: .65rem; }
.cat-hero-stat .icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    color: #a5b4fc;
}
.cat-hero-stat .val { font-size: 1.35rem; font-weight: 800; color: #fff; line-height: 1; }
.cat-hero-stat .lbl { font-size: .72rem; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-top: .15rem; }

/* ---------- STATS CARDS ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (max-width: 768px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.5rem 1.25rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 32px rgba(15,23,42,.08);
    transition: .3s;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0); transform-origin: left; transition: transform .4s;
}
.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(15,23,42,.14); }
.stat-card .icon {
    width: 52px; height: 52px;
    border-radius: 15px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff;
    margin-bottom: .85rem;
}
.stat-card .val { font-size: 2rem; font-weight: 800; color: #0f172a; letter-spacing: -.04em; line-height: 1; }
.stat-card .lbl { font-size: .75rem; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: .4rem; }

/* ---------- CATEGORY CARDS ---------- */
.cat-grid-card {
    background: #fff;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 10px rgba(15,23,42,.04);
    transition: .35s;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
}
.cat-grid-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(15,23,42,.12);
    border-color: rgba(99,102,241,.25);
    color: inherit;
}
.cat-grid-card .thumb {
    position: relative;
    height: 170px;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}
.cat-grid-card .thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.cat-grid-card:hover .thumb img { transform: scale(1.08); }
.cat-grid-card .thumb .placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 2.5rem;
    opacity: .95;
}
.cat-grid-card .thumb .featured-pill {
    position: absolute;
    top: 12px; left: 12px;
    padding: .3rem .75rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
    box-shadow: 0 4px 12px rgba(245,158,11,.4);
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}
.cat-grid-card .thumb .count-pill {
    position: absolute;
    bottom: 12px; right: 12px;
    padding: .35rem .85rem;
    border-radius: 50px;
    background: rgba(15,23,42,.85);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.cat-grid-card .body {
    padding: 1.15rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.cat-grid-card .body .cat-title {
    font-weight: 800;
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cat-grid-card .body .cat-desc {
    color: #64748b;
    font-size: .82rem;
    line-height: 1.5;
    margin-bottom: .85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.45rem;
}
.cat-grid-card .body .cat-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: .75rem;
    border-top: 1px solid #f1f5f9;
}
.cat-grid-card .body .cat-slug {
    font-family: 'SF Mono', monospace;
    font-size: .72rem;
    color: #94a3b8;
    padding: .2rem .55rem;
    border-radius: 6px;
    background: #f1f5f9;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cat-grid-card .body .browse-btn {
    padding: .35rem .9rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: .2s;
}
.cat-grid-card:hover .body .browse-btn { box-shadow: 0 6px 16px rgba(99,102,241,.4); }

/* Compact mini cards for the "Other categories" strip at the bottom */
.mini-cat {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: .25s;
    height: 100%;
}
.mini-cat:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15,23,42,.08);
    border-color: rgba(99,102,241,.25);
    color: inherit;
}
.mini-cat .dot {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.mini-cat .info { flex: 1; min-width: 0; }
.mini-cat .info .name {
    font-weight: 700;
    color: #0f172a;
    font-size: .88rem;
    margin-bottom: .1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-cat .info .name {
    font-weight: 700; color: #0f172a; font-size: .88rem;
    margin-bottom: .1rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block;
}
.mini-cat .info .count { font-size: .72rem; color: #94a3b8; font-weight: 600; }
.mini-cat .arrow { color: #cbd5e1; font-size: 1.1rem; }
.mini-cat:hover .arrow { color: var(--primary); }

/* ---------- EMPTY STATE ---------- */
.empty-state {
    text-align: center;
    padding: 5rem 1.5rem;
}
.empty-state .icon-wrap {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99,102,241,.1), rgba(168,85,247,.1));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
}
.empty-state h4 { font-weight: 800; color: #0f172a; font-size: 1.4rem; margin-bottom: .5rem; }
.empty-state p { color: #64748b; margin-bottom: 1.25rem; }

/* ---------- CTA ---------- */
.cta-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.cta-inner h2 {
    font-weight: 800; font-size: 2.5rem;
    letter-spacing: -.03em; color: #fff;
    margin-bottom: .75rem; line-height: 1.15;
}
.cta-inner p { font-size: 1.1rem; color: rgba(255,255,255,.9); margin-bottom: 2rem; }
.cta-inner .btn-white {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    background: #fff;
    color: var(--primary);
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: .25s;
    box-shadow: 0 15px 35px rgba(0,0,0,.22);
}
.cta-inner .btn-white:hover {
    color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(0,0,0,.3);
}
.cta-inner .btn-ghost-white {
    padding: 1rem 2rem;
    border-radius: 50px;
    background: rgba(255,255,255,.12);
    border: 1.5px solid rgba(255,255,255,.3);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: .2s;
    margin-left: .5rem;
}
.cta-inner .btn-ghost-white:hover { background: rgba(255,255,255,.22); color: #fff; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
    section { padding: 2.5rem 0; }
    .cat-hero-title { font-size: 2.25rem; }
    .head-center h2 { font-size: 1.75rem; padding: 0; }
    .head-center h2::before, .head-center h2::after { display: none; }
    .cta-inner h2 { font-size: 2rem; }
}
@media (max-width: 576px) {
    section { padding: 2rem 0; }
    .cat-hero-title { font-size: 1.85rem; }
    .cat-hero-lead { font-size: 1rem; }
    .head-center h2 { font-size: 1.4rem; }
    .cta-inner h2 { font-size: 1.55rem; }
    .stat-card .val { font-size: 1.5rem; }
    .stat-card { padding: 1.15rem .9rem; }
    .cta-inner .btn-ghost-white { margin-left: 0; margin-top: .5rem; }
}