* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    /* Block browser pinch-zoom; taps/clicks stay unaffected */
    touch-action: none;
    overscroll-behavior: none;
}

body {
    font-family: Arial, sans-serif;
    overflow: hidden;
    background-color: #f5f5f5;
}

.container {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.slide.zooming {
    transform: scale(1.2);
}

.slide img {
    display: block;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-wrapper img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.hotspot-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    pointer-events: none;
}

.bubble-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

#slide-3-image,
#slide-3-svg {
    transform-origin: center center;
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

#slide-3-image {
    transform: translate(var(--level3-zoom-x, 0px), var(--level3-zoom-y, 0px)) scale(var(--level3-zoom-scale, 1));
}

#slide-3-svg {
    transform: translate(-50%, -50%) translate(var(--level3-zoom-x, 0px), var(--level3-zoom-y, 0px)) scale(var(--level3-zoom-scale, 1));
}

.hotspot-path {
    fill: rgba(255, 165, 0, 0.1);
    stroke: none;
    cursor: pointer;
    pointer-events: all;
    touch-action: none;
    transition: all 0.3s ease;
}

.hotspot-path.touch-active {
    fill: rgba(255, 165, 0, 0.3);
}

.person-hotspot {
    fill: url(#person-hotspot-gradient-1);
    opacity: 0;
    stroke: none;
    cursor: pointer;
    pointer-events: all;
    touch-action: none;
    transition: opacity 0.22s ease;
}

.person-hotspot.touch-active {
    opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
    .hotspot-path:hover {
        fill: rgba(255, 165, 0, 0.3);
    }

    .person-hotspot:hover {
        opacity: 1;
    }
}

.person-hotspot.is-hidden {
    opacity: 0 !important;
    pointer-events: none;
}

.person-bubble-group {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    transition: opacity 0.24s ease, transform 0.3s ease;
}

.person-bubble-group.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.person-bubble-group.is-hiding {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.person-bubble-shape {
    fill: #fff;
    stroke: #111;
    stroke-width: 4;
    stroke-linejoin: round;
    filter: drop-shadow(8px 8px 0 rgba(0, 0, 0, 0.22));
}

.person-bubble-connector {
    fill: none;
    stroke: #111;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.person-bubble-text {
    fill: #111;
    font-family: "Patrick Hand", "Comic Sans MS", cursive;
}

.hotspot-label {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.hotspot-label.visible {
    opacity: 1;
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #333;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    z-index: 100;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.back-button.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-button:hover {
    background-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hotspot-label {
        font-size: 12px;
        padding: 6px 12px;
    }

    .back-button {
        top: 10px;
        left: 10px;
        padding: 8px 16px;
        font-size: 12px;
    }

}

@media (max-width: 480px) {
    .hotspot-label {
        font-size: 11px;
        padding: 5px 10px;
    }

    .back-button {
        padding: 6px 12px;
        font-size: 11px;
    }

}
