/* ==========================================================================
   1. VARIABLES CSS & RESET
   ========================================================================== */
:root {
  /* Paleta de colores */
  --bg-dark: #0a0b10;
  --bg-card: rgba(22, 27, 38, 0.7);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #06b6d4;
  --accent-purple: #6366f1;
  --accent-gradient: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  
  /* Tipografía */
  --font-base: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  
  /* Layout y espaciados */
  --container-max-width: 1140px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-full: 9999px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-base);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   2. FONDO FLUIDO (CANVAS) Y CONTENEDOR BASE
   ========================================================================== */
#fluid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   3. BOTONES Y COMPONENTES REUTILIZABLES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: var(--transition);
  cursor: pointer;
}

.btn--primary {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.4);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}

.btn--outline:hover {
  border-color: var(--accent-cyan);
}

.btn--large {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  color: var(--accent-cyan);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 8px;
}

/* Grillas */
.grid {
  display: grid;
  gap: 24px;
}

.grid--2-cols {
  grid-template-columns: 1fr;
}

.grid--3-cols {
  grid-template-columns: 1fr;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  padding: 32px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-4px);
}

/* ==========================================================================
   4. HEADER & NAVEGACIÓN
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 11, 16, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-card-border);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
}

.logo span {
  color: var(--accent-cyan);
}

.menu-toggle {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger {
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  left: 0;
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

.nav {
  position: absolute;
  top: 70px;
  left: 0;
  width: 100%;
  background: var(--bg-dark);
  display: none;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
  border-bottom: 1px solid var(--bg-card-border);
}

.nav.is-active {
  display: flex;
}

.nav__link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav__link:hover {
  color: var(--text-main);
}

/* ==========================================================================
   5. SECCIONES (HERO, PROBLEMA, SOLUCIÓN)
   ========================================================================== */

/* Hero */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero__title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero__subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto 32px;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.hero__features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Problema */
.problem {
  padding: 80px 0;
}

.card--problem h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: #f87171;
}

.card--problem p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Solución */
.solution {
  padding: 80px 0;
}

.solution__item {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  padding: 28px;
  border-radius: var(--radius-md);
}


.solution__item h3 {
  color: var(--accent-cyan);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.solution__item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.solution__showcase {
  margin-top: 24px;
}

.solution__showcase h3 {
  color: var(--accent-cyan);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.solution__showcase p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ==========================================================================
   TARJETAS INTERACTIVAS — PROBLEMA / SOLUCIÓN
   ========================================================================== */

.card--problem p,
.solution__item p {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    margin-top 0.35s ease;
}

.card--problem.is-open p,
.solution__item.is-open p {
  max-height: 200px;
  opacity: 1;
  margin-top: 16px;
}
.card--problem,
.solution__item {
  cursor: pointer;
}

.card--problem h3,
.solution__item h3 {
  position: relative;
  padding-right: 32px;
}

.card--problem h3::after,
.solution__item h3::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.3s ease;
}

.card--problem.is-open h3::after,
.solution__item.is-open h3::after {
  content: "−";
}

/* ==========================================================================
   6.SECCIONES (SERVICIOS, CTA, FOOTER)
   ========================================================================== */

.services {
  padding: 80px 0;
}

.services-grid {
  display: grid;
  gap: 24px;
  margin-top: 48px;
}


.service-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  padding: 28px;
  border-radius: var(--radius-md);

}

.service-card h3 {
  margin-bottom: 16px;
}

.service-card p {
  margin: 0;
  color: var(--text-muted);
}


/* CTA Final */
.cta-section {
  padding: 80px 0;
  text-align: center;
}

.cta-section__container {
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 1px solid var(--bg-card-border);
  padding: 48px 24px;
  border-radius: var(--radius-md);
}

.cta-section__title {
  font-size: 2rem;
  margin-bottom: 16px;
}

.cta-section__description {
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto 32px;
}

/* Footer */
.footer {
  background: #06070a;
  border-top: 1px solid var(--bg-card-border);
  padding: 60px 0 20px;
}

.footer__container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 40px;
}

.footer__brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 320px;
}

.footer__contact a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.footer__bottom {
  border-top: 1px solid var(--bg-card-border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Botón flotante WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background-color: #25d366;
  color: #ffffff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 99;
  transition: var(--transition);
   /* Estado oculto */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);  
}

.whatsapp-float.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

/* ==========================================================================
   6. RESPONSIVE / MEDIA QUERIES
   ========================================================================== */

/* Dispositivos medianos (Tablets - 768px+) */
@media (min-width: 768px) {
  .hero__title {
    font-size: 3rem;
  }

  .hero__actions {
    flex-direction: row;
    justify-content: center;
  }

  .grid--2-cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--3-cols {
    grid-template-columns: repeat(3, 1fr);
  }

  .menu-toggle {
    display: none;
  }

  .nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    background: transparent;
    padding: 0;
    border: none;
    width: auto;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__container {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Pantallas grandes (Escritorio - 1024px+) */
@media (min-width: 1024px) {
  .section-title {
    font-size: 2.5rem;
  }

  .hero {
    padding: 120px 0 80px;
  }
}