/**
 * PeopleNetWorth (PNW) - Political Explainers & Guides Stylesheet
 * High-readability editorial layout for in-depth civic education guides.
 *
 * @package PNW_Theme
 */

.guide-single-wrapper,
.guides-hub-wrapper {
    background: #f8fafc;
    min-height: 100vh;
    padding-bottom: 70px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #334155;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   1. HERO HEADER
   ========================================================================== */
.guide-hero {
    background-size: cover;
    background-position: center;
    position: relative;
    color: #ffffff;
    padding: 55px 0 70px 0;
}

.guide-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.88) 55%, rgba(15, 23, 42, 0.75) 100%);
    z-index: 1;
}

.guide-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.guide-breadcrumbs {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.guide-breadcrumbs a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s ease;
}

.guide-breadcrumbs a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.guide-breadcrumbs .sep {
    opacity: 0.5;
    font-size: 11px;
}

.guide-breadcrumbs .current {
    color: #ffffff;
    font-weight: 600;
}

.guide-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0284c7;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.guide-hero-title {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin: 0 0 16px 0;
}

.guide-hero-deck {
    font-size: 17px;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

.guide-meta-strip {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 12.5px;
    color: #94a3b8;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 18px;
}

.guide-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.guide-meta-item i {
    color: #38bdf8;
}

/* ==========================================================================
   2. ARTICLE LAYOUT (2 Columns)
   ========================================================================== */
.guide-layout-container {
    display: grid;
    grid-template-columns: 2.1fr 1fr;
    gap: 36px;
    margin-top: 40px;
    align-items: start;
}

.guide-main-col {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px 45px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.guide-lead-paragraph {
    font-size: 18px;
    line-height: 1.75;
    color: #1e293b;
    font-weight: 500;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.guide-article-body {
    font-size: 16px;
    line-height: 1.85;
    color: #334155;
    overflow-wrap: break-word;
    word-break: break-word;
}

.guide-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.guide-article-body pre,
.guide-article-body code {
    max-width: 100%;
    overflow-x: auto;
    word-break: break-word;
}

.guide-article-body p {
    margin: 0 0 20px 0;
}

.guide-article-body h2 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 40px 0 16px 0;
    line-height: 1.3;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    scroll-margin-top: 80px;
}

.guide-article-body h3 {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    margin: 28px 0 12px 0;
    line-height: 1.35;
    scroll-margin-top: 80px;
}

.guide-article-body ul, .guide-article-body ol {
    margin: 0 0 22px 0;
    padding-left: 24px;
}

.guide-article-body li {
    margin-bottom: 8px;
}

.guide-article-body strong {
    color: #0f172a;
}

/* ==========================================================================
   3. SPECIALIZED CONTENT COMPONENTS
   ========================================================================== */
/* Callout Box */
.guide-callout-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 26px 0;
}

.guide-callout-box.info {
    background: #f0f9ff;
    border-color: #bae6fd;
    border-left-color: #0284c7;
}

.guide-callout-box.amber {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #f59e0b;
}

.guide-callout-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-callout-box p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.65;
    color: #334155;
}

/* Comparison Table */
.guide-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 28px 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    max-width: 100%;
    position: relative;
}

.guide-table {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.guide-table th {
    background: #0f2e5a;
    color: #ffffff;
    font-weight: 700;
    padding: 13px 16px;
    border-bottom: 1px solid #cbd5e1;
}

.guide-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    line-height: 1.5;
}

.guide-table tr:last-child td {
    border-bottom: none;
}

.guide-table tr:nth-child(even) td {
    background: #f8fafc;
}

/* Visual Step / Roadmap Flow Cards */
.guide-step-grid {
    display: grid;
    gap: 16px;
    margin: 28px 0;
}

.guide-step-card {
    display: flex;
    gap: 18px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.guide-step-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.guide-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0284c7;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guide-step-content h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.guide-step-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}

/* FAQs */
.guide-faq-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 14px;
}

.guide-faq-card h4 {
    margin: 0 0 8px 0;
    font-size: 15.5px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-faq-card h4 i {
    color: #0284c7;
    font-size: 14px;
}

.guide-faq-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #475569;
}

