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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Header */
header {
    /* background-color: #f8f9fa; */
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}



nav a {
    color: #666;
    text-decoration: none;
    margin-left: 1rem;
    font-weight: 500;
}

nav h1 a {
    color: #333;
    text-decoration: none;
    font-size: 2.5rem;
    font-weight: bold;
    margin-left: 0rem;
}

nav a:hover {
    color: #007bff;
}

#site-header-container, main, footer {
    max-width: 1200px;
    margin: 0 auto;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
}

/* Articles */
article {
    margin-bottom: 2rem;
}

article h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

article h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #34495e;
}

article h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #34495e;
}

.meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.author {
    margin-left: 0.5rem;
}

.categories {
    margin-top: 0.5rem;
}

.category {
    background-color: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

.featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

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

.content p {
    margin-bottom: 1rem;
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Featured Image - Better aspect ratio handling */
.featured-image {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    object-position: center;
    border-radius: 0.5rem;
    margin: 1.5rem auto;
    display: block;
    /* Remove background and let image maintain natural dimensions */
}

/* Image Gallery */
.image-gallery {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

.image-gallery h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

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

.gallery-item {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Remove background, padding, and shadows */
}

.gallery-item:hover {
    /* Keep subtle hover effect but no background changes */
    transform: translateY(-2px);
}

.gallery-item img {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    margin: 0;
    border-radius: 0.5rem;
    display: block;
}

.gallery-caption {
    padding: 1rem;
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    background: #f8f9fa;
}

/* Shortcode Images */
.shortcode-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shortcode-figure {
    margin: 2rem auto;
    text-align: center;
    max-width: 100%;
}

.shortcode-figure img {
    margin-bottom: 0.5rem;
}

.shortcode-figure figcaption {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
    padding: 0 1rem;
}

/* Post Lists */
.posts-list h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.post-preview {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.post-preview h2 a,
.post-preview h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.post-preview h2 a:hover,
.post-preview h3 a:hover {
    color: #007bff;
}

.summary {
    margin-top: 0.5rem;
    color: #666;
}

/* Homepage */
.homepage h1 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.homepage > p {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

.recent-posts h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* 404 page */
.error-page{
    text-align:center;
    padding:6rem 1rem;
}
.error-page h1{
    font-size:4rem;
    margin-bottom:1rem;
    color:#2c3e50;
}
.error-page .lead{
    font-size:1.25rem;
    margin-bottom:2rem;
    color:#666;
}

/* Taxonomy Pages */
.taxonomy {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.term-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease;
}

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

.term-card h3 {
    margin-bottom: 0.5rem;
}

.term-card h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.term-card h3 a:hover {
    color: #007bff;
}

.term-card .count {
    color: #666;
    font-size: 0.9rem;
}

/* Term Pages */
.term {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.term-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    text-align: center;
}

/* Footer */
footer {
    background-color: #f8f9fa;
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #666;
}

.newsletter {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #e9ecef;
    border-radius: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .terms-grid {
        grid-template-columns: 1fr;
    }
    
    .homepage h1 {
        font-size: 2rem;
    }
    
    .taxonomy,
    .term {
        padding: 1rem;
    }
    
    /* Mobile gallery adjustments */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 250px;
    }
    
    .featured-image {
        max-height: 300px;
    }
}
