.ina-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 20px;
    background: rgba(0, 0, 0, 0.88);
    opacity: 0;
    transition: opacity 160ms ease;
}

.ina-modal.is-open {
    display: flex;
}

.ina-modal.is-visible {
    opacity: 1;
}

.ina-modal__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
}

.ina-modal__image {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 80px);
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.45);
}

.ina-modal__caption {
    max-width: calc(100vw - 40px);
    margin-top: 10px;
    color: #fff;
    font: 16px/1.35 Arial, sans-serif;
    text-align: center;
}

.ina-modal__close {
    position: fixed;
    top: 12px;
    right: 14px;
    z-index: 1;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    font: 32px/40px Arial, sans-serif;
    cursor: pointer;
}

.ina-modal__close:hover,
.ina-modal__close:focus {
    background: #fff;
    outline: 3px solid #9ebe2a;
}

body.ina-modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .ina-modal {
        padding: 10px;
    }

    .ina-modal__image {
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 70px);
        border-radius: 4px;
    }

    .ina-modal__caption {
        max-width: calc(100vw - 20px);
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ina-modal {
        transition: none;
    }
}
