/* ============================================================
   CATEGORY PAGE TEMPLATE  — cat.css
   Used by all category index pages (electrical, wire, lighting,
   grades, math, datetime, paycheck)
   ============================================================ */

/* ── Reset app-container bg to white for cat pages ────────── */
.cat-page { background: #f8fafc; min-height: 100vh; font-family: 'Inter', sans-serif; }

/* ── White header override ────────────────────────────────── */
.cat-page .app-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e8ecf4 !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06) !important;
    position: sticky; top: 0; z-index: 999;
}
.cat-page .app-header .brand h1 { color: #1e293b !important; }
.cat-page .app-header .brand h1 span { color: #2563eb !important; }
.cat-page .app-header .logo-icon { background: #2563eb !important; color: #fff !important; }
.cat-page .app-header .nav-link { color: #374151 !important; }
.cat-page .app-header .nav-link:hover { color: #2563eb !important; }
.cat-page .app-header .nav-link.active { color: #2563eb !important; }
.cat-page .app-header .theme-toggle-btn { color: #374151 !important; }

/* ── Page-level wrapper ───────────────────────────────────── */
.cat-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.cat-breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: #64748b;
    padding: 14px 0 0;
}
.cat-breadcrumb a { color: #64748b; text-decoration: none; }
.cat-breadcrumb a:hover { color: #2563eb; }
.cat-breadcrumb .bc-sep { opacity: 0.5; }
.cat-breadcrumb .bc-cur { color: #2563eb; font-weight: 500; }

/* ── Two-column layout ────────────────────────────────────── */
.cat-body {
    display: grid;
    grid-template-columns: 178px 1fr;
    gap: 20px;
    align-items: start;
    padding-top: 14px;
}

/* ── LEFT SIDEBAR ─────────────────────────────────────────── */
.cat-sidebar {
    position: sticky;
    top: 80px;
}
.cat-sidebar-nav {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
}
.cat-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    font-size: 13px; font-weight: 500;
    color: #374151;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}
.cat-nav-item:hover { background: #f8fafc; color: #2563eb; }
.cat-nav-item.active {
    background: #eff6ff;
    color: #2563eb;
    border-left-color: #2563eb;
    font-weight: 600;
}
.cat-nav-icon {
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}

/* Sidebar CTA widget */
.cat-sidebar-widget {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
}
.cat-widget-img {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
    line-height: 1;
}
.cat-widget-title {
    font-size: 13.5px; font-weight: 800;
    color: #0f172a; margin-bottom: 6px; line-height: 1.3;
}
.cat-widget-desc {
    font-size: 11.5px; color: #64748b; line-height: 1.55;
}

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.cat-main { min-width: 0; }

/* Page header */
.cat-header {
    display: flex; align-items: flex-start; gap: 20px;
    background: var(--gu-surface, #ffffff); border: 1px solid var(--gu-border, #e5e7eb);
    border-radius: var(--gu-r-lg, 20px); padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: var(--gu-shadow-sm, 0 1px 3px rgba(0,0,0,.06));
    transition: var(--gu-ease, all .2s ease);
}
.cat-header:hover {
    box-shadow: var(--gu-shadow-md, 0 4px 16px rgba(0,0,0,.08));
}
.cat-header-icon {
    width: 56px; height: 56px; border-radius: var(--gu-r-md, 14px);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; flex-shrink: 0;
    background: var(--gu-primary-light, #eff6ff);
}
.cat-header-text h1 {
    font-size: 26px; font-weight: 800; color: var(--gu-heading, #111827);
    margin: 0 0 6px; letter-spacing: -0.02em;
}
.cat-header-text p { font-size: 15px; color: var(--gu-muted, #6b7280); margin: 0; line-height: 1.6; }

/* Feature badges row */
.cat-features {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 14px; margin-bottom: 24px;
}
.cat-feature {
    background: var(--gu-surface, #ffffff); border: 1px solid var(--gu-border, #e5e7eb); border-radius: var(--gu-r-md, 14px);
    padding: 16px; display: flex; align-items: flex-start; gap: 12px;
    box-shadow: var(--gu-shadow-sm, 0 1px 3px rgba(0,0,0,.06));
    transition: var(--gu-ease, all .2s ease);
}
.cat-feature:hover {
    box-shadow: var(--gu-shadow-md, 0 4px 16px rgba(0,0,0,.08));
    transform: translateY(-2px);
}
.cat-feature-icon {
    width: 40px; height: 40px; border-radius: var(--gu-r-sm, 10px);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
    background: var(--gu-primary-light, #eff6ff);
}
.cat-feature-text strong { display: block; font-size: 13.5px; font-weight: 700; color: var(--gu-heading, #111827); }
.cat-feature-text span  { font-size: 12px; color: var(--gu-muted, #6b7280); line-height: 1.45; }

/* Section heading with blue left bar */
.cat-section-title {
    font-size: 18px; font-weight: 800; color: var(--gu-heading, #111827);
    border-left: 4px solid #2563eb;
    padding-left: 14px; margin: 0 0 16px;
    letter-spacing: -0.01em;
}

/* Calculator cards grid */
.cat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.cat-card {
    background: var(--gu-surface, #ffffff); border: 1px solid var(--gu-border, #e5e7eb);
    border-radius: var(--gu-r-lg, 20px); padding: 22px 18px;
    text-decoration: none; text-align: center;
    transition: var(--gu-ease, all .2s ease); display: block;
    box-shadow: var(--gu-shadow-sm, 0 1px 3px rgba(0,0,0,.06));
}
.cat-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 10px 30px rgba(37,99,235,0.12);
    transform: translateY(-4px);
}
.cat-card-icon {
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin: 0 auto 12px;
    background: var(--gu-primary-light, #eff6ff);
}
.cat-card-name {
    font-size: 14px; font-weight: 700; color: var(--gu-heading, #111827);
    margin-bottom: 6px; line-height: 1.35;
}
.cat-card-desc {
    font-size: 12px; color: var(--gu-muted, #6b7280); line-height: 1.5;
    margin-bottom: 12px;
}
.cat-card-link {
    font-size: 13px; font-weight: 600; color: #2563eb;
    display: inline-flex; align-items: center; gap: 4px;
}

/* Section card wrapper (white card with border) */
.cat-section-card {
    background: var(--gu-surface, #ffffff); border: 1px solid var(--gu-border, #e5e7eb);
    border-radius: var(--gu-r-lg, 20px); padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--gu-shadow-sm, 0 1px 3px rgba(0,0,0,.06));
}

/* Why use section */
.cat-benefits {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 16px; margin-bottom: 20px;
}
.cat-benefit {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 18px; background: var(--gu-surface, #ffffff);
    border: 1px solid var(--gu-border, #e5e7eb); border-radius: var(--gu-r-md, 14px);
    box-shadow: var(--gu-shadow-sm, 0 1px 3px rgba(0,0,0,.06));
    transition: var(--gu-ease, all .2s ease);
}
.cat-benefit:hover {
    box-shadow: var(--gu-shadow-md, 0 4px 16px rgba(0,0,0,.08));
    transform: translateY(-2px);
}
.cat-benefit-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.cat-benefit-text strong { display: block; font-size: 13px; font-weight: 700; color: #0f172a; margin-bottom: 3px; }
.cat-benefit-text span   { font-size: 11.5px; color: #64748b; line-height: 1.5; }

/* Why use section heading */
.cat-why-title {
    font-size: 16px; font-weight: 800; color: #0f172a;
    margin: 0 0 16px;
}

/* Disclaimer */
.cat-disclaimer {
    display: flex; align-items: flex-start; gap: 10px;
    background: #eff6ff; border: 1px solid #bfdbfe;
    border-radius: 10px; padding: 12px 16px;
    font-size: 12px; color: #1e40af; margin-top: 8px;
}
.cat-disclaimer svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .cat-cards { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
    .cat-body { grid-template-columns: 1fr; }
    .cat-sidebar { position: static; display: none; }
    .cat-features { grid-template-columns: repeat(2, 1fr); }
    .cat-benefits { grid-template-columns: repeat(2, 1fr); }
    .cat-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
    .cat-cards { grid-template-columns: repeat(2, 1fr); }
    .cat-features { grid-template-columns: 1fr 1fr; }
    .cat-benefits { grid-template-columns: 1fr 1fr; }
}