/* ==========================================================================
   4. STICKY SIDEBAR
   ========================================================================== */
.guide-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 30px;
}

.guide-side-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.guide-side-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px 0;
    padding-left: 10px;
    border-left: 3.5px solid #0284c7;
    line-height: 1.25;
}

/* Table of Contents */
.guide-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13.5px;
}

.guide-toc-nav a {
    color: #475569;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.guide-toc-nav a:hover {
    color: #0284c7;
    background: #f0f9ff;
    padding-left: 14px;
}

/* Fast Facts List */
.guide-fast-facts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.guide-fast-facts-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.guide-fast-facts-list li:last-child {
    border-bottom: none;
}

.guide-fast-facts-list .ff-lbl {
    color: #64748b;
}

.guide-fast-facts-list .ff-val {
    color: #0f172a;
    font-weight: 700;
    text-align: right;
}

/* Other Guides Cross-Promotion */
.guide-other-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s ease;
}

.guide-other-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.guide-other-item:hover {
    opacity: 0.85;
}

.guide-other-thumb {
    width: 60px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.guide-other-item h5 {
    margin: 0 0 3px 0;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.guide-other-item:hover h5 {
    color: #0284c7;
}

.guide-other-item span {
    font-size: 11.5px;
    color: #0284c7;
    font-weight: 600;
}

/* ==========================================================================
   5. RESPONSIVENESS (EXPLAINERS & CORE GUIDE PAGES)
   ========================================================================== */
@media (max-width: 992px) {
    .guide-layout-container {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
        margin-top: 25px;
    }
    .guide-main-col {
        padding: 28px 24px;
    }
    .guide-sidebar-col {
        position: static;
        width: 100%;
    }
    .guide-hero-title {
        font-size: clamp(28px, 4.5vw, 36px);
    }
}

@media (max-width: 768px) {
    .guide-hero {
        padding: 38px 0 42px 0;
    }
    .guide-hero-title {
        font-size: clamp(24px, 5.5vw, 32px) !important;
        line-height: 1.25;
        margin-bottom: 12px;
    }
    .guide-hero-deck {
        font-size: 15px;
        line-height: 1.55;
        margin-bottom: 18px;
    }
    .guide-meta-strip {
        gap: 12px;
        font-size: 12px;
        padding-top: 14px;
    }
    .guide-breadcrumbs {
        font-size: 12px;
        gap: 6px;
        margin-bottom: 14px;
    }
    .guide-main-col {
        padding: 24px 18px !important;
        border-radius: 12px;
    }
    .guide-lead-paragraph {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 22px;
        padding-bottom: 16px;
    }
    .guide-article-body {
        font-size: 15px;
        line-height: 1.75;
    }
    .guide-article-body h2 {
        font-size: 20px;
        margin: 30px 0 14px 0;
        padding-bottom: 8px;
    }
    .guide-article-body h3 {
        font-size: 17px;
        margin: 22px 0 10px 0;
    }
    .guide-article-body ul, .guide-article-body ol {
        padding-left: 20px;
        font-size: 14.5px;
        margin-bottom: 18px;
    }
    .guide-callout-box {
        padding: 16px 16px;
        margin: 20px 0;
        border-radius: 8px;
    }
    .guide-callout-title {
        font-size: 14px;
    }
    .guide-callout-box p {
        font-size: 13.5px;
    }
    .guide-step-card {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    .guide-faq-card {
        padding: 15px 16px;
        border-radius: 8px;
    }
    .guide-faq-card h4 {
        font-size: 14.5px;
    }
    .guide-faq-card p {
        font-size: 13.5px;
    }
    .guide-side-box {
        padding: 20px 16px;
        border-radius: 12px;
    }
    .guide-fast-facts-list li {
        gap: 10px;
        font-size: 12.5px;
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
    .guide-hero {
        padding: 28px 0 32px 0;
    }
    .guide-hero-title {
        font-size: 22px !important;
        line-height: 1.25;
    }
    .guide-hero-deck {
        font-size: 13.5px;
        line-height: 1.55;
    }
    .guide-main-col {
        padding: 18px 14px !important;
        border-radius: 10px;
    }
    .guide-lead-paragraph {
        font-size: 15px;
        line-height: 1.65;
        margin-bottom: 18px;
        padding-bottom: 14px;
    }
    .guide-article-body h2 {
        font-size: 18px;
    }
    .guide-article-body h3 {
        font-size: 16px;
    }
    .guide-article-body p {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 16px;
    }
    .guide-table th, .guide-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* ==========================================================================
   6. GUIDES ARCHIVE / DIRECTORY HUB (/guides/) - ELEVATED DESIGN
   ========================================================================== */
.guides-hub-wrapper {
    background: #f8fafc;
    min-height: 100vh;
    padding-bottom: 90px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #334155;
}

/* --- Hero Section (Authoritative Dark Civic Theme with Image Overlay) --- */
.guides-hub-hero {
    background-color: #0b1329;
    background-image: linear-gradient(180deg, rgba(11, 19, 41, 0.90) 0%, rgba(15, 23, 42, 0.95) 65%, #0b1329 100%), url('../images/parliament-building.webp');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    color: #ffffff;
    padding: 70px 0 65px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.guides-hub-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(11, 19, 41, 0.2) 0%, rgba(11, 19, 41, 0.75) 100%);
    pointer-events: none;
}

.guides-hub-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 30%, #818cf8 70%, #0284c7 100%);
}

.guides-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 2;
}

.guides-hub-hero h1 {
    font-size: 42px;
    font-weight: 900;
    margin: 0 0 16px 0;
    letter-spacing: -0.03em;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
}

.guides-hero-highlight {
    color: #38bdf8;
    background: none;
    -webkit-text-fill-color: initial;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

.guides-hub-hero p {
    font-size: 16.5px;
    color: #cbd5e1;
    max-width: 740px;
    margin: 0 auto 32px auto;
    line-height: 1.65;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 2;
}

/* Hero Modern Stat Cards Grid */
.guides-hub-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 920px;
    margin: 0 auto 32px auto;
    position: relative;
    z-index: 2;
}

.guides-hub-stat-card {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.guides-hub-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(30, 41, 59, 0.9);
}

.guides-hub-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(2, 132, 199, 0.22);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.guides-hub-stat-info strong {
    display: block;
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.guides-hub-stat-info span {
    font-size: 11.5px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* Hero Quick Topic Chips */
.guides-hero-chips-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.guides-hero-chips-label {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.guides-hero-chip {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.guides-hero-chip:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

/* --- Container --- */
.guides-hub-container {
    max-width: 1280px;
    margin: 40px auto 0 auto;
    padding: 0 20px;
}

/* --- Curated Spotlight Banner (Top 3 Essential Guides) --- */
.guides-spotlight-section {
    margin-bottom: 45px;
}

.guides-spotlight-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.guides-spotlight-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guides-spotlight-header h2 i {
    color: #f59e0b;
}

.guides-spotlight-header span {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.guides-spotlight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.guides-spotlight-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.guides-spotlight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 28px -4px rgba(15, 23, 42, 0.09);
    border-color: #38bdf8;
}

.guides-spotlight-thumb-wrap {
    height: 180px;
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.guides-spotlight-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.guides-spotlight-card:hover .guides-spotlight-thumb {
    transform: scale(1.05);
}

.guides-spotlight-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.guides-spotlight-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.guides-spotlight-body h3 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 8px 0;
    transition: color 0.15s ease;
}

.guides-spotlight-card:hover .guides-spotlight-body h3 {
    color: #0284c7;
}

.guides-spotlight-body p {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 16px 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guides-spotlight-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}

.guides-spotlight-footer .btn-link {
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.15s ease;
}

.guides-spotlight-card:hover .guides-spotlight-footer .btn-link {
    gap: 8px;
}

/* --- Sticky Modern Filter Toolbar --- */
.guides-filter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid #e2e8f0;
    padding: 12px 18px;
    border-radius: 16px;
    box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.05);
    position: sticky;
    top: 12px;
    z-index: 40;
}

.guides-tab-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.guides-tab-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 7px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.guides-tab-btn i {
    font-size: 12px;
    opacity: 0.8;
}

.guides-tab-count {
    background: rgba(15, 23, 42, 0.08);
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    transition: all 0.15s ease;
}

.guides-tab-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}

.guides-tab-btn.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.guides-tab-btn.active .guides-tab-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.guides-search-wrap {
    position: relative;
    min-width: 280px;
}

.guides-search-wrap i.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
}

.guides-search-input {
    width: 100%;
    padding: 9px 36px 9px 38px;
    font-size: 13.5px;
    border: 1px solid #cbd5e1;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    background: #ffffff;
}

.guides-search-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.guides-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
    display: none;
    padding: 4px;
}

.guides-search-clear:hover {
    color: #0f172a;
}

/* Guides Visible Counter Row */
.guides-count-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    font-size: 13.5px;
    color: #64748b;
    font-weight: 500;
}

.guides-count-row strong {
    color: #0f172a;
    font-weight: 700;
}

/* --- 3-Column Modern Guides Grid --- */
.guides-hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.guides-hub-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px -1px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    position: relative;
}

