/* ══════════════════════════════════════════════════════════════
   Texas PFCG — Shared Design System
   ══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    background: #f8f9fb;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ── Top Navigation Bar ──────────────────────────────────────── */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 2rem;
}

.topbar-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.topbar .logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.02em;
}

.topbar .logo span { color: #7c3aed; }

.topbar nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-left: 2rem;
    transition: color 0.15s;
}

.topbar nav a:hover,
.topbar nav a.active { color: #7c3aed; }

/* ── Hero Banner ─────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b3d 100%);
    color: #fff;
    padding: 3rem 2rem;
}

.hero-inner {
    max-width: 1120px;
    margin: 0 auto;
}

.breadcrumb {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: rgba(255,255,255,0.55);
    transition: color 0.15s;
}

.breadcrumb a:hover { color: #fff; }

.breadcrumb .sep { margin: 0 0.5rem; }

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    max-width: 540px;
}

/* ── Page Layout ─────────────────────────────────────────────── */
.page-wrap {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    gap: 3rem;
    padding: 2.5rem 2rem 4rem;
}

.page-wrap.no-sidebar {
    display: block;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
    width: 220px;
    flex-shrink: 0;
}

.sidebar-section { margin-bottom: 1.75rem; }

.sidebar-section h4 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-section li { margin-bottom: 0.15rem; }

.sidebar-section li a {
    display: block;
    font-size: 0.875rem;
    font-weight: 450;
    color: #4b5563;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: all 0.15s;
}

.sidebar-section li a:hover {
    background: #f3f4f6;
    color: #1a1a2e;
}

.sidebar-section li a.active {
    background: #f5f3ff;
    color: #7c3aed;
    font-weight: 600;
}

/* ── Main Content ────────────────────────────────────────────── */
.main-content { flex: 1; min-width: 0; }

/* ── Content Body — wrapper for long-form / legacy content ──── */
.content-body {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2.5rem;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.75;
}

.content-body h2,
.content-body h3 {
    color: #1a1a2e;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.content-body > h2:first-child {
    text-align: center;
    margin-top: 0;
}

.content-body ol ol {
    list-style-type: lower-alpha;
}

.content-body a {
    color: #7c3aed;
    text-decoration: underline;
    text-decoration-color: rgba(124, 58, 237, 0.3);
    text-underline-offset: 2px;
}

.content-body a:hover {
    text-decoration-color: #7c3aed;
}

.content-body p {
    margin-bottom: 0.75em;
}

.content-body ul,
.content-body ol {
    margin-left: 1.5em;
    margin-bottom: 0.75em;
}

/* ── Overview Card ───────────────────────────────────────────── */
.overview-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.overview-card p {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.75;
}

.overview-card a {
    color: #7c3aed;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(124, 58, 237, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s;
}

.overview-card a:hover {
    text-decoration-color: #7c3aed;
}

/* ── Section Heading ─────────────────────────────────────────── */
.section-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

/* ── Cards Grid ──────────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: default;
}

.card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.card-icon svg { width: 20px; height: 20px; }

.card-icon.purple  { background: #f3e8ff; color: #7c3aed; }
.card-icon.red     { background: #fef2f2; color: #b91c1c; }
.card-icon.blue    { background: #eff6ff; color: #2563eb; }
.card-icon.amber   { background: #fffbeb; color: #d97706; }
.card-icon.green   { background: #ecfdf5; color: #059669; }
.card-icon.slate   { background: #f1f5f9; color: #475569; }

.card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
}

.card a { color: #7c3aed; font-weight: 500; }
.card a:hover { text-decoration: underline; }

/* ── CTA Banner ──────────────────────────────────────────────── */
.cta-banner {
    margin-top: 2rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b3d 100%);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.cta-banner p {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
}

.cta-banner .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: #1a1a2e;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    transition: background 0.15s, transform 0.1s;
}

.cta-banner .btn:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.cta-banner .btn svg { width: 16px; height: 16px; }

/* ── Home Hero (special variant for homepage) ────────────────── */
.hero-home {
    padding: 4rem 2rem 3.5rem;
    text-align: center;
}

.hero-home .hero-inner {
    max-width: 640px;
}

.hero-home h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.hero-home p {
    margin: 0 auto 2rem;
    max-width: 480px;
}

.hero-home .slogan {
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #a78bfa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-home .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #7c3aed;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    transition: background 0.15s, transform 0.1s;
}

.hero-home .btn-primary:hover {
    background: #6d28d9;
    transform: translateY(-1px);
}

.hero-home .btn-primary svg { width: 18px; height: 18px; }

/* ── 404 ─────────────────────────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page .error-code {
    font-size: 6rem;
    font-weight: 800;
    color: #e5e7eb;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
}

.error-page h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
}

.error-page p {
    color: #6b7280;
    margin-bottom: 2rem;
}

.error-page .btn-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #1a1a2e;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    transition: background 0.15s, transform 0.1s;
}

.error-page .btn-home:hover {
    background: #2d1b3d;
    transform: translateY(-1px);
}

.error-page .btn-home svg { width: 16px; height: 16px; }

/* ── Footer ──────────────────────────────────────────────────── */
.page-footer {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.page-footer-inner {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .page-wrap {
        flex-direction: column;
        gap: 2rem;
        padding: 1.5rem 1rem 3rem;
    }

    .sidebar { width: 100%; }

    .sidebar-section ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .sidebar-section li a {
        padding: 0.35rem 0.65rem;
        font-size: 0.8rem;
    }

    .cards-grid { grid-template-columns: 1fr; }

    .hero { padding: 2rem 1rem; }
    .hero h1 { font-size: 1.5rem; }
    .hero-home h1 { font-size: 1.75rem; }
    .hero-home { padding: 2.5rem 1rem 2rem; }

    .cta-banner {
        flex-direction: column;
        text-align: center;
    }

    .content-body { padding: 1.5rem; }

    .topbar-inner { height: auto; flex-wrap: wrap; padding: 0.75rem 0; gap: 0.5rem; }
    .topbar nav a { margin-left: 0; margin-right: 1.25rem; }
}
