/**
 * World Map Styles - Impressive Global Presence Section
 * Life Care Systems - Physiotherapy Equipment
 */

/* ========================================
   World Map Section - Main Container
   ======================================== */
.world-map-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #0a1628 0%, #1a365d 50%, #0f2447 100%);
    position: relative;
    overflow: hidden;
    /* Ensure no overflow on mobile */
    max-width: 100vw;
    clip-path: inset(0);
}

/* Animated background stars effect */
.world-map-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.3), transparent);
    background-size: 200px 200px;
    animation: twinkle 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Glowing orb effect */
.world-map-section::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 800px;
    height: 100%;
    max-height: 800px;
    background: radial-gradient(circle, rgba(230, 120, 23, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.map-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Section Header */
.map-container .section-header {
    margin-bottom: 50px;
}

.map-container .section-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(230, 120, 23, 0.2), rgba(230, 120, 23, 0.1));
    border: 1px solid rgba(230, 120, 23, 0.3);
    color: #e67817;
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.map-container .section-badge i {
    font-size: 1.2rem;
}

.map-container .section-title {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.map-container .section-title span {
    background: linear-gradient(135deg, #e67817, #f4a460);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.map-container .section-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   Map Wrapper & SVG Styles
   ======================================== */
.map-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 50px;
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    position: relative;
}

.map-wrapper::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e67817, transparent);
}

.map-wrapper svg {
    width: 100%;
    height: auto;
    max-height: 500px;
    filter: drop-shadow(0 0 30px rgba(0,0,0,0.3));
}

/* SVG Path Styles - All countries */
.map-wrapper #countries path {
    fill: #2d4a6f;
    stroke: rgba(255,255,255,0.15);
    stroke-width: 0.5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Hover effect for all countries */
.map-wrapper #countries path:hover {
    fill: #4a6fa5;
    filter: drop-shadow(0 0 10px rgba(74, 111, 165, 0.5));
}

/* Highlighted export countries */
.map-wrapper #countries path.highlighted {
    fill: #3b82f6;
    stroke: #60a5fa;
    stroke-width: 1;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

.map-wrapper #countries path.highlighted:hover {
    fill: #60a5fa;
    filter: drop-shadow(0 0 15px rgba(96, 165, 250, 0.8));
}

/* India (home country) - Special golden highlight */
.map-wrapper #countries path.home-country,
.map-wrapper #countries path[data-id="IN"] {
    fill: #e67817 !important;
    stroke: #f4a460 !important;
    stroke-width: 2 !important;
    filter: drop-shadow(0 0 15px rgba(230, 120, 23, 0.8)) !important;
    animation: homeGlow 2s ease-in-out infinite;
}

@keyframes homeGlow {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(230, 120, 23, 0.8)); }
    50% { filter: drop-shadow(0 0 25px rgba(230, 120, 23, 1)); }
}

.map-wrapper #countries path.home-country:hover,
.map-wrapper #countries path[data-id="IN"]:hover {
    fill: #f4a460 !important;
    filter: drop-shadow(0 0 25px rgba(244, 164, 96, 1)) !important;
}

/* ========================================
   Export Countries Grid - By Region
   ======================================== */
.export-countries {
    margin: 50px 0;
}

.export-countries h3 {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 30px;
    font-weight: 700;
}

.countries-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.region-group {
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
}

.region-group:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    border-color: rgba(230, 120, 23, 0.3);
}

.region-title {
    font-size: 0.9rem;
    color: #e67817;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.region-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #e67817;
    border-radius: 50%;
}

