/* style.css - COMPLETO Y OPTIMIZADO (sin cambios, se mantiene igual) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --verde: #2b7a4b;
  --verde-claro: #e1f3e9;
  --azul-claro: #e2f0fa;
  --blanco: #ffffff;
  --gris-oscuro: #1f2a36;
  --texto: #2d3e4f;
  --sombra-suave: 0 12px 28px rgba(0, 0, 0, 0.04);
  --transition: all 0.25s ease;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--texto);
  line-height: 1.5;
  background-color: var(--blanco);
  scroll-behavior: smooth;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== header fijo ===== */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 40, 20, 0.1);
  z-index: 100;
  padding: 0.7rem 0;
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.nav-list {
  display: flex;
  gap: 1rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--gris-oscuro);
  padding: 0.4rem 0.2rem;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.nav-link:hover {
  border-bottom-color: var(--verde);
  color: var(--verde);
}

/* ===== botón flotante WhatsApp ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 20px;
  background-color: #25d366;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.25);
  z-index: 99;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.45);
  animation: none;
}

@keyframes pulse-whatsapp {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ===== secciones genéricas ===== */
.section {
  padding: 4rem 0;
}

.bg-light {
  background-color: #f7fcf9;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--verde);
  margin-bottom: 2.5rem;
  position: relative;
  letter-spacing: -0.02em;
}

.section-title::after {
  content: '';
  display: block;
  width: 70px;
  height: 4px;
  background: var(--verde);
  margin-top: 0.5rem;
  border-radius: 4px;
}

/* ===== hero ===== */
.hero {
  background: linear-gradient(145deg, var(--verde-claro) 0%, var(--azul-claro) 100%);
  padding: 3rem 0 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0a2e1a;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin: 1rem 0 2rem;
  color: #1a3b2c;
}

.btn {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  padding: 0.9rem 1.8rem;
  border-radius: 60px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 8px rgba(0, 70, 40, 0.08);
}

.btn-primary {
  background-color: var(--verde);
  color: white;
}

.btn-primary:hover {
  background-color: #1e5f38;
  transform: scale(1.03);
  box-shadow: 0 10px 20px rgba(33, 128, 78, 0.3);
}

.btn-secondary {
  background-color: white;
  color: var(--verde);
  border: 2px solid var(--verde);
  margin-left: 0.5rem;
}

