.smooth-globe-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}
.smooth-globe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  cursor: grab;
  outline: none;
}

.smooth-globe:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
.smooth-globe canvas {
  filter: drop-shadow(0 0 12px rgba(99,102,241,0.35));
  transition: filter 0.3s ease;
}

/* Enhanced point styling for country nodes and animated dots */
.smooth-globe {
  position: relative;
}

.smooth-globe::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  animation: gentle-pulse 8s ease-in-out infinite;
}

/* Prominent country nodes styling - 5 distinct glowing effects */
.smooth-globe-wrap .supported-country-node.australia-node {
  animation: australia-glow 6s ease-in-out infinite;
}

.smooth-globe-wrap .supported-country-node.uk-node {
  animation: uk-glow 6s ease-in-out infinite;
}

.smooth-globe-wrap .supported-country-node.usa-node {
  animation: usa-glow 6s ease-in-out infinite;
}

.smooth-globe-wrap .supported-country-node.canada-node {
  animation: canada-glow 6s ease-in-out infinite;
}

.smooth-globe-wrap .supported-country-node.south-africa-node {
  animation: south-africa-glow 6s ease-in-out infinite;
}

/* Australia - Oceanic blue-green glow with wave-like pulsing */
@keyframes australia-glow {
  0%, 100% {
    filter: drop-shadow(0 0 12px #00b894) drop-shadow(0 0 20px rgba(0, 184, 148, 0.4));
  }
  25% {
    filter: drop-shadow(0 0 15px #00b894) drop-shadow(0 0 25px rgba(0, 184, 148, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 18px #00b894) drop-shadow(0 0 30px rgba(0, 184, 148, 0.6));
  }
  75% {
    filter: drop-shadow(0 0 15px #00b894) drop-shadow(0 0 25px rgba(0, 184, 148, 0.5));
  }
}

/* UK - Royal purple glow with sophisticated pulsing */
@keyframes uk-glow {
  0%, 100% {
    filter: drop-shadow(0 0 12px #9c27b0) drop-shadow(0 0 20px rgba(156, 39, 176, 0.4));
  }
  20% {
    filter: drop-shadow(0 0 14px #9c27b0) drop-shadow(0 0 22px rgba(156, 39, 176, 0.45));
  }
  40% {
    filter: drop-shadow(0 0 16px #9c27b0) drop-shadow(0 0 26px rgba(156, 39, 176, 0.55));
  }
  60% {
    filter: drop-shadow(0 0 18px #9c27b0) drop-shadow(0 0 30px rgba(156, 39, 176, 0.65));
  }
  80% {
    filter: drop-shadow(0 0 14px #9c27b0) drop-shadow(0 0 22px rgba(156, 39, 176, 0.45));
  }
}

/* USA - Patriotic blue glow with strong, steady pulsing */
@keyframes usa-glow {
  0%, 100% {
    filter: drop-shadow(0 0 12px #3f51b5) drop-shadow(0 0 20px rgba(63, 81, 181, 0.4));
  }
  33% {
    filter: drop-shadow(0 0 16px #3f51b5) drop-shadow(0 0 28px rgba(63, 81, 181, 0.6));
  }
  66% {
    filter: drop-shadow(0 0 20px #3f51b5) drop-shadow(0 0 35px rgba(63, 81, 181, 0.7));
  }
}

/* Canada - Maple leaf inspired warm glow with gentle waves */
@keyframes canada-glow {
  0%, 100% {
    filter: drop-shadow(0 0 12px #ffc107) drop-shadow(0 0 20px rgba(255, 193, 7, 0.4));
  }
  15% {
    filter: drop-shadow(0 0 14px #ffc107) drop-shadow(0 0 22px rgba(255, 193, 7, 0.45));
  }
  30% {
    filter: drop-shadow(0 0 16px #ffc107) drop-shadow(0 0 26px rgba(255, 193, 7, 0.55));
  }
  45% {
    filter: drop-shadow(0 0 18px #ffc107) drop-shadow(0 0 30px rgba(255, 193, 7, 0.65));
  }
  60% {
    filter: drop-shadow(0 0 16px #ffc107) drop-shadow(0 0 26px rgba(255, 193, 7, 0.55));
  }
  75% {
    filter: drop-shadow(0 0 14px #ffc107) drop-shadow(0 0 22px rgba(255, 193, 7, 0.45));
  }
  85% {
    filter: drop-shadow(0 0 13px #ffc107) drop-shadow(0 0 21px rgba(255, 193, 7, 0.42));
  }
}

/* South Africa - Vibrant green-gold glow with African rhythm */
@keyframes south-africa-glow {
  0%, 100% {
    filter: none;
  }
  12% { filter: none; }
  25% { filter: none; }
  37% { filter: none; }
  50% { filter: none; }
  62% { filter: none; }
  75% { filter: none; }
  87% { filter: none; }
}

/* Country node glow effects */
@keyframes gentle-pulse {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

/* Enhanced interaction feedback */
.smooth-globe-wrap.interactive-active {
  position: relative;
}

.smooth-globe-wrap.interactive-active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  border-radius: 8px;
  pointer-events: none;
  animation: interaction-pulse 2s ease-out;
}

@keyframes interaction-pulse {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

/* Migration route highlights */
.smooth-globe-wrap.route-highlight {
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
  transition: box-shadow 0.5s ease;
}

/* Australia path enhancements */
.australia-path {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8)) !important;
  animation: australia-path-glow 2s ease-in-out infinite alternate;
}

@keyframes australia-path-glow {
  0% {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
  }
  100% {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1));
  }
}

/* Source country nodes styling */
.source-country-node {
  filter: drop-shadow(0 0 3px rgba(120, 120, 120, 0.5));
  opacity: 0.8;
}

/* Enhanced immigration flow indicators */
.immigration-flow {
  position: relative;
}

.immigration-flow::before {
  content: '→';
  position: absolute;
  top: -10px;
  right: -10px;
  background: rgba(59, 130, 246, 0.9);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  animation: flow-indicator 1.5s ease-in-out infinite;
}

@keyframes flow-indicator {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* Hide globe container styling during drag interactions */
.smooth-globe-wrap.globe-dragging {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: all 0.2s ease-out;
}

.smooth-globe-wrap.globe-dragging::before,
.smooth-globe-wrap.globe-dragging::after {
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

/* Services page specific drag styling */
.services-parallax-globe.globe-dragging {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Restore container styling when drag ends */
.smooth-globe-wrap:not(.globe-dragging) {
  transition: all 0.3s ease-in;
}

.smooth-globe-wrap:not(.globe-dragging)::before,
.smooth-globe-wrap:not(.globe-dragging)::after {
  opacity: 1;
  transition: opacity 0.3s ease-in;
}

/* Animated dots styling */
@keyframes dot-travel {
  0% {
    opacity: 0.6;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0.6;
    transform: scale(0.8);
  }
}

/* Country information panel */
#country-info-panel {
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#country-info-panel .country-flag {
  font-size: 1.2em;
  margin-right: 8px;
}

#country-info-panel .country-name {
  font-weight: 600;
  color: var(--primary-color, #3b82f6);
}

#country-info-panel .services-list {
  margin-top: 8px;
  font-size: 0.85em;
  line-height: 1.4;
  opacity: 0.9;
}

/* Enhanced tooltip styling */
.smooth-globe-wrap .globe-tooltip {
  background: rgba(0, 0, 0, 0.9) !important;
  border-radius: 8px !important;
  padding: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  font-family: inherit !important;
}

.smooth-globe-wrap .globe-tooltip::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(0, 0, 0, 0.9);
}

/* Scroll conflict prevention styles */
.smooth-globe-wrap.scroll-disabled {
  pointer-events: none;
  position: relative;
}

.smooth-globe-wrap.scroll-disabled::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(1px);
  z-index: 10;
  border-radius: 8px;
  transition: opacity 0.3s ease;
}

.smooth-globe-wrap.scroll-disabled .smooth-globe canvas {
  filter: drop-shadow(0 0 8px rgba(99,102,241,0.2));
}

/* Improved interaction states */
.smooth-globe:hover {
  cursor: grab;
}

.smooth-globe:active {
  cursor: grabbing;
}



/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .smooth-globe {
    cursor: default;
  }

  .smooth-globe-wrap {
    -webkit-overflow-scrolling: touch;
  }
}

/* Buffer zones for better scroll accessibility */
.smooth-globe-wrap::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 0;
  right: 0;
  height: 30px;
  z-index: 5;
  pointer-events: auto;
  background: transparent;
}

.smooth-globe-wrap::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 0;
  right: 0;
  height: 30px;
  z-index: 5;
  pointer-events: auto;
  background: transparent;
}

/* Enhanced buffer zones for touch devices */
@media (hover: none) and (pointer: coarse) {
  .smooth-globe-wrap::before {
    height: 50px;
    top: -50px;
  }

  .smooth-globe-wrap::after {
    height: 50px;
    bottom: -50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .smooth-globe canvas { animation: none !important; }
  .smooth-globe-wrap::before,
  .smooth-globe-wrap::after {
    display: none;
  }
}

/* Services Page Globe Wrapper - Optimized for transform-based positioning */
.services-globe-wrapper {
    position: sticky;
    top: 2rem;
    height: calc(100vh - 2rem);
    overflow: visible;
    border-radius: 12px;
    z-index: 10;
    /* Optimize for child transforms */
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    will-change: transform;
}

/* Services Page Parallax Globe - Visual container that moves with globe and fades out */
.services-parallax-globe {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 60px rgba(59, 130, 246, 0.15);
    background:
        /* Enhanced gradient background */
        linear-gradient(135deg,
            rgba(59, 130, 246, 0.15) 0%,
            rgba(59, 130, 246, 0.10) 25%,
            rgba(255, 255, 255, 0.25) 50%,
            rgba(245, 158, 11, 0.08) 75%,
            rgba(59, 130, 246, 0.12) 100%
        ),
        /* Dynamic radial overlays */
        radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        /* Subtle pattern overlay */
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239ca3af' fill-opacity='0.04'%3E%3Ccircle cx='10' cy='10' r='1.5'/%3E%3Ccircle cx='70' cy='15' r='1'/%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3Ccircle cx='55' cy='45' r='1.2'/%3E%3Ccircle cx='20' cy='60' r='0.8'/%3E%3Ccircle cx='65' cy='70' r='1.3'/%3E%3C/g%3E%3Cpath d='M20 20 L60 20 M20 40 L60 40 M20 60 L60 60' stroke='%236b7280' stroke-width='0.5' stroke-opacity='0.03'/%3E%3C/g%3E%3C/svg%3E");
    backdrop-filter: blur(20px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    /* Critical for container movement and fade effects */
    will-change: transform, opacity;
    z-index: 10;
    transform-origin: center center;
    /* Hardware acceleration for smooth movement and fading */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    /* Smooth opacity transitions */
    transition: opacity 0.1s ease-out;
    /* Prevent layout thrashing */
    contain: layout style paint;
    /* Ensure smooth transforms */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Add floating particles around the globe */
.services-parallax-globe::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background:
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.1) 0%, transparent 3px),
        radial-gradient(circle at 25% 75%, rgba(245, 158, 11, 0.06) 0%, transparent 3px);
    background-size: 100px 100px;
    animation: gentle-float-bg 15s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: -1;
}

.services-parallax-globe .smooth-globe-wrap {
    height: 100%;
    width: 100%;
    position: relative;
}

.services-parallax-globe .smooth-globe {
    height: 100% !important;
    width: 100% !important;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.08s ease-out;
    will-change: transform;
    /* Hardware acceleration for smooth transforms */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    /* Optimize rendering */
    image-rendering: optimizeQuality;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Globe zoom zones */
.globe-zoom-zone {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50vh;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.globe-zoom-zone.active {
    background: none !important;
}

/* Enhanced service card interactions */
.enhanced-service-card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%),
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.04) 0%, transparent 50%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.03),
        0 10px 25px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.enhanced-service-card::before {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.1) 0%,
        rgba(6, 182, 212, 0.08) 50%,
        rgba(245, 158, 11, 0.06) 100%);
}

.enhanced-service-card.active-service {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.enhanced-service-card.active-service .service-icon-modern {
    transform: scale(1.15);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.enhanced-service-card.active-service .service-title {
    color: var(--primary-color);
    font-weight: 700;
}

/* Smooth globe transitions */
.services-parallax-globe.smooth-transition {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Performance optimizations */
.services-parallax-globe .smooth-globe canvas {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    /* Optimize canvas rendering */
    image-rendering: optimizeSpeed;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    /* Prevent flickering */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Services Page Layout Improvements */
.services-grid {
    padding: 4rem 0;
    min-height: 100vh;
    position: relative; /* Establish positioning context for floating globe */
    background:
        /* Layer 1: Subtle travel-themed pattern */
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 20% 90%, rgba(245, 158, 11, 0.04) 0%, transparent 30%),
        /* Layer 2: Connecting lines pattern */
        linear-gradient(45deg, transparent 46%, rgba(59, 130, 246, 0.02) 47%, rgba(59, 130, 246, 0.02) 53%, transparent 54%),
        linear-gradient(-45deg, transparent 46%, rgba(59, 130, 246, 0.02) 47%, rgba(59, 130, 246, 0.02) 53%, transparent 54%),
        /* Layer 3: Base gradient */
        linear-gradient(135deg, #fefefe 0%, #f8fafc 25%, #f1f5f9 100%);
    background-attachment: fixed;
    background-size: 400px 400px, 300px 300px, 200px 200px, 150px 150px, 100px 100px, 80px 80px, 100% 100%;
    background-position: 0 0, 50px 50px, 100px 100px, 200px 200px, 0 0, 0 0, 0 0;
    overflow: hidden;
}

/* Floating travel elements */
.services-grid .floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.services-grid .floating-elements::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 10%;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233b82f6'%3E%3Cpath d='M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5L21 16z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    opacity: 0.4;
    animation: float-travel-1 25s ease-in-out infinite;
}

.services-grid .floating-elements::after {
    content: '';
    position: absolute;
    top: 60%;
    right: 15%;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2306b6d4'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    opacity: 0.35;
    animation: float-travel-2 30s ease-in-out infinite reverse;
}

/* Additional floating elements */
.services-grid .travel-marker-1 {
    position: absolute;
    top: 35%;
    left: 25%;
    width: 16px;
    height: 16px;
    background: rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    animation: float-travel-3 20s ease-in-out infinite;
}

.services-grid .travel-marker-2 {
    position: absolute;
    top: 75%;
    left: 70%;
    width: 12px;
    height: 12px;
    background: rgba(16, 185, 129, 0.25);
    border-radius: 50%;
    animation: float-travel-4 35s ease-in-out infinite reverse;
}

/* Country-specific background themes */
.services-grid.country-australia {
    background:
        linear-gradient(135deg, rgba(0, 184, 148, 0.03) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(0, 184, 148, 0.02) 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300b894' fill-opacity='0.02'%3E%3Cpath d='M30 2L58 30L30 58L2 30L30 2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.services-grid.country-canada {
    background:
        linear-gradient(135deg, rgba(255, 193, 7, 0.03) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 193, 7, 0.02) 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffc107' fill-opacity='0.02'%3E%3Cpath d='M30 10L50 30L30 50L10 30L30 10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.services-grid.country-uk {
    background:
        linear-gradient(135deg, rgba(156, 39, 176, 0.03) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(156, 39, 176, 0.02) 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239c27b0' fill-opacity='0.02'%3E%3Cpath d='M20 20L40 20L40 40L20 40Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.services-grid.country-usa {
    background:
        linear-gradient(135deg, rgba(63, 81, 181, 0.03) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(63, 81, 181, 0.02) 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233f51b5' fill-opacity='0.02'%3E%3Cpath d='M15 15L45 15L45 25L15 25ZM15 35L45 35L45 45L15 45Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.services-grid.country-south-africa {
    background:
        linear-gradient(135deg, rgba(76, 175, 80, 0.03) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(76, 175, 80, 0.02) 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234caf50' fill-opacity='0.02'%3E%3Cpath d='M30 5L55 30L30 55L5 30L30 5z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Service card country themes */
.enhanced-service-card.country-australia {
    border-left: 4px solid rgba(0, 184, 148, 0.3);
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.02) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.enhanced-service-card.country-australia:hover {
    box-shadow: 0 10px 40px rgba(0, 184, 148, 0.15);
    border-left-color: rgba(0, 184, 148, 0.5);
}

.enhanced-service-card.country-canada {
    border-left: 4px solid rgba(255, 193, 7, 0.3);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.02) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.enhanced-service-card.country-canada:hover {
    box-shadow: 0 10px 40px rgba(255, 193, 7, 0.15);
    border-left-color: rgba(255, 193, 7, 0.5);
}

.enhanced-service-card.country-uk {
    border-left: 4px solid rgba(156, 39, 176, 0.3);
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.02) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.enhanced-service-card.country-uk:hover {
    box-shadow: 0 10px 40px rgba(156, 39, 176, 0.15);
    border-left-color: rgba(156, 39, 176, 0.5);
}

.enhanced-service-card.country-usa {
    border-left: 4px solid rgba(63, 81, 181, 0.3);
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.02) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.enhanced-service-card.country-usa:hover {
    box-shadow: 0 10px 40px rgba(63, 81, 181, 0.15);
    border-left-color: rgba(63, 81, 181, 0.5);
}

.enhanced-service-card.country-south-africa {
    border-left: 4px solid rgba(76, 175, 80, 0.3);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.02) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.enhanced-service-card.country-south-africa:hover {
    box-shadow: 0 10px 40px rgba(76, 175, 80, 0.15);
    border-left-color: rgba(76, 175, 80, 0.5);
}

.services-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        /* Migration routes pattern */
        radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 3px),
        radial-gradient(circle at 15% 85%, rgba(245, 158, 11, 0.05) 0%, transparent 3px),
        /* Connecting paths */
        linear-gradient(45deg, rgba(59, 130, 246, 0.03) 0%, transparent 1px, transparent 99%, rgba(59, 130, 246, 0.03) 100%),
        linear-gradient(-45deg, rgba(245, 158, 11, 0.02) 0%, transparent 1px, transparent 99%, rgba(245, 158, 11, 0.02) 100%);
    background-size: 120px 120px, 120px 120px, 120px 120px, 120px 120px, 200px 200px, 200px 200px;
    opacity: 0.7;
    pointer-events: none;
    z-index: 1;
    animation: gentle-float-bg 20s ease-in-out infinite;
}

/* Additional background layers for depth */
.services-grid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        /* Subtle geometric shapes */
        radial-gradient(ellipse 60% 40% at 30% 30%, rgba(59, 130, 246, 0.04) 0%, transparent 100%),
        /* Travel path lines */
        linear-gradient(135deg, rgba(245, 158, 11, 0.02) 0%, transparent 50%, rgba(59, 130, 246, 0.02) 100%);
    background-size: 300px 300px, 250px 250px, 100% 100%;
    opacity: 0.5;
    pointer-events: none;
    z-index: 2;
    animation: subtle-rotate 30s linear infinite;
}

.services-grid .container {
    max-width: 1400px;
}

.services-grid .row {
    min-height: calc(100vh - 8rem);
    position: relative; /* Ensure proper stacking context */
}

/* Ensure service cards column has proper height for globe positioning */
.services-grid .col-lg-7 {
    display: flex;
    flex-direction: column;
}

/* Ensure globe column maintains proper height */
.services-grid .col-lg-5 {
    display: flex;
    align-items: flex-start;
}

/* Service cards spacing */
.services-grid .service-card {
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.services-grid .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Enhanced visual hierarchy */
.services-grid .service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.services-grid .service-description {
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Fallback for when globe is disabled or fails to load */
.services-parallax-globe:empty,
.services-parallax-globe[data-disabled="true"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.services-parallax-globe:empty::before,
.services-parallax-globe[data-disabled="true"]::before {
    content: "🌍";
    font-size: 4rem;
    opacity: 0.8;
    animation: float 6s ease-in-out infinite;
}

.services-parallax-globe:empty::after,
.services-parallax-globe[data-disabled="true"]::after {
    content: "Interactive World Map";
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Background animation keyframes */
@keyframes gentle-float-bg {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-5px) translateX(2px);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-10px) translateX(-1px);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-3px) translateX(-2px);
        opacity: 0.65;
    }
}

@keyframes subtle-rotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(1deg) scale(1.02); }
    100% { transform: rotate(0deg) scale(1); }
}

@keyframes background-shimmer {
    0% { background-position: -100px 0; }
    100% { background-position: 100px 0; }
}

/* Travel-themed floating animations */
@keyframes float-travel-1 {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.4;
    }
    25% {
        transform: translateY(-15px) translateX(10px) rotate(5deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-25px) translateX(-5px) rotate(-3deg);
        opacity: 0.5;
    }
    75% {
        transform: translateY(-10px) translateX(8px) rotate(2deg);
        opacity: 0.35;
    }
}

@keyframes float-travel-2 {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.35;
    }
    33% {
        transform: translateY(-20px) translateX(-8px) scale(1.1);
        opacity: 0.45;
    }
    66% {
        transform: translateY(-35px) translateX(12px) scale(0.9);
        opacity: 0.25;
    }
}

@keyframes float-travel-3 {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-12px) translateX(6px) scale(1.2);
        opacity: 0.4;
    }
}

@keyframes float-travel-4 {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.25;
    }
    25% {
        transform: translateY(-18px) translateX(-4px) rotate(90deg);
        opacity: 0.35;
    }
    50% {
        transform: translateY(-28px) translateX(8px) rotate(180deg);
        opacity: 0.2;
    }
    75% {
        transform: translateY(-14px) translateX(-6px) rotate(270deg);
        opacity: 0.3;
    }
}



/* Hover-only effects for enhanced service cards */
.enhanced-service-card:hover {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 30px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-6px);
    z-index: 5;
}

.enhanced-service-card:hover .service-icon-modern {
    transform: scale(1.15);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.4);
}

.enhanced-service-card:hover .service-title {
    color: var(--primary-color);
    transform: translateX(2px);
}

/* Remove focus outlines completely - only hover controls blue effects */
.enhanced-service-card:focus,
.enhanced-service-card:focus-visible {
    outline: none;
    box-shadow: none;
    transform: none;
    z-index: auto;
}

/* Smooth transitions for all interactive states */
.enhanced-service-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.enhanced-service-card .service-icon-modern {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.enhanced-service-card .service-title {
    transition: color 0.3s ease, transform 0.3s ease;
}

/* Enhanced country-specific card styling */
.enhanced-service-card.country-australia .service-title::after {
    content: ' 🇦🇺';
    opacity: 0.7;
    font-size: 0.9em;
}

.enhanced-service-card.country-canada .service-title::after {
    content: ' 🇨🇦';
    opacity: 0.7;
    font-size: 0.9em;
}

.enhanced-service-card.country-uk .service-title::after {
    content: ' 🇬🇧';
    opacity: 0.7;
    font-size: 0.9em;
}

.enhanced-service-card.country-usa .service-title::after {
    content: ' 🇺🇸';
    opacity: 0.7;
    font-size: 0.9em;
}

.enhanced-service-card.country-south-africa .service-title::after {
    content: ' 🇿🇦';
    opacity: 0.7;
    font-size: 0.9em;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .services-grid::before,
    .services-grid::after,
    .services-grid .floating-elements::before,
    .services-grid .floating-elements::after,
    .services-grid .travel-marker-1,
    .services-grid .travel-marker-2 {
        animation: none !important;
    }

    /* Reduce transitions for accessibility */
    .enhanced-service-card {
        transition: none !important;
    }

    .enhanced-service-card .service-icon-modern,
    .enhanced-service-card .service-title {
        transition: none !important;
    }
}

/* Reduced animations class for low-end devices */
.reduced-animations .enhanced-service-card {
    transition: none !important;
}

.reduced-animations .enhanced-service-card .service-icon-modern,
.reduced-animations .enhanced-service-card .service-title {
    transition: none !important;
}

/* Optimized scroll-based background animations */
.services-grid.scroll-animated {
    position: relative;
    overflow: hidden;
    /* Enable hardware acceleration for background layers */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.services-grid.scroll-animated::before {
    transform-origin: center center;
    transition: transform 0.08s ease-out;
    will-change: transform;
    /* Hardware acceleration */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.services-grid.scroll-animated::after {
    transform-origin: center center;
    transition: transform 0.12s ease-out, opacity 0.08s ease-out;
    will-change: transform, opacity;
    /* Hardware acceleration */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Parallax effect for background layers */
.services-parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.services-parallax-bg .bg-layer-1 {
    background:
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 25%);
    background-size: 300px 300px, 250px 250px;
    animation: parallax-float-1 40s ease-in-out infinite;
}

.services-parallax-bg .bg-layer-2 {
    background:
        linear-gradient(45deg, transparent 48%, rgba(245, 158, 11, 0.03) 49%, rgba(245, 158, 11, 0.03) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(16, 185, 129, 0.03) 49%, rgba(16, 185, 129, 0.03) 51%, transparent 52%);
    background-size: 150px 150px, 120px 120px;
    animation: parallax-float-2 35s ease-in-out infinite reverse;
}

.services-parallax-bg .bg-layer-3 {
    background:
        radial-gradient(ellipse 40% 30% at 60% 70%, rgba(59, 130, 246, 0.04) 0%, transparent 100%),
        radial-gradient(ellipse 30% 50% at 20% 80%, rgba(6, 182, 212, 0.03) 0%, transparent 100%);
    background-size: 400px 400px, 350px 350px;
    animation: parallax-float-3 50s ease-in-out infinite;
}

/* Parallax animation keyframes */
@keyframes parallax-float-1 {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.8;
    }
    25% {
        transform: translateY(-20px) translateX(10px) rotate(1deg);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-40px) translateX(-15px) rotate(-0.5deg);
        opacity: 0.7;
    }
    75% {
        transform: translateY(-15px) translateX(5px) rotate(0.8deg);
        opacity: 0.85;
    }
}

@keyframes parallax-float-2 {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translateY(15px) translateX(-10px) scale(1.05);
        opacity: 0.7;
    }
    66% {
        transform: translateY(-10px) translateX(15px) scale(0.95);
        opacity: 0.5;
    }
}

@keyframes parallax-float-3 {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-30px) translateX(-20px);
        opacity: 0.6;
    }
}

/* Simple fade-in animation - single trigger only */
/* Prevent conflicts with global animation classes */
.enhanced-service-card {
    animation: none !important; /* Disable all animations by default */
}

/* Initial state - hidden and ready to animate */
.enhanced-service-card.scroll-reveal {
    transform: translateY(30px) !important;
    opacity: 0 !important;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease !important;
}

/* Only animate when revealed class is added */
.enhanced-service-card.scroll-reveal.revealed {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

/* Enhanced globe parallax on scroll */
.services-parallax-globe.scroll-enhanced {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .services-globe-wrapper,
    .services-parallax-globe {
        display: none;
    }

    .services-grid .col-lg-7 {
        margin-bottom: 3rem;
    }
}

@media (min-width: 992px) {
    .services-grid .col-lg-7 {
        padding-right: 3rem;
    }

    .services-grid .col-lg-5 {
        padding-left: 1rem;
    }

    /* Ensure globe wrapper takes full height of its column */
    .services-globe-wrapper {
        height: 100%;
        min-height: 600px;
    }
}

/* Additional responsive improvements */
@media (min-width: 1200px) {
    .services-globe-wrapper {
        height: calc(100vh - 8rem);
    }
}


