/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1f2937;
    --secondary-color: #3b82f6;
    --accent-color: #10b981;
    --text-color: #374151;
    --light-bg: #f9fafb;
    --border-color: #e5e7eb;
    --white: #ffffff;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

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

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-menu a {
    color: var(--white);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.85rem;
    }
}

/* Header */
.hero,
.hero-small {
    background: linear-gradient(135deg, var(--primary-color) 0%, #374151 100%);
    color: var(--white);
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.hero-small {
    padding: 2rem 0;
}

.hero h1,
.hero-small h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
}

.breadcrumb {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 1rem;
}

.breadcrumb a {
    color: var(--white);
}

@media (max-width: 768px) {
    .hero h1,
    .hero-small h1 {
        font-size: 1.8rem;
    }

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

/* Main Content */
main {
    min-height: 60vh;
}

.content {
    padding: 2rem 0;
}

.section-content {
    flex: 1;
    padding-right: 2rem;
}

.content .container {
    display: flex;
    gap: 2rem;
}

h2 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin: 1.5rem 0 0.75rem 0;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* Sidebar */
.sidebar {
    flex: 0 0 300px;
}

.sidebar-widget {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.75rem;
}

.quick-facts,
.related-links {
    list-style: none;
}

.quick-facts li,
.related-links li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.quick-facts li:last-child,
.related-links li:last-child {
    border-bottom: none;
}

.related-links a {
    display: block;
    padding: 0.5rem 0;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.related-links a:hover {
    color: var(--accent-color);
}

/* CTA Section */
.cta-section {
    background-color: var(--light-bg);
    border-left: 4px solid var(--secondary-color);
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 4px;
}

.cta-section h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Featured Content */
.featured-content {
    background-color: var(--light-bg);
    padding: 3rem 0;
    margin-top: 3rem;
}

.featured-content h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.card h3 a {
    color: var(--primary-color);
}

.card h3 a:hover {
    color: var(--secondary-color);
}

.card p {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.card-link {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: var(--accent-color);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    font-size: 0.95rem;
}

.footer a {
    color: var(--white);
    text-decoration: underline;
}

.footer a:hover {
    color: var(--accent-color);
}

.footer p {
    margin-bottom: 0.5rem;
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 768px) {
    .content .container {
        flex-direction: column;
    }

    .section-content {
        padding-right: 0;
    }

    .sidebar {
        flex: 1;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.1rem;
    }

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

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th,
td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--light-bg);
    font-weight: 600;
    color: var(--primary-color);
}

/* Lists */
ul,
ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Code */
code {
    background-color: var(--light-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

pre {
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-color);
    font-style: italic;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .sidebar,
    .featured-content,
    .footer {
        display: none;
    }

    body {
        font-size: 12pt;
    }

    a {
        color: var(--primary-color);
        text-decoration: underline;
    }
}
