/* Blog image modal/lightbox styles */

.blog-image-modal-trigger {
    display: inline-block;
    width: fit-content;
    line-height: 0;
}

.blog-image-thumb {
    display: block;
    max-width: 220px;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.blog-image-thumb:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    opacity: 0.98;
}

.blog-image-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(10, 18, 32, 0.5);
    backdrop-filter: blur(4px);
}

.blog-image-modal-backdrop.is-open {
    display: flex;
}

.blog-image-modal-dialog {
    position: relative;
    max-width: min(92vw, 1100px);
    max-height: 92vh;
    margin: auto;
    padding: 0.0625rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(10, 47, 107, 0.96), rgba(8, 24, 58, 0.98));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.blog-image-modal-frame {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.125rem;
}

.blog-image-modal-image {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
    cursor: zoom-out;
}

.blog-image-modal-caption {
    color: #e8f0f7;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.4;
}

.blog-image-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    min-width: 5.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(8, 24, 58, 0.88);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.blog-image-modal-close-text {
    letter-spacing: 0.01em;
}

.blog-image-modal-close:hover,
.blog-image-modal-close:focus {
    background: rgba(10, 47, 107, 0.96);
    outline: none;
}

body.blog-image-modal-open {
    overflow: hidden;
}

@media (max-width: 576px) {
    .blog-image-thumb {
        max-width: 100%;
    }

    .blog-image-modal-dialog {
        max-width: 100%;
        width: 100%;
        padding: 0.0625rem;
        border-radius: 0.75rem;
    }

    .blog-image-modal-image {
        max-height: 68vh;
    }
}
