/* Reusable configuration for all recipe videos */
.recipe-video-embed {
    border: 0;                    /* Replaces the deprecated frameborder */
    border-radius: 12px;         /* Gives it a modern, soft look */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* Adds depth */
    transition: transform 0.3s ease; /* Smooth interaction if you hover */
}

.recipe-video-embed:hover {
    transform: translateY(-2px); /* Lifts slightly when hovered */
}

/* Add this to app/static/css/main.css */
.video-constrain {
    max-width: 720px;
    margin: 2rem auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.adblock-banner {
    background-color: #fff3cd; /* Warm yellow */
    border-bottom: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.adblock-banner button {
    background: none;
    border: 1px solid #856404;
    border-radius: 4px;
    margin-left: 15px;
    padding: 2px 8px;
    cursor: pointer;
}

.recipe-hero-wrapper {
    width: 100%;
    max-width: 1200px;    /* Prevents the image from being ridiculously wide on a 4K monitor */
    margin: 0 auto 2rem;  /* Centers the wrapper and adds space below it */
    border-radius: 12px;  /* Modern rounded corners */
    overflow: hidden;     /* Ensures the image doesn't bleed outside the rounded corners */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Optional: adds a nice subtle shadow */
}

.recipe-hero-img {
    width: 100%;
    height: 450px;        /* Forces the hero image to be a consistent height */
    object-fit: cover;    /* The magic command: crops the overflow instead of distorting */
    display: block;
}

/* Mobile responsiveness: Make the hero image slightly shorter on small phone screens */
@media (max-width: 768px) {
    .recipe-hero-img {
        height: 250px;
    }
}

/* Ensure all images inside the story stay within the screen */
.recipe-story img {
    max-width: 100%;    /* Prevents overflowing the phone screen */
    height: auto;       /* Maintains aspect ratio so food isn't squished */
    display: block;     /* Required for the auto-margins to work */
    margin: 1.5rem auto; /* Centers the image and adds space above/below */
    border-radius: 8px; /* Optional: matches your hero image aesthetic */
}

/* If you use TinyMCE's "align center" button, it might add this class */
.recipe-story .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Handles cases where TinyMCE wraps images in a figure tag */
.recipe-story figure {
    max-width: 100%;
    margin: 1.5rem auto;
    text-align: center;
}

.recipe-story figcaption {
    font-style: italic;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* target the specific container from your HTML */
.blog-post-content img {
    /* 1. Force the size down on mobile */
    max-width: 100% !important;
    height: auto !important;

    /* 2. Force the centering */
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;

    /* 3. Add some vertical breathing room */
    margin-top: 2rem;
    margin-bottom: 2rem;

    aspect-ratio: attr(width) / attr(height); /* Only works if TinyMCE includes width/height */
    /* OR just use a general estimate for recipe photos */
    min-height: 200px;
}

/* TinyMCE-specific alignment classes */
.blog-post-content .aligncenter {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.blog-post-content .alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.blog-post-content .alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Clear floats so the next paragraph doesn't wrap weirdly */
.blog-post-content::after {
    content: "";
    display: table;
    clear: both;
}

.blog-post-content p {
    /* Ensures that if an image is inside a P tag, the P tag doesn't block the centering */
    overflow: visible;
}