/* ============================================================
   EVAPORA — Modern Redesign 2026
   ============================================================ */

/* --- CSS Variables / Theme --- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f2e;
  --bg-card-hover: #1f2538;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-1: #3b82f6;
  --accent-2: #8b5cf6;
  --accent-3: #06b6d4;
  --gradient-main: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-hero: linear-gradient(135deg, #3b82f6, #06b6d4, #8b5cf6);
  --border-color: rgba(255,255,255,0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 8px 32px rgba(0,0,0,0.3);
  --nav-height: 72px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
strong { color: #fff; font-weight: 600; }

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled {
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

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

.nav-logo img {
  height: 36px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

.nav-logo:hover img {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

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

.nav-btn {
  padding: 8px 22px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-main);
  border-radius: 8px;
  margin-left: 8px;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
}

/* Nav Toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-primary);
}

#particlesCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(59, 130, 246, 0.15), transparent),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(139, 92, 246, 0.1), transparent),
    radial-gradient(ellipse 40% 30% at 20% 60%, rgba(6, 182, 212, 0.08), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--accent-1);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 100px;
  margin-bottom: 32px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary, .btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 14px 34px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
}

.btn-primary {
  color: #fff;
  background: var(--gradient-main);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.45);
}

.btn-outline {
  color: var(--text-primary);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
}

.btn-outline:hover {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.05);
  transform: translateY(-3px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Hero scroll indicator */
.hero-scroll {
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-mouse {
  width: 26px;
  height: 40px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 13px;
  position: relative;
}

.scroll-dot {
  width: 4px;
  height: 8px;
  background: var(--accent-1);
  border-radius: 2px;
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section {
  padding: 120px 0;
  position: relative;
}

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

.section-tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-1);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 100px;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 24px;
}

.section-divider {
  width: 60px;
  height: 4px;
  background: var(--gradient-main);
  border-radius: 4px;
  margin: 0 auto;
}

.section-sub {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 650px;
  margin: -30px auto 50px;
}

/* ============================================================
   HISTORIA
   ============================================================ */
.historia {
  background: var(--bg-secondary);
  overflow: hidden;
}

.historia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.historia-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 20px;
  line-height: 1.8;
}

/* Stats counter */
.historia-stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--border-color);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* Floating cards visual */
.historia-visual {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  font-size: 0.9rem;
  font-weight: 500;
  animation: float 6s ease-in-out infinite;
}

.card-1 {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.card-2 {
  top: 40%;
  right: 0;
  animation-delay: 2s;
}

.card-3 {
  bottom: 10%;
  left: 15%;
  animation-delay: 4s;
}

.card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  font-size: 1.2rem;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.glow-orb {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.12), transparent 70%);
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* ============================================================
   SOLUCIONES
   ============================================================ */
.soluciones {
  background: var(--bg-primary);
}

.soluciones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.sol-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.sol-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.sol-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.sol-card:hover::before {
  opacity: 1;
}

.sol-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-1);
  transition: all 0.4s ease;
}

.sol-icon svg {
  width: 26px;
  height: 26px;
}

.sol-card:hover .sol-icon {
  background: var(--gradient-main);
  color: #fff;
  transform: scale(1.05);
}

.sol-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.sol-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================================
   PARALLAX SECTION
   ============================================================ */
.parallax-section {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  inset: -20px;
  background:
    linear-gradient(135deg, rgba(10,14,26,0.85), rgba(10,14,26,0.7)),
    url('assets/img/bg/divider6.jpg') center/cover fixed;
  transform: translateZ(0);
  will-change: transform;
}

.parallax-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.parallax-content h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.parallax-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================================
   CASOS DE ÉXITO
   ============================================================ */
.casos {
  background: var(--bg-secondary);
}

.casos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.caso-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.caso-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  border-color: rgba(59, 130, 246, 0.2);
}

.caso-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.caso-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.caso-card:hover .caso-img img {
  transform: scale(1.08);
}

.caso-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 26, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.caso-card:hover .caso-overlay {
  opacity: 1;
}

.caso-overlay span {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  backdrop-filter: blur(4px);
  transform: translateY(10px);
  transition: transform 0.4s ease;
}

.caso-card:hover .caso-overlay span {
  transform: translateY(0);
}

.caso-info {
  padding: 16px;
}

.caso-info h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.caso-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto {
  background: var(--bg-primary);
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}

.contacto-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-1);
}

.contact-icon svg {
  width: 22px;
  height: 22px;
}

.contact-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-item p,
.contact-item a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--accent-1);
}

/* Contact form */
.contacto-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.3s ease;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-focus {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: width 0.3s ease;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.form-group input:focus ~ .form-focus,
.form-group textarea:focus ~ .form-focus {
  width: 100%;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand img {
  height: 30px;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 300px;
  line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links li,
.footer-contact li {
  margin-bottom: 10px;
}

.footer-links a,
.footer-contact a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--accent-1);
}

.footer-contact li:last-child {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================================
   MODAL / LIGHTBOX
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  padding: 24px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.modal-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-text h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

.modal-image img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* ============================================================
   SCROLL REVEAL ANIMATION
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .soluciones-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .historia-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .historia-visual {
    min-height: 300px;
  }

  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }

  /* Navbar */
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    background: rgba(10, 14, 26, 0.97);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
  }

  .nav-menu.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 1.2rem;
    padding: 12px 24px;
  }

  .nav-btn {
    margin-left: 0;
    margin-top: 8px;
  }

  /* Grids */
  .casos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .soluciones-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .historia-stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .modal-body {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .casos-grid {
    grid-template-columns: 1fr;
  }
}