/* ===== VARIABLES ===== */
:root {
  --primary-dark: #001220;
  --accent-green: #00c853;
  --accent-blue: #2962ff;
  --accent-purple: #aa00ff;
  --accent-orange: #ff6d00;
  --light-text: #ffffff;
  --dark-text: #333333;
  --gray-bg: #f5f7fa;
  --card-bg: rgba(255, 255, 255, 0.08);
  --transition: all 0.3s ease;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--primary-dark);
  color: var(--light-text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent-green), #00a046);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 200, 83, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-green);
  border: 2px solid var(--accent-green);
}

.btn-secondary:hover {
  background: rgba(0, 200, 83, 0.1);
  transform: translateY(-3px);
}

/* ===== BACKGROUND ANIMATION ===== */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--primary-dark);
  overflow: hidden;
}

.bg-animation::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: radial-gradient(circle, transparent 20%, var(--primary-dark) 70%),
              repeating-conic-gradient(from 0deg, rgba(0, 200, 83, 0.05) 0deg 10deg, transparent 10deg 20deg),
              repeating-linear-gradient(45deg, rgba(41, 98, 255, 0.03) 0px 1px, transparent 1px 10px);
  animation: rotate 100s linear infinite;
  z-index: -1;
}

@keyframes rotate {
  0% { transform: rotate(0deg);} 
  100% { transform: rotate(360deg);} 
}

/* ===== NAVIGATION ===== */
.navbar {
  background: rgba(0, 18, 32, 0.8);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hisa-image-container {
    width: 800px;
    height: 800px;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 4rem auto;
    padding: 0;
}

/* Stretched image container for SDG */
.hisa-image-container.stretched-image {
    width: 100%;
    max-width: 1200px;
    height: 500px;
    margin: 2rem auto;
}

.hisa-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hisa-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

/* Stretched SDG image styles */
.hisa-logo.stretched-sdg {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-placeholder {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(0, 200, 83, 0.15);
  overflow: hidden;
}

.hisa-nav-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  background: linear-gradient(to right, var(--accent-green), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: white;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-green);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 32px;
  height: 32px;
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 4px;
  margin: 4px 0;
  background: var(--accent-green);
  border-radius: 2px;
  transition: 0.3s;
}

/* Dropdown */
.projects-link, .whitepapers-link, .apps-link {
  position: relative;
  cursor: pointer;
  display: inline-block;
}

/* Higher specificity for nav-link with dropdown classes */
.nav-link.projects-link:active,
.nav-link.projects-link.active,
.nav-link.whitepapers-link:active,
.nav-link.whitepapers-link.active,
.nav-link.apps-link:active,
.nav-link.apps-link.active,
.projects-link:active,
.projects-link.active,
.whitepapers-link:active,
.whitepapers-link.active,
.apps-link:active,
.apps-link.active {
  color: var(--accent-green) !important;
}

.nav-link.projects-link:active::after,
.nav-link.projects-link.active::after,
.nav-link.whitepapers-link:active::after,
.nav-link.whitepapers-link.active::after,
.nav-link.apps-link:active::after,
.nav-link.apps-link.active::after,
.projects-link:active::after,
.projects-link.active::after,
.whitepapers-link:active::after,
.whitepapers-link.active::after,
.apps-link:active::after,
.apps-link.active::after {
  width: 100%;
}

/* Show green when dropdown has show class (for browsers that support :has) */
@supports selector(:has(*)) {
  .projects-link:has(.dropdown-menu.show),
  .whitepapers-link:has(.dropdown-menu.show),
  .apps-link:has(.dropdown-menu.show) {
    color: var(--accent-green) !important;
  }

  .projects-link:has(.dropdown-menu.show)::after,
  .whitepapers-link:has(.dropdown-menu.show)::after,
  .apps-link:has(.dropdown-menu.show)::after {
    width: 100%;
  }
}

.dropdown-arrow {
  margin-left: 6px;
  font-size: 0.8em;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-radius: 8px;
  margin-top: 8px;
  min-width: 160px;
  z-index: 1002;
  flex-direction: column;
}

.dropdown-menu.show { display: flex; }

.dropdown-menu a {
  padding: 10px 16px;
  color: #222;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
}

.dropdown-menu a:hover {
  background: #f0f0f0;
  color: var(--accent-green);
}

.dropdown-menu a:active,
.dropdown-menu a.active {
  color: var(--accent-green);
  font-weight: 600;
  background: rgba(0, 200, 83, 0.1);
}

/* ===== HERO SECTION ===== */
.hero-section {
  padding: 120px 0 80px;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 90%;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin: 2.5rem 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== PILLARS SECTION ===== */
.pillars-section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--accent-green);
  border-radius: 2px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.pillar-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.pillar-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
  border-color: rgba(0, 200, 83, 0.3);
}

