/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a8a;
    --primary-dark: #1e293b;
    --secondary-color: #b8860b;
    --accent-color: #d97706;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-pattern: #f1f5f9;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #dc2626;
    --justice-blue: #1e3a8a;
    --justice-gold: #b8860b;
    --justice-navy: #0f172a;
    --footer-bg: #1f2937;
    --footer-text: #d1d5db;
    --footer-text-dim: #9ca3af;
    --footer-border: #374151;
    --nav-text: rgba(255, 255, 255, 0.9);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #d4a017;
    --accent-color: #fb923c;
    --text-dark: #e5e7eb;
    --text-light: #9ca3af;
    --bg-light: #1f2937;
    --bg-white: #111827;
    --bg-pattern: #0f172a;
    --border-color: #374151;
    --success-color: #34d399;
    --warning-color: #ef4444;
    --justice-blue: #3b82f6;
    --justice-gold: #d4a017;
    --justice-navy: #1e293b;
    --footer-bg: #0f172a;
    --footer-text: #d1d5db;
    --footer-text-dim: #9ca3af;
    --footer-border: #374151;
    --nav-text: rgba(255, 255, 255, 0.9);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Dark mode toggle button */
.theme-toggle {
    background: none;
    border: 2px solid currentColor;
    color: var(--nav-text);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.theme-icon {
    font-size: 1.25rem;
}

/* Skip to main content link (accessibility) */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 4px 0;
}

.skip-to-main:focus {
    left: 0;
    top: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-pattern);
    background-image:
        linear-gradient(90deg, rgba(30, 58, 138, 0.02) 1px, transparent 1px),
        linear-gradient(rgba(30, 58, 138, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--justice-navy) 0%, var(--primary-color) 100%);
    border-bottom: 3px solid var(--justice-gold);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--justice-gold);
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.brand-subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--nav-text);
    font-weight: 400;
    margin-top: -4px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--bg-white);
    margin: 3px 0;
    transition: 0.3s;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--justice-gold);
    border-bottom-color: var(--justice-gold);
}

.nav-menu .btn-primary {
    color: var(--justice-navy);
    background-color: var(--justice-gold);
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    border-bottom: none !important;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
    min-width: 120px;
    text-align: center;
}

.nav-menu .btn-primary:hover {
    background-color: var(--secondary-color);
    color: var(--justice-navy);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--justice-navy) 0%, var(--primary-color) 50%, var(--justice-blue) 100%);
    color: var(--bg-white);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(45deg, rgba(184, 134, 11, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(184, 134, 11, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(184, 134, 11, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(184, 134, 11, 0.05) 75%);
    background-size: 60px 60px;
    background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
    opacity: 0.3;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--bg-white);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--bg-white);
    border: 2px solid var(--bg-white);
}

.btn-secondary:hover {
    background-color: var(--bg-white);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-dark);
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.bg-primary .section-title {
    color: var(--bg-white);
}

.text-white {
    color: var(--bg-white);
}

/* Content Boxes */
.content-box {
    max-width: 900px;
    margin: 0 auto;
}

.lead {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.emphasis {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.bg-primary .emphasis {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: var(--bg-white);
}

/* Important Notice */
.important-notice {
    background-color: rgba(245, 158, 11, 0.1);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.important-notice h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.important-notice p {
    color: var(--text-dark);
    margin: 0;
}

/* Lists */
.check-list,
.large-list {
    list-style: none;
    margin: 1.5rem 0;
}

.check-list li,
.large-list li {
    padding: 0.75rem 0 0.75rem 2rem;
    position: relative;
}

.check-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.25rem;
}

.large-list li:before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
}

/* Mission Grid */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.mission-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.mission-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.mission-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.mission-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Link Cards */
.link-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.link-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
    position: relative;
    display: block;
}

.link-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.link-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.link-card p {
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

.link-arrow {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.link-card:hover .link-arrow {
    transform: translateX(5px);
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: var(--bg-white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--bg-white);
}

.footer-bottom {
    border-top: 1px solid var(--footer-border);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--footer-text-dim);
}

/* Page-specific styles */
.page-header {
    background: linear-gradient(135deg, var(--justice-navy) 0%, var(--primary-color) 50%, var(--justice-blue) 100%);
    color: var(--bg-white);
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(45deg, rgba(184, 134, 11, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(184, 134, 11, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(184, 134, 11, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(184, 134, 11, 0.05) 75%);
    background-size: 60px 60px;
    background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
    opacity: 0.3;
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Info Boxes */
.info-box {
    background-color: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.warning-box {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--warning-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.success-box {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--success-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

/* Resource Cards */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.resource-card {
    background-color: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
}

.resource-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.resource-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.resource-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.resource-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.resource-card a:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-submit:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Accordion */
.accordion {
    margin: 2rem 0;
}

.accordion-item {
    background-color: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 1.25rem;
    background-color: var(--bg-white);
    border: none;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.accordion-header:hover {
    background-color: var(--bg-light);
}

.accordion-icon {
    font-size: 1.5rem;
    color: var(--text-dark);
    transition: transform 0.3s;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content-inner {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.accordion-item.active .accordion-content {
    max-height: 2000px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 700px;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 0.75rem 1rem;
        color: var(--text-dark) !important;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu a:hover {
        background-color: var(--bg-light);
        color: var(--primary-color) !important;
    }

    .nav-menu .btn-primary {
        color: var(--justice-navy) !important;
        background-color: var(--justice-gold);
        margin-top: 0.5rem;
        border: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

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

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   PRINT STYLES - Force light mode for printing
   ============================================ */
@media print {
    /* Override dark mode variables for printing */
    :root,
    [data-theme="dark"] {
        --primary-color: #1e3a8a;
        --secondary-color: #b8860b;
        --text-dark: #1f2937;
        --text-light: #6b7280;
        --bg-light: #ffffff;
        --bg-white: #ffffff;
        --bg-pattern: #ffffff;
        --border-color: #e2e8f0;
        --footer-bg: #ffffff;
        --footer-text: #1f2937;
        --footer-text-dim: #6b7280;
    }

    /* Force light backgrounds and dark text */
    body {
        background: white !important;
        color: black !important;
    }

    /* Hide navigation, footer, and non-essential elements */
    header,
    footer,
    .theme-toggle,
    .nav-toggle,
    .btn-primary,
    .hero-buttons {
        display: none !important;
    }

    /* Ensure all text is readable */
    * {
        color: black !important;
        background: white !important;
    }

    /* Keep borders visible but light */
    .accordion-item,
    .resource-card,
    .content-box {
        border: 1px solid #ccc !important;
    }

    /* Remove shadows for cleaner printing */
    * {
        box-shadow: none !important;
    }

    /* Optimize page breaks */
    .accordion-item,
    .resource-card {
        page-break-inside: avoid;
    }

    h2, h3 {
        page-break-after: avoid;
    }
}
