
/* =====================================================
   MARCUS SCIENCE GROUP — GLOBAL SCIENTIFIC NETWORK
   Full-width responsive map | Purple-blue brand theme
===================================================== */

.msg-global-map-section {
    position: relative !important;
    width: 100vw !important;
    max-width: 100vw !important;

    /* Break out of the centered parent container */
    left: auto !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;

    box-sizing: border-box !important;
    padding: 85px 0 55px !important;

    background:
        radial-gradient(circle at 20% 20%, rgba(98,86,217,.13), transparent 32%),
        radial-gradient(circle at 80% 80%, rgba(139,124,246,.10), transparent 30%),
        #080d1b !important;

    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

/* Heading */
.msg-map-heading {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto 35px;
    padding: 0 24px;
    text-align: center;
}

.msg-map-heading > span {
    color: #a99af7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
}

.msg-map-heading h2 {
    color: #fff;
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 700;
    margin: 16px 0;
}

.msg-map-heading p {
    color: #aeb8ce;
    font-size: 15px;
    line-height: 1.8;
}

/* Legend */
.msg-map-legend {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    margin: 0 auto 25px;
    padding: 0 20px;
    color: #c5ccda;
    font-size: 12px;
}

.msg-map-legend span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-country {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    background: #8b7cf6;
}

.legend-star {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 9px #fff;
}

/* Map stage */
.msg-map-container {
    position: relative;
    z-index: 1;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;

    background:
        radial-gradient(ellipse at center, #17233b 0%, #0b1325 70%, #080d1b 100%) !important;

    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
}

/* Map content centered inside full-width stage */
#msgWorldMap {
    position: relative;
    width: 100% !important;
    max-width: 1500px;
    margin: 0 auto !important;
    box-sizing: border-box;
    overflow: hidden;
    touch-action: pan-y;
}

/* SVG — preserve D3 zoom transforms */
#msgWorldMapSvg {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    min-height: 0 !important;
    overflow: visible;
    cursor: grab;
}

#msgWorldMapSvg:active {
    cursor: grabbing;
}

/* Countries */
.msg-map-country {
    fill: #27334b;
    stroke: #53617b;
    stroke-width: .65px;
    stroke-linejoin: round;
    transition: fill .25s ease, stroke .25s ease;
    cursor: default;
}

.msg-map-country.has-conference {
    stroke: #a99af7;
    stroke-width: 1.2px;
    cursor: pointer;
}

.msg-map-country.has-conference:hover {
    stroke: #fff;
    stroke-width: 2px;
    filter: brightness(1.35);
}

/* Conference flags */
.msg-map-flag {
    cursor: pointer;
}

.msg-map-flag circle {
    fill: #fff;
    stroke: #a99af7;
    stroke-width: 2px;
    filter: drop-shadow(0 0 7px rgba(139,124,246,.8));
}

.msg-map-flag image {
    pointer-events: none;
}

/* Stars */
.msg-map-stars {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.msg-map-star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #fff;
    opacity: .3;
    box-shadow: 0 0 5px rgba(255,255,255,.9);
    animation: msgStarTwinkle var(--duration, 3s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.msg-map-star.large {
    width: 3px;
    height: 3px;
}

@keyframes msgStarTwinkle {
    0%, 100% {
        opacity: .15;
        transform: scale(.7);
    }
    50% {
        opacity: .95;
        transform: scale(1.5);
    }
}

/* Tooltip */
.msg-map-tooltip {
    position: absolute;
    z-index: 5;
    display: none;
    width: min(290px, calc(100% - 24px));
    padding: 16px;
    border: 1px solid rgba(169,154,247,.45);
    border-radius: 12px;
    background: rgba(12,19,35,.97);
    box-shadow: 0 15px 45px rgba(0,0,0,.4);
    pointer-events: none;
    backdrop-filter: blur(12px);
    box-sizing: border-box;
}

.msg-map-tooltip.visible {
    display: block;
}

.msg-tooltip-country {
    color: #b8adf2;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.msg-tooltip-event {
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,.12);
}

.msg-tooltip-event strong {
    display: block;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
}

.msg-tooltip-event span {
    display: block;
    margin-top: 5px;
    color: #aebbd2;
    font-size: 11px;
}

.msg-tooltip-status {
    display: inline-block !important;
    margin-top: 7px !important;
    color: #b8adf2 !important;
    font-size: 10px !important;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Loading */
.msg-map-loading {
    position: absolute;
    z-index: 4;
    inset: 0;
    display: grid;
    place-items: center;
    color: #b8adf2;
    font-size: 13px;
    background: #0b1325;
}

.msg-map-loading.hidden {
    display: none;
}

/* Zoom controls */
.msg-map-zoom-controls {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg-map-zoom-controls button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 12px;
    background: rgba(25,35,65,.92);
    color: #fff;
    font-size: 25px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all .25s ease;
}

.msg-map-zoom-controls button:hover {
    background: #6256d9;
    transform: scale(1.08);
    border-color: #b8adf2;
}

/* Footer */
.msg-map-footer {
    position: relative;
    z-index: 2;
    margin-top: 28px;
    padding: 0 15px;
    text-align: center;
    color: #a5a9d5;
    font-size: 10px;
    letter-spacing: 3px;
}

/* Mobile */
@media (max-width: 768px) {
    .msg-global-map-section {
        padding: 60px 0 40px !important;
    }

    .msg-map-heading {
        padding: 0 18px;
    }

    .msg-map-zoom-controls {
        right: 12px;
        bottom: 12px;
    }

    .msg-map-zoom-controls button {
        width: 38px;
        height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .msg-map-star {
        animation: none !important;
    }
}
