/**
 * 905WOOD Blog — Frontend Styles
 * Magento 2.4.8 Compatible
 * Designed for Hyva 1.4.4 / Tailwind CSS v4 compatibility
 */

/* ===== POST LIST ===== */
.wood905-blog-list {
    display: grid;
    gap: 2rem;
}

.blog-post-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.blog-post-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-post-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 400px;
}

.blog-post-info {
    padding: 1.5rem;
}

.blog-post-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.blog-post-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.blog-post-title a:hover {
    color: #2e7d32; /* 905WOOD green */
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.blog-post-meta span::before {
    margin-right: 0.25rem;
}

.blog-post-excerpt {
    color: #333;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-read-more {
    display: inline-block;
    color: #2e7d32;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.blog-read-more:hover {
    border-bottom-color: #2e7d32;
}

/* ===== POST DETAIL ===== */
.wood905-blog-post-detail {
    max-width: 900px;
}

.blog-post-featured-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.blog-post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-post-header {
    margin-bottom: 2rem;
}

.blog-post-header .blog-post-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.blog-post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 3rem;
}

.blog-post-content h2 { font-size: 1.5rem; margin: 2rem 0 1rem; }
.blog-post-content h3 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
.blog-post-content p { margin-bottom: 1rem; }
.blog-post-content img { max-width: 100%; height: auto; border-radius: 4px; }
.blog-post-content blockquote {
    border-left: 4px solid #2e7d32;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f5f5f5;
    font-style: italic;
}

/* ===== COMMENTS ===== */
.blog-comments {
    border-top: 2px solid #e0e0e0;
    padding-top: 2rem;
    margin-top: 2rem;
}

