:root {
    --bg: #F6F4EF;
    --surface: #FFFFFF;
    --text: #1B1F24;
    --muted: #616B75;
    --border: #E6E1D8;
    --accent: #0F5B3E;
    --accent2: #1E3A5F;
    --highlight: #B08D57;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

/* ===== TYPOGRAPHY ===== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--border);
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.25rem;
}

h5, h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

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

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

a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== LAYOUT ===== */

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

.layout-2col {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

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

.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ===== HEADER ===== */

.header {
    background-color: var(--surface);
    border-bottom: 2px solid var(--border);
    padding: 2rem 0;
    margin-bottom: 0;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--accent);
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-text {
    color: var(--text);
}

.tagline {
    color: var(--muted);
    font-size: 0.95rem;
    font-style: italic;
    margin: 0;
}

/* ===== NAVIGATION ===== */

.nav {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 2rem;
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

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

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--accent);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

/* ===== BREADCRUMBS ===== */

.breadcrumbs {
    background-color: transparent;
    padding: 1rem 0;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.5rem;
}

.breadcrumbs-list li::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--muted);
}

.breadcrumbs-list li:last-child::after {
    content: '';
}

.breadcrumbs-list a {
    color: var(--accent);
}

/* ===== HERO ===== */

.hero {
    background-color: var(--surface);
    border-bottom: 3px solid var(--border);
    padding: 4rem 0;
    margin-bottom: 3rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ===== DISCLAIMER ===== */

.disclaimer {
    background-color: #FFF8F0;
    border-left: 4px solid var(--highlight);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

.disclaimer p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text);
}

/* ===== BUTTONS & LINKS ===== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--accent2);
    color: white;
}

.btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

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

.btn-secondary:hover {
    background-color: var(--accent);
    color: white;
}

/* ===== CARDS & SECTIONS ===== */

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

.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--border);
}

/* ===== POST CARDS ===== */

.post-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.post-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--bg);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 1.5rem;
}

.post-category {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.post-card-title {
    margin: 0.75rem 0 0.5rem 0;
}

.post-card-title a {
    color: var(--text);
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--accent);
}

.post-card-excerpt {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-card-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.post-divider {
    margin: 0 0.5rem;
}

.post-card-link {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

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

/* ===== SIDEBAR ===== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-section {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--highlight);
    color: var(--text);
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    margin-bottom: 0.75rem;
}

.sidebar-list a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.sidebar-list a:hover {
    color: var(--accent2);
    text-decoration: underline;
}

.sidebar-definitions {
    display: grid;
    gap: 1rem;
}

.sidebar-definitions dt {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.95rem;
}

.sidebar-definitions dd {
    margin-left: 0;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.sidebar-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* ===== TABLE OF CONTENTS ===== */

.toc {
    background-color: #F9F8F6;
    border-left: 4px solid var(--highlight);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.toc-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.toc-list {
    list-style: decimal-leading-zero inside;
    padding-left: 1rem;
}

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-link {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.toc-link:hover {
    color: var(--accent2);
    text-decoration: underline;
}

/* ===== CALLOUTS ===== */

.callout {
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    border-left: 4px solid var(--border);
}

.callout.note {
    background-color: #EEF5FF;
    border-left-color: var(--accent2);
}

.callout.note strong {
    color: var(--accent2);
}

.callout.warning {
    background-color: #FFF4E6;
    border-left-color: #E89B3C;
}

.callout.warning strong {
    color: #E89B3C;
}

.callout.example {
    background-color: #F0F9F5;
    border-left-color: var(--accent);
}

.callout.example strong {
    color: var(--accent);
}

.callout p {
    margin: 0;
}

/* ===== TABLES ===== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    border-radius: 4px;
    overflow: hidden;
}

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

th {
    background-color: var(--accent);
    color: white;
    font-weight: 600;
}

tr:hover {
    background-color: #FAFAF8;
}

/* ===== DEFINITION LISTS ===== */

.definition-list {
    margin: 1.5rem 0;
}

.definition-list dt {
    font-weight: 600;
    color: var(--accent);
    margin-top: 1rem;
}

.definition-list dd {
    margin-left: 2rem;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 0.5rem;
}

/* ===== LISTS ===== */

ul, ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

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

/* ===== FORMS ===== */

form {
    max-width: 600px;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--surface);
    color: var(--text);
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(15, 91, 62, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin-top: 0.25rem;
    cursor: pointer;
    accent-color: var(--accent);
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
}

input[type="submit"],
button {
    background-color: var(--accent);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="submit"]:hover,
button:hover {
    background-color: var(--accent2);
}

input[type="submit"]:focus,
button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.form-error {
    color: #E24C4C;
    font-size: 0.9rem;
    margin-top: 0.35rem;
}

/* ===== FOOTER ===== */

.footer {
    background-color: var(--surface);
    border-top: 2px solid var(--border);
    padding: 3rem 0 1rem 0;
    margin-top: 4rem;
    color: var(--text);
}

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

.footer-section h3 {
    margin-top: 0;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-disclaimer {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--muted);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-links a {
    color: var(--accent);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
}

/* ===== MAIN CONTENT ===== */

main {
    min-height: 60vh;
}

.main-content {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

/* ===== TAGS & CHIPS ===== */

.tag {
    display: inline-block;
    background-color: var(--border);
    color: var(--text);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: var(--accent);
    color: white;
}

/* ===== ARTICLE ===== */

article {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

article img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.95rem;
}

.article-author {
    font-weight: 500;
    color: var(--text);
}

/* ===== PAGINATION ===== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--accent);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: var(--accent);
    color: white;
}

.pagination .current {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ===== RELATED POSTS ===== */

.related-posts {
    margin: 3rem 0;
}

.related-posts h3 {
    margin-top: 0;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 992px) {
    .layout-2col {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

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

    .nav-list {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .nav-toggle {
        display: block;
    }

    .nav-list {
        display: none;
    }

    .nav-list.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        gap: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    .hero {
        padding: 2rem 0;
    }

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

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

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

    .article-meta {
        flex-direction: column;
    }

    form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

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

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

    .btn {
        width: 100%;
        justify-content: center;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    .sidebar {
        gap: 1rem;
    }

    .sidebar-section {
        padding: 1rem;
    }
}

/* ===== ACCESSIBILITY ===== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== ANIMATIONS ===== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}
