/* Global Styles */
:root {
  --ai-color: #4285F4;
  --healthcare-color: #34A853;
  --energy-color: #FBBC05;
  --transportation-color: #EA4335;
  --space-color: #9C27B0;
  --background: #f9f9f9;
  --text: #333;
  --light-text: #666;
  --card-bg: #fff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
  color: white;
  padding: 60px 0 40px;
  text-align: center;
}

header h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  font-weight: 800;
}

header p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Navigation */
nav {
  background-color: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: var(--transition);
}

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

/* Timeline Controls */
.timeline-controls {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin: 30px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.year-selector {
  display: flex;
  overflow-x: auto;
  padding: 10px 0;
  margin-bottom: 10px;
  width: 100%;
}

.year-btn {
  background-color: var(--background);
  border: none;
  padding: 10px 20px;
  margin-right: 10px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.year-btn:hover {
  background-color: rgba(66, 133, 244, 0.1);
}

.year-btn.active {
  background-color: var(--ai-color);
  color: white;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.category-filter {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.filter-ai {
  background-color: rgba(66, 133, 244, 0.1);
  color: var(--ai-color);
}

.filter-healthcare {
  background-color: rgba(52, 168, 83, 0.1);
  color: var(--healthcare-color);
}

.filter-energy {
  background-color: rgba(251, 188, 5, 0.1);
  color: var(--energy-color);
}

.filter-transportation {
  background-color: rgba(234, 67, 53, 0.1);
  color: var(--transportation-color);
}

.filter-space {
  background-color: rgba(156, 39, 176, 0.1);
  color: var(--space-color);
}

.category-filter.active {
  color: white;
}

.filter-ai.active {
  background-color: var(--ai-color);
}

.filter-healthcare.active {
  background-color: var(--healthcare-color);
}

.filter-energy.active {
  background-color: var(--energy-color);
}

.filter-transportation.active {
  background-color: var(--transportation-color);
}

.filter-space.active {
  background-color: var(--space-color);
}

.category-filter-icon {
  margin-right: 8px;
}

/* Timeline Section */
.timeline-section {
  padding: 40px 0;
}

.timeline-container {
  position: relative;
  margin-top: 30px;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background-color: #ddd;
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: 30px;
  position: relative;
  margin-bottom: 50px;
  width: 50%;
}

.timeline-item:nth-child(even) {
  align-self: flex-end;
  justify-content: flex-start;
  padding-right: 0;
  padding-left: 30px;
  left: 50%;
}

.timeline-content {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 20px;
  width: 100%;
  max-width: 500px;
  transition: var(--transition);
}

.timeline-content:hover {
  box-shadow: var(--hover-shadow);
  transform: translateY(-5px);
}

.timeline-content h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.timeline-content p {
  color: var(--light-text);
  margin-bottom: 15px;
}

.timeline-content .category-tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.timeline-content .impact-tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 10px;
  background-color: rgba(0, 0, 0, 0.05);
}

.timeline-content .regions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 15px;
}

.timeline-content .region-tag {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
}

/* Category Colors */
.category-ai {
  background-color: rgba(66, 133, 244, 0.1);
  color: var(--ai-color);
  border-left: 4px solid var(--ai-color);
}

.category-healthcare {
  background-color: rgba(52, 168, 83, 0.1);
  color: var(--healthcare-color);
  border-left: 4px solid var(--healthcare-color);
}

.category-energy {
  background-color: rgba(251, 188, 5, 0.1);
  color: var(--energy-color);
  border-left: 4px solid var(--energy-color);
}

.category-transportation {
  background-color: rgba(234, 67, 53, 0.1);
  color: var(--transportation-color);
  border-left: 4px solid var(--transportation-color);
}

.category-space {
  background-color: rgba(156, 39, 176, 0.1);
  color: var(--space-color);
  border-left: 4px solid var(--space-color);
}

.tag-ai {
  background-color: var(--ai-color);
  color: white;
}

.tag-healthcare {
  background-color: var(--healthcare-color);
  color: white;
}

.tag-energy {
  background-color: var(--energy-color);
  color: white;
}

.tag-transportation {
  background-color: var(--transportation-color);
  color: white;
}

.tag-space {
  background-color: var(--space-color);
  color: white;
}

/* Map Section */
.map-section {
  padding: 40px 0;
}

.map-container {
  height: 500px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

#world-map {
  width: 100%;
  height: 100%;
}

/* About Section */
.about-section {
  padding: 60px 0;
  background-color: white;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.about-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 30px;
  transition: var(--transition);
}

.about-card:hover {
  box-shadow: var(--hover-shadow);
  transform: translateY(-5px);
}

.about-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--ai-color);
}

.about-card p {
  color: var(--light-text);
}

/* Footer */
footer {
  background-color: #333;
  color: white;
  padding: 40px 0;
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-content p {
  margin-bottom: 20px;
  opacity: 0.8;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.social-links a {
  color: white;
  font-size: 1.5rem;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--ai-color);
}

/* Responsive Design */
@media (max-width: 992px) {
  header h1 {
    font-size: 2.5rem;
  }
  
  .timeline-item {
    width: 100%;
    padding-right: 0;
    padding-left: 70px;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
    padding-left: 70px;
  }
  
  .timeline-line {
    left: 40px;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  header p {
    font-size: 1rem;
  }
  
  .nav-container {
    flex-direction: column;
  }
  
  .nav-links {
    margin-top: 15px;
  }
  
  .nav-links li {
    margin-left: 15px;
    margin-right: 15px;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* Map Tooltip */
.map-tooltip {
  position: absolute;
  background-color: white;
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  pointer-events: none;
  z-index: 1000;
  max-width: 300px;
  font-size: 0.9rem;
}

.map-tooltip h4 {
  margin-bottom: 5px;
  font-size: 1rem;
}

.map-tooltip p {
  margin-bottom: 5px;
  color: var(--light-text);
}

/* Loading Animation */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--ai-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}