.ws-contact-map-hero {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #e5e5e5;
}

.ws-contact-map-shell,
.ws-contact-map {
    width: 100%;
    height: 100%;
}

.ws-contact-map {
    position: relative;
    z-index: 1;
}

.ws-contact-map-fallback {
    position: absolute;
    z-index: 500;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    max-width: min(22rem, calc(100% - 2rem));
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    color: #111;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.35rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.18);
    font-size: 0.95rem;
    line-height: 1.35;
}

.ws-contact-map-fallback[hidden] {
    display: none;
}

.ws-contact-map-fallback a,
.ws-contact-map-popup a {
    margin-top: 0.35rem;
    color: #c51220;
    font-weight: 700;
}

.ws-contact-map-marker {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    padding: 0;
    background: #fff;
    border: 3px solid #fff;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.34);
}

.ws-contact-map-marker img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ws-contact-map-popup {
    min-width: 12rem;
    line-height: 1.4;
}

.ws-contact-map-popup strong,
.ws-contact-map-popup span,
.ws-contact-map-popup a {
    display: block;
}

.ws-contact-map-hero .leaflet-control-attribution {
    font-size: 10px;
}

@media (max-width: 1024px) {
    .ws-contact-map-hero {
        height: 350px;
    }
}

@media (max-width: 600px) {
    .ws-contact-map-hero {
        height: 300px;
    }

    .ws-contact-map-marker {
        width: 46px;
        height: 46px;
        padding: 0;
    }

    .ws-contact-map-fallback {
        right: 0.65rem;
        bottom: 0.65rem;
        max-width: calc(100% - 1.3rem);
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ws-contact-map-hero * {
        scroll-behavior: auto !important;
    }
}

/* Release E2: modulo contatti CMS. Tutte le regole restano scoped. */
.ws-contact-form {
    box-sizing: border-box;
    width: min(100%, 980px);
    margin: 2rem auto;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    background: #f4f4f4;
    border-top: 4px solid #c51220;
}

.ws-contact-form *,
.ws-contact-form *::before,
.ws-contact-form *::after {
    box-sizing: border-box;
}

.ws-contact-form form,
.ws-contact-form fieldset {
    margin: 0;
}

.ws-contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.ws-contact-form-field {
    min-width: 0;
    margin: 0 0 1.25rem;
    padding: 0;
    border: 0;
}

.ws-contact-form-grid .ws-contact-form-field {
    margin-bottom: 0;
}

.ws-contact-form label,
.ws-contact-form legend {
    display: block;
    margin-bottom: 0.45rem;
    color: #191919;
    font-weight: 700;
}

.ws-contact-form input[type="text"],
.ws-contact-form input[type="email"],
.ws-contact-form input[type="tel"],
.ws-contact-form textarea {
    display: block;
    width: 100%;
    padding: 0.8rem 0.9rem;
    color: #171717;
    background: #fff;
    border: 1px solid #858585;
    border-radius: 2px;
    font: inherit;
    line-height: 1.35;
}

.ws-contact-form textarea {
    min-height: 10rem;
    resize: vertical;
}

.ws-contact-form input:focus,
.ws-contact-form textarea:focus,
.ws-contact-form input[type="radio"]:focus + span,
.ws-contact-form input[type="checkbox"]:focus + span {
    outline: 3px solid rgba(197, 18, 32, 0.24);
    outline-offset: 2px;
    border-color: #c51220;
}

.ws-contact-form-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.ws-contact-form-options-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ws-contact-form-options label {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.ws-contact-form-options input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.ws-contact-form-options span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.65rem 0.8rem;
    text-align: center;
    background: #fff;
    border: 1px solid #858585;
    border-radius: 2px;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.ws-contact-form-options input:checked + span {
    color: #fff;
    background: #252525;
    border-color: #252525;
}

.ws-contact-form-privacy label {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-weight: 400;
}

.ws-contact-form-privacy input {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.15rem;
    accent-color: #c51220;
}

.ws-contact-form-privacy a {
    color: #a20f1b;
    font-weight: 700;
}

.ws-contact-form-required {
    margin: 0 0 1rem;
    font-size: 0.9rem;
}

.ws-contact-form-alert,
.ws-contact-form-success {
    border: 1px solid #a20f1b;
}

.ws-contact-form-alert {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    color: #7e0b14;
    background: #fff1f2;
    font-weight: 700;
}

.ws-contact-form-error {
    display: block;
    margin-top: 0.35rem;
    color: #9a0e18;
    font-size: 0.9rem;
    font-weight: 700;
}

.ws-contact-form .has-error input[type="text"],
.ws-contact-form .has-error input[type="email"],
.ws-contact-form .has-error input[type="tel"],
.ws-contact-form .has-error textarea,
.ws-contact-form .has-error .ws-contact-form-options span {
    border-color: #b20f1c;
}

.ws-contact-form-actions {
    margin-top: 1.4rem;
}

.ws-contact-form-submit {
    min-height: 3rem;
    padding: 0.75rem 1.5rem;
    color: #fff;
    background: #c51220;
    border: 0;
    border-radius: 2px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ws-contact-form-submit:hover,
.ws-contact-form-submit:focus {
    background: #990e18;
}

.ws-contact-form-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.ws-contact-form-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.ws-contact-form-success h3 {
    margin-top: 0;
}

@media (max-width: 680px) {
    .ws-contact-form {
        margin: 1.25rem auto;
        padding: 1.1rem;
    }

    .ws-contact-form-grid,
    .ws-contact-form-options,
    .ws-contact-form-options-wide {
        grid-template-columns: 1fr;
    }
}
