/**
 * Blog Page Styles
 * Custom styles for the blog page layout
 */

/* HTML and Body background for blog page - covers entire viewport including margins */
html body.blog-page-template,
html body.page-template-page-blog,
html body.page-template-page-blog-php {
    background-color: #7E2C2C !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.blog-page-template,
body.page-template-page-blog,
body.page-template-page-blog-php {
    background-color: #7E2C2C !important;
    margin: 0 !important;
    padding: 0 !important;
}

html:has(body.blog-page-template),
html:has(body.page-template-page-blog),
html:has(body.page-template-page-blog-php) {
    background-color: #7E2C2C !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure site-main and wrapper elements also have background */
body.blog-page-template .site-main,
body.page-template-page-blog .site-main,
body.page-template-page-blog-php .site-main {
    background-color: #7E2C2C !important;
    margin: 0 !important;
}

body.blog-page-template #content,
body.page-template-page-blog #content,
body.page-template-page-blog-php #content {
    background-color: #7E2C2C !important;
    margin: 0 !important;
}

/* Blog Main Container */
.blog-page-main {
    background-color: #7E2C2C;
    min-height: 100vh;
    padding: 40px 24px;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Blog Header */
.blog-header {
    max-width: 1160px;
    margin: 0 auto 40px;
    text-align: center;
}

.blog-title {
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 30px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Category Navigation */
.blog-category-nav {
    margin-bottom: 40px;
}

.blog-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap:0px;
}

.blog-category-list li {
    margin: 0;
}

.blog-category-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    display: inline-block;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.blog-category-link:hover,
.blog-category-link.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
    font-weight: 600;
}

/* Blog Posts Container */
.blog-posts-container {
    max-width: 1160px;
    margin: 0 auto;
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 48px;
    margin-bottom: 60px;
}

/* Blog Post Card */
.blog-post-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Blog Post Image */
.blog-post-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post-card:hover .blog-post-image img {
    transform: scale(1.05);
}

.blog-post-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Blog Post Content */
.blog-post-content {
    padding: 30px;
}

/* Blog Post Meta */
.blog-post-meta {
    color: #595959;
    font-size: 13px;
    line-height: 20px;
    font-weight: 400;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.blog-post-separator {
    color: #595959;
}

.blog-post-categories {
    color: #595959;
}

/* Blog Post Title */
.blog-post-title,
.blog-post-title h2 {
    margin: 0 0 15px 0;
    font-size: 20px !important;
    line-height: 23px !important;
    color: #1b1b1b !important;
    font-weight: 400 !important;
}

.blog-post-title a {
    color: #1b1b1b !important;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 20px !important;
    line-height: 23px !important;
    font-weight: 400 !important;
}

.blog-post-title a:hover {
    color: #7c2c2c !important;
}

/* Blog Post Excerpt */
.blog-post-excerpt {
    color: #5e5e5e;
    font-size: 14px;
    line-height: 21px;
    font-weight: 400;
    margin-bottom: 20px;
}

.blog-post-excerpt p {
    margin: 0 0 10px 0;
}

.blog-post-excerpt p:last-child {
    margin-bottom: 0;
}

/* Continue Reading Link */
.blog-post-read-more {
    color: #7c2c2c;
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    line-height: 21px;
    display: inline-block;
    transition: color 0.3s ease;
}

.blog-post-read-more:hover {
    color: #5a1f1f;
    text-decoration: underline;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1160px;
    margin: 60px auto 0;
    padding: 20px 0;
}

.blog-nav-previous a,
.blog-nav-next a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.blog-nav-previous a:hover,
.blog-nav-next a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* No Posts Message */
.blog-no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #ffffff;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-page-main {
        padding: 20px 15px;
    }
    
    .blog-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .blog-category-list {
        gap: 10px;
    }
    
    .blog-category-link {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .blog-post-image {
        height: 250px;
    }
    
    .blog-post-content {
        padding: 20px;
    }
    
    .blog-post-title,
    .blog-post-title a {
        font-size: 20px !important;
        line-height: 23px !important;
        color: #1b1b1b !important;
        font-weight: 400 !important;
    }
    
    .blog-post-excerpt {
        font-size: 14px;
    }
    
    .blog-pagination {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .blog-title {
        font-size: 24px;
    }
    
    .blog-category-list {
        flex-direction: column;
        align-items: center;
    }
    
    .blog-post-image {
        height: 200px;
    }
}

/* ============================================
   SINGLE POST PAGE LAYOUT
   ============================================ */

/* Single Post Main Container */
.single-post-main {
    background-color: #ffffff;
    padding: 0;
    margin: 0;
}

.single-post-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 24px 40px;
}

/* All Posts Button */
.single-post-back-button {
    margin-bottom: 30px;
}

.all-posts-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #7c2c2c;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #7c2c2c;
}

