/* Styles for templates/blog_detail.html (moved out of the template) */
/* Enhanced Related Posts Styling */
.related-posts {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #faf8f5 0%, #f2e8dc 100%);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e8ddd2;
}

.related-posts h3 {
    font-size: 1.8rem;
    color: #b85c3c;
    margin-bottom: 0.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-posts h3 i {
    color: #e07a5f;
}

.related-posts-subtitle {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block; /* Remove any inline spacing */
    background-color: #f2e8dc; /* Background for when image loads */
    transition: transform 0.3s ease;
}

/* Add a subtle placeholder for missing images */
.related-post-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8f5f2 0%, #f2e8dc 50%, #e8ddd2 100%);
    z-index: -1;
}

/* Fix any potential spacing issues */
.related-post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}


/* Mobile responsiveness fix */
@media (max-width: 768px) {
    .related-post-image {
        height: 240px;
    }
}

/* ===========================================
   ADDITIONAL DEBUGGING STYLES
   =========================================== */

/* Temporary debug borders to see container boundaries */
/*
.related-post-card {
    border: 2px solid red !important;
}

.related-post-image {
    border: 2px solid blue !important;
}

.related-post-image img {
    border: 2px solid green !important;
}
*/

.related-post-card:hover .related-post-image img {
    transform: scale(1.08);
}

.related-post-content {
    padding: 1.25rem;
}

.related-post-content h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: #39332e;
    line-height: 1.3;
    font-weight: 600;
}

.related-post-tags {
    margin-bottom: 0.75rem;
}

.shared-tag {
    background: linear-gradient(135deg, #e07a5f, #b85c3c);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
    display: inline-block;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(184, 92, 60, 0.2);
}

.related-post-meta {
    display: flex;
    gap: 1rem;
    color: #777;
    font-size: 0.85rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.meta-item i {
    color: #b85c3c;
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .related-posts {
        margin-top: 2rem;
        padding: 1.5rem;
        border-radius: 10px;
    }
    
    .related-posts h3 {
        font-size: 1.5rem;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .related-post-image {
        height: 240px;
    }
    
    .related-post-content {
        padding: 1rem;
    }
}
.affiliate-products-gallery {
    margin-top: 3rem;
    padding: 2rem;
    background-color: #f9f7f5;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
}

.affiliate-products-gallery h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-warm);
    position: relative;
}

.affiliate-products-gallery h3::after {
    content: '';
    flex-grow: 1;
    height: 2px;
    background: linear-gradient(to right, var(--accent-warm), transparent);
    margin-left: 1rem;
}

.affiliate-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 1.5rem;
}

/* Product Card */
.affiliate-product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.affiliate-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-warm);
}