.guides-hub-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px -4px rgba(15, 23, 42, 0.09);
    border-color: #cbd5e1;
}

.guides-hub-card-thumb-wrap {
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: hidden;
    position: relative;
    background: #0f172a;
}

.guides-hub-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.guides-hub-card:hover .guides-hub-card-thumb {
    transform: scale(1.05);
}

.guides-hub-card-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, 0.75) 100%);
    pointer-events: none;
}

/* Category Badges with Color Logic */
.guides-hub-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #0284c7;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

/* Color Coding by Category */
.guides-hub-card[data-category="parliament"] .guides-hub-card-badge {
    background: #1e40af; /* Blue */
}
.guides-hub-card[data-category="constitution"] .guides-hub-card-badge {
    background: #4338ca; /* Indigo */
}
.guides-hub-card[data-category="elections"] .guides-hub-card-badge {
    background: #d97706; /* Amber */
}
.guides-hub-card[data-category="transparency"] .guides-hub-card-badge {
    background: #0f766e; /* Teal */
}
.guides-hub-card[data-category="federalism"] .guides-hub-card-badge {
    background: #7e22ce; /* Purple */
}

/* Category-specific card hover border */
.guides-hub-card[data-category="parliament"]:hover {
    border-color: #3b82f6;
}
.guides-hub-card[data-category="constitution"]:hover {
    border-color: #6366f1;
}
.guides-hub-card[data-category="elections"]:hover {
    border-color: #f59e0b;
}
.guides-hub-card[data-category="transparency"]:hover {
    border-color: #14b8a6;
}
.guides-hub-card[data-category="federalism"]:hover {
    border-color: #a855f7;
}

