/* Fix for BD card comic image text overlap issue */

/* Ensure comic image container has strict boundaries */
.comic-container {
    display: flex;
    flex-direction: column;
    position: relative;
}

.comic-image-link {
    display: block;
    position: relative;
    overflow: hidden !important;
    background: #f3f4f6;
    isolation: isolate;
}

/* Ensure image is properly contained */
.comic-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: center top;
}

/* Create a clear separation between image and content */
.comic-container > a + div {
    position: relative;
    z-index: 2;
    background: white;
    isolation: isolate;
}

/* Ensure title and content don't overlap with image */
.comic-container h3 {
    position: relative;
    z-index: 3;
    background: white;
    padding-top: 0;
}

/* Mobile specific fixes */
@media (max-width: 768px) {
    .comic-image-link {
        max-height: 400px;
        overflow: hidden !important;
    }
    
    .comic-image {
        max-height: 400px;
        object-fit: cover;
        object-position: center top;
    }
}

/* Tablet fixes */
@media (min-width: 769px) and (max-width: 1024px) {
    .comic-image-link {
        max-height: 500px;
        overflow: hidden !important;
    }
    
    .comic-image {
        max-height: 500px;
        object-fit: cover;
        object-position: center top;
    }
}