.affiliate-product-link {
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Product Image Container */
.affiliate-product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.affiliate-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.affiliate-product-card:hover .affiliate-product-image img {
    transform: scale(1.1);
}

/* Overlay on hover */
.affiliate-product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(174, 92, 64, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    gap: 10px;
}

.affiliate-product-overlay span {
    font-weight: bold;
    font-size: 1.1rem;
}

.affiliate-product-overlay i {
    font-size: 1.5rem;
}

.affiliate-product-card:hover .affiliate-product-overlay {
    opacity: 1;
}

/* Product Title and Description */
.affiliate-product-title {
    padding: 15px 15px 0;
    margin: 0;
    font-size: 1rem;
    color: var(--accent-warm);
    line-height: 1.3;
}

.affiliate-product-description {
    padding: 5px 15px 15px;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

/* Affiliate Disclaimer */
.affiliate-disclaimer {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: rgba(174, 92, 64, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-warm);
}

.affiliate-disclaimer i {
    font-size: 1.5rem;
    color: var(--accent-warm);
}

.affiliate-disclaimer p {
    margin: 0;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-secondary);
}

h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-warm);
}


    .blog-post {
        max-width: 1000px;
        margin: 2rem auto;
        margin-top: 0;
        padding: 2rem;
        font-family: 'Georgia', serif;
        background-color: #fff;
        background-image: url('data:image/png;base64,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');
        border-radius: 10px;
        border: 1px solid #e0d9cf;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        position: relative;
        color: #39332e;
        display: flex;
        flex-direction: column;
    }
    
    .blog-post::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXWBgYGHh4d5eXlzc3OLi4ubm5uVlZWPj4+NjY19fX2JiYl/f39ra2uRkZGZmZlpaWmXl5dvb29xcXGTk5NnZ2c8TV1mAAAAG3RSTlNAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAvEOwtAAAFVklEQVR4XpWWB67c2BUFb3g557T/hRo9/WUMZHlgr4Bg8Z4qQgQJlHI4A8SzFVrapvmTF9O7dmYRFZ60YiBhJRCgh1FYhiLAmdvX0CzTOpNE77ME0Zty/nWWzchDtiqrmQDeuv3powQ5ta2eN0FY0InkqDD73lT9c9lEzwUNqgFHs9VQce3TVClFCQrSTfOiYkVJQBmpbq2L6iZavPnAPcoU0dSw0SUTqz/GtrGuXfbyyBniKykOWQWGqwwMA7QiYAxi+IlPdqo+hYHnUt5ZPfnsHJyNiDtnpJyayNBkF6cWoYGAMY92U2hXHF/C1M8uP/ZtYdiuj26UdAdQQSXQErwSOMzt/XWRWAz5GuSBIkwG1H3FabJ2OsUOUhGC6tK4EMtJO0ttC6IBD3kM0ve0tJwMdSfjZo+EEISaeTr9P3wYrGjXqyC1krcKdhMpxEnt5JetoulscpyzhXN5FRpuPHvbeQaKxFAEB6EN+cYN6xD7RYGpXpNndMmZgM5Dcs3YSNFDHUo2LGfZuukSWyUYirJAdYbF3MfqEKmjM+I2EfhA94iG3L7uKrR+GdWD73ydlIB+6hgref1QTlmgmbM3/LeX5GI1Ux1RWpgxpLuZ2+I+IjzZ8wqE4nilvQdkUdfhzI5QDWy+kw5Wgg2pGpeEVeCCA7b85BO3F9DzxB3cdqvBzWcmzbyMiqhzuYqtHRVG2y4x+KOlnyqla8AoWWpuBoYRxzXrfKuILl6SfiWCbjxoZJUaCBj1CjH7GIaDbc9kqBY3W/Rgjda1iqQcOJu2WW+76pZC9QG7M00dffe9hNnseupFL53r8F7YHSwJWUKP2q+k7RdsxyOB11n0xtOvnW4irMMFNV4H0uqwS5ExsmP9AxbDTc9JwgneAT5vTiUSm1E7BSflSt3bfa1tv8Di3R8n3Af7MNWzs49hmauE2wP+ttrq+AsWpFG2awvsuOqbipWHgtuvuaAE+A1Z/7gC9hesnr+7wqCwG8c5yAg3AL1fm8T9AZtp/bbJGwl1pNrE7RuOX7PeMRUERVaPpEs+yqeoSmuOlokqw49pgomjLeh7icHNlG19yjs6XXOMedYm5xH2YxpV2tc0Ro2jJfxC50ApuxGob7lMsxfTbeUv07TyYxpeLucEH1gNd4IKH2LAg5TdVhlCafZvpskfncCfx8pOhJzd76bJWeYFnFciwcYfubRc12Ip/ppIhA1/mSZ/RxjFDrJC5xifFjJpY2Xl5zXdguFqYyTR1zSp1Y9p+tktDYYSNflcxI0iyO4TPBdlRcpeqjK/piF5bklq77VSEaA+z8qmJTFzIWiitbnzR794USKBUaT0NTEsVjZqLaFVqJoPN9ODG70IPbfBHKK+/q/AWR0tJzYHRULOa4MP+W/HfGadZUbfw177G7j/OGbIs8TahLyynl4X4RinF793Oz+BU0saXtUHrVBFT/DnA3ctNPoGbs4hRIjTok8i+algT1lTHi4SxFvONKNrgQFAq2/gFnWMXgwffgYMJpiKYkmW3tTg3ZQ9Jq+f8XN+A5eeUKHWvJWJ2sgJ1Sop+wwhqFVijqWaJhwtD8MNlSBeWNNWTa5Z5kPZw5+LbVT99wqTdx29lMUH4OIG/D86ruKEauBjvH5xy6um/Sfj7ei6UUVk4AIl3MyD4MSSTOFgSwsH/QJWaQ5as7ZcmgBZkzjjU1UrQ74ci1gWBCSGHtuV1H2mhSnO3Wp/3fEV5a+4wz//6qy8JxjZsmxxy5+4w9CDNJY09T072iKG0EnOS0arEYgXqYnXcYHwjTtUNAcMelOd4xpkoqiTYICWFq0JSiPfPDQdnt+4/wuqcXY47QILbgAAAABJRU5ErkJggg==");
        opacity: 0.03;
        pointer-events: none;
        border-radius: 10px;
        z-index: 0;
    }
    
    /* Vintage stained edges */
    .blog-post::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: 
            radial-gradient(circle at top left, rgba(179, 156, 120, 0.2), transparent 30%),
            radial-gradient(circle at bottom right, rgba(179, 156, 120, 0.2), transparent 30%);
        pointer-events: none;
        border-radius: 10px;
        z-index: 0;
    }
    
    .post-header {
        text-align: center;
        margin-bottom: 2rem;
        border-bottom: 1px solid #e0d9cf;
        padding-bottom: 1.5rem;
        position: relative;
        z-index: 1;
    }
    
    .post-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
        line-height: 1.2;
        font-family: 'Georgia', serif;
        color: #b85c3c;
        position: relative;
        display: inline-block;
    }
    
    .post-title::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 25%;
        width: 50%;
        height: 2px;
        background: linear-gradient(to right, transparent, #b85c3c, transparent);
    }
    
    .post-meta {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        font-size: 0.95rem;
        color: #665e53;
    }
    
    .post-meta span {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .post-meta a {
        color: #b85c3c;
        text-decoration: none;
        transition: color 0.2s;
    }
    
    .post-meta a:hover {
        color: #784527;
    }
    
    
.featured-image {
    position: relative; /* Not absolute, stays in document flow */
    margin: 1.5rem auto 2.5rem;
    max-width: 90%;
    text-align: center;
    overflow: visible;
    z-index: 1;
    clear: both; /* Ensures proper document flow */
}

.featured-image-wrapper {
    display: inline-block;
    position: relative;
    border: 12px solid white;
    outline: 1px solid #e0d9cf;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    line-height: 0; /* Removes any space below the image */
    max-width: 50%;
    background-color: white; /* Ensures white background */
}

.post-thumbnail {
    display: block;
    max-width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.featured-image:hover .post-thumbnail {
    transform: scale(1.01);
}

.post-content, .post-intro, .recipe-card {
    clear: both; 
    position: relative; 
    z-index: 1; 
}

/* Decorative corner accents for featured image */
.featured-image-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #f2e8dc;
    box-shadow: inset 0 0 0 1px #e0d9cf;
    pointer-events: none;
    z-index: 2;
}
    
    
    /* Introduction text styling */
    .post-intro {
        font-size: 1.2rem;
        line-height: 1.8;
        margin-bottom: 2.5rem;
        padding: 1.8rem;
        background-color: #f9f7f5;
        border-radius: 8px;
        border-left: 4px solid #b85c3c;
        position: relative;
        z-index: 1;
        color: #4b3f36;
        font-style: italic;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }
    
    /* Recipe card enhanced with rustic styling */
    .recipe-card {
        background-color: #fff;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding: 2.5rem;
        margin: 2rem 0;
        border: 1px solid #e0d9cf;
        position: relative;
        z-index: 1;
    }
    
    /* Recipe metadata styling */
    .recipe-info {
        display: flex;
        flex-wrap: wrap;
        gap: 2.5rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid #e0d9cf;
    }
    
    .info-item {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        font-size: 1.1rem;
        color: #665e53;
    }
    
    .info-item i {
        color: #b85c3c;
        font-size: 1.3rem;
    }
    
    /* Ingredients section styling */
    .ingredients-section {
        margin: 2rem 0;
    }
    
    .ingredients-section h3, .cooking-steps h3 {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
        color: #b85c3c;
        position: relative;
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }
    
    .ingredients-section h3::after, .cooking-steps h3::after {
        content: '';
        flex-grow: 1;
        height: 2px;
        background: linear-gradient(to right, #e0d9cf, transparent);
        margin-left: 1rem;
    }
    
    .ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: #f9f7f5;
    border-radius: 8px;
    padding: 1.5rem;
    list-style: none;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}
    .ingredient-item {
        padding: 0.8rem;
        border-bottom: 1px dashed #e0d9cf;
        display: flex;
        align-items: baseline;
        position: relative;
    }
    
    .ingredient-item::before {
        content: '•';
        position: absolute;
        left: 0;
        color: #b85c3c;
    }
    
    .ingredient-amount {
        min-width: 100px;
        font-weight: 600;
        color: #665e53;
        margin-left: 1rem;
    }
    
    .ingredient-name {
        color: #39332e;
    }
    
    .ingredient-notes {
        color: #897b6d;
        font-size: 0.9rem;
        font-style: italic;
        margin-left: 5rem;
    }
    
    .cooking-steps {
        margin-top: 2.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid #e0d9cf;
    }
    
    .steps-content {
        line-height: 1.8;
        color: #39332e;
        font-size: 1.1rem;
        position: relative;
    }
    
    .steps-content img, .post-content img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        margin: 1.5rem auto;
        display: block;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        border: 5px solid white;
        outline: 1px solid #e0d9cf;
        transition: transform 0.3s ease;
    }
    
    .steps-content img:hover, .post-content img:hover {
        transform: scale(1.02);
    }
    
    /* Image caption styling */
    .steps-content figure, .post-content figure {
        margin: 2rem auto;
        text-align: center;
    }
    
    .steps-content figcaption, .post-content figcaption {
        font-size: 0.9rem;
        color: #665e53;
        font-style: italic;
        margin-top: 0.5rem;
    }
    
    .steps-content ol {
        counter-reset: recipe-steps;
        list-style-type: none;
        padding-left: 0;
        margin: 1.5rem 0;
    }
    
    .steps-content ol li {
        counter-increment: recipe-steps;
        position: relative;
        padding: 1.5rem 1.5rem 1.5rem 4rem;
        margin-bottom: 1.5rem;
        background-color: #f9f7f5;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        border-left: 3px solid #b85c3c;
    }
    
    .steps-content ol li::before {
        content: counter(recipe-steps);
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        background-color: #b85c3c;
        color: white;
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-weight: bold;
        font-family: 'Georgia', serif;
        font-style: italic;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    /* If ordered list is nested */
    .steps-content ol ol {
        counter-reset: recipe-substeps;
        margin: 1rem 0 0.5rem 1rem;
    }
    
    .steps-content ol ol li {
        counter-increment: recipe-substeps;
        padding: 1rem 1rem 1rem 3rem;
        margin-bottom: 1rem;
        background-color: rgba(255, 255, 255, 0.5);
        border-left: 2px solid #c9a77a;
    }
    
    .steps-content ol ol li::before {
        content: counter(recipe-steps) "." counter(recipe-substeps);
        background-color: #c9a77a;
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }
    
    .steps-content ul, .post-content ul {
        list-style-type: none;
        padding-left: 0.5rem;
        margin: 1.5rem 0;
    }
    
    .steps-content ul li, .post-content ul li {
        position: relative;
        padding: 0.7rem 0.7rem 0.7rem 2rem;
        margin-bottom: 0.7rem;
    }
    
    .steps-content ul li::before, .post-content ul li::before {
        content: '✦';
        position: absolute;
        left: 0;
        color: #b85c3c;
        font-size: 1rem;
    }


    
    /* Post tags styling */
    .post-tags {
        margin: 2rem 0;
        border-top: 1px solid #e0d9cf;
        padding-top: 1.5rem;
    }
    
    .post-tags h4 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
        color: #665e53;
    }
    
    .tags-container {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .tag {
        background-color: #f2e8dc;
        color: #b85c3c;
        padding: 0.4rem 0.8rem;
        border-radius: 20px;
        font-size: 0.9rem;
        transition: all 0.2s ease;
    }
    
    .tag:hover {
        background-color: #e0d9cf;
        transform: translateY(-2px);
    }
    
    /* Related posts styling */
    .related-posts {
        margin-top: 3rem;
    }
    
    .related-posts h3 {
        font-size: 1.5rem;
        color: #b85c3c;
        margin-bottom: 1.5rem;
        text-align: center;
        position: relative;
    }
    
    .related-posts h3::before, .related-posts h3::after {
        content: '';
        position: absolute;
        top: 50%;
        width: 30%;
        height: 1px;
        background: linear-gradient(to right, transparent, #e0d9cf, transparent);
    }
    
    .related-posts h3::before {
        left: 0;
    }
    
    .related-posts h3::after {
        right: 0;
    }
    
    .related-posts-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .related-post-card {
  background: white;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid #e0d9cf;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
    
    .related-post-card:hover {
  border-color: #e07a5f;
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
    
    .related-post-card a {
        text-decoration: none;
        color: inherit;
    }
    
    .related-post-card img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        transition: transform 0.5s ease;
    }
    
    .related-post-card:hover img {
        transform: scale(1.05);
    }
    
    .related-post-card h4 {
        padding: 1rem;
        margin: 0;
        font-size: 1rem;
        color: #39332e;
        font-weight: normal;
    }
    
    /* Back link styling */
    .back-link {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background-color: #b85c3c;
        color: white;
        padding: 0.8rem 1.5rem;
        border-radius: 5px;
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .back-link:hover {
        background-color: #784527;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
    
    .post-content {
        line-height: 1.8;
        font-size: 1.1rem;
        color: #39332e;
        position: relative;
        z-index: 1;
    }
    
    /* Image gallery styling for multiple images */
    .image-gallery {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
        margin: 2rem 0;
    }
    
    .image-gallery img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 8px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .image-gallery img:hover {
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    }
    
    /* Fancy quote styling */
    blockquote {
        position: relative;
        margin: 2rem 0;
        padding: 2rem 3rem;
        background-color: #f9f7f5;
        border-radius: 8px;
        font-style: italic;
        color: #4b3f36;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }
    
    blockquote::before, blockquote::after {
        content: '"';
        position: absolute;
        font-size: 4rem;
        color: #b85c3c;
        opacity: 0.2;
        font-family: Georgia, serif;
    }
    
    blockquote::before {
        top: 0.5rem;
        left: 1rem;
    }
    
    blockquote::after {
        bottom: -1.5rem;
        right: 1rem;
    }
    


/* ============================================
   MOBILE RESPONSIVE STYLES (768px and below)
   ============================================ */

@media screen and (max-width: 768px) {
    
    /* === MAIN BLOG POST CONTAINER === */
    .blog-post {
        max-width: 100%;
        padding: 1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
        background-color: #fff;
    }
    
    /* === BLOG POST TITLE === */
    .blog-post h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
        text-align: center;
        line-height: 1.4;
        padding: 0 0.5rem;
    }
    
    /* === FEATURED IMAGE - FIXED WRAPPER ISSUES === */
        .blog-post .featured-image {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 0;
        text-align: center;
        position: relative;
        overflow: visible;
        clear: both;
    }
    
    .featured-image-wrapper {
        display: inline-block;
        position: relative;
        border: 8px solid white;
        outline: 1px solid #e0d9cf;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
        line-height: 0;
        max-width: 90%;
        width: auto;
        background-color: white;
        margin: 0 auto;
    }
    
    .blog-post .featured-image,
    .blog-post .post-thumbnail {
        display: block;
        margin: 0 auto;
        width: 100%;
        max-width: 100%; 
        height: auto;
        border-radius: 4px;
        object-fit: cover;
    }
    
    /* === TEXT EDITOR IMAGES - COMPREHENSIVE CENTERING === */
    
    /* Center ALL images within content areas */
    .blog-post .post-content img,
    .blog-post .post-intro img,
    .blog-post .recipe-card img,
    .blog-post p img,
    .blog-post div img,
    .blog-post article img {
        display: block !important;
        margin: 1rem auto !important;
        max-width: 90% !important;
        width: auto !important;
        height: auto !important;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        clear: both;
        float: none !important;
    }
    
    .blog-post .post-content,
    .blog-post .post-intro {
        text-align: left; 
    }
    
    .blog-post .post-content > *:has(img),
    .blog-post .post-intro > *:has(img) {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin: 1rem 0;
    }
    
    .blog-post .post-content p,
    .blog-post .post-intro p,
    .blog-post .post-content div,
    .blog-post .post-intro div {
        text-align: center;
    }
    
    .blog-post .post-content p:not(:has(img)),
    .blog-post .post-intro p:not(:has(img)),
    .blog-post .post-content div:not(:has(img)),
    .blog-post .post-intro div:not(:has(img)) {
        text-align: left;
    }
    
    .blog-post .post-content *,
    .blog-post .post-intro * {
        text-align: inherit;
    }
    
    .blog-post .post-content img,
    .blog-post .post-intro img {
        text-align: center;
    }
    
    .blog-post figure {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        margin: 1rem auto !important;
        max-width: 90% !important;
        clear: both;
    }
    
    .blog-post figure img {
        margin: 0 auto 0.5rem auto !important;
    }
    
    .blog-post figcaption {
        text-align: center;
        font-style: italic;
        font-size: 0.9rem;
        color: #666;
        margin-top: 0.5rem;
        padding: 0 0.5rem;
        width: 100%;
    }
    
    .blog-post .alignleft,
    .blog-post .alignright,
    .blog-post .aligncenter,
    .blog-post .wp-caption,
    .blog-post .wp-image {
        display: block !important;
        margin: 1rem auto !important;
        float: none !important;
        text-align: center !important;
        max-width: 90% !important;
        clear: both !important;
    }
    
    .blog-post .wp-caption {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .blog-post .wp-caption img {
        margin: 0 auto 0.5rem auto !important;
    }
    
    .blog-post .wp-caption-text {
        text-align: center !important;
        font-style: italic;
        font-size: 0.9rem;
        color: #666;
    }
    
    .blog-post img[style*="float"],
    .blog-post img[align] {
        float: none !important;
        display: block !important;
        margin: 1rem auto !important;
        text-align: center !important;
    }
    
    .blog-post p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }
    
    .blog-post h2 {
        font-size: 1.5rem;
        margin: 1.5rem 0 1rem 0;
        padding: 0 0.5rem;
        text-align: left;
    }
    
    .blog-post h3 {
        font-size: 1.3rem;
        margin: 1.25rem 0 0.75rem 0;
        padding: 0 0.5rem;
        text-align: left;
    }
    
    .ingredients-section {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: 6px;
        text-align: left;
    }
    
    .ingredients-section h3 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
        text-align: left;
    }
    
    .ingredients-section ul {
        padding-left: 1.5rem;
        text-align: left;
    }
    
    .ingredients-section li {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        line-height: 1.5;
        text-align: left;
    }
    
    /* === RECIPE STATS === */
    


    
    /* === POST METADATA === */
    
    
    /* === POST NAVIGATION === */
    .post-navigation {
        display: flex;
        gap: 0.75rem;
        flex-direction: column;
    }

    
    /* === POST TAGS === */
    .post-tags {
        margin: 1rem 0.5rem;
        text-align: center;
    }
    
    .post-tags .tag {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        margin: 0.25rem;
        display: inline-block;
        border-radius: 4px;
    }
    
    /* === AFFILIATE DISCLOSURE === */
    .affiliate-disclosure {
        padding: 1rem;
        border-radius: 6px;
        font-size: 0.9rem;
        text-align: left;
    }
}

/* ============================================
   SMALL MOBILE RESPONSIVE STYLES (480px and below)
   ============================================ */

@media screen and (max-width: 480px) {
    
    .blog-post {
        padding: 0.75rem;
    }
    
    .blog-post h1 {
        font-size: 1.5rem;
        padding: 0 0.25rem;
    }
    
    .blog-post h2 {
        font-size: 1.3rem;
        padding: 0 0.25rem;
    }
    
    .blog-post h3 {
        font-size: 1.1rem;
        padding: 0 0.25rem;
    }
    
    .blog-post p {
        font-size: 0.95rem;
        padding: 0 0.25rem;
    }
    
    /* === FEATURED IMAGE ADJUSTMENTS === */
    .featured-image-wrapper {
        max-width: 95%;
        border: 6px solid white;
    }
    
    /* === TEXT EDITOR IMAGES ON SMALL MOBILE === */
    .blog-post .post-content img,
    .blog-post .post-intro img,
    .blog-post .recipe-card img,
    .blog-post p img,
    .blog-post div img {
        max-width: 95% !important;
        margin: 0.75rem auto !important;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
    }
    
    .blog-post figure {
        max-width: 95% !important;
    }
    
    /* Other small mobile adjustments */
    .ingredients-section {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }


    
    .post-navigation {
        gap: 0.5rem;
    }

}

/* ============================================
   TABLET RESPONSIVE FIXES (769px - 1024px)
   ============================================ */

@media screen and (min-width: 769px) and (max-width: 1024px) {
    
    .blog-post {
        max-width: 100%;
        margin: 1.5rem auto;
        padding: 1.5rem;
    }
    
    .blog-post h1 {
        font-size: 2.2rem;
    }
    
    .blog-post p {
        font-size: 1.05rem;
    }

    
    .featured-image-wrapper {
        max-width: 80%;
        border: 10px solid white;
    }
    
    .blog-post .featured-image,
    .blog-post img {
        max-width: 100%; 
        border-radius: 6px;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    }
    
    /* Text editor images on tablets */
    .blog-post .post-content img,
    .blog-post .post-intro img,
    .blog-post .recipe-card img {
        max-width: 80% !important;
        margin: 1.5rem auto !important;
    }
    
    .ingredients-section {
        padding: 1.5rem;
    }
    .recipe-card {
        padding: 1rem;

    }


}

/* ============================================
   LANDSCAPE MOBILE ORIENTATION
   ============================================ */

@media screen and (max-height: 600px) and (orientation: landscape) {
    
    .blog-post {
        margin: 0.5rem auto;
        padding: 0.75rem 1rem;
    }
    
    .blog-post h1 {
        font-size: 1.6rem;
        margin-bottom: 0.75rem;
    }
    
    .featured-image-wrapper {
        max-width: 70%;
        border: 6px solid white;
    }
    
    .blog-post .post-content img,
    .blog-post .post-intro img {
        max-width: 70% !important;
        margin: 0.75rem auto !important;
    }


}

.blog-post img:focus {
    outline: 2px solid #b85c3c;
    outline-offset: 2px;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .blog-post img {
        cursor: default;
    }
    
    /* Remove hover effects on touch devices */
    .featured-image:hover .post-thumbnail {
        transform: none;
    }
    
    /* Larger tap targets */
        .post-tags .tag {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .blog-post img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ============================================
   FALLBACK FOR OLDER BROWSERS
   ============================================ */

/* For browsers that don't support modern CSS features */
.blog-post .post-content {
    overflow: hidden;
}

.blog-post .post-content img,
.blog-post .post-intro img {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ensure images don't break layout */

/* Force text content back to left alignment */
.blog-post .post-content h1,
.blog-post .post-content h2,
.blog-post .post-content h3,
.blog-post .post-content h4,
.blog-post .post-content h5,
.blog-post .post-content h6,
.blog-post .post-content ul,
.blog-post .post-content ol,
.blog-post .post-intro h1,
.blog-post .post-intro h2,
.blog-post .post-intro h3,
.blog-post .post-intro h4,
.blog-post .post-intro h5,
.blog-post .post-intro h6,
.blog-post .post-intro ul,
.blog-post .post-intro ol {
    text-align: left !important;
}


@media screen and (min-width: 769px) and (max-width: 1024px) {
    .blog-post .featured-image,
    .blog-post img {
        max-width: 100% !important; 
        border-radius: 6px;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    }
}

/* Mobile image fixes */
@media screen and (max-width: 768px) {
    
    /* Fix featured image wrapper adaptation */
        .blog-post .featured-image {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 1rem 0;
        text-align: center;
    }
    
    .featured-image-wrapper {
        max-width: 90%;
        width: auto;
        margin: 0 auto;
        display: inline-block;
    }
    
    .blog-post .featured-image,
    .blog-post .post-thumbnail {
        width: 100%;
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
    
    /* Center ALL text editor images */
    .blog-post .post-content img,
    .blog-post .post-intro img,
    .blog-post .recipe-card img,
    .blog-post p img,
    .blog-post div img {
        display: block !important;
        margin: 1rem auto !important;
        max-width: 90% !important;
        width: auto !important;
        height: auto !important;
        float: none !important;
        clear: both;
    }
    
    /* Force center alignment for image containers */
    .blog-post .post-content,
    .blog-post .post-intro {
        overflow: hidden; /* Prevent layout breaks */
    }
    
    /* Alternative centering method for better compatibility */
    .blog-post .post-content img,
    .blog-post .post-intro img {
        position: relative;
        left: 50%;
        transform: translateX(-50%);
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Override any alignment classes */
    .blog-post .alignleft,
    .blog-post .alignright,
    .blog-post .aligncenter {
        display: block !important;
        margin: 1rem auto !important;
        float: none !important;
        max-width: 90% !important;
    }
    
    /* Handle figure elements */
    .blog-post figure {
        text-align: center !important;
        margin: 1rem auto !important;
        max-width: 90% !important;
    }
    
    .blog-post figure img {
        margin: 0 auto !important;
    }
}

/* Small mobile adjustments */
@media screen and (max-width: 480px) {
    .featured-image-wrapper {
        max-width: 95%;
    }
    
    .blog-post .post-content img,
    .blog-post .post-intro img,
    .blog-post p img,
    .blog-post div img {
        max-width: 95% !important;
    }
}

/* Ensure images don't break layout on any device */
.blog-post img {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}
/* ============================================
   MOBILE INGREDIENTS HORIZONTAL LAYOUT FIX - CENTERED
   ============================================ */

/* Add this CSS to your blog_detail.html mobile responsive section */

@media screen and (max-width: 768px) {
    
    /* Center and make recipe card wider to accommodate ingredients */
    .recipe-card {
        padding: 1.5rem 1rem;
        margin: 1rem auto; /* Auto margins for centering */
        max-width: calc(100vw - 1rem); /* Use more of the viewport width */
        width: 95%; /* Explicit width for better centering */
        box-sizing: border-box;
        position: relative;
        left: 50%;
        transform: translateX(-50%); /* Perfect centering */
    }
    
    /* Optimize ingredients layout for horizontal display */
    .ingredients-list {
        padding: 1rem 0.5rem;
        gap: 0.4rem;
    }
    
    .ingredient-item {
        padding: 0.5rem 0.3rem;
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.5rem;
        border-bottom: 1px solid #e0d9cf;
    }
    
    .ingredient-item::before {
        flex-shrink: 0;
        position: static;
        margin-right: 0.3rem;
    }
    
    .ingredient-amount {
        min-width: 70px; /* Reduced from 100px */
        margin-left: 0;
        font-size: 0.85rem;
        font-weight: 600;
        color: #b85c3c;
        flex-shrink: 0;
    }
    
    .ingredient-name {
        flex-grow: 1;
        font-size: 0.9rem;
        line-height: 1.3;
        margin-left: 0;
    }
    
    .ingredient-notes {
        margin-left: 0;
        font-size: 0.8rem;
        color: #897b6d;
        flex-shrink: 0;
        max-width: 80px; /* Limit notes width */
        text-align: right;
    }
}

@media screen and (max-width: 480px) {
    
    /* Even wider on small mobile - still centered */
    .recipe-card {
        padding: 1rem 0.75rem;
        margin: 1rem auto;
        max-width: calc(100vw - 0.5rem);
        width: 98%; /* Wider on small screens */
        left: 50%;
        transform: translateX(-50%);
    }
    
    .ingredients-section {
        padding: 0;
        margin: 1rem 0;
    }
    
    .ingredients-list {
        padding: 0.75rem 0.5rem;
        border-radius: 6px;
    }
    
    .ingredient-item {
        padding: 0.4rem 0.2rem;
        gap: 0.4rem;
    }
    
    .ingredient-amount {
        min-width: 60px;
        font-size: 0.8rem;
    }
    
    .ingredient-name {
        font-size: 0.85rem;
    }
    
    .ingredient-notes {
        font-size: 0.75rem;
        max-width: 70px;
    }
}

/* For very small screens - still horizontal, centered, and more compact */
@media screen and (max-width: 360px) {
    
    .recipe-card {
        padding: 0.75rem 0.5rem;
        margin: 1rem auto;
        max-width: 100vw;
        width: 100%; /* Full width on very small screens */
        left: 50%;
        transform: translateX(-50%);
        border-radius: 8px; /* Keep some border radius */
    }
    
    .ingredient-item {
        padding: 0.3rem 0.1rem;
        gap: 0.3rem;
    }
    
    .ingredient-amount {
        min-width: 50px;
        font-size: 0.75rem;
    }
    
    .ingredient-name {
        font-size: 0.8rem;
    }
    
    .ingredient-notes {
        font-size: 0.7rem;
        max-width: 60px;
    }
    
    /* Make bullet smaller on very small screens */
    .ingredient-item::before {
        font-size: 0.8rem;
    }
}

/* Ensure the main blog post container allows for centered recipe cards */
@media screen and (max-width: 768px) {
    .blog-post {
        padding: 1rem 0.5rem; /* Reduce side padding */
        overflow-x: visible; /* Allow recipe card to extend */
    }
    
    /* Ensure other content aligns nicely with centered recipe card */
    .blog-post > *:not(.recipe-card) {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}


.related-post-image {
  background-color: #f8f5f2;
  background-image: linear-gradient(135deg, #f8f5f2 0%, #f2e8dc 100%);
  align-items: center;
  justify-content: center;
  height: 280px;
  width: 100%;
  position: relative;
  overflow: hidden;
  display: block;
  line-height: 0;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0;
    padding: 0;
    min-width: 100%;
    min-height: 100%;
}

/* ------------------------------------------------------------------
   "Håll skärmen vaken" switch (static/js/wake-lock.js)
   ------------------------------------------------------------------ */
.wake-lock-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1rem;
    margin: 1.5rem 0;
    padding: 0.85rem 1.1rem;
    background: #faf6f0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.wake-lock-toggle[hidden] {
    display: none;
}

.wake-lock-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
}

/* visually hidden but still focusable/keyboard-operable */
.wake-lock-label input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.wake-lock-switch {
    position: relative;
    flex: none;
    width: 46px;
    height: 26px;
    border-radius: 13px;
    background: #cfc4b4;
    transition: background-color 0.2s ease;
}

.wake-lock-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.wake-lock-label input:checked + .wake-lock-switch {
    background: var(--accent-warm);
}

.wake-lock-label input:checked + .wake-lock-switch::after {
    transform: translateX(20px);
}

.wake-lock-label input:focus-visible + .wake-lock-switch {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

.wake-lock-text i {
    color: var(--accent-gold);
    margin-right: 0.2rem;
}

.wake-lock-toggle.is-active .wake-lock-text i {
    color: var(--accent-warm);
}

.wake-lock-hint {
    font-size: 0.85rem;
    color: #7a6a58;
}
