/* Blog Styles - Using Tendra Theme */
/* Header styles are now in /static/css/header.css */

/* Main content area with top margin for fixed header */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* Blog Container */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Blog Header */
.blog-header {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #649D75 100%);
    color: white;
    margin-bottom: 40px;
}

.blog-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: white;
}

.blog-subtitle {
    font-size: 1.2em;
    color: white;
    opacity: 0.95;
}

/* Blog Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    gap: 30px;
}

/* Post Card */
.post-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

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

.post-image-link {
    display: block;
}

.post-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.post-content {
    padding: 20px;
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9em;
}

/* Compact meta info for individual blog posts (no big header) */
.post-meta-compact {
    display: flex;
    gap: 15px;
    color: var(--text-light);
    font-size: 0.9em;
    margin: 20px 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.post-meta-compact .post-category a {
    color: var(--primary-color);
    text-decoration: none;
}

.post-meta-compact .post-category a:hover {
    text-decoration: underline;
}

.post-category {
    color: var(--primary-color);
    font-weight: 500;
}

.post-date {
    color: var(--text-light);
}

.post-title {
    margin-bottom: 15px;
}

.post-title a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.4em;
    font-weight: 600;
}

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

.post-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    color: #27ae60;
    text-decoration: none;
    font-weight: 500;
}

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

.post-tags {
    display: flex;
    gap: 10px;
}

.tag-link {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 0.9em;
}

.tag-link:hover {
    color: #27ae60;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.sidebar-widget h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 1.2em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-button {
    padding: 8px 16px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-button:hover {
    background: #229954;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.category-link {
    color: #555;
    text-decoration: none;
}

.category-link:hover {
    color: #27ae60;
}

/* Popular Posts */
.popular-posts {
    list-style: none;
    padding: 0;
}

.popular-posts li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.popular-post-link {
    text-decoration: none;
}

.popular-post-link h4 {
    color: #2c3e50;
    font-size: 0.95em;
    margin-bottom: 5px;
}

.popular-post-link:hover h4 {
    color: #27ae60;
}

.post-views {
    color: #7f8c8d;
    font-size: 0.85em;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 5px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    text-decoration: none;
    color: #555;
    font-size: 0.9em;
}

.tag-item:hover {
    background: #27ae60;
    color: white;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.newsletter-widget h3 {
    color: white;
}

.newsletter-widget p {
    margin-bottom: 15px;
    font-size: 0.95em;
}

.newsletter-form,
.newsletter-inline-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-input {
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: white;
}

.newsletter-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.newsletter-button,
.newsletter-submit {
    padding: 10px;
    background: white;
    color: #27ae60;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

.newsletter-button:hover,
.newsletter-submit:hover {
    background: #f0f0f0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.pagination-prev,
.pagination-next {
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.pagination-prev:hover,
.pagination-next:hover {
    background: #229954;
}

.pagination-current {
    color: #555;
}

/* Filter Badge */
.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: #f0f0f0;
    border-radius: 20px;
    margin-bottom: 20px;
}

.clear-filter {
    color: #999;
    text-decoration: none;
    font-size: 1.2em;
}

.clear-filter:hover {
    color: #333;
}

/* No Posts Message */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

/* Individual Blog Post Styles */
.blog-post {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    margin-top: 70px; /* Account for fixed header */
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    color: #7f8c8d;
    font-size: 0.9em;
}

.breadcrumbs a {
    color: #7f8c8d;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #27ae60;
}

.breadcrumbs .current {
    color: #2c3e50;
}

/* Post Header - specific to blog posts */
.blog-post .post-header,
article .post-header {
    margin-bottom: 40px;
    background: none;
    position: static;
    width: auto;
    padding: 0;
    box-shadow: none;
}

.blog-post .post-header .post-title,
article .post-header .post-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.post-header .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.post-author,
.post-views {
    color: #555;
}

/* Featured Image */
.featured-image {
    margin: 30px 0;
}

.featured-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Post Content */
.blog-post .post-content {
    color: #333;
    line-height: 1.8;
    font-size: 1.1em;
}

/* Ensure all images in post content are responsive */
.blog-post .post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}

.blog-post .post-content h2 {
    margin: 30px 0 15px;
    color: #2c3e50;
}

.blog-post .post-content h3 {
    margin: 25px 0 10px;
    color: #34495e;
}

.blog-post .post-content p {
    margin-bottom: 20px;
}

.blog-post .post-content ul,
.blog-post .post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.blog-post .post-content li {
    margin-bottom: 10px;
}

.blog-post .post-content blockquote {
    border-left: 4px solid #27ae60;
    padding-left: 20px;
    margin: 20px 0;
    color: #555;
    font-style: italic;
}

.blog-post .post-content code {
    background: #f4f4f4;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.blog-post .post-content pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

/* Responsive tables */
.blog-post .post-content table {
    width: 100%;
    overflow-x: auto;
    display: block;
    margin: 20px 0;
    border-collapse: collapse;
}

.blog-post .post-content table th,
.blog-post .post-content table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.blog-post .post-content table th {
    background-color: #f4f4f4;
    font-weight: 600;
}

/* Post Tags Section */
.post-tags-section {
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.post-tags-section h3 {
    display: inline;
    margin-right: 15px;
    color: #555;
}

.tag-list {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Related Plants */
.related-plants {
    margin: 40px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.related-plants h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.plant-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.plant-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.plant-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.plant-card h4 {
    margin-bottom: 5px;
    color: var(--text-dark);
}

.plant-scientific {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.plant-family {
    color: #555;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.plant-link {
    color: #27ae60;
    text-decoration: none;
    font-weight: 500;
}

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

/* Share Section */
.share-section {
    margin: 40px 0;
    text-align: center;
}

.share-section h3 {
    margin-bottom: 15px;
    color: #555;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.share-btn {
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    color: white;
    font-weight: 500;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.linkedin {
    background: #0A66C2;
}

.share-btn.email {
    background: #555;
}

.share-btn:hover {
    opacity: 0.9;
}

/* Related Posts */
.related-posts {
    margin: 40px 0;
}

.related-posts h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.related-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-content {
    padding: 15px;
}

.related-content h4 {
    margin-bottom: 10px;
}

.related-content h4 a {
    color: #2c3e50;
    text-decoration: none;
}

.related-content h4 a:hover {
    color: #27ae60;
}

.related-content p {
    color: #555;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.related-date {
    color: #7f8c8d;
    font-size: 0.85em;
}

/* Newsletter CTA */
.newsletter-cta {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    margin: 40px 0;
}

.newsletter-cta h3 {
    margin-bottom: 10px;
}

.newsletter-cta p {
    margin-bottom: 20px;
}

.newsletter-inline-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }

    .blog-header h1 {
        font-size: 2em;
    }

    .post-header .post-title {
        font-size: 1.8em;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .plant-cards {
        grid-template-columns: 1fr;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }
}

/* Footer - Matching home.html style */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 20px 20px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    color: white;
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    color: rgba(255,255,255,0.6);
}