/* Core Variables */
:root {
    --color-primary: #2D5A27; /* Forest Green */
    --color-secondary: #8AA87B; /* Sage Green */
    --color-bg: #F9F9F6; /* Off-white/Beige */
    --color-text: #222222; /* High contrast dark gray */
    --color-white: #FFFFFF;
    --color-border: #DCDCDC;
    
    --font-heading: 'Georgia', serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    
    --radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset & Basics */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 18px; /* Minimum body text size */
}

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

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

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* Header */
.site-header {
    background-color: var(--color-white);
    border-bottom: 4px solid var(--color-primary);
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.brand {
    display: flex;
    flex-direction: column;
}

.brand h1 {
    margin: 0;
    font-size: 2.2rem;
}

.brand .tagline {
    font-size: 1rem;
    color: #555;
    font-style: italic;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.main-nav a {
    font-weight: 600;
    color: var(--color-text);
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: background-color 0.2s;
}

.main-nav a:hover {
    background-color: var(--color-bg);
    text-decoration: none;
    color: var(--color-primary);
}

/* Search Bar */
.search-form {
    display: flex;
    margin-bottom: 30px;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius) 0 0 var(--radius);
    outline: none;
}

.search-form input[type="text"]:focus {
    border-color: var(--color-primary);
}

.search-form button {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 2px solid var(--color-primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-form button:hover {
    background-color: #1f3f1b;
}

/* Main Content Area */
.main-content {
    padding: 40px 0;
}

/* Post Grid */
.category-filters {
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-tag {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
}

.filter-tag:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
    text-decoration: none;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.post-card {
    background-color: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    cursor: pointer;
    border: 1px solid var(--color-border);
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--color-border);
}

.post-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.category-label {
    background-color: var(--color-secondary);
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: 10px;
}

.post-card-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--color-primary);
}

.post-card-excerpt {
    color: #444;
    margin-bottom: 20px;
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    display: block;
    text-align: center;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 12px 16px;
    border-radius: var(--radius);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1rem;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #1f3f1b;
    text-decoration: none;
}

/* Full Post Page */
.post-layout {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.article-container {
    flex: 1;
    min-width: 0;
    max-width: 800px;
    background-color: var(--color-white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 0 auto;
}

.sidebar {
    width: 320px;
}

.article-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
}

.article-meta {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.article-title {
    font-size: 2.5rem;
    line-height: 1.2;
}

.article-featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.article-content {
    font-size: 1.1rem;
}

.article-content h2, .article-content h3 {
    margin-top: 30px;
}

.article-content p, .article-content ul, .article-content ol {
    margin-bottom: 20px;
}

.article-content ul {
    margin-left: 25px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Sidebar Widget */
.widget {
    background-color: var(--color-white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.4rem;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

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

.widget-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.widget-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Footer */
.site-footer {
    background-color: #222;
    color: var(--color-white);
    padding: 40px 0;
    text-align: center;
    margin-top: 60px;
}

.footer-nav {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #aaaaaa;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--color-white);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 992px) {
    .post-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .article-container {
        padding: 25px;
    }
    
    .article-title {
        font-size: 2rem;
    }
}

/* Captcha Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content.captcha-box {
    background: var(--color-white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.captcha-box h3 {
    margin-bottom: 10px;
    color: var(--color-primary);
}

.captcha-box p {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #555;
}

.captcha-checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: #f9f9f9;
    padding: 15px 30px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.captcha-checkbox-container:hover {
    background: #f1f1f1;
}

.captcha-checkbox-container input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.captcha-checkbox-container label {
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--color-text);
}
