/**
 * Enhanced Single Blog Post Styles
 * Improves typography, readability, and Gutenberg block rendering
 */

/* Single Post Layout */
.single-post .site-main {
    background: #f9fafb;
    padding: 0;
}

.single-post .entry-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Typography Improvements */
.single-post .entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Post Title */
.single-post .wp-block-post-title {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Post Meta */
.single-post .wp-block-template-part {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.single-post .wp-block-post-date time {
    color: #666;
}

.single-post .taxonomy-category a {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.single-post .taxonomy-category a:hover {
    background: #2e7d32;
    color: white;
}

/* Intro Paragraph */
.single-post .intro-paragraph {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 30px;
    font-weight: 400;
    border-left: 4px solid #2e7d32;
    padding-left: 20px;
}

/* Headings */
.single-post .entry-content h2 {
    font-size: 2rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #1a1a1a;
    font-weight: 600;
    line-height: 1.4;
    position: relative;
    padding-top: 10px;
}

.single-post .entry-content h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #2e7d32, #4caf50);
}

.single-post .entry-content h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.single-post .entry-content h4 {
    font-size: 1.25rem;
    margin-top: 25px;
    margin-bottom: 12px;
    color: #444;
    font-weight: 600;
}

/* Paragraphs and Text */
.single-post .entry-content p {
    margin-bottom: 20px;
    text-align: justify;
    hyphens: auto;
}

.single-post .entry-content strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Links */
.single-post .entry-content a {
    color: #2e7d32;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.single-post .entry-content a:hover {
    color: #1b5e20;
    border-bottom-color: #1b5e20;
}

/* Lists */
.single-post .entry-content ul,
.single-post .entry-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.single-post .entry-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.single-post .entry-content ul li::marker {
    color: #2e7d32;
}

/* Blockquotes */
.single-post .wp-block-quote {
    margin: 30px 0;
    padding: 20px 30px;
    background: #f8f9fa;
    border-left: 4px solid #2e7d32;
    font-style: italic;
    position: relative;
}

.single-post .wp-block-quote::before {
    content: '"';
    font-size: 3rem;
    color: #2e7d32;
    position: absolute;
    top: -10px;
    left: 10px;
    opacity: 0.3;
}

.single-post .wp-block-quote p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.single-post .wp-block-quote cite {
    display: block;
    text-align: right;
    font-size: 0.9rem;
    color: #666;
    font-style: normal;
    margin-top: 10px;
}

/* Pull Quotes */
.single-post .wp-block-pullquote {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 3px solid #e0e0e0;
    border-bottom: 3px solid #e0e0e0;
    text-align: center;
}

.single-post .wp-block-pullquote blockquote {
    font-size: 1.25rem;
    font-weight: 500;
    color: #2e7d32;
    max-width: 600px;
    margin: 0 auto;
}

.single-post .wp-block-pullquote blockquote p {
    margin: 0;
}

/* Images */
.single-post .wp-block-image {
    margin: 30px 0;
}

.single-post .wp-block-image img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.single-post .wp-block-image.alignwide {
    margin-left: -40px;
    margin-right: -40px;
    max-width: calc(100% + 80px);
}

.single-post .wp-block-image figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* Galleries */
.single-post .wp-block-gallery {
    margin: 30px 0;
}

.single-post .wp-block-gallery .wp-block-image {
    margin: 0;
}

.single-post .wp-block-gallery .wp-block-image img {
    height: 100%;
    object-fit: cover;
}

.single-post .wp-block-gallery figcaption {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 12px;
    font-size: 0.875rem;
}

/* Columns */
.single-post .wp-block-columns {
    margin: 30px 0;
    gap: 30px;
}

.single-post .wp-block-column {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.single-post .wp-block-column h3 {
    margin-top: 0;
    color: #2e7d32;
}

/* Separators */
.single-post .wp-block-separator {
    margin: 40px 0;
    border-color: #e0e0e0;
}

.single-post .wp-block-separator.is-style-wide {
    max-width: 100%;
}

/* Tables */
.single-post .wp-block-table {
    margin: 30px 0;
}

.single-post .wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}

.single-post .wp-block-table th {
    background: #f5f5f5;
    font-weight: 600;
    text-align: left;
    padding: 12px;
}

.single-post .wp-block-table td {
    padding: 12px;
    border: 1px solid #e0e0e0;
}

.single-post .wp-block-table tr:nth-child(even) {
    background: #fafafa;
}

/* Buttons */
.single-post .wp-block-button {
    margin: 20px 0;
}

.single-post .wp-block-button__link {
    background: #2e7d32;
    color: white;
    padding: 14px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid #2e7d32;
}

.single-post .wp-block-button__link:hover {
    background: #1b5e20;
    border-color: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46,125,50,0.3);
}

.single-post .wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent;
    color: #2e7d32;
}

