/* ===== Category Page & Tools Page CSS ===== */

.cat-loading { padding: 4rem; text-align: center; color: #999; }

/* ── Category Hero ──────────────────────────── */
.cat-hero {
    background: #fff;
    padding: 2.5rem 0 2rem;
    margin-bottom: 0;
    border-bottom: 1px solid #e5e7eb;
}
.cat-hero-inner { max-width: 680px; }
.cat-hero-badge {
    display: inline-block;
    color: white; font-size: 11px; font-weight: 800;
    padding: 4px 12px; border-radius: 4px;
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-bottom: 1rem;
}
.cat-hero-title {
    font-size: 2.2rem; font-weight: 900;
    color: #111827; line-height: 1.2;
    letter-spacing: -0.5px; margin-bottom: 0.75rem;
}
.cat-hero-desc {
    font-size: 1rem; color: #6b7280;
    line-height: 1.6; margin-bottom: 0.5rem;
}
.cat-hero-meta { font-size: 13px; color: #9ca3af; }

/* ── Main content ───────────────────────────── */
.cat-main-content { padding: 2rem 0 3rem; }

/* ── Featured article ───────────────────────── */
.cat-featured-wrap { margin-bottom: 1.5rem; }
.cat-featured {
    display: flex; gap: 2rem; align-items: flex-start;
    text-decoration: none; color: inherit;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}
.cat-featured:hover .cat-featured-body h2 { color: #c41230; }
.cat-featured-img {
    width: 55%; flex-shrink: 0;
    position: relative; overflow: hidden;
    border-radius: 6px;
}
.cat-featured-img img {
    width: 100%; height: 320px; object-fit: cover;
    display: block; transition: transform 0.35s;
}
.cat-featured:hover .cat-featured-img img { transform: scale(1.03); }
.cat-featured-body { flex: 1; padding-top: 0.5rem; }
.cat-featured-body h2 {
    font-size: 1.6rem; font-weight: 800;
    color: #111827; line-height: 1.25;
    letter-spacing: -0.3px; margin-bottom: 0.75rem;
    transition: color 0.2s;
}
.cat-featured-body p {
    font-size: 0.95rem; color: #6b7280;
    line-height: 1.65; margin-bottom: 1rem;
    display: -webkit-box; -webkit-line-clamp: 4;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Ad strip ───────────────────────────────── */
.ri-ad-strip {
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 0; margin: 1.5rem 0;
}
.ri-ad-strip-inner { display: flex; align-items: center; gap: 16px; }
.ri-ad-strip-label {
    font-size: 10px; font-weight: 700; color: #9ca3af;
    text-transform: uppercase; letter-spacing: 0.8px;
    white-space: nowrap; flex-shrink: 0;
}
.ri-ad-strip-items { display: flex; gap: 12px; flex: 1; }
.ri-ad-strip-item { flex: 1; min-width: 0; }
.ri-ad-strip-item a { display: block; border-radius: 5px; overflow: hidden; }
.ri-ad-strip-item img { width: 100%; height: 70px; object-fit: cover; display: block; transition: opacity 0.2s; }
.ri-ad-strip-item a:hover img { opacity: 0.88; }

/* ── Articles grid ──────────────────────────── */
.cat-grid { margin-top: 0.5rem; }
.cat-grid-card {
    display: block; text-decoration: none; color: inherit;
    height: 100%;
}
.cat-grid-img {
    overflow: hidden; border-radius: 6px; margin-bottom: 0.75rem;
}
.cat-grid-img img {
    width: 100%; height: 190px; object-fit: cover;
    display: block; transition: transform 0.35s;
}
.cat-grid-card:hover .cat-grid-img img { transform: scale(1.05); }
.cat-grid-body { padding-bottom: 1rem; }
.cat-grid-tag {
    font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.6px;
    display: block; margin-bottom: 5px;
}
.cat-grid-body h5 {
    font-size: 14px; font-weight: 700; color: #111827;
    line-height: 1.4; margin-bottom: 6px;
}
.cat-grid-card:hover .cat-grid-body h5 { color: #c41230; }
.cat-grid-body p {
    font-size: 12px; color: #6b7280; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 6px;
}

/* ── Empty state ────────────────────────────── */
.cat-empty {
    text-align: center; padding: 4rem 0;
    color: #9ca3af;
}
.cat-empty p { margin: 1rem 0; font-size: 15px; }

/* ══════════════════════════════════════════════
   TOOLS PAGE
══════════════════════════════════════════════ */
.tool-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}
.tool-card:hover:not(.tool-soon) {
    box-shadow: 0 8px 28px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}
.tool-soon { opacity: 0.75; }

.tool-icon {
    display: flex; align-items: center; justify-content: center;
    height: 90px;
}

.tool-body { padding: 1.25rem 1.25rem 0.75rem; flex: 1; }

.tool-badge {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    padding: 3px 10px; border-radius: 50px;
    margin-bottom: 0.75rem;
}

.tool-body h3 {
    font-size: 16px; font-weight: 800;
    color: #111827; margin-bottom: 0.5rem;
}

.tool-body p {
    font-size: 13px; color: #6b7280;
    line-height: 1.6; margin-bottom: 0.75rem;
}

.tool-features {
    list-style: none; padding: 0; margin: 0;
    font-size: 12px; color: #374151;
}
.tool-features li { padding: 3px 0; }

.tool-footer {
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid #f3f4f6;
}

.tool-btn {
    display: block; text-align: center;
    color: white; text-decoration: none;
    border-radius: 7px; padding: 10px 16px;
    font-size: 14px; font-weight: 600;
    transition: opacity 0.2s;
}
.tool-btn:hover { opacity: 0.88; color: white; }

.tool-btn-disabled {
    display: block; text-align: center;
    background: #f3f4f6; color: #9ca3af;
    border-radius: 7px; padding: 10px 16px;
    font-size: 13px; font-weight: 500;
    cursor: not-allowed;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
    .cat-featured { flex-direction: column; }
    .cat-featured-img { width: 100%; }
    .cat-featured-img img { height: 220px; }
    .cat-featured-body h2 { font-size: 1.2rem; }
    .cat-hero-title { font-size: 1.6rem; }
    .ri-ad-strip-items { flex-wrap: wrap; }
}
