/* Shared styles for Civic Vanguard department pages.
   Extracted from the home page (index.html) so all department pages
   stay visually identical to the main site. */

:root {
    --primary: #0072CE;
    --primary-dark: #005A9E;
    --accent: #00A896;
    --accent-light: #02C39A;
    --black: #1A1A1A;
    --surface: #F8FAFC;
    --text: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --forge: #7C3AED;
    --forge-light: #9B5DE5;
    --compass: #F77F00;
    --compass-light: #FF9F1C;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--surface);
    overflow-x: hidden;
}

.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    opacity: 0.4;
    background-image:
        linear-gradient(rgba(0, 114, 206, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 114, 206, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    height: 44px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s ease;
    padding: 0;
}

.hamburger-btn:hover {
    background: rgba(0, 114, 206, 0.08);
    color: var(--primary);
    border-color: var(--primary);
}

.hamburger-btn svg {
    width: 22px;
    height: 22px;
}

.menu-panel {
    position: fixed;
    top: 72px;
    right: 1rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    padding: 0.75rem;
    min-width: 240px;
    z-index: 101;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
}

.menu-panel a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.menu-panel a:hover {
    background: rgba(0, 114, 206, 0.08);
    color: var(--primary);
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 99;
    display: none;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 114, 206, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 114, 206, 0.4);
}

.btn-outline {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Department hero */
.dept-hero {
    padding: 10rem 2rem 5rem;
    background: linear-gradient(135deg, rgba(0, 114, 206, 0.03) 0%, transparent 50%);
}

.dept-hero-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hero-badge-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-badge-icon svg {
    width: 14px;
    height: 14px;
    color: white;
}

.dept-hero h1 {
    font-size: clamp(2.25rem, 4.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    color: var(--black);
}

.dept-hero h1 span {
    color: var(--primary);
}

.dept-hero-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 0 auto 2rem;
    max-width: 680px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.hero-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hero-note svg {
    color: var(--accent);
    width: 18px;
    height: 18px;
}

/* Section chrome */
.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--black);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 1rem auto 0;
    line-height: 1.7;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

/* Pain / reality section */
.pain {
    padding: 5rem 2rem;
    background: white;
}

.pain-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.pain h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 1.25rem;
    line-height: 1.25;
}

.pain p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 720px;
    margin: 0 auto 1rem;
}

.pain-highlight {
    display: flex;
    align-items: flex-start;
    text-align: left;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    margin: 2rem auto 0;
    max-width: 720px;
}

.pain-highlight svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.pain-highlight span {
    font-size: 1rem;
    color: var(--text);
    font-weight: 500;
}

/* Module use-case sections */
.modules {
    padding: 6rem 2rem;
    background: var(--surface);
}

.modules-container {
    max-width: 1200px;
    margin: 0 auto;
}

.module-block {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.module-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    opacity: 1;
}

.module-block.atlas::before { background: linear-gradient(90deg, var(--primary), var(--primary-dark)); }
.module-block.forge::before { background: linear-gradient(90deg, var(--forge), var(--forge-light)); }
.module-block.notify::before { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.module-block.compass::before { background: linear-gradient(90deg, var(--compass), var(--compass-light)); }

.module-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.module-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.module-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.module-icon.atlas { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.module-icon.forge { background: linear-gradient(135deg, var(--forge), var(--forge-light)); }
.module-icon.notify { background: linear-gradient(135deg, var(--accent), var(--accent-light)); }
.module-icon.compass { background: linear-gradient(135deg, var(--compass), var(--compass-light)); }

.module-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.module-head h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--black);
}

.module-head .module-kicker {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.module-lede {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.75rem;
    max-width: 860px;
}

.usecase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.usecase {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
}

.usecase h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.usecase p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.usecase .ask {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--primary);
    background: rgba(0, 114, 206, 0.06);
    border: 1px solid rgba(0, 114, 206, 0.15);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    margin-top: 0.85rem;
}

.platform-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.feature-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Outcomes strip */
.outcomes {
    padding: 5rem 2rem;
    background: white;
}

