:root {
  --bitcoin-orange: #ff9900;
  --bitcoin-orange-light: #ffb74d;
  --bitcoin-orange-glow: rgba(255, 153, 0, 0.3);
  --dark-blue: #0a2540;
  --dark-blue-light: #1e3a5f;
  --light-blue: #00a3ff;
  --off-white: #f8f9fa;
  --dark-gray: #1e1e1e;
  --medium-gray: #555555;
  --light-gray: #eeeeee;
  --site-background: white; /* New variable for consistent background color */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--site-background);
  color: var(--dark-gray);
  height: 100vh;
  overflow: hidden;
  position: relative; /* Added to ensure proper positioning context */
}

.header {
  padding: 0.81rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--site-background); /* Now explicitly using the same background color */
  width: 100%;
  z-index: 50; /* Keeping high z-index to stay above particles */
  position: relative;
  height: 73px;
}

.logo {
  display: flex;
  align-items: center;
  z-index: 51; /* Ensure logo stays above particles */
}

.logo img {
  height: 35px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  z-index: 51; /* Ensure nav links stay above particles */
}

.nav-links a {
  color: var(--dark-gray);
  text-decoration: none;
  font-weight: 420;
  font-size: 1rem;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--bitcoin-orange);
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--bitcoin-orange);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: calc(100vh - 73px);
  width: 100%;
  position: relative;
  padding: 0;
  overflow: hidden;
  z-index: 10; /* Lower than header but above particles */
}

/* Modified particles container to cover the entire viewport */
.particles-container {
  position: fixed; /* Changed from absolute to fixed */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1; /* Ensure it's behind content but visible */
}

.particle {
  position: absolute;
  background-color: var(--bitcoin-orange);
  border-radius: 50%;
  opacity: 0.1;
}

.hero-content {
  width: 100%;
  max-width: 1200px;
  padding: 0.5rem 2rem;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 10;
  position: relative;
  opacity: 1;
  transform: translateY(0);
  flex: 0 0 auto;
}

.hero-content h1 {
  font-size: 2.4rem;
  font-weight: 420;
  margin-bottom: 0.4rem;
  background: linear-gradient(to right, var(--dark-gray), var(--bitcoin-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(255, 153, 0, 0.1);
}

.hero-content p {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  max-width: 600px;
  line-height: 1.3;
  color: var(--medium-gray);
}

/* This class is added on page load to trigger the animation */
.hero-content.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.cta-button {
  padding: 0.8rem 1.5rem;
  background-color: var(--bitcoin-orange);
  color: white;
  text-decoration: none;
  font-weight: 420;
  border-radius: 2rem;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
}

.cta-button:hover {
  background-color: #ff8000;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
}

.cta-button.secondary {
  background-color: transparent;
  border: 2px solid var(--bitcoin-orange);
  color: var(--bitcoin-orange);
}

.cta-button.secondary:hover {
  background-color: rgba(255, 153, 0, 0.1);
}

.map-container {
  width: 100%;
  max-width: 1280px;
  height: calc(100vh - 200px);
  max-height: 800px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  margin: 0 auto;
  flex: 1 1 auto;
  background-color: transparent; /* Changed from white to transparent */
  z-index: 20; /* Ensure it's above particles */
}

.island-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.parallax-container {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transition: transform 0.3s ease-out;
  transform-origin: center center;
  transform: scale(0.9);
}

.island-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mask-image: radial-gradient(ellipse 42% 42% at 50% 50%, white 80%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 50% 42% at 50% 50%, white 85%, transparent 100%);
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  mask-position: center;
  -webkit-mask-position: center;
}

.color-spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}

/* Add this for the fading edge effect */
.color-spotlight::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), transparent 175px, rgba(255, 255, 255, 0.9) 200px);
  mix-blend-mode: saturation;
  pointer-events: none;
  z-index: 1;
}

#spotlight-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Electric flicker effect */
.electric {
  animation: electricFlicker 1s infinite alternate;
}

/* Flicker keyframes with glow via drop-shadow */
@keyframes electricFlicker {
  0% {
    opacity: 0.3;
    transform: scale(1);
    filter: drop-shadow(0 0 3px #00ffff);
  }

  50% {
    opacity: 1;
    transform: scale(1.4);
    filter: drop-shadow(0 0 12px #00ffff);
  }

  100% {
    opacity: 0.3;
    transform: scale(1);
    filter: drop-shadow(0 0 3px #00ffff);
  }
}

/* Floating / pulsing animations for markers */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }

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

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 153, 0, 0.7);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(255, 153, 0, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 153, 0, 0);
  }
}

