/* MAP SECTION STYLES */
.map-section-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 2.5rem; 
}

.map-container {
    width: 100%;
    height: 220px; 
    position: relative;
    border-radius: 0;
    overflow: hidden;
    background-color: #f8fafc;
    border: none;
    box-shadow: none;
    isolation: isolate;
}

@media (min-width: 768px) {
    .map-container {
        height: 240px; 
        border-radius: 1rem; 
    }
}

.map-time-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 400;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-family: monospace;
    color: #475569;
    border: 1px solid rgba(255, 255, 255, 0.5);
    pointer-events: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: #22c55e;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

#map {
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #f8fafc;
    outline: none;
}

.map-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5rem; 
    background: linear-gradient(to top, #fdfdfc, rgba(253, 253, 252, 0.8), transparent);
    z-index: 400;
    pointer-events: none;
}

.map-container {
    cursor: grab !important;
}
.map-container:active {
    cursor: grabbing !important;
}

.marker-container {
    position: relative;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.marker-dot {
    position: relative;
    width: 12px;
    height: 12px;
    background-color: #0ea5e9; /* Sky-500 */
    border: 2px solid white;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.marker-pulse {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    background-color: rgba(14, 165, 233, 0.6);
    border-radius: 50%;
    z-index: 1;
    animation: pulse-ring 2.5s infinite;
}
@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; }
    50% { opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

.custom-leaflet-icon {
    background: transparent;
    border: none;
}
.leaflet-container {
    font-family: inherit;
}


/* --- CLOUD / FOG ANIMATION --- */

.cloud-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50; 
    pointer-events: none;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.8s ease;
}

.map-container:hover .cloud-wrapper {
    opacity: 0;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    filter: blur(12px); 
    opacity: 0.8; 
    
    box-shadow: 0 0 15px rgba(255, 255, 255, 1); 
}

.c1 {
    width: 140px; 
    height: 50px;
    top: 25%;
    left: -150px;
    animation: floatCloud 18s linear infinite; 
    opacity: 0.9;
}

.c2 {
    width: 240px; 
    height: 90px;
    top: 45%;
    left: -250px;
    animation: floatCloud 35s linear infinite;
    animation-delay: -10s; 
    opacity: 0.7;
}

.c3 {
    width: 180px;
    height: 60px;
    top: 15%;
    left: -200px;
    animation: floatCloud 28s linear infinite;
    animation-delay: -2s;
    opacity: 0.8;
}

@keyframes floatCloud {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(150%); 
    }
}


/* --- PLANE ANIMATION --- */

.plane-wrapper {
    position: absolute;
    z-index: 60;
    pointer-events: none;
    left: -100px; 
    bottom: -50px; 
    animation: flyLoop 300s linear infinite;
    animation-delay: 0s;
    opacity: 0;
}

.plane-body, .plane-shadow {
    font-size: 1rem; 
    position: absolute;
    top: 0;
    left: 0;
}

.plane-body {
    z-index: 2;
    transform: rotate(25deg); 
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.5));
}

.plane-shadow {
    z-index: 1;
    top: 12px;
    left: 8px;
    transform: rotate(20deg) scale(0.8); 
    filter: contrast(0) brightness(0) opacity(0.2) blur(2px);
}

@keyframes flyLoop {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    2% {
        opacity: 1;
    }
    35% {
        transform: translate(120vw, -1000px); 
        opacity: 1;
    }

    36% {
        opacity: 0;
        transform: translate(120vw, -1000px); 
    }
    100% {
        opacity: 0;
        transform: translate(0, 0); 
    }
}