.home-banner-modal {
    --bs-modal-width: min(960px, calc(100vw - 2rem));
}

.home-banner-modal .modal-dialog {
    width: var(--bs-modal-width);
    max-width: var(--bs-modal-width);
    margin-right: auto;
    margin-left: auto;
}

.home-banner-modal .modal-content {
    position: relative;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.home-banner-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 3rem);
    margin: 0 auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.home-banner-link {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.home-banner-close {
    position: absolute;
    z-index: 2;
    top: -14px;
    right: -14px;
    display: inline-flex;
    width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: #222;
    background: #fff;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
    transition: transform 160ms ease, background-color 160ms ease;
}

.home-banner-close:hover,
.home-banner-close:focus-visible {
    color: #8f0710;
    background: #fff5f5;
    transform: scale(1.06);
}

.home-banner-close:focus-visible {
    outline: 3px solid rgba(197, 22, 24, 0.3);
    outline-offset: 3px;
}

@media (max-width: 575.98px) {
    .home-banner-modal {
        --bs-modal-width: calc(100vw - 1.25rem);
    }

    .home-banner-image {
        max-height: calc(100vh - 2rem);
        border-radius: 9px;
    }

    .home-banner-close {
        top: -10px;
        right: -6px;
        width: 38px;
        height: 38px;
    }
}
