:root {
  --bg-dark: #050505;
  --bg-card: rgba(20, 20, 35, 0.6);
  --bg-input: rgba(255, 255, 255, 0.05);
  --primary: #00e396;
  --secondary: #008ffb;
  --accent: #775dd0;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --glass-border: rgba(255, 255, 255, 0.08);
  --gradient-main: linear-gradient(135deg, #00e396 0%, #008ffb 100%);
  --glow: 0 0 20px rgba(0, 227, 150, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
  width: 100%;
  max-width: 100vw;
  position: relative;
  padding-top: 0;
}

h1,
h2,
h3 {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
}

/* Fondo Animado */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.bg-grid video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.15;
}

.bg-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  max-width: 90vw;
  background: radial-gradient(
    circle,
    rgba(0, 143, 251, 0.15) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  z-index: -1;
  animation: pulseGlow 8s infinite alternate;
}

@keyframes pulseGlow {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.8;
  }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition:
    transform 0.3s ease-in-out,
    background 0.3s ease;
}

.navbar.hidden {
  transform: translateY(-100%);
}

.navbar.scrolled {
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-brand-name {
  font-family: "Outfit", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, var(--primary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  padding-left: 0.75rem;
}

.nav-brand-name::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 30px;
  background: linear-gradient(180deg, transparent, var(--primary), transparent);
}

.nav-logo img {
  height: 45px;
  filter: drop-shadow(0 0 10px rgba(151, 207, 188, 0.5));
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link svg {
  transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link-btn {
  padding: 0.6rem 1.5rem;
  background: var(--gradient-main);
  color: #000;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link-btn svg {
  stroke: #000;
}

.nav-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 227, 150, 0.4);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary);
  transition: all 0.3s;
}

/* Hero Section */
.hero {
  min-height: auto;
  padding-bottom: 4rem; /* Un poco de aire abajo para que no se pegue */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem 2rem 2rem 2rem;
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  margin-top: 140px;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.5;
  z-index: 10;
}

/* Ajustar secciones para el espacio del navbar + ticker */
section:not(.hero) {
  margin-top: 140px;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%) scale(1.2);
  object-fit: cover;
  filter: blur(8px);
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle 1000px at center,
    rgba(45, 112, 124, 0) 0%,
    rgba(5, 5, 5, 0.8) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  z-index: 10;
  text-align: center;
  max-width: 900px;
  width: 100%;
  position: relative;
  box-sizing: border-box;
  padding: 0 1rem;
}

.logo {
  width: 100%;
  max-width: 500px;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 0px rgba(0, 0, 0, 0));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  } /* Flota hacia arriba */
  100% {
    transform: translateY(0px);
  }
}

h1 {
  font-size: clamp(2rem, 8vw, 5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #ffffff 20%, #00e396 50%, #008ffb 80%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: shine 5s linear infinite;
  word-wrap: break-word;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-weight: 300;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Botones */
.btn {
  padding: 1rem 3rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.4s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--primary);
  color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 227, 150, 0.1);
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--primary);
  z-index: -1;
  transition: width 0.4s ease;
}

.btn-primary:hover {
  color: #000;
  box-shadow: 0 0 30px rgba(0, 227, 150, 0.4);
}

.btn-primary:hover::before {
  width: 100%;
}

.btn-secondary {
  background: rgba(0, 227, 150, 0.1);
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-secondary:hover {
  background: rgba(0, 227, 150, 0.2);
  transform: translateY(-2px);
}

/* TradingView Widget */
.tradingview-widget-container {
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  max-width: 100vw;
  background: rgba(1, 39, 82, 0.7);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 999;
  transition: top 0.3s ease-in-out;
}

.tradingview-widget-container__widget {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* Secciones */
section {
  padding: 6rem 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: hidden;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Grid Container */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  transition: all 0.4s ease;
  max-width: 100%;
  box-sizing: border-box;
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--secondary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Footer */
.footer {
  background: rgba(10, 10, 20, 0.8);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  margin-top: 0; /* Eliminamos la separación */
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.5;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  max-width: 200px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(151, 207, 188, 0.3));
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

.footer-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 350px;
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.footer-column h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-column h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary);
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-column ul li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s;
  display: inline-block;
}

.footer-column ul li a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.footer-social-link:hover {
  background: rgba(0, 227, 150, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(5px);
}

.footer-social-link svg {
  flex-shrink: 0;
}

.footer-bottom {
  margin-top: 3rem;
}

.footer-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--glass-border),
    transparent
  );
  margin-bottom: 2rem;
}

.footer-copyright {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
}

.footer-copyright p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-legal a:hover {
  color: var(--primary);
}

.footer-separator {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transition: left 0.3s;
    align-items: flex-start;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-link-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  section {
    padding: 4rem 1rem;
  }

  .hero {
    padding: 4rem 1rem 2rem 1rem;
  }

  .hero-content {
    padding: 0 0.5rem;
  }

  h1 {
    font-size: 3rem;
  }

  .grid-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Footer Responsive */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-copyright {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-legal {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-separator {
    display: none;
  }
}
