/**
 * Clean Blog Posts Styling
 * Ensures blog posts display with clean, readable formatting
 * without complex backgrounds or theme interference
 */

/* Reset all backgrounds in blog posts */
.single-post .entry-content,
.single-post .entry-content *,
.blog .entry-content,
.blog .entry-content *,
.archive .entry-content,
.archive .entry-content * {
    background-color: transparent !important;
    background-image: none !important;
}

/* Main content area */
.single-post .site-main,
.blog .site-main {
    background-color: #ffffff !important;
    padding: 40px 0;
}

/* Entry content container */
.single-post .entry-content,
.blog .entry-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333333;
}

/* Typography */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: #1a1a1a !important;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.entry-content h2 {
    font-size: 2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.entry-content h3 {
    font-size: 1.5rem;
}

/* Paragraphs */
.entry-content p {
    margin-bottom: 1.5rem;
    color: #333333 !important;
}

/* Lists */
.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
    color: #333333 !important;
}

/* Links */
.entry-content a {
    color: #2e7d32;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.entry-content a:hover {
    color: #1b5e20;
    text-decoration: none;
}

/* Horizontal rules */
.entry-content hr {
    margin: 3rem 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

/* Buttons */
.entry-content .button,
.entry-content a.button {
    display: inline-block;
    background-color: #2e7d32 !important;
    color: white !important;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.entry-content .button:hover,
.entry-content a.button:hover {
    background-color: #1b5e20 !important;
    color: white !important;
}

/* Remove any theme patterns or blocks */
.single-post .wp-block-pattern,
.single-post [class*="wp-block-pattern"],
.single-post .wp-block-template-part,
.single-post [class*="has-background"] {
    background: transparent !important;
}

/* Blog post meta */
.single-post .entry-meta {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 0 20px;
    color: #666;
    font-size: 0.9rem;
}

/* Blog post title */
.single-post .entry-title {
    max-width: 800px;
    margin: 0 auto 1rem;
    padding: 0 20px;
    font-size: 2.5rem;
    color: #1a1a1a !important;
}

/* Remove any background images from header/hero areas */
.single-post header,
.single-post .site-header,
.single-post .entry-header,
.blog header,
.blog .site-header {
    background-image: none !important;
    background-color: #ffffff !important;
}

/* Ensure readability */
.entry-content strong {
    font-weight: 600;
    color: #1a1a1a;
}

.entry-content em {
    font-style: italic;
}

/* Blockquotes */
.entry-content blockquote {
    margin: 2rem 0;
    padding-left: 2rem;
    border-left: 4px solid #2e7d32;
    font-style: italic;
    color: #555;
}

/* Code blocks */
.entry-content code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

/* Tables */
.entry-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
}

.entry-content th,
.entry-content td {
    padding: 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.entry-content th {
    background-color: #f5f5f5;
    font-weight: 600;
}

/* Images */
.entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
}

/* Remove any overlay or cover blocks */
.wp-block-cover,
.wp-block-cover__background,
.wp-block-cover__inner-container {
    background: transparent !important;
}

/* Blog archive page */
.blog .site-main article,
.archive .site-main article {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #e0e0e0;
}

.blog .site-main article:last-child,
.archive .site-main article:last-child {
    border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .entry-content {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .single-post .entry-title {
        font-size: 2rem;
    }
    
    .entry-content h2 {
        font-size: 1.5rem;
    }
    
    .entry-content h3 {
        font-size: 1.25rem;
    }
}

/* Override any theme-specific patterns */
body.single-post .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    background: transparent !important;
}

/* Ensure no dark overlays */
.single-post *[class*="overlay"],
.single-post *[class*="has-background-dim"] {
    background: transparent !important;
    opacity: 1 !important;
}

/* Clean sidebar if present */
.single-post .sidebar,
.single-post aside {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
}

/* Focus on content readability */
.single-post main:focus {
    outline: none;
}

/* Remove any gradients */
.single-post *[style*="gradient"] {
    background-image: none !important;
}