/* Our Presence Section Styles */

.our-presence {
    padding: 120px 0;
}

.our-presence .section-title {
    margin-bottom: 60px;
}

.our-presence .section-title__title{
    color: #fff;
}

.map-section {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    height: 100%;
}

.map-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.map-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.country-flag {
    margin-right: 15px;
}

.flag-icon {
    width: 40px;
    height: 30px;
    border-radius: 5px;
}

.country-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.map-container {
    position: relative;
    margin-bottom: 25px;
}

.map-image {
    width: 100%;
    height: 500px; /* Increased height to show full SVG maps without cutting */
    position: relative;
    overflow: hidden;
}

/* SVG Map Container */
.map-svg-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* SVG Map Container - Clean and simple */

/* SVG Map Styles */
.india-map, .uae-map {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: contain; /* Changed back to contain to show full map */
}

/* Object tag styling for embedded SVG */
object.uae-map {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* HTML Map Markers Styling */
.uae-map-html, .india-map-html {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Ensure UAE map container is properly positioned */
.uae-map-html {
    position: relative !important;
    overflow: visible !important;
    min-height: 100% !important;
    min-width: 100% !important;
}

/* Force UAE markers to be visible and properly positioned */
.uae-map-html .location-marker {
    position: absolute !important;
    z-index: 1000 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.uae-map-html .location-marker .marker-pin {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 16px;
    height: 16px;
    border-radius: 50% !important;
}

.uae-map-html .location-marker .location-label {
    display: block !important;
    opacity: 0 !important;
    visibility: visible !important;
    position: absolute !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    color: white !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
}



.uae-map-html .location-marker, .india-map-html .location-marker {
    transition: all 0.3s ease;
}

.uae-map-html .location-marker:hover, .india-map-html .location-marker:hover {
    transform: scale(1.2);
}

.uae-map-html .location-marker:hover .location-label, .india-map-html .location-marker:hover .location-label {
    opacity: 1 !important;
}

.uae-map-html .marker-pin, .india-map-html .marker-pin {
    transition: all 0.3s ease;
}

.uae-map-html .location-label, .india-map-html .location-label {
    pointer-events: none;
}

/* Map hover effects */
.map-section:hover .india-map,
.map-section:hover .uae-map {
    filter: brightness(1.05);
    transition: filter 0.3s ease;
}

/* Enhanced SVG Map Markers */
.location-marker {
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    /* Debug: Make sure markers are visible */
    opacity: 1 !important;
    visibility: visible !important;
}

.location-marker:hover {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.location-marker:hover {
    transform: scale(1.1);
}

.marker-pin {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.marker-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 0.3; }
    100% { transform: scale(1); opacity: 0.6; }
}

/* Different marker colors for different types */
.main-hub .marker-pin {
    fill: #e74c3c !important;
    stroke: #ffffff !important;
    stroke-width: 2 !important;
}

.regional .marker-pin {
    fill: #3498db !important;
    stroke: #ffffff !important;
    stroke-width: 2 !important;
}

.warehouse .marker-pin {
    fill: #f39c12 !important;
    stroke: #ffffff !important;
    stroke-width: 2 !important;
}

/* Ensure markers are visible */
.location-marker {
    z-index: 10;
    pointer-events: auto;
    position: absolute !important;
}

.marker-pin {
    z-index: 11;
    pointer-events: auto;
}

/* Ensure markers stay on top of map */
.map-svg-container {
    position: relative;
    z-index: 1;
}

.location-marker {
    z-index: 100 !important;
}

/* Prevent markers from being hidden */
.location-marker * {
    z-index: 101 !important;
}



/* Location Labels and Coordinate Overlays - Now handled within SVG files */

/* Location List */
.location-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.location-list h5 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.location-names {
    text-align: center;
    padding: 15px 0;
    line-height: 1.6;
}

.location-names strong {
    color: #333;
    font-weight: 700;
    font-size: 16px;
    margin: 0 5px;
}

.location-names strong:first-child {
    margin-left: 0;
}

.location-names strong:last-child {
    margin-right: 0;
}

/* Map Marker Pins and Labels - Clean CSS */
.location-marker .marker-pin {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.location-marker .location-label {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    pointer-events: none;
}

/* India Map Specific Styling */
.india-map-html .location-marker.main-hub .marker-pin {
    background: #e74c3c !important;
}

.india-map-html .location-marker.regional .marker-pin {
    background: #3498db !important;
}

.india-map-html .location-marker.main-hub .location-label {
    background: #e74c3c !important;
}

.india-map-html .location-marker.regional .location-label {
    background: #3498db !important;
}

/* UAE Map Specific Styling */
.uae-map-html .location-marker.main-hub .marker-pin {
    background: #e74c3c !important;
}

.uae-map-html .location-marker.regional .marker-pin {
    background: #3498db !important;
}

.uae-map-html .location-marker.main-hub .location-label {
    background: #e74c3c !important;
}

.uae-map-html .location-marker.regional .location-label {
    background: #3498db !important;
}

/* Ensure UAE markers have proper hover effects */
.uae-map-html .location-marker:hover .location-label {
    opacity: 1 !important;
}

.uae-map-html .location-marker:hover .marker-pin {
    transform: scale(1.2) !important;
}

/* Ensure UAE markers are visible */
.uae-map-html .location-marker {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Base India map marker positions (Fixed Pixel Positioning) */
.india-map-html .location-marker[data-location="mumbai"] {
    top: 60.9% !important;
    left: 23.1% !important;
}

.india-map-html .location-marker[data-location="mundra"] {
    top: 44.5% !important;
    left: 13.5% !important;
}

.india-map-html .location-marker[data-location="surat"] {
    top:  52.5% !important;
    left: 22% !important;
}

.india-map-html .location-marker[data-location="delhi"] {
    top: 30% !important;
    left: 32% !important;
}

.india-map-html .location-marker[data-location="chennai"] {
    top: 80.9% !important;
    left: 40.3% !important;
}

.india-map-html .location-marker[data-location="tuticorin"] {
    top: 86% !important;
    left: 36% !important;
}

/* Responsive Map Marker Positioning for Different Screen Sizes */
/* @media (max-width: 1200px) {
    Desktop adjustments - Fixed Pixel Positioning 
    .india-map-html .location-marker[data-location="mumbai"] {
        top: 260px !important;
        left: 110px !important;
    }
    
    .india-map-html .location-marker[data-location="mundra"] {
        top: 200px !important;
        left: 70px !important;
    }
    
    .india-map-html .location-marker[data-location="surat"] {
        top: 220px !important;
        left: 80px !important;
    }
    
    .india-map-html .location-marker[data-location="delhi"] {
        top: 90px !important;
        left: 180px !important;
    }
    
    .india-map-html .location-marker[data-location="chennai"] {
        top: 360px !important;
        left: 200px !important;
    }
    
    .india-map-html .location-marker[data-location="tuticorin"] {
        top: 400px !important;
        left: 180px !important;
    }
} */

@media (max-width: 768px) {
    /* Tablet adjustments - Fixed Pixel Positioning */
    /* .india-map-html .location-marker[data-location="mumbai"] {
        top: 240px !important;
        left: 100px !important;
    }
    
    .india-map-html .location-marker[data-location="mundra"] {
        top: 180px !important;
        left: 60px !important;
    }
    
    .india-map-html .location-marker[data-location="surat"] {
        top: 200px !important;
        left: 70px !important;
    }
    
    .india-map-html .location-marker[data-location="delhi"] {
        top: 80px !important;
        left: 160px !important;
    }
    
    .india-map-html .location-marker[data-location="chennai"] {
        top: 340px !important;
        left: 180px !important;
    }
    
    .india-map-html .location-marker[data-location="tuticorin"] {
        top: 380px !important;
        left: 160px !important;
    } */
    
    /* Adjust marker sizes for tablet */
    .india-map-html .marker-pin {
        width: 14px !important;
        height: 14px !important;
    }
    
    .india-map-html .location-label {
        font-size: 11px !important;
        padding: 3px 6px !important;
    }
}

@media (max-width: 480px) {
    /* Mobile adjustments - Fixed Pixel Positioning */
    /* .india-map-html .location-marker[data-location="mumbai"] {
        top: 200px !important;
        left: 80px !important;
    }
    
    .india-map-html .location-marker[data-location="mundra"] {
        top: 160px !important;
        left: 50px !important;
    }
    
    .india-map-html .location-marker[data-location="surat"] {
        top: 180px !important;
        left: 60px !important;
    }
    
    .india-map-html .location-marker[data-location="delhi"] {
        top: 70px !important;
        left: 140px !important;
    }
    
    .india-map-html .location-marker[data-location="chennai"] {
        top: 300px !important;
        left: 160px !important;
    }
    
    .india-map-html .location-marker[data-location="tuticorin"] {
        top: 340px !important;
        left: 140px !important;
    } */
    
    /* Adjust marker sizes for mobile */
    .india-map-html .marker-pin {
        width: 12px !important;
        height: 12px !important;
    }
    
    .india-map-html .location-label {
        font-size: 10px !important;
        padding: 2px 4px !important;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .map-image {
        height: 450px;
    }
    
    .map-svg-container {
        height: 100%;
    }
}

@media (max-width: 768px) {
    .our-presence {
        padding: 80px 0;
    }
    
    .map-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .map-image {
        height: 300px;
    }
    
    .country-title {
        font-size: 20px;
    }
    
    .location-list {
        padding: 15px;
    }
    
    /* Ensure markers are visible on tablet */
    .location-marker {
        z-index: 20 !important;
    }
}

@media (max-width: 480px) {
    .map-image {
        height: 250px;
    }
    
    .map-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .country-title {
        font-size: 18px;
    }
    
    /* Ensure markers are visible on mobile */
    .location-marker {
        z-index: 25 !important;
    }
    
    /* Adjust marker positioning for mobile */
    .location-marker .location-label {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Enhanced Map Interactions */
.map-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

/* Map container hover effects */
.map-section:hover .map-svg-container {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Enhanced tooltip styling */
.map-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.map-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.map-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}



/* Map Legend */
.map-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

.legend-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.india-map-section .legend-marker {
    background: #e74c3c;
}

.uae-map-section .legend-marker {
    background: #e74c3c;
}

/* UAE Map Marker Positions - Fixed Pixel */
.uae-map-html .location-marker[data-location="dubai"] {
    position: absolute !important;
    top: 29% !important;
    left: 72% !important;
    z-index: 1000 !important;
    display: block !important;
}

.uae-map-html .location-marker[data-location="abudhabi"] {
    position: absolute !important;
    top: 49% !important;
    left: 59.4% !important;
    z-index: 1000 !important;
    display: block !important;
}

.uae-map-html .location-marker[data-location="sharjah"] {
    position: absolute !important;
    top: 23% !important;
    left: 76% !important;
    z-index: 1000 !important;
    display: block !important;
}

.uae-map-html .location-marker[data-location="rasalkhaimah"] {
    position: absolute !important;
    top: 14% !important;
    left: 85% !important;
    z-index: 1000 !important;
    display: block !important;
}

/* Responsive UAE Map Marker Positioning - Fixed Pixel */
/* @media (max-width: 1200px) {
    Desktop adjustments for UAE
    .uae-map-html .location-marker[data-location="dubai"] {
        top: 260px !important;
        left: 550px !important;
    }
    
    .uae-map-html .location-marker[data-location="abudhabi"] {
        top: 560px !important;
        left: 420px !important;
    }
    
    .uae-map-html .location-marker[data-location="sharjah"] {
        top: 220px !important;
        left: 620px !important;
    }
    
    .uae-map-html .location-marker[data-location="rasalkhaimah"] {
        top: 100px !important;
        left: 660px !important;
    }
} */

@media (max-width: 768px) {
    /* Tablet adjustments for UAE - Fixed Pixel */
    /* .uae-map-html .location-marker[data-location="dubai"] {
        top: 240px !important;
        left: 500px !important;
    }
    
    .uae-map-html .location-marker[data-location="abudhabi"] {
        top: 500px !important;
        left: 380px !important;
    }
    
    .uae-map-html .location-marker[data-location="sharjah"] {
        top: 200px !important;
        left: 570px !important;
    }
    
    .uae-map-html .location-marker[data-location="rasalkhaimah"] {
        top: 90px !important;
        left: 610px !important;
    } */
    
    /* Adjust marker sizes for tablet */
    .uae-map-html .marker-pin {
        width: 14px !important;
        height: 14px !important;
    }
    
    .uae-map-html .location-label {
        font-size: 11px !important;
        padding: 3px 6px !important;
    }
}

@media (max-width: 480px) {
    /* Mobile adjustments for UAE - Fixed Pixel */
    /* .uae-map-html .location-marker[data-location="dubai"] {
        top: 200px !important;
        left: 400px !important;
    }
    
    .uae-map-html .location-marker[data-location="abudhabi"] {
        top: 420px !important;
        left: 300px !important;
    }
    
    .uae-map-html .location-marker[data-location="sharjah"] {
        top: 160px !important;
        left: 470px !important;
    }
    
    .uae-map-html .location-marker[data-location="rasalkhaimah"] {
        top: 70px !important;
        left: 510px !important;
    } */
    
    /* Adjust marker sizes for mobile */
    .uae-map-html .marker-pin {
        width: 12px !important;
        height: 12px !important;
    }
    
    .uae-map-html .location-label {
        font-size: 10px !important;
        padding: 2px 4px !important;
    }
}
