.t1-block-template {
    margin-top: 20px;
}


.map-wrapper {
    position: relative;
    width: 100%;
    height: var(--map-h, 500px); /* Регулируемая высота */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.map-wrapper iframe { width: 100%; height: 100%; display: block; }

.contact-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 360px;
    max-height: calc(100% - 40px);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 10;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.contact-overlay.pos-right { left: auto; right: 20px; }

.collapse-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: #0d6efd;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s;
    z-index: 11;
}
.collapse-btn:hover { background: #0b5ed7; transform: scale(1.1); }

.form-body { transition: all 0.4s ease; max-height: 800px; opacity: 1; margin-top: 10px; }

/* Свернутое состояние */
.contact-overlay.collapsed {
    width: 48px;
    padding: 8px;
    border-radius: 24px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.contact-overlay.collapsed .form-body { max-height: 0; opacity: 0; margin: 0; pointer-events: none; }
.contact-overlay.collapsed .collapse-btn { position: static; transform: rotate(180deg); }
.contact-overlay.collapsed:hover { background: rgba(255,255,255,0.9); }

@media (max-width: 576px) {
    .contact-overlay { width: calc(100% - 40px) !important; left: 20px !important; right: 20px !important; }
}