.blog-comment {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.comment-meta {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: #1a1a1a;
}

.comment-date {
    font-size: 0.8rem;
    color: #999;
}

.comment-body {
    color: #444;
    line-height: 1.6;
}

.blog-comment-form {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.blog-comment-form .field {
    margin-bottom: 1rem;
}

.blog-comment-form .label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.blog-comment-form .input-text {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.blog-comment-form textarea.input-text {
    resize: vertical;
}

/* ===== SIDEBAR ===== */
.wood905-blog-sidebar {
    padding: 0;
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2e7d32;
    color: #1a1a1a;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-list li a {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
}

.sidebar-list li a:hover {
    color: #2e7d32;
}

.sidebar-post-date {
    display: block;
    font-size: 0.8rem;
    color: #999;
}

.sidebar-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sidebar-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s;
}

.sidebar-tag:hover {
    background: #2e7d32;
    color: #fff;
}

/* ===== EMPTY STATE ===== */
.wood905-blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
    font-size: 1.1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .blog-post-header .blog-post-title {
        font-size: 1.5rem;
    }
    .blog-post-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* ===== LIGHT THEME OVERRIDE ===== */
/* Forces blog content area to white bg / black text */
/* regardless of parent Hyva/905wood dark theme      */

.wood905-blog-post-detail,
.wood905-blog-list {
    background: #ffffff;
    color: #111111;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.wood905-blog-post-detail *,
.wood905-blog-list * {
    color: inherit;
}

/* Post detail headings */
.wood905-blog-post-detail .blog-post-title,
.wood905-blog-post-detail h1,
.wood905-blog-post-detail h2,
.wood905-blog-post-detail h3,
.wood905-blog-post-detail h4 {
    color: #111111;
}

/* Post body content */
.wood905-blog-post-detail .blog-post-content {
    color: #1a1a1a;
    line-height: 1.8;
}

.wood905-blog-post-detail .blog-post-content p,
.wood905-blog-post-detail .blog-post-content li,
.wood905-blog-post-detail .blog-post-content td,
.wood905-blog-post-detail .blog-post-content th,
.wood905-blog-post-detail .blog-post-content span {
    color: #1a1a1a;
}

/* Post meta (author, date, views) */
.wood905-blog-post-detail .blog-post-meta,
.wood905-blog-post-detail .blog-meta-author,
.wood905-blog-post-detail .blog-meta-date,
.wood905-blog-post-detail .blog-meta-views {
    color: #555555;
}

/* Blog list cards */
.wood905-blog-list .blog-post-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.wood905-blog-list .blog-post-title {
    color: #111111;
}

.wood905-blog-list .blog-post-title a {
    color: #111111;
}

.wood905-blog-list .blog-post-excerpt {
    color: #333333;
}

/* Blog links — keep 905WOOD green */
.wood905-blog-post-detail a,
.wood905-blog-list a {
    color: #2e7d32;
}

.wood905-blog-post-detail a:hover,
.wood905-blog-list a:hover {
    color: #1b5e20;
}

/* Read more link */
.wood905-blog-list .blog-read-more {
    color: #2e7d32;
}

/* Comments section */
.blog-comments {
    background: #f9f9f9;
    color: #111111;
    border-radius: 8px;
    padding: 1.5rem;
}

.blog-comments h3 {
    color: #111111;
}

.blog-comment {
    border-bottom-color: #e0e0e0;
}

.comment-author {
    color: #111111;
}

.comment-date {
    color: #666666;
}

.comment-body {
    color: #333333;
}

/* Comment form */
.blog-comment-form {
    background: #f0f0f0;
    color: #111111;
}

.blog-comment-form .label {
    color: #111111;
}

.blog-comment-form .input-text {
    background: #ffffff;
    color: #111111;
    border-color: #cccccc;
}

/* Sidebar override */
.blog-sidebar {
    background: #ffffff;
    color: #111111;
    padding: 1.5rem;
    border-radius: 12px;
}

.blog-sidebar h3,
.blog-sidebar h4,
.sidebar-widget h3 {
    color: #111111;
}

.sidebar-category a,
.sidebar-tag {
    color: #2e7d32;
}

/* Empty state */
.wood905-blog-empty {
    color: #666666;
}

/* Pagination */
.blog-pagination a {
    color: #2e7d32;
}

.blog-pagination .current {
    background: #2e7d32;
    color: #ffffff;
}

/* ===== HEADER FIX — Force white bg on all blog sub-elements ===== */
.wood905-blog-post-detail .blog-post-header,
.wood905-blog-post-detail header,
.wood905-blog-post-detail .blog-post-featured-image,
.wood905-blog-post-detail section,
.wood905-blog-post-detail div {
    background-color: #ffffff !important;
    color: #111111 !important;
}

.wood905-blog-post-detail .blog-post-title {
    color: #111111 !important;
}

.wood905-blog-post-detail .blog-post-meta,
.wood905-blog-post-detail .blog-meta-author,
.wood905-blog-post-detail .blog-meta-date,
.wood905-blog-post-detail .blog-meta-views {
    color: #555555 !important;
}

.wood905-blog-post-detail .blog-post-content,
.wood905-blog-post-detail .blog-post-content p,
.wood905-blog-post-detail .blog-post-content li,
.wood905-blog-post-detail .blog-post-content td,
.wood905-blog-post-detail .blog-post-content th {
    color: #1a1a1a !important;
}

/* Comments section fix */
.wood905-blog-post-detail .blog-comments,
.wood905-blog-post-detail .blog-comment-form {
    background-color: #f5f5f5 !important;
    color: #111111 !important;
}

.wood905-blog-post-detail .blog-comment-form .input-text {
    background-color: #ffffff !important;
    color: #111111 !important;
    border-color: #cccccc !important;
}

/* Links stay 905WOOD green */
.wood905-blog-post-detail a {
    color: #2e7d32 !important;
}

.wood905-blog-post-detail a:hover {
    color: #1b5e20 !important;
}

/* Page title wrapper — also force light for blog pages */
body.blog-post-view .page-title-wrapper,
body.blog-post-view .page-title,
body.blog-index-index .page-title-wrapper,
body.blog-index-index .page-title {
    background-color: #ffffff !important;
    color: #111111 !important;
}

body.blog-post-view h1.page-title,
body.blog-index-index h1.page-title {
    color: #111111 !important;
}

/* Sidebar override for blog pages */
body.blog-post-view .sidebar,
body.blog-post-view .sidebar-main,
body.blog-post-view .sidebar-additional,
body.blog-index-index .sidebar,
body.blog-index-index .sidebar-main {
    background-color: #ffffff !important;
    color: #111111 !important;
    border-radius: 12px;
    padding: 1rem;
}

body.blog-post-view .sidebar *,
body.blog-index-index .sidebar * {
    color: inherit !important;
}

body.blog-post-view .sidebar a,
body.blog-index-index .sidebar a {
    color: #2e7d32 !important;
}

/* Force page-main background white on blog pages */
body.blog-post-view .page-main,
body.blog-index-index .page-main {
    background-color: #ffffff !important;
}

body.blog-post-view .columns,
body.blog-post-view .column.main,
body.blog-index-index .columns,
body.blog-index-index .column.main {
    background-color: #ffffff !important;
}