.single-post .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: #2e7d32;
    color: white;
}

/* Info Boxes and Notices */
.single-post .entry-content > p:has(strong:first-child) {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2e7d32;
    margin: 20px 0;
}

/* Special formatted paragraphs with emojis */
.single-post .entry-content h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Info boxes based on content */
.single-post .entry-content p:has(strong:first-child) {
    position: relative;
    padding-left: 25px;
}

/* Trail tip styling */
.single-post .wp-block-pullquote p:has-text("Trail tip") {
    color: #2e7d32;
    font-weight: 500;
}

/* Comments Section */
.single-post .wp-block-post-comments {
    max-width: 800px;
    margin: 60px auto 40px;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.single-post .comment-reply-title {
    font-size: 1.75rem;
    margin-bottom: 30px;
    color: #1a1a1a;
}

.single-post .comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.single-post .comment-form input[type="text"],
.single-post .comment-form input[type="email"],
.single-post .comment-form input[type="url"],
.single-post .comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.single-post .comment-form input:focus,
.single-post .comment-form textarea:focus {
    outline: none;
    border-color: #2e7d32;
}

.single-post .comment-form .submit {
    background: #2e7d32;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.single-post .comment-form .submit:hover {
    background: #1b5e20;
    transform: translateY(-2px);
}

/* Post Navigation */
.single-post .wp-block-post-navigation-link {
    margin: 20px 0;
}

.single-post .wp-block-post-navigation-link a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.single-post .wp-block-post-navigation-link a:hover {
    color: #1b5e20;
    gap: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .single-post .entry-content {
        padding: 30px 20px;
        font-size: 1.05rem;
    }
    
    .single-post .wp-block-post-title {
        font-size: 2rem;
    }
    
    .single-post .intro-paragraph {
        font-size: 1.125rem;
    }
    
    .single-post .entry-content h2 {
        font-size: 1.75rem;
    }
    
    .single-post .entry-content h3 {
        font-size: 1.375rem;
    }
    
    .single-post .wp-block-image.alignwide {
        margin-left: -20px;
        margin-right: -20px;
        max-width: calc(100% + 40px);
    }
    
    .single-post .wp-block-columns {
        flex-direction: column;
    }
    
    .single-post .entry-content p {
        text-align: left;
    }
}

/* Print Styles */
@media print {
    .single-post .entry-content {
        box-shadow: none;
        padding: 0;
    }
    
    .single-post .entry-content a {
        color: #000;
        text-decoration: underline;
    }
    
    .single-post .wp-block-image img {
        box-shadow: none;
    }
}

/* Accessibility Improvements */
.single-post .entry-content *:focus {
    outline: 2px solid #2e7d32;
    outline-offset: 2px;
}

.single-post .skip-link:focus {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 999999;
    padding: 10px 20px;
    background: #2e7d32;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

/* Dark Mode Support (if implemented) */
@media (prefers-color-scheme: dark) {
    .single-post .entry-content {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .single-post .wp-block-post-title,
    .single-post .entry-content h2,
    .single-post .entry-content h3,
    .single-post .entry-content h4 {
        color: #f5f5f5;
    }
    
    .single-post .entry-content strong {
        color: #fff;
    }
    
    .single-post .wp-block-quote,
    .single-post .wp-block-column {
        background: #2a2a2a;
    }
}