/**
 * Blog Stylesheet
 * Simple, responsive design with large readable text
 */

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

body {
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: #333;
    background: #d4e6d4;
    padding: 2rem 1rem;
}

/* Container with max-width for readability */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
}

/* Header */
header {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

header.no-background {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 2rem;
}

.header-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0;
    color: #222;
    font-weight: 700;
    flex: 1;
}

header h1.home-title {
    font-size: 3rem;
}

.admin-sun-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5d76e;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    align-self: flex-start;
}

.admin-sun-button:hover {
    background: #f4c430;
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.admin-sun-button:active {
    transform: scale(0.98);
}

.admin-sun-button svg {
    width: 20px;
    height: 20px;
}

header h1 a {
    color: inherit;
    text-decoration: none;
}

header h1 a:hover {
    color: #555;
}

.header-back-link {
    margin-top: 0.5rem;
}

.header-back-link .back-link {
    font-size: 0.9rem;
}

/* Author intro */
.author-intro {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-top: 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.author-intro a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.author-intro a:hover {
    text-decoration: underline;
}

/* Main content */
main {
    margin-bottom: 3rem;
}

/* Articles subtitle */
.articles-subtitle {
    font-size: 2.5rem;
    font-weight: 700;
    color: #222;
    margin-top: 4rem;
    margin-bottom: 0.5rem;
    padding: 0 2rem 0 0;
}

/* Post previews on home page */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-preview {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

/* Featured image on home page */
.featured-image-link {
    display: block;
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 4px;
    overflow: hidden;
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.post-preview-content {
    flex: 1;
    min-width: 0;
}

.featured-image-link:hover .featured-image {
    transform: scale(1.02);
}

.featured-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    background: #d4e6d4;
    border-radius: 4px;
    color: #5a8a5a;
    text-decoration: none;
    transition: all 0.3s ease;
}

.featured-image-placeholder:hover {
    background: #c4dcc4;
    transform: scale(1.02);
}

.featured-image-placeholder svg {
    width: 48px;
    height: 48px;
}

.post-preview h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.post-preview h2 a {
    color: #222;
    text-decoration: none;
}

.post-preview h2 a:hover {
    color: #555;
    text-decoration: underline;
}

.post-date-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.post-date {
    font-size: 0.95rem;
    color: #666;
}

.article-number {
    display: inline-block;
    background: #d4e6d4;
    color: #222;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.post-excerpt {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.read-more {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* Single post view */
.single-post {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.single-post h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: #222;
    font-weight: 700;
    line-height: 1.3;
}

.single-post .post-date {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Featured image on single post */
.featured-image-container {
    margin-bottom: 2rem;
    border-radius: 4px;
    overflow: hidden;
}

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

.post-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #333;
    margin-bottom: 2rem;
}

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

/* Style HTML content from rich text editor */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.75rem; }
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.25rem; }

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

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content a {
    color: #333;
    text-decoration: underline;
}

.post-content a:hover {
    color: #555;
}

.post-content strong,
.post-content b {
    font-weight: 600;
}

.post-content em,
.post-content i {
    font-style: italic;
}

.post-content blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: #666;
    font-style: italic;
}

.post-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

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

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.back-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

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

/* No posts message */
.no-posts {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
        font-size: 16px;
    }
    
    .container {
        padding: 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .admin-sun-button {
        width: 40px;
        height: 40px;
    }
    
    .admin-sun-button svg {
        width: 20px;
        height: 20px;
    }
    
    .post-preview h2,
    .single-post h2 {
        font-size: 1.5rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .posts-list {
        gap: 2rem;
    }
    
    .post-preview {
        flex-direction: column;
    }
    
    .featured-image-link,
    .featured-image-placeholder {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    header h1.home-title {
        font-size: 2rem;
    }
    
    .admin-sun-button {
        width: 36px;
        height: 36px;
    }
    
    .admin-sun-button svg {
        width: 18px;
        height: 18px;
    }
    
    .post-preview h2,
    .single-post h2 {
        font-size: 1.3rem;
    }
}

