/* CSS Variables for Hero */
:root {
  --aws-dark: #0f1419;
  --aws-darker: #0a0e13;
  --aws-navy: #16202b;
  --aws-blue: #1e3a5f;
  --aws-orange: #ff9900;
  --aws-orange-hover: #e88b00;
  --aws-light-blue: #4a9eff;
  --neon-purple: #4a9eff;
  
  /* Text Colors */
  --text-white: #ffffff;
  --text-light: #ffffff;
  --text-gray: #d1d5db;
  --text-muted: #9ca3af;
  --text-dark: #374151;
  
  /* Background Colors */
  --aws-gray-bg: #0f1419;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.1);
}

/* Hero Section - Left-aligned SaaS Style */
.hero {
  background: 
    linear-gradient(135deg, rgba(255, 153, 0, 0.05) 0%, rgba(74, 158, 255, 0.05) 50%, transparent 100%),
    linear-gradient(45deg, var(--aws-darker) 0%, var(--aws-navy) 50%, var(--aws-blue) 100%),
    radial-gradient(circle at 20% 80%, rgba(255, 153, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(74, 158, 255, 0.1) 0%, transparent 50%),
    /* Fallback pattern */
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(255, 153, 0, 0.02) 2px,
      rgba(255, 153, 0, 0.02) 4px
    );
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-bottom: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--hero-bg-image, url('https://events.techgroupkenya.co.ke/wp-content/uploads/2025/09/nairobi-worlds-best-city-to-visit.png'));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(0.5px);
  opacity: 0.4;
  z-index: 1;
  transform: scale(1.05);
  transition: opacity 0.5s ease;
}

/* When image is loaded successfully */
.hero.image-loaded::before {
  opacity: 0.4;
  filter: blur(0.3px);
}

/* Fallback when no image loads */
.hero.image-fallback::before {
  background-image: 
    linear-gradient(135deg, rgba(255, 153, 0, 0.3) 0%, rgba(74, 158, 255, 0.2) 100%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 153, 0, 0.1),
      rgba(255, 153, 0, 0.1) 2px,
      transparent 2px,
      transparent 20px
    );
  opacity: 0.6;
  filter: none;
}

/* Debug: Make background more visible for testing */
.hero-debug::before {
  opacity: 0.8 !important;
  filter: none !important;
  border: 3px solid #ff9900;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(255, 153, 0, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(74, 158, 255, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at center, rgba(15, 20, 25, 0.3) 0%, rgba(22, 32, 43, 0.8) 70%, rgba(15, 20, 25, 0.95) 100%);
  z-index: 2;
}

/* Hero image loading states */
.hero.image-loaded::before {
  background-image: var(--hero-bg-image);
  opacity: 0.4;
}

.hero.image-fallback::before {
  opacity: 0.2;
}

.hero .container {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1200px;
  text-align: left;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  color: #ffffff;
  letter-spacing: -0.02em;
  max-width: 800px;
}

.typewriter {
  color: var(--aws-orange);
  position: relative;
  display: inline-block;
  min-width: 200px;
}

.typewriter::after {
  content: '|';
  color: var(--aws-light-blue);
  animation: blink 1s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  max-width: 600px;
  line-height: 1.6;
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex !important;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 0 !important;
  justify-content: flex-start !important;
  align-items: center;
}

.hero-stat {
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  min-width: 120px;
}

.hero-stat-number {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--aws-orange);
  margin-bottom: 0.5rem;
  display: block;
  line-height: 1;
}

.hero-stat-title {
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.hero-stat-desc {
  display: none;
}

/* Floating particles animation */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--aws-orange);
  border-radius: 50%;
  opacity: 0.6;
  animation: float 15s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--aws-orange);
  color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  background: var(--aws-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  color: #ffffff;
  text-decoration: none;
}

.hero .btn-secondary {
  background: var(--aws-orange) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important;
  border: none !important;
}

.hero .btn-secondary:hover {
  background: var(--aws-orange-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

.hero-buttons .submit-btn {
  background: linear-gradient(135deg, #232F3E 0%, #16202b 100%) !important;
  border: 1px solid #232F3E !important;
  color: #ffffff !important;
}

.hero-buttons .submit-btn:hover {
  background: linear-gradient(135deg, #16202b 0%, #0f1419 100%) !important;
  border-color: #16202b !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
  min-width: 160px;
  justify-content: center;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
  .hero {
    padding: 0;
    height: 100vh;
    align-items: center;
  }
  
  .hero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    margin-bottom: 1rem;
  }
  
  .typewriter {
    min-width: 150px;
  }
  
  .hero-subtitle {
    font-size: clamp(0.9rem, 4vw, 1.1rem);
    margin-bottom: 2rem;
    max-width: 100%;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    width: fit-content;
    margin-bottom: 2rem;
  }
  
  .hero-stats {
    gap: clamp(1rem, 3vw, 1.5rem) !important;
    flex-wrap: wrap;
    justify-content: flex-start !important;
    margin-top: 0 !important;
  }
  
  .hero-stat {
    min-width: clamp(90px, 20vw, 120px);
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 0;
    height: 100vh;
  }
  
  .hero h1 {
    font-size: clamp(1.75rem, 12vw, 2.5rem);
  }
  
  .typewriter {
    min-width: 120px;
  }
  
  .typewriter::after {
    margin-left: 1px;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-buttons {
    gap: 0.5rem;
  }
  
  .btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .hero-stats {
    gap: clamp(0.75rem, 4vw, 1rem) !important;
    justify-content: flex-start !important;
    margin-top: 0 !important;
  }
  
  .hero-stat {
    min-width: clamp(70px, 25vw, 90px);
    flex: 0 1 auto;
  }
  
  .hero-stat-number {
    font-size: clamp(1rem, 5vw, 1.5rem);
  }
  
  .hero-stat-title {
    font-size: clamp(0.7rem, 3vw, 0.8rem);
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: 0;
    height: 100vh;
  }
  
  .hero h1 {
    max-width: 900px;
  }
  
  .hero-subtitle {
    max-width: 650px;
    font-size: 1.375rem;
  }
  
  .hero-buttons {
    gap: 1.5rem;
  }
}