:root {
    --bg-color: #222222;
    --card-bg: #1e1e1e;
    --text-color: #FFF;
    --subtext-color: #C5C5C5;
    --accent-color: #5865f2;
    --hover-accent: #4752c4;
    --link-color: #e0e0e0;
    --header-height: 70px;
    --transition: 0.3s;
    --footer-color: #0F0F0F;
  }

  * {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
  }
  
  body.light {
    --bg-color: #ffffff;
    --card-bg: #f9f9f9;
    --text-color: #202124;
    --subtext-color: #505050;
    --link-color: #202124;
    --footer-color: #444444;
  }
  
  * { margin: 0; padding: 0; box-sizing: border-box; }
  
  body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.6;
    margin: 0;
  }
  
  .page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
  }
  
  a { color: var(--link-color); text-decoration: none; transition: color var(--transition); }
  a:hover { color: var(--accent-color); }
  
  /* Enhanced nav styling */
  header { position: relative; /* o quita esta propiedad */ background: var(--card-bg); box-shadow: 0 2px 8px rgba(0,0,0,0.5); height: var(--header-height); display: flex; align-items: center; padding: 0 20px; }

  .main-nav {
    position: sticky;
    top: 0;
    z-index: 500;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding-inline: clamp(24px, 6vw, 60px);
    margin-top: 12px;
  }
  
  .nav-gradient {
    position: absolute;
    inset: 0;
    border-radius: calc(var(--radius-lg) * 0.7);
    background: linear-gradient(120deg, rgba(113, 129, 255, 0.38), rgba(92, 195, 216, 0.25));
    opacity: 0.18;
    filter: blur(20px);
  }
  
  .nav-frame {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-lg) * 0.8);
    padding: 0 clamp(20px, 4vw, 36px);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
  }
  
  .left-section,
  .right-section {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2vw, 30px);
  }
  
  #logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(113, 129, 255, 0.28);
  }
  
  .nav-links {
    display: flex;
    gap: clamp(12px, 2vw, 28px);
    font-size: 0.95rem;
  }
  
  .nav-item {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 550;
    color: var(--text-soft);
    letter-spacing: 0.01em;
    transition: background var(--transition-medium), color var(--transition-medium), transform var(--transition-fast);
  }
  
  .nav-item:hover,
  .nav-item:focus-visible {
    background: var(--accent-soft);
    color: var(--text);
    transform: translateY(-2px);
  }
  
  .toggle-mode,
  .hamburger {
    border: none;
    background: var(--surface);
    color: var(--text);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background var(--transition-medium), transform var(--transition-fast);
  }
  
  .toggle-mode:hover,
  .hamburger:hover {
    background: var(--accent-soft);
    transform: translateY(-1px);
  }
  
  .hamburger {
    display: none;
    font-size: 1.3rem;
  }

  .hero-video { position: relative; width: 100%;  height: 100vh; overflow: hidden; margin: 0; }
  .bg-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; } 
  .hero-overlay { position: relative; width: 100%; height: 100%; background: rgba(10, 10, 10, 0.6); display: flex; align-items: center; justify-content: center; padding: 0 20px; text-align: center; }
  .hero-content { max-width: 800px; color: white; }
  .hero-content h1 { font-size: 3rem; margin-bottom: 20px; }
  .hero-content p { font-size: 1.2rem; margin-bottom: 30px; color: #ddd; }
  .buttons { display: flex; gap: 16px; justify-content: center; }
  .btn, .btn-outline { padding: 12px 24px; font-size: 1rem; border-radius: 4px; cursor: pointer; transition: all 0.3s ease; }
  .btn { background: var(--accent-color); color: #fff; border: none; }
  .btn:hover { background: var(--hover-accent); }
  .btn-outline { background: transparent; color: #fff; border: 1px solid #fff; }
  .btn-outline:hover { background: var(--accent-color); color: #fff; border-color: var(--accent-color); }  
 
  /*Features*/
  .features, .impact { display: flex; flex-direction: column; gap: 40px; padding: 40px 0; }
  .feature-card { /* background: var(--card-bg); */ padding: 50px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .feature-card .feature-icon, .feature-card .feature-content { flex: 1 1 45%; margin: 0 40px; }
  .feature-card .feature-icon img { display: block; max-width: 100%; height: auto; }
  .feature-icon { font-size: 2rem; color: var(--accent-color); }
  .feature-content h3 { font-size: 1.5rem; margin-bottom: 10px; }
  .feature-content p { color: var(--subtext-color); }
  .feature-button { display: inline-block; margin-top: 20px; padding: 10px 20px; background-color: var(--accent-color); color: white; border: none; border-radius: 6px; text-decoration: none; font-weight: bold; transition: background-color 0.3s ease; }
  .feature-button:hover { background-color: darken(var(--accent-color), 10%); }
  .feature-card { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .feature-card.show { opacity: 1; transform: translateY(0); }

  .btn, .btn-outline {  transition: transform 0.2s ease, box-shadow 0.2s ease; }
  
  .btn:hover, .btn-outline:hover { transform: scale(1.05); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
  
  
  
  /* Impact */
  .impact { background: var(--card-bg); padding: 30px 0; border-radius: 8px; text-align: center; display: flex; flex-wrap: wrap; }
  .impact h2 { font-size: 2rem; }
  .stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 40px; margin-bottom: 30px;}
  .stat .number { font-size: 2rem; font-weight: bold; }
  .stat .label { color: var(--subtext-color); }
  
  /* Footer */
  footer { background: var(footer-color); color: var(--subtext-color); padding: 40px 20px; }
  .footer-cols { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
  .footer-col h4 { color: var(--text-color); margin-bottom: 10px; }
  .footer-col ul { list-style: none; }
  .footer-col li { margin-bottom: 8px; }
  .footer-bottom { text-align: center; margin-top: 20px; font-size: 0.9rem; }
  .footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
  
  /* Responsive: apilar en móvil */
  @media (max-width: 768px) {
    .feature-card {
      flex-direction: column;
    }
    .feature-card .feature-icon,
    .feature-card .feature-content {
      flex: 1 1 100%; margin: 0%;
    }
  }
  
  
  /* Responsive */
  @media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-links { display: none; flex-direction: column; background: var(--card-bg); position: absolute; top: var(--header-height); left: 0; width: 100%; padding: 20px; }
    .nav-links.active { display: flex; }
    .hero { flex-direction: column; }
    .hero-image img { max-width: 200px; margin-top: 20px; }
    .features { padding: 20px 0; }
    .feature-card { flex-direction: column; text-align: center; }
    .feature-icon { margin-bottom: 10px; }
    .stats { gap: 20px; }
  }

#loadingContainer { display: flex; justify-content: center; align-items: center; height: 100vh; background-color: rgba(0, 0, 0, 0.5); position: fixed; top: 0; left: 0; width: 100%; z-index: 9999; }
#loadingImage { width: 100px;  height: 100px; animation: rotar 2s linear infinite; }

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

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.marquee-wrapper { position: relative; overflow: hidden; padding: 16px 0; }
.marquee-container { white-space: nowrap; }
.marquee-content { display: inline-block; padding-left: 100%; animation: scroll-left 30s linear infinite; }
.item { display: inline-block; margin: 0 40px; color: white; font-size: 30px; text-decoration: bold; }
.icon { color: white; margin-right: 6px; font-size: 30px; }
.marquee-wrapper::before,
.marquee-wrapper::after { content: ''; position: absolute; top: 0; width: 60px; height: 100%; z-index: 2; pointer-events: none; }
.marquee-wrapper::before { left: 0; background: linear-gradient(to right, --bg-color 0%, transparent 100%); }
.marquee-wrapper::after { right: 0; background: linear-gradient(to left, --bg-color, 0%, transparent 100%); }

#typed-word {
  color: red;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
}

.cursor {
  display: inline;
  width: 1ch;
  animation: blink 1s infinite;
}

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


#particles-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}


#phrases-loop {
  margin-top: 10px;
  font-size: 1.2rem;
  color: #ccc;
  height: 24px;
  overflow: hidden;
  position: relative;
}
.phrase {
  position: absolute;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.phrase.active {
  opacity: 1;
}

#typewriter {
  font-size: 3rem;
  color: white;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
}
.cursor {
  display: inline;
  animation: blink 1s infinite;
}

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