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

body {
    font-family: 'Source Sans Pro', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Crimson Text', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #8B4513;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #A0522D;
}

/* Header */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.site-title a {
    color: #8B4513;
    font-size: 3rem;
    font-weight: 600;
    text-decoration: none;
}

.site-description {
    font-style: italic;
    color: #666;
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

/* Main content */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: calc(100vh - 200px);
}

/* Hero section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    color: #8B4513;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
}

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

.post-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.post-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.post-image {
    overflow: hidden;
}

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

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

.post-content {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #8B4513;
}

.post-date {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
    display: block;
}

.post-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Individual post page */
.post {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.post-header {
    padding: 2rem;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

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

.post-header .post-date {
    font-size: 1rem;
    color: #888;
}

.post-content {
    padding: 2rem;
    line-height: 1.8;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-content h2 {
    color: #8B4513;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h3 {
    color: #A0522D;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Post footer */
.post-footer {
    padding: 2rem;
    border-top: 1px solid #e0e0e0;
    background-color: #f8f8f8;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.post-nav a {
    color: #8B4513;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid #8B4513;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.post-nav a:hover {
    background-color: #8B4513;
    color: #fff;
}

.back-to-home {
    display: inline-block;
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.back-to-home:hover {
    color: #8B4513;
}

/* Footer */
.site-footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

.footer-container p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Search functionality */
.search-container {
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Source Sans Pro', Arial, sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.search-results {
    list-style: none;
    margin: 1rem 0 0 0;
    padding: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
}

.search-results:empty {
    display: none;
}

.search-result-item {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #f8f8f8;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #8B4513;
}

.search-result-item p {
    margin: 0 0 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.search-result-item time {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.no-results {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .site-title a {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-header .post-title {
        font-size: 2rem;
    }
    
    .post-content {
        padding: 1.5rem;
    }
    
    .post-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-nav a {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-container,
    .page-content,
    .footer-container {
        padding: 0 0.5rem;
    }
    
    .hero {
        padding: 1rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-footer {
        padding: 1rem;
    }
}