/* Modal funzionalità — layout screenshot in evidenza (2026.08.18.2) */
#h360FeatureModal .h360-feature-modal-dialog {
    width: calc(100% - 1.25rem);
    max-width: min(80rem, calc(100vw - 1.5rem));
    margin: 0.75rem auto;
}

@media (min-width: 768px) {
    #h360FeatureModal .h360-feature-modal-dialog {
        width: calc(100% - 2rem);
        margin: 1.25rem auto;
        height: calc(100% - 2.5rem);
        max-height: calc(100vh - 2.5rem);
    }
}

#h360FeatureModal .h360-feature-modal-content {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: var(--h360-shadow, 0 24px 60px rgba(15, 23, 42, 0.08));
    background: var(--h360-surface, #fff);
}

#h360FeatureModal .h360-feature-modal-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    z-index: 5;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    padding: 0.55rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

#h360FeatureModal .h360-feature-modal-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 12rem;
    background: #0f172a;
    border-bottom: 1px solid var(--h360-border, rgba(15, 23, 42, 0.08));
    border-radius: 0;
    overflow: hidden;
}

#h360FeatureModal .h360-feature-modal-content:not(.has-image) .h360-feature-modal-media {
    min-height: 8rem;
    background: linear-gradient(160deg, rgba(14, 165, 164, 0.12), rgba(99, 102, 241, 0.1));
}

#h360FeatureModal .h360-feature-modal-image-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

#h360FeatureModal .h360-feature-modal-image {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: min(68vh, 40rem);
    object-fit: contain;
    object-position: center top;
    background: #0f172a;
}

#h360FeatureModal .h360-feature-modal-zoom-hint {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: auto;
    height: auto;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    pointer-events: none;
}

#h360FeatureModal .h360-feature-modal-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 8rem;
    padding: 2rem;
}

#h360FeatureModal .h360-feature-modal-fallback[hidden],
#h360FeatureModal .h360-feature-modal-image-trigger[hidden] {
    display: none !important;
}

#h360FeatureModal .h360-feature-modal-copy {
    padding: 1.5rem 1.25rem 1.75rem;
}

@media (min-width: 768px) {
    #h360FeatureModal .h360-feature-modal-copy {
        padding: 1.75rem 2rem 2rem;
    }
}

#h360FeatureModal .h360-feature-modal-cta {
    width: 100%;
    margin-top: 1.5rem;
}

.h360-feature-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.h360-feature-lightbox[hidden] {
    display: none !important;
}

.h360-feature-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.82);
    cursor: zoom-out;
}

.h360-feature-lightbox-dialog {
    position: relative;
    z-index: 1;
    max-width: min(1400px, 100%);
    max-height: min(92vh, 100%);
}

.h360-feature-lightbox-image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(1400px, 100vw - 2rem);
    max-height: min(92vh, 100vh - 2rem);
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    background: #0f172a;
}

.h360-feature-lightbox-close {
    position: absolute;
    top: -0.75rem;
    right: -0.75rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

@media (max-width: 575.98px) {
    .h360-feature-lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
    }
}