.outcomes-container {
    max-width: 1100px;
    margin: 0 auto;
}

.outcomes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.outcome-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.75rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.outcome-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.outcome-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.outcome-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Closing CTA */
.dept-cta {
    padding: 6rem 2rem;
    background: var(--surface);
}

.dept-cta-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
}

.dept-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 1rem;
    line-height: 1.25;
}

.dept-cta p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.dept-cta .hero-cta {
    margin-bottom: 0;
}

/* Other departments */
.more-depts {
    padding: 4rem 2rem 5rem;
    background: white;
}

.more-depts-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.more-depts h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 2rem;
}

.dept-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.dept-links a {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.6rem 1.2rem;
    transition: all 0.2s ease;
}

.dept-links a:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 114, 206, 0.15);
    transform: translateY(-2px);
}

.dept-links a.current {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    cursor: default;
    pointer-events: none;
}

/* Department index grid (departments/index.html) */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.dept-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.dept-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 114, 206, 0.3);
}

.dept-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
}

.dept-card-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.dept-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.4rem;
}

.dept-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.dept-card-cta {
    margin-top: auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Contact modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    height: 680px;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Footer */
footer {
    background: var(--black);
    color: white;
    padding: 3rem 2rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    background: white;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
}

.footer-brand-logo img {
    height: 32px;
    width: auto;
}

.footer-brand p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
    .usecase-grid {
        grid-template-columns: 1fr;
    }

    .outcomes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dept-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        height: 60px;
    }

    .logo img {
        height: 36px;
    }

    .nav-links {
        display: none;
    }

    .hamburger-btn {
        display: inline-flex;
    }

    .menu-panel {
        top: 60px;
    }

    .menu-panel.open {
        display: flex;
    }

    .menu-overlay.open {
        display: block;
    }

    .nav-cta {
        gap: 0.5rem;
    }

    .nav-cta .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .dept-hero {
        padding: 8rem 1.25rem 3.5rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .module-block {
        padding: 1.75rem;
    }

    .dept-grid {
        grid-template-columns: 1fr;
    }

    .footer-main {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .modal-container {
        max-width: 100%;
        max-height: 85vh;
        margin: 0.5rem;
    }

    .modal-body {
        height: 600px;
    }
}

@media (max-width: 480px) {
    .outcomes-grid {
        grid-template-columns: 1fr;
    }
}

/* Service color variants (match the home page platform icons) */
.module-icon.svc-orange { background: linear-gradient(135deg, #F77F00, #FF9F1C); }
.module-icon.svc-blue { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.module-icon.svc-purple { background: linear-gradient(135deg, #7C3AED, #9B5DE5); }
.module-icon.svc-green { background: linear-gradient(135deg, var(--accent), var(--accent-light)); }

.module-block.svc-orange::before { background: linear-gradient(90deg, #F77F00, #FF9F1C); }
.module-block.svc-blue::before { background: linear-gradient(90deg, var(--primary), var(--primary-dark)); }
.module-block.svc-purple::before { background: linear-gradient(90deg, #7C3AED, #9B5DE5); }
.module-block.svc-green::before { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }

/* CivQuest platform callout */
.callout {
    padding: 5rem 2rem;
    background: white;
}

.callout-container {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem 2.5rem;
}

.callout h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 1rem;
}

.callout p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

/* Hero visual — the animated map from the home page hero */
.dept-hero-container.has-visual {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
    text-align: left;
}

.dept-hero-container.has-visual .dept-hero-description {
    margin-left: 0;
}

.dept-hero-container.has-visual .hero-cta {
    justify-content: flex-start;
}

.dept-hero-visual {
    position: relative;
    width: 100%;
    height: 420px;
}

.dept-hero-visual iframe {
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
    display: block;
}

@media (max-width: 968px) {
    .dept-hero-container.has-visual {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .dept-hero-container.has-visual .dept-hero-description {
        margin-left: auto;
    }

    .dept-hero-container.has-visual .hero-cta {
        justify-content: center;
    }

    .dept-hero-visual {
        height: 300px;
    }
}
