/* ==========================================
   Vora Civi — PA Institutional Overrides
   Loaded AFTER bundle-landing.css to override
   Gen-Z palette with institutional colors
   ========================================== */

:root {
    /* Institutional Palette — overrides bundle defaults */
    --navy: #1a365d;
    --navy-light: #2a4a7f;
    --navy-dark: #0f2341;
    --civic-gold: #b8940a;
    --civic-gold-light: #d4ab1a;
    --slate-blue: #334e7e;
    --trust-green: #16a34a;

    /* Override legacy color tokens */
    --sage: #1a365d;
    --sage-light: #2a4a7f;
    --sage-dark: #0f2341;
    --clay: #334e7e;
    --sand: #8896a8;
    --amber: #b8940a;

    /* Override semantic tokens */
    --primary: var(--navy);
    --primary-hover: var(--navy-dark);
    --primary-light: var(--navy-light);
    --secondary: var(--slate-blue);
    --accent: var(--civic-gold);

    /* Focus ring */
    --ring-color: rgba(26, 54, 93, 0.5);
}

/* ------------------------------------------
   Trust Bar — Minimal institutional strip
   ------------------------------------------ */
.trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 8px 24px;
    background: #1a365d;
    font-family: var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 72px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.trust-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.trust-bar-icon {
    display: none;
}

.trust-bar-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.trust-bar-separator {
    display: none;
}

@media (max-width: 768px) {
    .trust-bar {
        gap: 16px;
        padding: 7px 16px;
        font-size: 10px;
    }
}

@media (max-width: 560px) {
    .trust-bar {
        gap: 12px;
        font-size: 9px;
        letter-spacing: 0.03em;
    }
}

/* ------------------------------------------
   KPI Cards — Political metrics component
   ------------------------------------------ */
.kpi-strip {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px;
}

.kpi-strip-title {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 24px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.kpi-card {
    padding: 28px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    transition: border-color 0.15s ease;
}

.kpi-card:hover {
    border-color: #1a365d;
}

.kpi-value {
    font-size: 42px;
    font-weight: 800;
    color: #1a365d;
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}

.kpi-label {
    font-size: 14px;
    font-weight: 600;
    color: #0f2341;
    margin-bottom: 4px;
}

.kpi-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* Comparison list: make items flex so metric sits on the right */
.comparison-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.comparison-list .comparison-text {
    flex: 1;
}

/* Metric badge: right-aligned, monospace-ish, subtle */
.metric-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    white-space: nowrap;
    opacity: 0.7;
}

.metric-badge-red {
    color: #b91c1c;
}

.metric-badge-green {
    color: #15803d;
}

/* KPI badge on use-case landing cards */
.uc-kpi-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #1a365d;
    background: rgba(26, 54, 93, 0.06);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

@media (max-width: 640px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .kpi-value {
        font-size: 32px;
    }
    .kpi-strip {
        padding: 32px 16px;
    }
}

/* ------------------------------------------
   Legal Pages — Override legal.css conflicts
   ------------------------------------------ */

/* Legal.css defines .btn/.btn-primary with wrong colors.
   These ensure the header buttons match the rest of the site. */
.header .btn-primary {
    background: var(--navy, #1a365d) !important;
    color: #fff !important;
}
.header .btn-primary:hover {
    background: var(--navy-dark, #0f2341) !important;
}
.header .btn-ghost {
    color: var(--charcoal, #1a1a1a) !important;
    background: transparent !important;
}

/* Legal hub card icons: white icon on navy background */
.legal-card-icon {
    background: var(--navy, #1a365d) !important;
}
.legal-card-icon svg {
    color: #ffffff !important;
}

/* Legal card hover uses navy */
.legal-card:hover {
    border-color: var(--navy, #1a365d) !important;
}

/* Legal page needs top margin for fixed header + trust bar */
.legal-container {
    margin-top: 40px;
}

/* ------------------------------------------
   FOUC Prevention — i18n loading state
   ------------------------------------------ */
body.i18n-loading {
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* ------------------------------------------
   Language Selector
   ------------------------------------------ */
.lang-selector {
    position: relative;
    display: inline-flex;
    margin-right: 8px;
}

.lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: 13px;
    font-weight: 500;
    color: var(--charcoal, #1a1a1a);
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
}

.lang-trigger:hover {
    border-color: rgba(0, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.03);
}

.lang-flag {
    font-size: 14px;
    line-height: 1;
}

.lang-code {
    letter-spacing: 0.02em;
}

.lang-arrow {
    opacity: 0.5;
    transition: transform 0.15s ease;
}

.lang-dropdown-open + .lang-dropdown,
.lang-dropdown.lang-dropdown-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 4px;
    min-width: 100px;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s ease;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 6px;
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: background 0.1s ease;
    text-align: left;
}

.lang-option:hover {
    background: #f0f4f8;
}

.lang-option-active {
    background: #f0f4f8;
    color: #1a365d;
    font-weight: 600;
}

@media (max-width: 768px) {
    .lang-selector {
        margin-right: 4px;
    }
    .lang-trigger {
        padding: 5px 8px;
        font-size: 12px;
    }
    .lang-code {
        display: none;
    }
}
