@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Montserrat:wght@300;400;600&display=swap');

:root {
    --dmi-primary-color: #2c3e50;
    --dmi-accent-color: #D8B571;
    --dmi-light-accent: #D8B571;
    --dmi-text-dark: #191F40;
    --dmi-text-light: #6b7280;
    --dmi-line-color: #D8B571;
    --dmi-glow-color: rgba(139, 115, 85, 0.4);
    --dmi-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dmi-interactive-building {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
    min-height: 600px;
}

.dmi-connections-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.dmi-connections-behind {
    z-index: 0;
}

.dmi-connections-front {
    z-index: 2;
}

.dmi-building-wrapper {
    position: relative;
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    z-index: 1;
}

.dmi-building-image {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    transition: var(--dmi-transition);
}

.dmi-interactive-building:hover .dmi-building-image {
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.2));
}

.dmi-rooms-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.dmi-room-label {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    text-align: center;
    transition: var(--dmi-transition);
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #D8B571;
}

/*.dmi-room-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--dmi-light-accent), var(--dmi-accent-color));
    opacity: 0;
    transition: var(--dmi-transition);
    z-index: -1;
}*/

.dmi-room-label:hover {
    transform: translate(-50%, -50%) scale(1.05);
    border-color: var(--dmi-accent-color);
}

.dmi-room-label:hover::before {
    opacity: 0.08;
}

.dmi-room-label.active {
    transform: translate(-50%, -50%) scale(1.08);
    border-color: var(--dmi-accent-color);
    background: rgba(255, 255, 255, 1);
}

.dmi-room-label.active::before {
    opacity: 0.12;
}

.dmi-room-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(14px, 2.5vw, 23px);
    font-weight: 800;
    font-style: italic;
    color: var(--dmi-text-dark);
    margin-bottom: 2px;
    line-height: 1.3;
    transition: var(--dmi-transition);
    white-space: nowrap;
}

.dmi-room-label:hover .dmi-room-name,
.dmi-room-label.active .dmi-room-name {
    color: var(--dmi-accent-color);
}



.dmi-connection-line {
    stroke: var(--dmi-line-color);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url(#dmi-glow);
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.dmi-connection-line.active {
    opacity: 1;
    animation: dmi-draw-line 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.dmi-connection-point {
    fill: var(--dmi-accent-color);
    opacity: 0;
    filter: drop-shadow(0 2px 4px rgba(139, 115, 85, 0.3));
    transition: opacity 0.4s ease-out;
}

.dmi-connection-point.active {
    animation: dmi-pulse-point 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

@keyframes dmi-draw-line {
    from {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dasharray: 1000;
        stroke-dashoffset: 0;
    }
}

@keyframes dmi-pulse-point {
    0% {
        opacity: 0;
    }
    1% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

@media (max-width: 1024px) {
    .dmi-interactive-building {
        padding: 40px 15px;
        min-height: 500px;
    }
    
    .dmi-room-label {
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .dmi-interactive-building {
        padding: 30px 10px;
        min-height: 400px;
    }
    
    .dmi-room-label {
        padding: 5px 10px;
        border-radius: 6px;
    }
    
    .dmi-room-name {
        font-size: 12px;
        margin-bottom: 1px;
    }
    
    .dmi-connection-line {
        stroke-width: 1.5;
    }

    .dmi-building-wrapper {
        width: 70%;
    }
}

@media (max-width: 480px) {
    .dmi-interactive-building {
        padding: 20px 5px;
        min-height: 300px;
    }
    
    .dmi-room-label {
        padding: 4px 8px;
    }
    
    .dmi-room-name {
        font-size: 10px;
        white-space: normal;
        max-width: 100px;
    }

}

@media (hover: none) and (pointer: coarse) {
    .dmi-room-label:active {
        transform: translate(-50%, -50%) scale(1.08);
    }
}