.all-posts-button:hover {
    background-color: #5a1f1f;
    border-color: #5a1f1f;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(124, 44, 44, 0.3);
}

.all-posts-button .button-icon {
    font-size: 18px;
    line-height: 1;
}

.all-posts-button .button-text {
    line-height: 1;
}

.single-post-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 60px;
    align-items: start;
}

/* Left Column: Main Content */
.single-post-content {
    min-width: 0; /* Prevents grid overflow */
}

.single-post-header {
    margin-bottom: 20px;
}

.single-post-title {
    font-size: 36px;
    line-height: 1.3;
    color: #1b1b1b;
    font-weight: 700;
    margin: 0 0 15px 0;
}

/* Post Meta */
.single-post-meta {
    color: #595959;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.single-post-meta .post-date {
    color: #595959;
}

.single-post-meta .meta-separator {
    margin: 0 8px;
    color: #999;
}

.single-post-meta .post-categories a {
    color: #595959;
    text-decoration: none;
    transition: color 0.3s ease;
}

.single-post-meta .post-categories a:hover {
    color: #7c2c2c;
}

/* Post Images within content */
.single-post-content-text img {
    width: 100%;
    height: auto;
    display: block;
    margin: 30px 0;
    border-radius: 4px;
}

.single-post-content-text figure {
    margin: 30px 0;
}

.single-post-content-text figure img {
    margin: 0;
}

/* Post Content Text */
.single-post-content-text {
    color: #333;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 40px;
}

.single-post-content-text p {
    margin-bottom: 20px;
}

.single-post-content-text p:last-child {
    margin-bottom: 0;
}

.single-post-content-text h1,
.single-post-content-text h2,
.single-post-content-text h3,
.single-post-content-text h4,
.single-post-content-text h5,
.single-post-content-text h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #1b1b1b;
    font-weight: 600;
}

.single-post-content-text h2 {
    font-size: 28px;
}

.single-post-content-text h3 {
    font-size: 24px;
}

/* Post Tags */
.single-post-tags {
    margin-bottom: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.single-post-tags .tag-links {
    color: #595959;
    font-size: 14px;
}

.single-post-tags .tag-links a {
    color: #7c2c2c;
    text-decoration: none;
    margin-right: 8px;
    transition: color 0.3s ease;
}

.single-post-tags .tag-links a:hover {
    color: #5a1f1f;
    text-decoration: underline;
}

/* Share Post Section */
.single-post-share {
    margin-bottom: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.single-post-share .share-label {
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.share-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-button:hover {
    background-color: #7c2c2c;
    color: #ffffff;
    transform: translateY(-2px);
}

.share-button svg {
    width: 20px;
    height: 20px;
}

/* Right Column: Sidebar */
.single-post-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background-color: #f9f9f9;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 20px;
    font-weight: 600;
    color: #1b1b1b;
    margin: 0 0 20px 0;
}

/* Newsletter Signup */
.newsletter-signup {
    background-color: #ffffff;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input[type="email"] {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: #7c2c2c;
}

.newsletter-form input[type="email"]::placeholder {
    color: #999;
}

.newsletter-submit {
    padding: 12px 24px;
    background-color: #7c2c2c;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter-submit:hover {
    background-color: #5a1f1f;
}

/* Recent Posts */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.recent-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-post-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 4px;
}

.recent-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-post-thumbnail:hover img {
    transform: scale(1.05);
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-title {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    color: #1b1b1b;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 8px;
    transition: color 0.3s ease;
    word-wrap: break-word;
}

.recent-post-title:hover {
    color: #7c2c2c;
}

.recent-post-date {
    display: block;
    font-size: 12px;
    color: #999;
}

/* Responsive Design for Single Post */
@media (max-width: 968px) {
    .single-post-content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .single-post-sidebar {
        position: static;
    }
    
    .single-post-container {
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    .single-post-title {
        font-size: 28px;
    }
    
    .single-post-meta {
        font-size: 13px;
    }
    
    .single-post-content-text {
        font-size: 15px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .widget-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .single-post-container {
        padding: 20px 15px;
    }
    
    .single-post-title {
        font-size: 24px;
    }
    
    .single-post-share {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .recent-post-item {
        flex-direction: column;
    }
    
    .recent-post-thumbnail {
        width: 100%;
        height: 200px;
    }
}

