/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c5530;
    --primary-light: #4a7c59;
    --secondary-color: #d4a574;
    --text-color: #333333;
    --text-light: #666666;
    --background-color: #ffffff;
    --background-alt: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
}

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

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

/* Header */
.header {
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

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

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.logo:hover {
    text-decoration: none;
}

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.language-form {
    display: inline;
}

.language-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.language-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
}

/* Main content */
.main {
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--background-alt) 0%, #ffffff 100%);
    border-radius: var(--radius);
}

.hero-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Posts grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background-color: var(--background-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.post-image {
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-date {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.post-title {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

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

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.post-author {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
}

/* Single post */
.post-full {
    max-width: 800px;
    margin: 0 auto;
}

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

.post-header .post-date {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.post-header .post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-image:hover {
    transform: scale(1.05);
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

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

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 2rem 0;
}

.post-content h2, .post-content h3 {
    color: var(--primary-color);
    margin: 2rem 0 1rem;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* About page */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.village-info {
    background-color: var(--background-alt);
    padding: 2rem;
    border-radius: var(--radius);
    margin-top: 3rem;
}

.village-info h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.info-item h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.info-item p {
    color: var(--text-light);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.pagination-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.pagination-link:hover {
    background-color: var(--background-alt);
}

.pagination-info {
    color: var(--text-light);
}

/* Error page */
.error-container {
    text-align: center;
    padding: 4rem 0;
}

.error-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-message {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.error-link {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

.error-link:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: var(--background-alt);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    text-align: center;
}

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

.footer-info {
    font-size: 0.875rem;
}

/* Utility classes */
.section-title {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.no-posts {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    background-color: var(--background-alt);
    border-radius: var(--radius);
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-list {
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-header .post-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .post-header .post-title {
        font-size: 1.75rem;
    }
    
    .gallery-item {
        height: 150px;
    }
}