/* =========================================================
   COMPONENTS.CSS — Navegación, botones, tarjetas, formulario
   EcoAnalítica
   ========================================================= */

/* =========================================================
   NAVEGACIÓN
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bosque);
  transition: box-shadow .3s ease, background .3s ease;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.25); background: var(--color-bosque-2); }

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

.nav-logo {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-blanco);
  letter-spacing: .3px;
}

.nav-menu { display: flex; gap: 32px; }
.nav-menu a {
  color: rgba(255,255,255,.82);
  font-size: .95rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color .25s;
}
.nav-menu a::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--color-salvia); transition: width .3s;
}
.nav-menu a:hover { color: var(--color-blanco); }
.nav-menu a:hover::after { width: 100%; }

/* Hamburguesa */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 2px; background: var(--color-blanco);
  border-radius: 2px; transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   BOTONES
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 600;
  font-size: .97rem;
  padding: 14px 30px;
  border-radius: var(--radio-sm);
  border: 1.6px solid transparent;
  transition: transform .25s, box-shadow .25s, background .25s, border-color .25s, color .25s;
}
.btn-primary {
  background: var(--color-salvia);
  color: var(--color-bosque);
  box-shadow: 0 6px 18px rgba(154,174,147,.4);
}
.btn-primary:hover {
  background: var(--color-salvia-osc);
  color: var(--color-blanco);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(154,174,147,.5);
}
.btn-outline {
  background: transparent;
  color: var(--color-arena);
  border-color: var(--color-arena);
}
.btn-outline:hover { background: rgba(216,204,187,.12); color: var(--color-blanco); transform: translateY(-2px); }
.btn-block { width: 100%; margin-top: 8px; }

/* =========================================================
   HERO — texto y scroll
   ========================================================= */
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  color: var(--color-blanco);
  font-weight: 700;
  margin-bottom: 22px;
}
.hero-sub {
  font-family: var(--fuente-cuerpo);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 400;
  color: var(--color-arena);
  max-width: 660px;
  margin-bottom: 38px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-indicator {
  position: absolute;
  bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 42px;
  border: 2px solid rgba(216,204,187,.6);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.scroll-dot { width: 5px; height: 8px; border-radius: 3px; background: var(--color-arena); }

/* =========================================================
   QUIÉNES SOMOS
   ========================================================= */
.about-media img { border-radius: var(--radio); box-shadow: var(--sombra-media); width: 100%; height: 100%; object-fit: cover; }
.about-text .lead { color: var(--color-texto); margin-bottom: 28px; }
.mv-block {
  border-left: 3px solid var(--color-salvia);
  padding-left: 20px;
  margin-bottom: 22px;
}
.mv-block h3 { font-size: 1.2rem; color: var(--color-bosque); margin-bottom: 6px; }
.mv-block p  { color: var(--color-tierra); font-size: .98rem; }

/* =========================================================
   PROBLEMA
   ========================================================= */
.problem-card {
  text-align: center;
  padding: 36px 28px;
  border: 1px solid #ece7df;
  border-radius: var(--radio);
  background: var(--color-blanco);
  transition: transform .3s, box-shadow .3s;
}
.problem-card:hover { transform: translateY(-5px); box-shadow: var(--sombra-suave); }
.problem-icon {
  width: 76px; height: 76px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--color-arena-claro);
  color: var(--color-salvia-osc);
  display: grid; place-items: center;
}
.problem-icon svg { width: 40px; height: 40px; }
.problem-card h3 { font-size: 1.28rem; color: var(--color-bosque); margin-bottom: 10px; }
.problem-card p  { color: var(--color-tierra); font-size: .97rem; }

/* =========================================================
   SOLUCIONES
   ========================================================= */
.solution-card {
  background: var(--color-blanco);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra-media);
  display: flex;
  flex-direction: column;
  transition: transform .3s, box-shadow .3s;
}
.solution-card:hover { transform: translateY(-6px); }
.solution-media { aspect-ratio: 16 / 9; overflow: hidden; }
.solution-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.solution-card:hover .solution-media img { transform: scale(1.05); }
.solution-body { padding: 32px 32px 34px; display: flex; flex-direction: column; flex: 1; }
.solution-body h3 { font-size: 1.5rem; color: var(--color-bosque); margin-bottom: 14px; }
.solution-desc { color: var(--color-tierra); margin-bottom: 16px; }
.solution-meta { font-size: .92rem; color: var(--color-texto); margin-bottom: 18px; }
.solution-meta strong { color: var(--color-bosque); }