/* Category-specific subtle thumbnail gradient tints */
.guides-hub-card[data-category="parliament"] .guides-hub-card-thumb-overlay {
    background: linear-gradient(180deg, rgba(30, 64, 175, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
}
.guides-hub-card[data-category="constitution"] .guides-hub-card-thumb-overlay {
    background: linear-gradient(180deg, rgba(67, 56, 202, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
}
.guides-hub-card[data-category="elections"] .guides-hub-card-thumb-overlay {
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
}
.guides-hub-card[data-category="transparency"] .guides-hub-card-thumb-overlay {
    background: linear-gradient(180deg, rgba(15, 118, 110, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
}
.guides-hub-card[data-category="federalism"] .guides-hub-card-thumb-overlay {
    background: linear-gradient(180deg, rgba(126, 34, 206, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
}

/* Read Time Badge on Top Right */
.guides-hub-card-time {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    color: #f1f5f9;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.guides-hub-card-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.guides-hub-card-body h3 {
    font-size: 17.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    transition: color 0.15s ease;
}

.guides-hub-card:hover .guides-hub-card-body h3 {
    color: #0284c7;
}

.guides-hub-card-body p {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 18px 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 62px;
}

.guides-hub-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}

.guides-hub-card-btn {
    color: #0284c7;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.15s ease;
}

.guides-hub-card:hover .guides-hub-card-btn {
    gap: 9px;
}

/* Related Editorial Posts Section */
.guides-related-posts-section {
    margin-top: 60px;
    padding-top: 45px;
    border-top: 2px solid #e2e8f0;
}

.guides-section-header {
    margin-bottom: 24px;
}

.guides-section-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guides-section-header h2 i {
    color: #0284c7;
}

.guides-section-header p {
    font-size: 14.5px;
    color: #64748b;
    margin: 0;
}

.guides-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.guides-post-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guides-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.guides-post-thumb-wrap {
    height: 160px;
    overflow: hidden;
    background: #0f172a;
    position: relative;
}

.guides-post-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.guides-post-card:hover .guides-post-thumb {
    transform: scale(1.04);
}

.guides-post-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.guides-post-cat {
    font-size: 11px;
    font-weight: 700;
    color: #0284c7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.guides-post-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin: 0 0 10px 0;
    transition: color 0.15s ease;
}

.guides-post-card:hover .guides-post-title {
    color: #0284c7;
}

.guides-post-excerpt {
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

.guides-post-meta {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

/* --- Upgraded Comprehensive Topic Index Matrix --- */
.guides-topic-index-section {
    margin-top: 60px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.04);
}

.guides-topic-index-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 28px;
}

.guides-index-col {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    border-top-width: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.guides-index-col.col-parliament { border-top-color: #1e40af; }
.guides-index-col.col-constitution { border-top-color: #4338ca; }
.guides-index-col.col-elections { border-top-color: #d97706; }
.guides-index-col.col-governance { border-top-color: #0f766e; }

.guides-index-col h4 {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.guides-index-col h4 i {
    font-size: 14px;
    opacity: 0.9;
}

.guides-index-col.col-parliament h4 i { color: #1e40af; }
.guides-index-col.col-constitution h4 i { color: #4338ca; }
.guides-index-col.col-elections h4 i { color: #d97706; }
.guides-index-col.col-governance h4 i { color: #0f766e; }

.guides-index-links {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.guides-index-links li {
    margin-bottom: 8px;
}

.guides-index-links a {
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease;
    display: block;
    line-height: 1.45;
    padding: 3px 0;
}

.guides-index-links a:hover {
    color: #0284c7;
    transform: translateX(3px);
}

/* --- Portal Cross-Linking Promotion --- */
.guides-portal-crosslink {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 36px;
    margin-top: 45px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.guides-portal-crosslink h3 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
}

.guides-portal-crosslink p {
    font-size: 14.5px;
    color: #64748b;
    max-width: 650px;
    margin: 0 auto 24px auto;
    line-height: 1.6;
}

.guides-portal-crosslink-btns {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.guides-portal-crosslink-btns .btn-primary {
    background: #0284c7;
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.guides-portal-crosslink-btns .btn-primary:hover {
    background: #0369a1;
}

.guides-portal-crosslink-btns .btn-secondary {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    font-size: 13.5px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid #cbd5e1;
    transition: background 0.15s ease;
}

.guides-portal-crosslink-btns .btn-secondary:hover {
    background: #e2e8f0;
}

/* Pillar Rankings Table Mobile Protection */
.pillar-ranking-wrapper .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 10px;
    margin-bottom: 20px;
}

.pillar-ranking-wrapper .data-table {
    min-width: 580px !important;
    width: 100% !important;
}

.pillar-ranking-wrapper .wealth-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
}

/* ==========================================================================
   7. RESPONSIVE MEDIA QUERIES (GUIDES HUB & ARCHIVE DIRECTORY)
   ========================================================================== */
@media (max-width: 1100px) {
    .guides-hub-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .guides-spotlight-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .guides-topic-index-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .guides-hub-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .guides-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .guides-hub-hero {
        padding: 45px 0 35px 0;
    }
    .guides-hub-hero h1 {
        font-size: clamp(26px, 6vw, 36px) !important;
        line-height: 1.25;
        margin-bottom: 12px;
    }
    .guides-hub-hero p {
        font-size: 14.5px;
        line-height: 1.6;
        margin-bottom: 24px;
    }
    .guides-hero-eyebrow {
        font-size: 11px;
        padding: 5px 12px;
        margin-bottom: 14px;
    }
    
    /* Sleek 2x2 stats grid instead of massive vertical stack */
    .guides-hub-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        margin-bottom: 24px;
    }
    .guides-hub-stat-card {
        padding: 10px 12px;
        gap: 10px;
        border-radius: 10px;
    }
    .guides-hub-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
        border-radius: 8px;
    }
    .guides-hub-stat-info strong {
        font-size: 16px;
    }
    .guides-hub-stat-info span {
        font-size: 10px;
    }

    /* Compact Hero Topic Chips */
    .guides-hero-chips-wrap {
        gap: 6px;
    }
    .guides-hero-chips-label {
        font-size: 12px;
    }
    .guides-hero-chip {
        font-size: 11px;
        padding: 4px 10px;
    }

    /* Spotlight Section */
    .guides-spotlight-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 16px;
    }
    .guides-spotlight-header h2 {
        font-size: 18px;
    }
    .guides-spotlight-header span {
        font-size: 12.5px;
    }
    .guides-spotlight-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    /* Guides Hub Grid */
    .guides-hub-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    .guides-hub-card-body h3 {
        min-height: auto;
        font-size: 16.5px;
    }
    .guides-hub-card-body p {
        min-height: auto;
        font-size: 13px;
        margin-bottom: 14px;
    }

    /* NON-STICKY MOBILE TOOLBAR (Prevents screen cover-up) & SWIPEABLE TAB LIST */
    .guides-filter-toolbar {
        position: relative !important;
        top: auto !important;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 14px;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    }
    .guides-tab-list {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 8px;
    }
    .guides-tab-list::-webkit-scrollbar {
        display: none;
    }
    .guides-tab-btn {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 12px;
        padding: 6px 12px;
    }
    .guides-tab-count {
        font-size: 10px;
        padding: 1px 5px;
    }
    .guides-search-wrap {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Count row wrap */
    .guides-count-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 12.5px;
        margin-bottom: 16px;
    }

    /* Related News & Articles Grid */
    .guides-posts-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    /* Topic Index Matrix */
    .guides-topic-index-section {
        padding: 22px 18px;
        border-radius: 14px;
        margin-top: 40px;
    }
    .guides-section-header h2 {
        font-size: 20px;
    }
    .guides-section-header p {
        font-size: 13.5px;
    }
    .guides-topic-index-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    .guides-index-col {
        padding: 18px 16px;
    }
    .guides-index-links li {
        margin-bottom: 6px;
    }

    /* Cross-linking box */
    .guides-portal-crosslink {
        padding: 24px 18px;
        margin-top: 30px;
        border-radius: 12px;
    }
    .guides-portal-crosslink h3 {
        font-size: 18px;
    }
    .guides-portal-crosslink-btns {
        flex-direction: column;
        gap: 10px;
    }
    .guides-portal-crosslink-btns a {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .guides-hub-container {
        padding: 0 12px;
        margin-top: 25px;
    }
    .guides-hub-hero {
        padding: 35px 0 28px 0;
    }
    .guides-hub-hero h1 {
        font-size: 24px !important;
    }
    .guides-hub-hero p {
        font-size: 13.5px;
    }
    .guides-spotlight-thumb-wrap {
        height: 150px;
    }
    .guides-spotlight-body {
        padding: 16px;
    }
    .guides-hub-card-body {
        padding: 16px;
    }
    .pillar-ranking-wrapper .wealth-stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Dynamic Pillar Rankings (Richest MLAs / MPs) Mobile-First Components
   ========================================================================== */
.pillar-search-filter-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.pillar-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.pillar-filter-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}
.pillar-filter-badge {
    font-size: 12px;
    color: #64748b;
}
.pillar-filter-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}
.pillar-search-input-wrap {
    flex: 1 1 auto;
    position: relative;
}
.pillar-search-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
.pillar-search-input-wrap input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px 10px 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.pillar-search-input-wrap input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.pillar-dropdown-row {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}
.pillar-select-col {
    position: relative;
}
.pillar-select-col select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #ffffff;
    color: #0f172a;
    min-width: 160px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.pillar-select-col select:focus {
    border-color: #2563eb;
}

/* Pillar Deep-Dive Cards Container */
.pillar-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.pillar-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pillar-card-inner {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.pillar-card-img {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
}
.pillar-card-body {
    flex: 1 1 auto;
    min-width: 0;
}
.pillar-card-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.pillar-rank-badge {
    font-size: 12px;
    font-weight: 800;
    color: #b45309;
    background: #fef3c7;
    padding: 3px 8px;
    border-radius: 4px;
}
.pillar-source-badge {
    font-size: 12px;
    color: #64748b;
}
.pillar-card-name {
    font-size: 20px;
    font-weight: 800;
    margin: 8px 0 4px 0;
    line-height: 1.3;
}
.pillar-card-name a {
    color: #0f172a;
    text-decoration: none;
}
.pillar-card-name a:hover {
    color: #2563eb;
}
.pillar-card-details {
    font-size: 13px;
    color: #475569;
    margin-bottom: 14px;
    line-height: 1.5;
}
.pillar-assets-microgrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    margin-bottom: 14px;
}
.micro-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
}
.micro-val {
    font-size: 14px;
    font-weight: 700;
    margin-top: 2px;
}
.micro-val.total-val {
    color: #16a34a;
    font-weight: 800;
    font-size: 15px;
}
.micro-val.net-val {
    color: #0284c7;
}
.micro-val.movable-val {
    color: #334155;
}
.micro-val.liab-val {
    color: #dc2626;
}
.pillar-card-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.btn-pillar-affidavit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0284c7;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.btn-pillar-affidavit:hover {
    background: #0369a1;
}
.btn-pillar-history {
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
}
.btn-pillar-history:hover {
    color: #0f172a;
    text-decoration: underline;
}

/* Mobile Optimizations for Pillar Rankings (<= 768px) */
@media (max-width: 768px) {
    .pillar-search-filter-box {
        padding: 14px;
        margin-bottom: 18px;
    }
    .pillar-filter-header {
        margin-bottom: 10px;
    }
    .pillar-filter-title {
        font-size: 14px;
    }
    .pillar-filter-badge {
        font-size: 11px;
    }
    .pillar-filter-controls {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    .pillar-search-input-wrap {
        width: 100%;
    }
    .pillar-search-input-wrap input {
        font-size: 13px;
        padding: 9px 12px 9px 36px;
    }
    .pillar-dropdown-row {
        width: 100%;
        gap: 8px;
    }
    .pillar-select-col {
        flex: 1 1 50%;
        min-width: 0;
    }
    .pillar-select-col select {
        min-width: 0;
        width: 100%;
        padding: 8px 10px;
        font-size: 12.5px;
    }
    
    /* Wealth Stats Grid Responsive */
    .pillar-ranking-wrapper .wealth-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        margin-bottom: 20px;
    }
    .pillar-ranking-wrapper .wealth-stats-grid > div {
        padding: 12px !important;
    }
    .pillar-ranking-wrapper .wealth-stats-grid > div:nth-child(3):last-child {
        grid-column: span 2;
    }
    
    /* Card Mobile Layout */
    .pillar-card-item {
        padding: 16px;
    }
    .pillar-card-inner {
        gap: 14px;
    }
    .pillar-card-img {
        width: 70px;
        height: 70px;
        border-radius: 8px;
    }
    .pillar-card-name {
        font-size: 17px;
    }
    .pillar-card-details {
        font-size: 12px;
        margin-bottom: 10px;
    }
    .pillar-assets-microgrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px;
    }
    .pillar-card-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .btn-pillar-affidavit {
        justify-content: center;
        text-align: center;
        padding: 10px 14px;
        width: 100%;
        box-sizing: border-box;
    }
    .btn-pillar-history {
        text-align: center;
        padding: 4px;
    }
}