.pillar-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar-symbol {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent-green);
  background: rgba(0, 200, 83, 0.1);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.pillar-symbol:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 200, 83, 0.3);
}

.pillar-emoji {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-green);
}

.pillar-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.token-symbol {
  background: rgba(0, 200, 83, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.pillar-activity {
  opacity: 0.8;
}

/* ===== TOKEN SECTION ===== */
.token-section {
  padding: 5rem 0;
}

.token-dashboard {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.token-logo-container {
    margin-top: 2rem;
    text-align: center;
}

.token-logo {
    width: 200px;
    height: 200px;
    border-radius: var(--border-radius);
    object-fit: cover;
    box-shadow: var(--shadow);
}

.token-logo-wrapper {
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.token-visual-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.token-info {
  flex: 1;
}

.token-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.token-supply {
  margin: 1.5rem 0;
}

.supply-number {
  font-size: 2rem;
  font-family: 'Orbitron', sans-serif;
  color: var(--accent-green);
  display: block;
}

.supply-label {
  opacity: 0.7;
  font-size: 0.9rem;
}

.token-utilities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.utility-item {
  background: rgba(0, 200, 83, 0.1);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
}

.token-visualization {
  flex: 1;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

/* ===== AI SECTION ===== */
.ai-section {
  padding: 5rem 0;
}

.ai-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.ai-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.core-agent {
  background: linear-gradient(135deg, rgba(0, 200, 83, 0.1), rgba(41, 98, 255, 0.1));
}

.ai-capabilities {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.capability {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.ai-agents-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.agent-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.agent-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(0, 200, 83, 0.3);
}

/* ===== PROJECTS PAGE ===== */
.page {
  display: none;
  min-height: 100vh;
}

.page.active {
  display: block;
}

.page-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--accent-green);
  border-radius: 2px;
}

.project-section {
  margin-bottom: 5rem;
}

.simulator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.simulator-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  font-weight: 500;
}

.control-group input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-green);
  cursor: pointer;
}

.simulator-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-card {
  background: rgba(0, 200, 83, 0.1);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
}

.reward-amount {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  color: var(--accent-green);
  margin: 0.5rem 0;
}

.apy-rate {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  color: var(--accent-blue);
  margin: 0.5rem 0;
}

.sdg-dashboard {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.sdg-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

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

.metric-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  margin: 0.5rem 0;
  color: var(--accent-green);
}

.metric-trend {
  color: var(--accent-green);
  font-size: 0.9rem;
  font-weight: 500;
}

.ecosystem-map {
  height: 500px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* ===== WHITEPAPERS PAGE ===== */
.whitepapers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.whitepaper-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

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

.paper-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.paper-meta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.btn-download {
  background: transparent;
  color: var(--accent-green);
  border: 2px solid var(--accent-green);
  width: 100%;
  margin-top: 1rem;
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-size: 1rem;
}

.btn-download:hover {
  background: rgba(0, 200, 83, 0.1);
  transform: translateY(-3px);
}

.documentation-section {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.doc-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.doc-item:hover {
  background: rgba(0, 200, 83, 0.1);
  transform: translateY(-5px);
}

.doc-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.doc-link:hover {
  transform: translateX(5px);
}

/* ===== APPS PAGE ===== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.app-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  position: relative;
}

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

.app-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(0, 200, 83, 0.1), rgba(41, 98, 255, 0.1));
}

.app-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.app-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.feature {
  background: rgba(0, 200, 83, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.app-status {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.available {
  background: rgba(0, 200, 83, 0.2);
  color: var(--accent-green);
}

.beta {
  background: rgba(170, 0, 255, 0.2);
  color: var(--accent-purple);
}

.coming {
  background: rgba(255, 109, 0, 0.2);
  color: var(--accent-orange);
}

.development {
  background: rgba(41, 98, 255, 0.2);
  color: var(--accent-blue);
}

.download-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-launch, .btn-notify, .btn-contact {
  width: 100%;
  margin-top: 1rem;
}

.integration-section {
  margin-top: 5rem;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.partner-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.partner-card:hover {
  background: rgba(0, 200, 83, 0.1);
  transform: translateY(-5px);
}

/* ===== FOOTER ===== */
.footer {
  background: rgba(0, 18, 32, 0.9);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 10px;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--accent-green);
}

.footer-section a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 0.8rem;
  transition: var(--transition);
}

.footer-section a:hover {
  color: white;
  transform: translateX(5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .hero-title { font-size: 3rem; }
  .token-dashboard { flex-direction: column; }
  .ai-grid { grid-template-columns: 1fr; }
}

/* ===== MODAL STYLES ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: var(--primary-dark);
  margin: 5% auto;
  padding: 0;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 1000px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
  color: white;
  padding: 1.5rem 2rem;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

.close {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}

.close:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.modal-body {
  padding: 2rem;
  color: var(--light-text);
}

/* Whitepapers Modal Styles */
.whitepapers-grid-modal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.whitepaper-card-modal {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

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

/* Ecosystem Modal Styles */
.ecosystem-overview {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.ecosystem-section h3 {
  color: var(--accent-green);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.ecosystem-item {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  transition: var(--transition);
}

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

.ecosystem-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.ecosystem-item h4 {
  color: var(--accent-green);
  margin-bottom: 0.5rem;
}

.ecosystem-item p {
  margin-bottom: 1rem;
  opacity: 0.9;
}

.ecosystem-link {
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.ecosystem-link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.apps-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.app-item {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-name {
  font-weight: 500;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ===== MOBILE HAMBURGER MENU OPTIMIZATION ===== */
@media (max-width: 900px) {
  /* Hamburger button styling */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    background: rgba(0, 200, 83, 0.1);
    border-radius: 8px;
    padding: 8px;
    transition: var(--transition);
    z-index: 1003;
    border: 1px solid rgba(0, 200, 83, 0.3);
    position: relative;
  }

  .hamburger:hover {
    background: rgba(0, 200, 83, 0.2);
    transform: scale(1.05);
  }

  .hamburger:active {
    transform: scale(0.95);
  }

  .hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--accent-green);
    margin: 3px 0;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }

  /* Animated X when menu is open */
  .hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
  }

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

  /* Mobile navigation menu */
  .nav-menu {
    display: none;
    position: fixed;
    top: 70px;
    right: 16px;
    width: 280px;
    max-width: calc(100vw - 32px);
    background: rgba(0, 18, 32, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 200, 83, 0.2);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1002;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }

  /* Show menu when mobile-open or open class is added */
  .nav-menu.mobile-open,
  .nav-menu.open {
    display: flex !important;
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Navigation links in mobile menu */
  .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 16px;
    border-radius: 8px;
    transition: var(--transition);
    width: 100%;
    text-align: left;
  }

  .nav-link:hover {
    background: rgba(0, 200, 83, 0.1);
    color: var(--accent-green);
  }

  /* Dropdown parent items */
  .projects-link,
  .whitepapers-link,
  .apps-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 16px;
    border-radius: 8px;
    transition: var(--transition);
    width: 100%;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .projects-link:hover,
  .whitepapers-link:hover,
  .apps-link:hover {
    background: rgba(0, 200, 83, 0.1);
    color: var(--accent-green);
  }

  /* Dropdown arrow */
  .dropdown-arrow {
    margin-left: 8px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
  }

  .projects-link.active .dropdown-arrow,
  .whitepapers-link.active .dropdown-arrow,
  .apps-link.active .dropdown-arrow {
    transform: rotate(180deg);
  }

  /* Dropdown menu styling for mobile */
  .dropdown-menu {
    position: static;
    display: none;
    background: rgba(0, 200, 83, 0.05);
    box-shadow: none;
    border-radius: 8px;
    margin: 4px 0 4px 16px;
    padding: 8px;
    border-left: 2px solid var(--accent-green);
  }

  .dropdown-menu.show {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease-out;
  }

  .dropdown-menu a {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
  }

  .dropdown-menu a:hover {
    background: rgba(0, 200, 83, 0.15);
    color: var(--accent-green);
    transform: translateX(4px);
  }

  .dropdown-menu a:active,
  .dropdown-menu a.active {
    background: rgba(0, 200, 83, 0.25);
    color: var(--accent-green);
    font-weight: 600;
    transform: translateX(4px);
  }

  /* Ensure nav container doesn't overflow */
  .nav-container {
    width: calc(100% - 32px);
    padding: 0 16px;
  }

  /* Add overlay when menu is open */
  body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    animation: fadeIn 0.3s ease-out;
  }

  /* Modal Responsive Design */
  .modal-content {
    width: 95%;
    margin: 10% auto;
    max-height: 80vh;
  }
  
  .modal-header {
    padding: 1rem 1.5rem;
  }
  
  .modal-header h2 {
    font-size: 1.5rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .whitepapers-grid-modal,
  .ecosystem-grid {
    grid-template-columns: 1fr;
  }
  
  .apps-overview {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop view - ensure everything displays correctly */
@media (min-width: 901px) {
  .hamburger {
    display: none !important;
  }

  .nav-menu {
    display: flex !important;
    flex-direction: row;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    width: auto;
    gap: 2rem;
  }

  .nav-link,
  .projects-link,
  .whitepapers-link,
  .apps-link {
    padding: 0;
    width: auto;
  }

  .dropdown-menu {
    position: absolute;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 8px;
    min-width: 180px;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  .dropdown-menu a {
    color: #333;
    transition: all 0.2s;
  }

  .dropdown-menu a:hover {
    background: #f0f0f0;
    color: var(--accent-green);
  }

  .dropdown-menu a:active,
  .dropdown-menu a.active {
    color: var(--accent-green);
    font-weight: 600;
    background: rgba(0, 200, 83, 0.1);
  }

  .projects-link:hover .dropdown-menu,
  .projects-link:focus .dropdown-menu,
  .whitepapers-link:hover .dropdown-menu,
  .whitepapers-link:focus .dropdown-menu,
  .apps-link:hover .dropdown-menu,
  .apps-link:focus .dropdown-menu,
  .dropdown-menu.show { 
    display: flex; 
  }

  /* Show green text when hovering over parent link (desktop) - higher specificity */
  .nav-link.projects-link:hover,
  .nav-link.projects-link:focus,
  .nav-link.whitepapers-link:hover,
  .nav-link.whitepapers-link:focus,
  .nav-link.apps-link:hover,
  .nav-link.apps-link:focus,
  .projects-link:hover,
  .projects-link:focus,
  .whitepapers-link:hover,
  .whitepapers-link:focus,
  .apps-link:hover,
  .apps-link:focus {
    color: var(--accent-green) !important;
  }

  .nav-link.projects-link:hover::after,
  .nav-link.projects-link:focus::after,
  .nav-link.whitepapers-link:hover::after,
  .nav-link.whitepapers-link:focus::after,
  .nav-link.apps-link:hover::after,
  .nav-link.apps-link:focus::after,
  .projects-link:hover::after,
  .projects-link:focus::after,
  .whitepapers-link:hover::after,
  .whitepapers-link:focus::after,
  .apps-link:hover::after,
  .apps-link:focus::after {
    width: 100%;
  }
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}