/* ============================================
   BLOG PAGE STYLES
   Matches landing.css design language:
   - Inter font, green palette, border-radius 8-12px
   - --primary-color: #2d7a3e, --text-dark: #1a2f23
   ============================================ */

/* ---- Layout ---- */
.blog-page { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #1a2f23; line-height: 1.7; }
.blog-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.blog-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ---- Featured Hero ---- */
.blog-hero {
    position: relative; overflow: hidden; margin-top: 80px;
    background: linear-gradient(135deg, #1b4d25 0%, #2d7a3e 50%, #4caf50 100%);
    padding: 60px 0;
}
.blog-hero .blog-container { display: flex; align-items: center; gap: 48px; }
.blog-hero-text { flex: 1; color: #fff; }
.blog-hero-badge { display: inline-block; background: rgba(255,255,255,.18); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: .8rem; font-weight: 600; margin-bottom: 16px; letter-spacing: .5px; }
.blog-hero-text h1 { font-size: 2.4rem; font-weight: 800; line-height: 1.2; margin: 0 0 14px; }
.blog-hero-text p { font-size: 1.05rem; opacity: .9; margin: 0 0 24px; }
.blog-hero-meta { font-size: .85rem; opacity: .75; display: flex; gap: 16px; flex-wrap: wrap; }
.blog-hero-img { flex: 0 0 380px; max-width: 380px; border-radius: 12px; overflow: hidden; }
.blog-hero-img img { width: 100%; height: 260px; object-fit: cover; display: block; }
.blog-hero-link { text-decoration: none; color: inherit; }
.blog-hero-link:hover .blog-hero-text h1 { text-decoration: underline; }

/* ---- Category Filter Bar ---- */
.blog-categories-bar { background: #fff; border-bottom: 1px solid #dcead9; padding: 16px 0; position: sticky; top: 72px; z-index: 50; }
.blog-categories-bar .blog-container { display: flex; align-items: center; gap: 12px; overflow-x: auto; }
.blog-cat-pill {
    display: inline-block; padding: 7px 18px; border-radius: 20px; font-size: .85rem; font-weight: 500;
    background: #f1f8f3; color: #5c6b5f; text-decoration: none; white-space: nowrap; border: 1px solid transparent; transition: all .2s;
}
.blog-cat-pill:hover, .blog-cat-pill.active { background: #2d7a3e; color: #fff; border-color: #2d7a3e; }

/* ---- Post Card Grid ---- */
.blog-grid-section { padding: 48px 0 64px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.blog-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    border: 1px solid #dcead9; transition: transform .2s, box-shadow .2s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(45,122,62,.1); }
.blog-card a { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.blog-card-img { height: 200px; overflow: hidden; background: #f1f8f3; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.blog-card-cat { font-size: .78rem; font-weight: 600; color: #2d7a3e; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.blog-card-body h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; line-height: 1.35; color: #1a2f23; }
.blog-card-body p { font-size: .9rem; color: #5c6b5f; margin: 0; flex: 1; }
.blog-card-footer { padding: 0 20px 16px; display: flex; justify-content: space-between; font-size: .8rem; color: #8a9d8b; }

/* ---- Sidebar ---- */
.blog-with-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 40px; padding: 48px 0; }
.blog-sidebar { position: sticky; top: 130px; align-self: start; }
.blog-sidebar-block { background: #fff; border-radius: 12px; border: 1px solid #dcead9; padding: 24px; margin-bottom: 24px; }
.blog-sidebar-block h3 { font-size: 1rem; font-weight: 700; margin: 0 0 16px; color: #1a2f23; }

/* Most Read */
.most-read-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #f1f8f3; text-decoration: none; color: inherit; }
.most-read-item:last-child { border-bottom: none; padding-bottom: 0; }
.most-read-num { font-size: 1.4rem; font-weight: 800; color: #dcead9; flex-shrink: 0; width: 28px; }
.most-read-item h4 { font-size: .9rem; font-weight: 600; margin: 0; line-height: 1.4; color: #1a2f23; }
.most-read-item:hover h4 { color: #2d7a3e; }

/* Tags Cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
    display: inline-block; padding: 5px 14px; border-radius: 16px;
    font-size: .8rem; background: #f1f8f3; color: #5c6b5f; text-decoration: none; transition: all .2s;
}
.tag-pill:hover { background: #2d7a3e; color: #fff; }

/* ---- Pagination ---- */
.blog-pagination { display: flex; justify-content: center; gap: 8px; padding: 24px 0 48px; }
.blog-page-btn {
    padding: 8px 16px; border-radius: 8px; border: 1px solid #dcead9;
    background: #fff; color: #1a2f23; text-decoration: none; font-size: .9rem; transition: all .2s;
}
.blog-page-btn:hover { border-color: #2d7a3e; color: #2d7a3e; }
.blog-page-btn.active { background: #2d7a3e; color: #fff; border-color: #2d7a3e; }
.blog-page-btn.disabled { opacity: .4; pointer-events: none; }

/* ---- Newsletter CTA Bar ---- */
.blog-newsletter {
    background: linear-gradient(135deg, #1b4d25, #2d7a3e);
    padding: 48px 0; text-align: center; color: #fff;
}
.blog-newsletter h2 { font-size: 1.6rem; font-weight: 700; margin: 0 0 8px; }
.blog-newsletter p { opacity: .85; margin: 0 0 24px; font-size: 1rem; }
.blog-newsletter-form { display: flex; justify-content: center; gap: 12px; max-width: 480px; margin: 0 auto; }
.blog-newsletter-form input {
    flex: 1; padding: 12px 16px; border-radius: 8px; border: none; font-size: .95rem;
}
.blog-newsletter-form button {
    padding: 12px 28px; border-radius: 8px; border: none;
    background: #e9c46a; color: #1a2f23; font-weight: 600; cursor: pointer; font-size: .95rem; transition: background .2s;
}
.blog-newsletter-form button:hover { background: #d4a373; }

/* ---- Single Post ---- */
.blog-single-header { margin-top: 80px; padding: 48px 0 0; }
.blog-breadcrumb { font-size: .85rem; color: #5c6b5f; margin-bottom: 20px; }
.blog-breadcrumb a { color: #2d7a3e; text-decoration: none; }
.blog-breadcrumb a:hover { text-decoration: underline; }
.blog-single-header h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.2; margin: 0 0 16px; color: #1a2f23; }
.blog-single-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: .9rem; color: #5c6b5f; margin-bottom: 32px; }
.blog-single-meta .cat-tag { background: #f1f8f3; padding: 4px 12px; border-radius: 16px; font-weight: 500; color: #2d7a3e; font-size: .82rem; }
.blog-featured-image { width: 100%; aspect-ratio: 16/7; object-fit: cover; border-radius: 12px; margin-bottom: 40px; }

/* Article Body Prose */
.blog-prose { font-size: 1.05rem; line-height: 1.85; color: #1a2f23; }
.blog-prose h2 { font-size: 1.6rem; font-weight: 700; margin: 2.5em 0 .6em; color: #2d7a3e; }
.blog-prose h3 { font-size: 1.3rem; font-weight: 600; margin: 2em 0 .5em; }
.blog-prose p { margin: 0 0 1.4em; }
.blog-prose img { max-width: 100%; border-radius: 8px; margin: 1.5em 0; }
.blog-prose a { color: #2d7a3e; text-decoration: underline; }
.blog-prose blockquote { border-left: 4px solid #2d7a3e; margin: 1.5em 0; padding: .6em 1.2em; background: #f1f8f3; border-radius: 0 8px 8px 0; }
.blog-prose pre { background: #1a2f23; color: #f1f8f3; padding: 20px; border-radius: 8px; overflow-x: auto; font-size: .9em; }
.blog-prose code { background: #f1f8f3; padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.blog-prose pre code { background: none; padding: 0; }
.blog-prose ul, .blog-prose ol { padding-left: 1.5em; }
.blog-prose li { margin-bottom: .5em; }
.blog-prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.blog-prose th, .blog-prose td { padding: 10px 14px; border: 1px solid #dcead9; text-align: left; }
.blog-prose th { background: #f1f8f3; font-weight: 600; }
.blog-prose hr { border: none; border-top: 2px solid #dcead9; margin: 2.5em 0; }

/* Post Tags */
.blog-post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0; padding-top: 24px; border-top: 1px solid #dcead9; }
.blog-post-tags a { padding: 5px 14px; border-radius: 16px; font-size: .82rem; background: #f1f8f3; color: #5c6b5f; text-decoration: none; }
.blog-post-tags a:hover { background: #2d7a3e; color: #fff; }

/* Author Box */
.blog-author-box { display: flex; gap: 16px; align-items: center; padding: 24px; background: #f1f8f3; border-radius: 12px; margin: 40px 0; }
.blog-author-avatar { width: 56px; height: 56px; border-radius: 28px; background: #2d7a3e; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; flex-shrink: 0; }
.blog-author-info h4 { margin: 0 0 4px; font-size: 1rem; }
.blog-author-info p { margin: 0; font-size: .85rem; color: #5c6b5f; }

/* Related Posts */
.blog-related { padding: 48px 0 64px; }
.blog-related h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 32px; text-align: center; }

/* CTA Banner */
.blog-cta-banner {
    background: linear-gradient(135deg, #1b4d25, #2d7a3e); border-radius: 16px;
    padding: 48px; text-align: center; color: #fff; margin: 48px 0;
}
.blog-cta-banner h2 { font-size: 1.6rem; margin: 0 0 12px; font-weight: 700; }
.blog-cta-banner p { opacity: .85; margin: 0 0 24px; }
.blog-cta-banner .btn-cta {
    display: inline-block; padding: 14px 32px; border-radius: 8px;
    background: #e9c46a; color: #1a2f23; font-weight: 700; text-decoration: none; font-size: 1rem; transition: background .2s;
}
.blog-cta-banner .btn-cta:hover { background: #d4a373; }

/* ---- Empty / Loading States ---- */
.blog-empty { text-align: center; padding: 80px 24px; color: #5c6b5f; }
.blog-empty h2 { font-size: 1.5rem; color: #1a2f23; margin-bottom: 8px; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .blog-with-sidebar { grid-template-columns: 1fr; }
    .blog-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 768px) {
    .blog-hero { padding: 0; }
    .blog-hero .blog-container { display: block; }
    .blog-hero-link { display: flex; flex-direction: column-reverse !important; gap: 0 !important; }
    .blog-hero-img { max-width: 100%; flex: auto; border-radius: 0; height: 220px; overflow: hidden; }
    .blog-hero-img img { height: 220px; width: 100%; object-fit: cover; border-radius: 0; }
    .blog-hero-text { padding: 28px 20px 32px; }
    .blog-hero-text h1 { font-size: 1.5rem; margin-bottom: 10px; }
    .blog-hero-text p { font-size: .95rem; margin-bottom: 16px; }
    .blog-hero-meta { font-size: .8rem; }
    .blog-hero-badge { margin-bottom: 12px; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-sidebar { grid-template-columns: 1fr; }
    .blog-single-header h1 { font-size: 1.8rem; }
    .blog-newsletter-form { flex-direction: column; }
    .blog-cta-banner { padding: 32px 20px; }
    .blog-cta-banner h2 { font-size: 1.3rem; }
}