.btn-secondary:hover {
  background-color: var(--verde-claro);
  transform: translateY(-3px);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-img, .importancia-img {
  max-width: 100%;
  height: auto;
  border-radius: 40px;
}

/* ===== problema stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 32px;
  box-shadow: var(--sombra-suave);
  text-align: center;
  border: 1px solid #d0f0de;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--verde);
  display: block;
  line-height: 1.2;
}

.territorio-destacado {
  background: rgba(43, 122, 75, 0.05);
  padding: 1.5rem;
  border-radius: 40px;
  font-size: 1.2rem;
  border-left: 6px solid var(--verde);
}

/* ===== NUEVA SECCIÓN: IMPORTANCIA ===== */
.importancia {
  background: white;
  padding: 4rem 0;
}

.importancia-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.importancia-content {
  max-width: 600px;
}

.importancia-texto {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #1f3b2e;
  line-height: 1.6;
}

.importancia-beneficios {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.importancia-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #f0fbf5;
  padding: 1rem 1.5rem;
  border-radius: 60px;
  transition: transform 0.2s ease;
}

.importancia-item:hover {
  transform: translateX(10px);
  background: var(--verde-claro);
}

.importancia-item span {
  font-size: 1.8rem;
}

.importancia-item p {
  font-weight: 500;
  color: #0a2e1a;
}

.btn-importancia {
  font-size: 1.2rem;
  padding: 1.2rem 2.5rem;
  animation: pulse-importancia 2s infinite;
}

@keyframes pulse-importancia {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.importancia-image {
  text-align: center;
}

/* ===== que-es ===== */
.institucional-content p {
  margin-bottom: 1.4rem;
  font-size: 1.1rem;
}

.pilares {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin: 2rem 0;
  justify-content: center;
}

.pilar {
  background: var(--verde-claro);
  padding: 1rem 1.8rem;
  border-radius: 40px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
}

/* ===== TESTIMONIOS ===== */
.testimonios {
  position: relative;
  background: #f3faf7;
}

.testimonios-intro {
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 3rem;
  color: #1b4b33;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.testimonios-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.testimonio-card {
  background: white;
  padding: 2rem 1.8rem;
  border-radius: 40px;
  box-shadow: 0 15px 30px rgba(0, 40, 20, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(43, 122, 75, 0.1);
  position: relative;
}

.testimonio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 40px rgba(43, 122, 75, 0.15);
}

.testimonio-estrellas {
  color: #f5b342;
  font-size: 1.3rem;
  letter-spacing: 4px;
  margin-bottom: 1rem;
}

.testimonio-texto {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 1.5rem;
  color: #1f3b2e;
  line-height: 1.6;
}

.testimonio-autor {
  display: flex;
  flex-direction: column;
}

.autor-nombre {
  font-weight: 700;
  color: var(--verde);
}

.autor-municipio {
  font-size: 0.9rem;
  color: #527a66;
}

.testimonios-credibilidad {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  background: rgba(255,255,255,0.8);
  padding: 1rem 2rem;
  border-radius: 60px;
  border: 1px solid #c0e0d0;
}

.testimonios-credibilidad span {
  font-weight: 500;
  color: #0a3b25;
}

/* ===== ley bullets ===== */
.ley-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.ley-list li {
  background: white;
  padding: 1.2rem 1.8rem;
  border-radius: 60px;
  box-shadow: 0 4px 12px rgba(0, 50, 30, 0.05);
  font-size: 1.1rem;
  font-weight: 500;
  border: 1px solid #c5e9d4;
}

/* ===== REGISTRO (persuasivo + optimizado móvil) ===== */
.registro {
  background: linear-gradient(145deg, #f0fbf5 0%, #e2f0fa 100%);
  position: relative;
  overflow: hidden;
}

.registro::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle at 70% 30%, rgba(43,122,75,0.08) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.registro .container {
  position: relative;
  z-index: 2;
}

.gratis-badge {
  display: inline-block;
  background: var(--verde);
  color: white;
  font-weight: 700;
  padding: 0.6rem 2rem;
  border-radius: 40px;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(43,122,75,0.3);
  animation: shine-badge 3s infinite, float 3s ease-in-out infinite;
  transform-origin: center;
  font-size: 1.1rem;
}

@keyframes shine-badge {
  0%, 100% { box-shadow: 0 8px 20px rgba(43,122,75,0.3); }
  50% { box-shadow: 0 8px 30px rgba(43,122,75,0.7); background-color: #1e5f38; }
}

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

.title-emojis {
  font-size: 2rem;
  margin-left: 0.5rem;
  display: inline-block;
  animation: wave 2s infinite;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(8deg); }
  75% { transform: rotate(-8deg); }
}

.typewriter-effect {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  color: #0a3622;
  border-right: 3px solid var(--verde);
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  animation: typing 3s steps(40, end) forwards, blink-caret 0.75s step-end infinite;
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--verde); }
}

.beneficios-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin: 2.5rem 0;
}

.beneficio-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  padding: 1.5rem 1rem;
  border-radius: 28px;
  text-align: center;
  box-shadow: 0 10px 22px rgba(0, 30, 10, 0.08);
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  border: 1px solid rgba(255,255,255,0.6);
}

.beneficio-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: white;
  box-shadow: 0 20px 30px rgba(43,122,75,0.15);
}

.beneficio-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.5rem;
  animation: bounce 2s infinite;
}

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

.beneficio-card h4 {
  color: var(--verde);
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
}

.form-glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 25px 40px -12px rgba(0, 60, 30, 0.25);
  transition: box-shadow 0.3s;
}

.form-glass:hover {
  box-shadow: 0 30px 50px -10px rgba(43,122,75,0.4);
}

.form-group small {
  display: block;
  font-size: 0.8rem;
  color: #3b5e4b;
  margin-top: 0.3rem;
  font-style: italic;
}