.map-marker {
  position: absolute;
  width: 40px;
  height: 40px;
  background-color: var(--bitcoin-orange);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  box-shadow: 0 0 0 rgba(255, 153, 0, 0.4);
  animation: pulse 2s infinite;
  transition: transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 30;
  border: 2px solid rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.map-marker:hover {
  transform: scale(3.5);
  background-color: #ffa500;
  z-index: 40;
  animation: none;
}

.map-marker img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.map-marker::after {
  content: attr(data-label);
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  color: var(--dark-gray);
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border: 1px solid var(--bitcoin-orange);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.map-marker:hover::after {
  opacity: 1;
}

.company-popup {
  position: absolute;
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid var(--bitcoin-orange);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 10px var(--bitcoin-orange-glow);
  max-width: 300px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  transform: translateY(20px);
  color: var(--dark-gray);
}

.company-popup.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.company-popup h3 {
  color: var(--bitcoin-orange);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.company-popup p {
  margin-bottom: 15px;
  line-height: 1.5;
  font-size: 0.9rem;
  color: var(--medium-gray);
}

.company-popup-btn {
  display: inline-block;
  background-color: var(--bitcoin-orange);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 420;
  transition: all 0.3s;
}

.company-popup-btn:hover {
  background-color: #ff8000;
  transform: translateY(-3px);
}

.close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--medium-gray);
  font-size: 1.2rem;
  cursor: pointer;
}

.tooltip {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  color: var(--dark-gray);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid var(--bitcoin-orange);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  opacity: 0;
  animation: fadeIn 1s forwards;
  animation-delay: 2s;
  z-index: 20;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* MOBILE RESPONSIVE STYLES */

/* Mobile Navigation Styles */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1000;
}

.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--dark-gray);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Mobile Nav Container */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background-color: var(--site-background);
  z-index: 999;
  transition: right 0.3s ease;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  padding: 80px 20px 20px;
  overflow-y: auto;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav-links a {
  color: var(--dark-gray);
  text-decoration: none;
  font-weight: 420;
  font-size: 1.2rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--light-gray);
}

/* Overlay for when mobile menu is open */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Animation for hamburger icon */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .map-container {
    height: calc(100vh - 250px);
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0.8rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero-content {
    padding: 1rem 1.5rem;
    margin-top: 1rem;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 250px;
  }

  .cta-button {
    width: 100%;
    text-align: center;
  }

  .map-container {
    height: 55vh;
  }

  .tooltip {
    width: 90%;
    bottom: 20px;
    font-size: 0.8rem;
    text-align: center;
    padding: 8px 12px;
  }

  /* Adjust map markers for touch */
  .map-marker {
    width: 32px;
    height: 32px;
  }

  .map-marker:hover {
    transform: scale(1.2);
  }

  /* Company popup adjustments */
  .company-popup {
    width: 85%;
    max-width: 250px;
    padding: 15px;
  }

  .company-popup h3 {
    font-size: 1.1rem;
  }

  .company-popup p {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.8rem 1rem;
  }

  .logo svg {
    width: 200px;
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .hero-content p {
    font-size: 0.8rem;
  }

  .map-container {
    height: 50vh;
  }

  /* Adjust particles for better mobile performance */
  .particle {
    opacity: 0.05;
  }

  /* Adjust footer for very small screens */
  .footer-column:first-child,
  .footer-column:last-child {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .footer-links li {
    margin-right: 0.5rem;
  }
}

/* Fix for island visualization on mobile */
@media (max-width: 768px) {
  .parallax-container {
    transform: scale(0.7);
  }

  /* Disable parallax effect on mobile for better performance */
  .parallax-container:hover {
    transform: scale(0.7) !important;
  }
}

/* Add touch support for map markers */
@media (hover: none) {
  .map-marker::after {
    opacity: 1;
    font-size: 8px;
    bottom: -20px;
  }
}

/* Updated footer styles with vertical alignment */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--site-background);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.8rem 0;
  z-index: 40;
}

.footer-container {
  width: 100%;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
}

.footer-right {
  display: flex;
  align-items: center;
}

.footer-logo {
  margin-right: 1.5rem;
  display: flex;
  align-items: center;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

.main-links {
  flex-wrap: wrap;
}

.legal-links {
  justify-content: flex-end;
}

.footer-links li {
  margin-right: 1.5rem;
  white-space: nowrap;
}

.footer-links a {
  color: var(--medium-gray);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--bitcoin-orange);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .footer-container {
    padding: 0 1.5rem;
  }

  .footer-logo {
    margin-right: 1rem;
  }

  .footer-links li {
    margin-right: 1rem;
  }
}

@media (max-width: 768px) {
  .map-container {
    height: auto;
    min-height: 60vh;
    margin-bottom: 70px; /* Extra margin to ensure visibility */
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-left,
  .footer-right {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .footer-right {
    margin-top: 0.5rem;
  }

  .footer-logo svg {
    width: 100px;
    height: 25px;
  }

  .footer-links li {
    margin-right: 0.8rem;
    margin-bottom: 0.3rem;
  }

  .footer-links a {
    font-size: 0.75rem;
  }

  .legal-links {
    justify-content: flex-start;
  }
}

@media (max-width: 576px) {
  .footer-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-logo {
    margin-bottom: 0.5rem;
  }

  .footer-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 5px;
  }

  .map-container {
    bottom: 10vh;
    min-height: 50vh;
  }

  .footer-container {
    padding: 0 1rem;
  }
}

/* Allow scrolling on mobile devices */
@media (max-width: 768px) {
  body {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .main-content {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  /* Improve map container sizing */
  .map-container {
    height: 70vh; /* Increased from 55vh */
    min-height: 450px;
    margin-bottom: 80px; /* Ensure space for footer */
    overflow: visible;
  }

  /* Adjust island container to show full island */
  .island-container {
    overflow: visible;
    padding-bottom: 20px;
  }

  /* Adjust footer positioning for scrollable content */
  .footer {
    position: relative;
    bottom: auto;
  }

  /* Adjust the scaling to fit better */
  .parallax-container {
    transform: scale(0.8);
  }
}

/* Smaller phones need more adjustment */
@media (max-width: 576px) {
  .map-container {
    height: 60vh;
    min-height: 400px;
    position: relative;
    bottom: auto;
  }

  /* Smaller scale for very small screens */
  .parallax-container {
    transform: scale(0.65);
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .map-container {
    min-height: 350px;
  }

  .parallax-container {
    transform: scale(0.55);
  }
}
