/* Stili per il container del contatto */
.contact-item {}

.contact-info {
    position: absolute;

    width: max-content;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.contact-item a {
    color: #000000;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 99 !important;
    text-align: center;
    line-height: 2.5;
}

article.layout_1_2 div:not(article .content *) {
    height: max-content !important;
}


.contact-item a:hover {
    background-color: #f1f5f9;
    color: #1d4ed8;
}

/* Mappa fluttuante */
.floating-map {
    position: fixed;
    width: 320px;
    height: auto;
    border: none;
    border-radius: 12px;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    background: white;
    overflow: hidden;
    will-change: transform, opacity;
    backface-visibility: hidden;
    display: block;
}

.floating-map.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    display: block;
}

.floating-map.following {
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Contenuto della mappa */
.map-preview {
    padding: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.map-header {
    padding: 12px 16px 8px;
    border-bottom: 1px solid #e5e7eb;
}

.map-header h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.map-address {
    font-size: 12px;
    color: #6b7280;
}

.map-container {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.map-footer {
    padding: 12px 16px;
    background: #f9fafb;
}

.map-button {
    width: 100%;
    padding: 8px 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.map-button:hover {
    background: #1d4ed8;
}

.floating-map {
    position: fixed !important;
    width: 320px !important;
    height: auto !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
    z-index: 90 !important;
    pointer-events: none !important;
    background: white !important;
    overflow: hidden !important;
    display: block !important;
    box-sizing: content-box !important;
    /* Posizione iniziale che verrà sovrascritta da JavaScript */
    top: 0 !important;
    left: 0 !important;
}

.floating-map.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.floating-map * {
    box-sizing: border-box !important;
}

.map-preview {
    padding: 0 !important;
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    margin: 0 !important;
}

.map-header {
    padding: 12px 16px 8px !important;
    border-bottom: 1px solid #e5e7eb !important;
    margin: 0 !important;
}

.map-header h4 {
    margin: 0 0 4px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    padding: 0 !important;
}

.map-address {
    font-size: 12px !important;
    color: #6b7280 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.map-container {
    position: relative !important;
    height: 180px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.map-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.map-footer {
    padding: 12px 16px !important;
    background: #f9fafb !important;
    margin: 0 !important;
}

.map-button {
    width: 100% !important;
    padding: 8px 12px !important;
    background: #2563eb !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    margin: 0 !important;
}

.map-button:hover {
    background: #1d4ed8 !important;
}

/* Evidenziazione dell'indirizzo quando la mappa è attiva */
.contact-item.map-active {
    background-color: rgba(37, 99, 235, 0.05) !important;
    border-radius: 4px !important;
    transition: background-color 0.2s ease !important;
}