/* ===== CORRECCIONES MÓVIL - FORMULARIO ===== */
.form-mobile-optimized {
  padding: 2rem 1.5rem !important;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.mobile-input {
  width: 100%;
  padding: 1.2rem 1.5rem !important;
  font-size: 1.1rem !important;
  border-radius: 50px !important;
  border: 2px solid #d1e8db !important;
  -webkit-appearance: none;
  appearance: none;
  background: white;
}

.mobile-input:focus {
  border-color: var(--verde) !important;
  outline: none;
  box-shadow: 0 0 0 4px rgba(43,122,75,0.15);
}

.btn-pulse {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--verde) 0%, #1e5f38 100%);
  border: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  animation: btn-glow 2s infinite;
}

@keyframes btn-glow {
  0%, 100% { box-shadow: 0 8px 18px rgba(43,122,75,0.3); }
  50% { box-shadow: 0 12px 28px rgba(43,122,75,0.6); }
}

.btn-pulse .btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn-pulse:hover .btn-shine {
  left: 100%;
}

.btn-pulse:hover {
  transform: scale(1.02);
}

.btn-mobile {
  padding: 1.3rem 1rem !important;
  font-size: 1.1rem !important;
  white-space: normal;
  word-break: break-word;
  height: auto;
  min-height: 70px;
  line-height: 1.4;
}

.trust-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.8rem;
  font-size: 0.9rem;
  color: #2a573c;
  font-weight: 500;
}

.trust-flags span {
  background: #def0e6;
  padding: 0.3rem 1rem;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.trust-flags-mobile {
  flex-wrap: wrap;
  gap: 0.8rem;
}

.trust-flags-mobile span {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.form-note {
  font-size: 1.1rem;
  background: rgba(255,255,255,0.7);
  padding: 0.8rem 1.5rem;
  border-radius: 60px;
  display: inline-block;
  margin-top: 1.8rem;
}

.form-note-small {
  color: #2e6041;
  font-size: 0.95rem;
  margin-top: 0.8rem;
}

/* ===== footer ===== */
.site-footer {
  background: #132b1f;
  color: #d1e0d8;
  padding: 2.5rem 0;
}

.footer-flex {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

.footer-logo {
  filter: brightness(1.2);
  margin-bottom: 0.5rem;
}

.footer-credit a {
  color: var(--verde-claro);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dotted;
}

.footer-credit a:hover {
  color: white;
}

/* ===== animaciones on scroll ===== */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.9, 0.1, 1), transform 0.6s ease;
}

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

/* ===== MEDIA QUERIES ===== */
@media (min-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-grid {
    align-items: center;
  }
  .footer-flex {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .beneficios-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .typewriter-effect {
    font-size: 1.6rem;
  }
}

@media (min-width: 700px) {
  .testimonios-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .importancia-grid {
    grid-template-columns: 1fr 1fr;
  }
  .importancia-beneficios {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .importancia-item {
    flex: 1 1 auto;
    min-width: 200px;
  }
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .ley-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-title {
    font-size: 2.5rem;
  }
}

@media (min-width: 1000px) {
  .testimonios-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 500px) {
  .typewriter-effect {
    white-space: normal;
    border-right: none;
    animation: none;
    width: auto;
  }
}

@media (max-width: 480px) {
  .form-mobile-optimized {
    padding: 1.5rem 1rem !important;
  }
  
  .mobile-input {
    padding: 1rem !important;
    font-size: 1rem !important;
  }
  
  .btn-mobile {
    padding: 1.2rem 0.8rem !important;
    font-size: 1rem !important;
    min-height: 65px;
  }
  
  .trust-flags-mobile {
    flex-direction: column;
    align-items: stretch;
  }
  
  .trust-flags-mobile span {
    white-space: normal;
    text-align: center;
    justify-content: center;
  }
  
  .importancia-item {
    padding: 0.8rem 1rem;
  }
  
  .importancia-item span {
    font-size: 1.5rem;
  }
  
  .importancia-item p {
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, .whatsapp-float {
    animation: none !important;
    transition: none !important;
  }
}