/* Full-Screen Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    inset: var(--topbar-height, 100px) 0 0 0;
    width: 100%;
    min-height: calc(100vh - var(--topbar-height, 100px));
    min-height: calc(100dvh - var(--topbar-height, 100px));
    padding: 4.5rem 1.5rem 1.5rem;
    box-sizing: border-box;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.image-modal-content {
    margin: 0 auto;
    display: block;
    align-self: center;
    max-width: min(90vw, 1200px);
    max-height: calc(100dvh - var(--topbar-height, 100px) - 7rem);
    object-fit: contain;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.image-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    line-height: 1;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.image-modal-caption {
    display: none;
}

@media (max-width: 768px) {
    .image-modal {
        padding: 4rem 1rem 1rem;
    }

    .image-modal-content {
        max-width: 100%;
        max-height: calc(100dvh - var(--topbar-height, 100px) - 6rem);
    }

    .image-modal-close {
        top: 0.75rem;
        right: 1rem;
        font-size: 42px;
    }
}
