/* ========================================
   MODERN GLOBAL PRESENCE SECTION
   ========================================*/

.modern-global-presence {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f5 100%);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    margin-bottom: 2rem;
}

.modern-global-presence::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e9ecef" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.modern-global-presence .container {
    position: relative;
    z-index: 2;
}

/* ========================================
   HEADER SECTION
   ========================================*/

.global-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(13, 110, 253, 0.2);
    transition: all 0.3s ease;
}

.section-badge:hover {
    background: rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.15);
}

.global-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.global-title .text-primary {
    background: linear-gradient(135deg, #0d6efd, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.global-subtitle {
    font-size: 1.25rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   WORLD MAP VISUAL
   ========================================*/

.world-map-container {
    position: relative;
    text-align: center;
    margin: 4rem 0;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(13, 110, 253, 0.05) 0%, transparent 70%);
    border-radius: 20px;
    padding: 2rem;
}

.map-background {
    position: relative;
    z-index: 2;
}

.map-background i {
    font-size: 14rem;
    color: #0d6efd;
    opacity: 0.15;
    animation: rotate 30s linear infinite;
    filter: drop-shadow(0 0 20px rgba(13, 110, 253, 0.1));
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.pulse-indicators {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
}

/* Replace pulse dots with flag indicators */
.flag-indicators {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
}

.flag-indicator {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 
        0 8px 25px rgba(13, 110, 253, 0.25),
        0 4px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: flagPulse 4s infinite;
    border: 4px solid #0d6efd;
    backdrop-filter: blur(10px);
    z-index: 5;
}

.flag-indicator:hover {
    transform: scale(1.3) translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(13, 110, 253, 0.4),
        0 8px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    z-index: 10;
    border-color: #0056b3;
}

.flag-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.4s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.flag-indicator:hover .flag-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.flag-tooltip {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0d6efd, #0056b3);
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.flag-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #0d6efd;
}

.flag-indicator:hover .flag-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -50px;
    transform: translateX(-50%) translateY(0);
}

@keyframes flagPulse {
    0%, 100% {
        box-shadow: 
            0 8px 25px rgba(13, 110, 253, 0.25),
            0 4px 10px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 8px 25px rgba(13, 110, 253, 0.4),
            0 0 0 15px rgba(13, 110, 253, 0.1),
            0 0 0 30px rgba(13, 110, 253, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
        transform: scale(1.05);
    }
}

/* Position flags around the globe with better spacing */
.flag-1 { top: 15%; left: 25%; animation-delay: 0s; }
.flag-2 { top: 20%; left: 70%; animation-delay: 0.7s; }
.flag-3 { top: 40%; left: 85%; animation-delay: 1.4s; }
.flag-4 { top: 70%; left: 75%; animation-delay: 2.1s; }
.flag-5 { top: 80%; left: 35%; animation-delay: 2.8s; }
.flag-6 { top: 65%; left: 10%; animation-delay: 3.5s; }
.flag-7 { top: 35%; left: 5%; animation-delay: 4.2s; }

/* ========================================
   STATS SECTION
   ========================================*/

.global-stats {
    margin-top: 5rem;
    padding: 3rem 0;
    background: linear-gradient(135deg, #0d6efd, #0056b3);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.global-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/><circle cx="20" cy="20" r="1" fill="white" opacity="0.05"/><circle cx="80" cy="30" r="1.5" fill="white" opacity="0.08"/><circle cx="30" cy="80" r="1" fill="white" opacity="0.06"/><circle cx="70" cy="70" r="1.2" fill="white" opacity="0.07"/></svg>');
    opacity: 0.3;
}

.stat-card {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 1.5rem 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.stat-icon i {
    font-size: 1.5rem;
    color: #ffffff;
}

.modern-global-presence .stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.modern-global-presence .stat-number::after {
    content: '+';
    font-size: 2rem;
    margin-left: 0.25rem;
}

.modern-global-presence .stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   RESPONSIVE DESIGN
   ========================================*/

/* Tablet */
@media (max-width: 991.98px) {
    .modern-global-presence {
        padding: 60px 0;
    }
    
    .global-title {
        font-size: 2.5rem;
    }
    
    .global-subtitle {
        font-size: 1.1rem;
    }
    
    .world-map-container {
        height: 350px;
        margin: 3rem 0;
        padding: 1.5rem;
    }
    
    .map-background i {
        font-size: 12rem;
    }
    
    .flag-indicator {
        width: 55px;
        height: 55px;
        border: 3px solid #0d6efd;
    }
    
    .flag-icon {
        width: 36px;
        height: 36px;
    }
    
    .flag-tooltip {
        font-size: 0.8rem;
        padding: 7px 14px;
    }
    
    .global-stats {
        margin-top: 4rem;
        padding: 2.5rem 0;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .modern-global-presence {
        padding: 40px 0;
    }
    
    .section-badge {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .global-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .global-subtitle {
        font-size: 1rem;
    }
    
    .world-map-container {
        height: 300px;
        margin: 2rem 0;
        padding: 1rem;
    }
    
    .map-background i {
        font-size: 10rem;
    }
    
    .flag-indicator {
        width: 50px;
        height: 50px;
        border: 3px solid #0d6efd;
    }
    
    .flag-icon {
        width: 32px;
        height: 32px;
    }
    
    .flag-tooltip {
        font-size: 0.75rem;
        padding: 6px 12px;
        bottom: -40px;
    }
    
    .flag-indicator:hover .flag-tooltip {
        bottom: -45px;
    }
    
    .country-card {
        padding: 1.25rem 0.75rem;
    }
    
    .flag-container {
        width: 60px;
        height: 60px;
    }
    
    .country-name {
        font-size: 1rem;
    }
    
    .country-region {
        font-size: 0.8rem;
    }
    
    .global-stats {
        margin-top: 3rem;
        padding: 2rem 0;
        border-radius: 16px;
    }
    
    .stat-card {
        padding: 1rem 0.5rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .stat-icon i {
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
}

/* Small Mobile */
@media (max-width: 575.98px) {
    .countries-grid .row {
        --bs-gutter-x: 0.75rem;
    }
    
    .country-card {
        margin-bottom: 1rem;
    }
    
    .flag-container {
        width: 50px;
        height: 50px;
    }
    
    .country-name {
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
}

/* ========================================
   ANIMATIONS AND INTERACTIONS
   ========================================*/

/* Counter Animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-number.animate {
    animation: countUp 0.6s ease-out;
}

/* Hover Effects for Accessibility */
@media (hover: hover) {
    .country-card:hover .country-flag {
        transform: scale(1.05);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .map-background i,
    .pulse-dot,
    .country-card,
    .stat-card {
        animation: none !important;
        transition: none !important;
    }
    
    .country-card:hover,
    .stat-card:hover {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .modern-global-presence {
        background: #ffffff;
    }
    
    .country-card {
        border-color: #000000;
    }
    
    .global-stats {
        background: #000000;
    }
}

/* Print Styles */
@media print {
    .modern-global-presence {
        background: #ffffff !important;
        padding: 2rem 0 !important;
    }
    
    .pulse-indicators,
    .map-background {
        display: none !important;
    }
    
    .global-stats {
        background: #f8f9fa !important;
        color: #000000 !important;
    }
    
    .stat-number,
    .stat-label {
        color: #000000 !important;
    }
}
