/* -----------------------------
   LENDIX LANDING PAGE STYLES
   Author: Jorge Zue
   Version: v2.0 (Full Responsive + Interactive)
------------------------------*/

:root {
  --bg-0: #0b0f16;
  --bg-1: #101725;
  --bg-2: #142036;
  --brand: #8de8ff;
  --brand2: #6b8bff;
  --text-1: #e9eef7;
  --text-2: #9fb3d1;
  --card: #121a2aee;
  --muted: #2a3954;
  --ok: #5ee6a4;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, Roboto, sans-serif;
  background:
    radial-gradient(1200px 800px at 10% -10%, #1d2a42 0%, transparent 60%),
    radial-gradient(1200px 800px at 110% 10%, #142034 0%, transparent 55%),
    radial-gradient(800px 600px at 80% 120%, #0f1a2c 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  color: var(--text-1);
  overflow-x: hidden;
}

/* ---------------------------------------------------
   BACKGROUND EFFECT (particles + glow)
--------------------------------------------------- */
canvas.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  filter: contrast(105%) saturate(105%);
}

.veil {
  position: fixed;
  inset: -10vmax;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(1200px 900px at var(--x,50%) var(--y,50%),
    rgba(109,146,255,.12), rgba(0,0,0,0) 50%),
    radial-gradient(900px 700px at calc(var(--x,50%) - 20%) calc(var(--y,50%) + 10%),
    rgba(31,204,255,.10), rgba(0,0,0,0) 60%);
  transition: transform .6s ease-out, opacity .6s ease-out;
  opacity: .85;
  will-change: transform;
}

/* ---------------------------------------------------
   NAVBAR (Header)
--------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(12,18,32,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1a2844;
  z-index: 100;
}

/* 🔧 NAVBAR HEIGHT CONTROL */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
  padding: 30px 24px; /* ← Ajusta la altura general del header aquí */
}

/* 🔧 LOGO SIZE & POSITION */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-1);
}

.logo img {
  max-width: 170px; /* ← Ajusta el tamaño del logo */
  height: auto;
}

.brand {
  font-size: 28px;
  font-weight: 800;
}

/* 🔧 MENU LINKS (centrados entre logo y botón ES) */
nav {
  display: flex;
  justify-content: center;
  flex-grow: 1;
  gap: 20px;
}

nav a {
  color: var(--text-1);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}
nav a:hover { color: var(--brand); }

/* 🔧 LANGUAGE TOGGLE BUTTON (alineado derecha) */
#lang-toggle {
  background: var(--card);
  color: var(--text-1);
  border: 1px solid #243450;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
  font-size: 14px;
}
#lang-toggle:hover {
  background: linear-gradient(180deg, #1f6cff, #6555ff);
}
[data-lang] { display: none; }
[data-lang].active { display: block; }


/* ---------------------------------------------------
   HERO SECTION
--------------------------------------------------- */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 100vh;
  padding: 120px 20px 80px;
  gap: 40px;
  max-width: 1200px;
  margin: auto;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
}

.hero-content h1 span {
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hueShift 6s infinite alternate; /* 💫 Efecto dinámico de color */
}

@keyframes hueShift {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(30deg); }
}

.hero-content p {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s, box-shadow .3s;
}