.badge {
  align-self: flex-start;
  font-size: .8rem; font-weight: 600;
  padding: 7px 14px; border-radius: 30px;
  margin-bottom: 20px; margin-top: auto;
}
.badge-pilot { background: rgba(154,174,147,.22); color: var(--color-salvia-osc); }
.badge-soon  { background: rgba(122,104,86,.16);  color: var(--color-tierra); }

/* =========================================================
   POR QUÉ
   ========================================================= */
.why-card { padding: 8px; }
.why-icon {
  width: 60px; height: 60px;
  border-radius: 15px;
  background: var(--color-bosque);
  color: var(--color-salvia);
  display: grid; place-items: center;
  margin-bottom: 22px;
}
.why-icon svg { width: 30px; height: 30px; }
.why-card h3 { font-size: 1.22rem; color: var(--color-bosque); margin-bottom: 10px; }
.why-card p  { color: var(--color-tierra); font-size: .98rem; }

/* =========================================================
   HERRAMIENTAS
   ========================================================= */
.tool-card {
  background: var(--color-blanco);
  border: 1px solid #ebe6de;
  border-radius: var(--radio-sm);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-suave); }
.tool-card h4 { font-size: 1.08rem; color: var(--color-bosque); margin-bottom: 10px; }
.tool-card p  { font-size: .9rem; color: var(--color-tierra); margin-bottom: 14px; flex: 1; }
.tool-status {
  font-size: .76rem; font-weight: 600; color: var(--color-salvia-osc);
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px;
}
.tool-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--color-salvia); }
.tool-link { font-size: .9rem; font-weight: 600; color: var(--color-tierra); transition: color .25s; }
.tool-link:hover { color: var(--color-bosque); }

/* =========================================================
   CONTACTO
   ========================================================= */
.contact-intro { color: var(--color-arena); margin: 14px 0 28px; }

.contact-form .field { margin-bottom: 18px; }
.contact-form label {
  display: block; font-size: .88rem; font-weight: 600;
  color: var(--color-arena); margin-bottom: 7px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid rgba(216,204,187,.3);
  border-radius: var(--radio-sm);
  background: rgba(255,255,255,.06);
  color: var(--color-blanco);
  font-size: .97rem;
  transition: border-color .25s, box-shadow .25s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(216,204,187,.5); }
.contact-form select option { color: var(--color-texto); }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-salvia);
  box-shadow: 0 0 0 3px rgba(154,174,147,.2);
}
.contact-form textarea { resize: vertical; }

.field-error { display: block; font-size: .82rem; color: #e8a08f; margin-top: 5px; min-height: 1em; }
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: #e8a08f; }

.form-success {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radio-sm);
  background: rgba(154,174,147,.2);
  color: var(--color-arena);
  font-size: .93rem;
  font-weight: 500;
}
.form-success.show { display: block; }

/* Datos de contacto */
.contact-info h3 { color: var(--color-blanco); font-size: 1.3rem; margin-bottom: 22px; }
.contact-list { margin-bottom: 28px; }
.contact-list li { margin-bottom: 18px; color: var(--color-arena); }
.ci-label {
  display: block; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--color-salvia); font-weight: 600; margin-bottom: 4px;
}
.contact-list a { color: var(--color-arena); transition: color .25s; }
.contact-list a:hover { color: var(--color-blanco); }
.contact-map { border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra-media); }

/* =========================================================
   PIE DE PÁGINA
   ========================================================= */
.site-footer {
  background: var(--color-bosque-2);
  color: rgba(216,204,187,.75);
  text-align: center;
  padding: 44px 0;
  font-size: .9rem;
}
.footer-logo {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-blanco);
  display: block;
  margin-bottom: 10px;
}
.footer-copy { margin-top: 8px; opacity: .65; }

/* =========================================================
   RESPONSIVE — navegación móvil
   ========================================================= */
@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--color-bosque-2);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .nav-menu.open { max-height: 360px; }
  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; padding: 16px 24px; }
}
