/* Article and Summernote Image Styles */

.article-body {
    line-height: 1.6;
    overflow-x: auto;
}

.article-body p {
    word-wrap: break-word;
    margin-bottom: 1rem;
}

/* Summernote image responsive styles */
.article-body img,
.summernote-image {
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    display: block;
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.article-body img:hover,
.summernote-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    /*cursor: pointer;*/
}

/* Responsive breakpoints */
@media (max-width: 575.98px) {
    .article-body img,
    .summernote-image {
        width: 100% !important;
        margin: 1rem auto;
        border-radius: 0.25rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .article-body img,
    .summernote-image {
        max-width: 95%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .article-body img,
    .summernote-image {
        max-width: 85%;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .article-body img,
    .summernote-image {
        max-width: 75%;
    }
}

@media (min-width: 1200px) {
    .article-body img,
    .summernote-image {
        max-width: 70%;
    }
}

/* Image gallery styles for multiple images */
.article-body .image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.article-body .image-gallery img {
    margin: 0;
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Figure and caption styles */
.article-body figure {
    margin: 2rem auto;
    text-align: center;
}

.article-body figcaption {
    font-style: italic;
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 0.5rem;
}

/* Ensure tables are also responsive */
.article-body table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.article-body table td,
.article-body table th {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

/* Loading state for images */
.article-body img[loading="lazy"] {
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%),
                linear-gradient(-45deg, #f8f9fa 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #f8f9fa 75%),
                linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    min-height: 200px;
}