.btn.primary {
  background: linear-gradient(180deg,#1f6cff,#6555ff);
  color: #fff;
  box-shadow: 0 10px 25px #0006;
}
.btn.primary:hover { transform: translateY(-2px); }

.btn.ghost {
  border: 1px solid #2d456f;
  background: transparent;
  color: var(--text-1);
}
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------------------------------------------------
   WE ARE SECTION (con rotador de texto)
--------------------------------------------------- */
.weare-section {
  padding: 100px 20px;
  max-width: 1100px;
  margin: auto;
  display: grid;
  gap: 40px;
}

.weare-text h2 {
  font-size: 2.4rem;
  margin-bottom: 14px;
}

.weare-text p {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* 💫 Texto rotativo interactivo */
.rotator {
  position: relative;
  height: 50px; /* ← Altura ajustada para que no se solape */
  margin-top: 32px; /* ← Baja el texto para dar más aire debajo del párrafo */
  overflow: hidden;
  display: flex;
  justify-content: center; /* ← Centra horizontalmente el texto */
  align-items: center; /* ← Centra verticalmente el contenido dentro del bloque */
  text-align: center; /* ← Asegura alineación centrada del texto */
}

.rotator-item {
  position: absolute;
  width: 100%;
  font-weight: 600;
  color: var(--brand);
  opacity: 0;
  transform: translateY(100%);
  animation: rotateText 16s infinite;
  text-align: center; /* ← Centra cada texto individualmente */
}

.rotator-item:nth-child(1) { animation-delay: 0s; }
.rotator-item:nth-child(2) { animation-delay: 4s; }
.rotator-item:nth-child(3) { animation-delay: 8s; }
.rotator-item:nth-child(4) { animation-delay: 12s; }

@keyframes rotateText {
  0%, 10% { opacity: 1; transform: translateY(0); }
  20%, 100% { opacity: 0; transform: translateY(-100%); }
}

/* 🔧 Ajuste adicional para pantallas pequeñas (móvil) */
@media (max-width: 768px) {
  .rotator {
    margin-top: 40px; /* ← Baja un poco más en móvil */
    height: 60px; /* ← Más espacio vertical para evitar solapamiento */
  }
  .rotator-item {
    font-size: 15px; /* ← Tamaño más pequeño en móviles */
  }
}

/* ---------------------------------------------------
   PROGRAMS SECTION
--------------------------------------------------- */
.programs-section {
  padding: 100px 20px;
  background: var(--bg-1);
  text-align: center;
}

.programs-section h2 {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.programs-sub {
  color: var(--text-2);
  margin-bottom: 40px;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  max-width: 1000px;
  margin: auto;
}

.program-card {
  background: var(--card);
  border: 1px solid #1a2844;
  padding: 24px;
  border-radius: 14px;
  text-align: left;
  box-shadow: 0 10px 30px #0006;
  transition: transform .2s, box-shadow .3s;
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px #0008;
}

/* ---------------------------------------------------
   CONTACT SECTION
--------------------------------------------------- */
.contact-section {
  padding: 100px 20px;
  text-align: center;
}

.contact-section h2 {
  font-size: 2.4rem;
  margin-bottom: 14px;
}

.contact-section p {
  color: var(--text-2);
  margin-bottom: 40px;
}

.contact-form {
  max-width: 800px;
  margin: auto;
  display: grid;
  gap: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

input, select, textarea {
  background: #121b2c;
  border: 1px solid #22324d;
  border-radius: 8px;
  color: var(--text-1);
  padding: 12px 14px;
  font-size: 15px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #172339;
}

/* ---------------------------------------------------
   FOOTER
--------------------------------------------------- */
.footer {
  background: var(--bg-2);
  padding: 30px 20px;
  border-top: 1px solid #243450;
  text-align: center;
  color: var(--text-2);
}

.footer-inner {
  max-width: 1000px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.footer-links a {
  color: var(--text-2);
  text-decoration: none;
  margin-left: 16px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--brand); }

/* ---------------------------------------------------
   RESPONSIVE FIXES (MOBILE)
--------------------------------------------------- */
@media (max-width: 900px) {
  .nav-container {
    flex-direction: column;
    gap: 8px;
    padding: 8px 16px;
  }

  /* 🔧 Botón de idioma en móvil */
  #lang-toggle {
    position: absolute;
    top: 10px;
    right: 16px;
    padding: 5px 10px;
    font-size: 13px;
  }

  .logo img {
    max-width: 130px; /* ← Ajusta tamaño del logo en móvil */
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  nav a { font-size: 14px; }

  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 140px !important; /* ← Ajusta espacio debajo del header */
    padding-bottom: 60px;
  }

  .hero-content h1 { font-size: 2rem; }

  .hero-content p { font-size: 1rem; padding: 0 10px; }

  .cta-row { justify-content: center; }

  .weare-section,
  .programs-section,
  .contact-section {
    padding: 70px 16px;
  }

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

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .footer {
    position: relative !important;
    margin-top: 40px;
    padding: 20px 10px;
    font-size: 13px;
  }
}