.region-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.country-tag {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.country-tag:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(59, 130, 246, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

.country-tag.home {
    background: linear-gradient(135deg, rgba(230, 120, 23, 0.3), rgba(230, 120, 23, 0.15));
    border-color: rgba(230, 120, 23, 0.5);
    color: #f4a460;
}

.country-tag.home:hover {
    background: linear-gradient(135deg, rgba(230, 120, 23, 0.5), rgba(230, 120, 23, 0.3));
    box-shadow: 0 5px 20px rgba(230, 120, 23, 0.4);
    color: #ffffff;
}

.country-tag i {
    font-size: 0.75rem;
}

/* ========================================
   Export Statistics
   ======================================== */
.export-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.export-stats .stat-item {
    text-align: center;
    padding: 30px 40px;
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    min-width: 180px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.export-stats .stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #e67817);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.export-stats .stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.export-stats .stat-item:hover::before {
    transform: scaleX(1);
}

.export-stats .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.export-stats .stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #e67817, #f4a460);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1;
}

.export-stats .stat-label {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   Tooltip Styles
   ======================================== */
.map-tooltip {
    position: fixed;
    background: linear-gradient(145deg, #1a202c, #0f141c);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(-50%) translateY(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    white-space: nowrap;
}

.map-tooltip.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.map-tooltip.home {
    border-color: rgba(230, 120, 23, 0.5);
    box-shadow: 0 10px 30px rgba(230, 120, 23, 0.3);
}

.map-tooltip.export {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.map-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #1a202c;
}

/* ========================================
   Modal Styles
   ======================================== */
.map-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.map-modal.visible {
    opacity: 1;
    visibility: visible;
}

.map-modal-content {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 24px;
    padding: 40px;
    max-width: 450px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.map-modal.visible .map-modal-content {
    transform: scale(1);
}

.map-modal-content.home {
    border-color: rgba(230, 120, 23, 0.3);
}

.map-modal-content.export {
    border-color: rgba(59, 130, 246, 0.3);
}

.map-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.map-modal-close:hover {
    color: #fff;
}

.map-modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.map-modal-title {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 700;
}

.map-modal-text {
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    margin-bottom: 25px;
}

.map-modal-btn {
    display: inline-block;
    background: linear-gradient(135deg, #e67817, #cf6a13);
    color: white;
    padding: 14px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(230, 120, 23, 0.4);
}

.map-modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(230, 120, 23, 0.5);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1200px) {
    .countries-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .map-container .section-title {
        font-size: 2.2rem;
    }
    
    .export-stats {
        gap: 20px;
    }
    
    .export-stats .stat-item {
        min-width: 150px;
        padding: 25px 30px;
    }
    
    .export-stats .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .world-map-section {
        padding: 50px 0;
    }
    
    .map-container .section-title {
        font-size: 1.8rem;
    }
    
    .map-wrapper {
        padding: 20px;
    }
    
    .countries-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .export-stats {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .export-stats .stat-item {
        width: 90%;
        max-width: 280px;
    }
    
    .country-tag {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .map-container {
        width: 100%;
        padding: 0 15px;
    }
    
    .map-container .section-title {
        font-size: 1.5rem;
    }
    
    .map-container .section-subtitle {
        font-size: 1rem;
    }
    
    .map-wrapper {
        padding: 15px;
        border-radius: 16px;
    }
    
    .region-group {
        padding: 20px;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.map-wrapper {
    animation: fadeInUp 1s ease-out;
}

.export-stats .stat-item {
    animation: fadeInUp 0.8s ease-out backwards;
}

.export-stats .stat-item:nth-child(1) { animation-delay: 0.1s; }
.export-stats .stat-item:nth-child(2) { animation-delay: 0.2s; }
.export-stats .stat-item:nth-child(3) { animation-delay: 0.3s; }
.export-stats .stat-item:nth-child(4) { animation-delay: 0.4s; }

.region-group {
    animation: slideInLeft 0.6s ease-out backwards;
}

.region-group:nth-child(1) { animation-delay: 0.1s; }
.region-group:nth-child(2) { animation-delay: 0.2s; }
.region-group:nth-child(3) { animation-delay: 0.3s; }
.region-group:nth-child(4) { animation-delay: 0.4s; }
