/* Blog Public Styles */
:root {
    --primary-color: #2d5016;
    --secondary-color: #6b8e23;
    --accent-color: #8fbc8f;
    --text-color: #333;
    --bg-color: #fafaf8;
    --card-bg: #fff;
    --border-color: #e0e0e0;
}

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

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

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

/* Header */
header {
    position: relative;
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
}

.header-with-background {
    background-image: url('/static/images/header.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.4) 0%, rgba(107, 142, 35, 0.3) 100%);
    z-index: 1;
}

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

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

header .tagline {
    color: #fff;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

nav {
    margin-top: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    margin-right: 1.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Main Content */
main {
    min-height: calc(100vh - 400px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.hero h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Posts List (Feed Style) */
.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.post-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: row;
    min-height: 200px;
}

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

.post-card .post-image {
    width: 300px;
    min-width: 300px;
    height: 300px;
    object-fit: cover;
}

.post-card .post-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    line-height: 1.3;
}

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

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

.post-card .post-meta {
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.post-meta {
    color: #888;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.post-meta time {
    font-weight: 500;
}

.post-meta .categories {
    display: flex;
    gap: 0.5rem;
}

.category-badge {
    background-color: var(--accent-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.excerpt {
    color: #555;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Single Post */
.single-post {
    background-color: var(--card-bg);
    padding: 2rem 2.5rem;
    border-radius: 12px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.post-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.post-title-large {
    color: var(--primary-color);
    margin-bottom: 0.75rem !important;
    font-size: 1.8rem !important;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    display: block !important;
    width: 100% !important;
}

.post-date {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    clear: both !important;
}

.post-date time {
    font-weight: 400;
}

.post-categories {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.post-featured-image {
    margin: 0 0 3rem 0;
    overflow: hidden;
    border-radius: 12px;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.post-body {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.9;
    color: #2c2c2c;
}

.post-body > p:first-of-type::first-letter {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1;
    float: left;
    margin: 0.1rem 0.15rem 0 0;
    color: var(--primary-color);
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-body h1 {
    color: var(--primary-color);
    font-size: 2.3rem;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.post-body h2 {
    color: var(--primary-color);
    font-size: 1.9rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.post-body h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body ul, .post-body ol {
    margin-left: 2rem;
    margin-bottom: 2rem;
}

.post-body li {
    margin-bottom: 0.8rem;
    line-height: 1.8;
}

.post-body strong {
    font-weight: 700;
    color: var(--primary-color);
}

.post-body em {
    font-style: italic;
}

.post-body blockquote {
    border-left: 5px solid var(--accent-color);
    background: #f8f9f8;
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    font-style: italic;
    color: #555;
    border-radius: 0 8px 8px 0;
    font-size: 1.2rem;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    background: transparent;
}

.tags {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.tags strong {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags .tag {
    background-color: var(--bg-color);
    color: var(--primary-color);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

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

.post-navigation {
    margin-top: 3rem;
    text-align: center;
}

.back-to-blog {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.2s;
}

.back-to-blog:hover {
    color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination a {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

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

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

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

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

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

/* Google AdSense */
.ad-horizontal {
    margin: 2rem 0;
    text-align: center;
}

.ad-in-article {
    margin: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        min-height: 280px;
        padding: 2rem 0;
    }

    header h1 a {
        font-size: 1.8rem;
    }

    header .tagline {
        font-size: 1rem;
    }

    nav {
        margin-top: 1.5rem;
    }

    nav a {
        display: inline-block;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .posts-grid {
        flex-direction: column;
    }

    .post-card {
        flex-direction: column;
        min-height: auto;
    }

    .post-card .post-image {
        width: 100%;
        min-width: 100%;
        height: 200px;
    }

    .single-post {
        padding: 2rem 1.5rem;
    }

    .post-header {
        margin-bottom: 1.5rem;
    }

    .post-title-large {
        font-size: 1.8rem;
    }

    .post-featured-image {
        margin: 0 0 2rem 0;
        border-radius: 8px;
    }

    .post-featured-image img {
        max-height: 300px;
    }

    .post-body {
        font-size: 1.05rem;
    }

    .post-body > p:first-of-type::first-letter {
        font-size: 3.5rem;
    }

    .post-body h1 {
        font-size: 1.8rem;
        margin-top: 2rem;
    }

    .post-body h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
    }

    .post-body h3 {
        font-size: 1.3rem;
        margin-top: 1.5rem;
    }

    .post-body blockquote {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
    }
}
