/* 3D Globe Container & Ambient Lighting */
.globe-wrapper {
  position: relative;
  width: 100%;
  height: 550px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  z-index: 2;
}

/* Atmospheric subtle glow behind the globe on light page */
.globe-wrapper::before {
  content: '';
  position: absolute;
  width: 75%;
  height: 75%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(245, 158, 11, 0.05) 45%, rgba(16, 185, 129, 0.02) 70%, transparent 100%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  filter: blur(40px);
  animation: pulseGlow 10s ease-in-out infinite alternate;
}

#globe-canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
  outline: none;
  z-index: 1;
}

#globe-canvas:active {
  cursor: grabbing;
}

.globe-overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  transform-style: preserve-3d;
}

/* Light Glassmorphic Country tags */
.globe-country-tag {
  position: absolute;
  /* --x, --y, and --z-index injected via JS dynamically */
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate3d(-50%, -50%, 0) scale(var(--scale, 1));
  z-index: var(--z-index, 1);
  opacity: var(--opacity, 1);

  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  color: var(--text-main) !important;
  padding: 8px 16px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04), 0 2px 4px rgba(15, 23, 42, 0.02);
  pointer-events: auto;
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.3s ease;
  will-change: transform, opacity;
}

/* Interactive Hover States */
.globe-country-tag:hover {
  border-color: var(--primary) !important;
  background: #ffffff !important;
  color: var(--primary) !important;
  transform: translate3d(-50%, -50%, 50px) scale(calc(var(--scale, 1) * 1.12));
  box-shadow: 0 15px 30px rgba(180, 83, 9, 0.12), 0 4px 10px rgba(180, 83, 9, 0.03);
  z-index: 99999 !important;
  cursor: pointer;
}

.globe-country-tag img {
  width: 18px;
  height: 13px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Ambient Background Animation */
@keyframes pulseGlow {
  0% {
    transform: scale(0.9) rotate(0deg);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.1) rotate(180deg);
    opacity: 1;
  }
}

/* Hero Section - Clean Light Theme with Spacing Optimization */
.hero-section {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  padding: 10px 0 40px 0;
  /* Further reduced padding from header/top */
  background: #ffffff;
  overflow: hidden;
  z-index: 1;
}

/* Dark-line grid matrix overlay optimized for white backgrounds */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(15, 23, 42, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.015) 1px, transparent 1px);
  background-size: 24px 24px, 48px 48px, 48px 48px;
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

/* Subtle pastel background glows on the right and left sides */
.hero-section::after {
  content: '';
  position: absolute;
  width: 45%;
  height: 85%;
  top: 10%;
  right: -5%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, rgba(99, 102, 241, 0.03) 50%, transparent 80%);
  z-index: 0;
  pointer-events: none;
  filter: blur(40px);
}

/* Floating interactive sector bubbles style */
.floating-bubble {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  z-index: 5;
  pointer-events: none;
}

.floating-bubble i {
  font-size: 0.9rem;
  color: var(--primary);
  /* Saffron */
}

.floating-bubble.bubble-2 i {
  color: var(--secondary);
  /* Emerald */
}

.floating-bubble.bubble-3 i {
  color: var(--accent-blue);
  /* Sky Blue */
}

.floating-bubble.bubble-4 i {
  color: #c78600;
  /* Amber/Gold */
}

/* Positioning bubbles relative to the globe-wrapper */
.bubble-1 {
  top: 10%;
  right: -3%;
  animation: floatSlow 6s ease-in-out infinite;
}

.bubble-2 {
  bottom: 14%;
  left: -4%;
  animation: floatSlow 8s ease-in-out infinite 1s;
}

.bubble-3 {
  top: 76%;
  right: 0%;
  animation: floatSlow 7s ease-in-out infinite 2s;
}

.bubble-4 {
  top: 44%;
  left: -8%;
  animation: floatSlow 9s ease-in-out infinite 0.5s;
}

@keyframes floatSlow {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-12px) rotate(1.5deg);
  }

  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

/* Typewriter vertical cursor design */
@keyframes cursorBlink {
  50% {
    opacity: 0;
  }
}

.typing-cursor {
  font-weight: 300;
  color: var(--primary);
  animation: cursorBlink 0.85s infinite;
  display: inline-block;
  margin-left: 3px;
}

.hero-subtitle {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  /* Brand Saffron Amber */
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
  /* Standard dark gray headings */
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  opacity: 0;
  /* Hides raw text momentarily before JS typing loads it */
  transition: opacity 0.2s ease;
}

.hero-desc {
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  color: var(--text-muted);
  /* Slate 600 readability */
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 540px;
}

/* Gradient Text Accents */
.accent-text-gold {
  color: var(--primary);
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.accent-text-emerald {
  color: var(--secondary);
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Premium Buttons inside Hero section */
.hero-section .btn-premium {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(180, 83, 9, 0.15);
  font-weight: 600;
  border-radius: 30px;
  transition: var(--transition-smooth);
}

.hero-section .btn-premium::before {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}

.hero-section .btn-premium:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(4, 120, 87, 0.25);
  color: #ffffff;
}

.hero-section .btn-outline-premium {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  font-weight: 600;
  border-radius: 30px;
  transition: var(--transition-smooth);
}

.hero-section .btn-outline-premium:hover {
  border-color: var(--primary);
  background: rgba(180, 83, 9, 0.05);
  color: var(--primary);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 4px 15px rgba(180, 83, 9, 0.08);
}

/* Apple-style Staggered Entrance Animations */
.hero-animate-left {
  opacity: 0;
  transform: translate3d(-60px, 0, 0);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.hero-animate-right {
  opacity: 0;
  transform: translate3d(120px, 0, 0) scale(0.92) rotate(4deg);
  transition: opacity 1.8s cubic-bezier(0.15, 0.85, 0.35, 1),
    transform 1.8s cubic-bezier(0.15, 0.85, 0.35, 1);
  will-change: transform, opacity;
}

/* Triggered State */
.hero-section.loaded .hero-animate-left {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.hero-section.loaded .hero-animate-right {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
}

/* Staggered Delay Intervals */
.hero-section.loaded .delay-1 {
  transition-delay: 0.1s;
}

.hero-section.loaded .delay-2 {
  transition-delay: 0.25s;
}

.hero-section.loaded .delay-3 {
  transition-delay: 0.4s;
}

.hero-section.loaded .delay-4 {
  transition-delay: 0.55s;
}

/* Hero Responsive */
@media (max-width: 991px) {
  .hero-section {
    padding: 15px 0 25px 0;
    background: #ffffff;
  }

  .globe-wrapper {
    height: 380px;
    margin-top: 2rem;
  }

  /* Hide floating bubbles on smaller mobile screens for clean layout */
  .floating-bubble {
    display: none !important;
  }

  .globe-wrapper::before {
    width: 75%;
    height: 75%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(245, 158, 11, 0.05) 45%, rgba(16, 185, 129, 0.02) 70%, transparent 100%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
  }
}