/* --- VARIABLES GLOBALES (Fácil Configuración) --- */
:root {
  /* 1. Paleta de Colores */
  --primary-color: #059669; /* Esmeralda vibrante (Más vida) */
  --secondary-color: #065f46; /* Esmeralda profundo */
  --primary-light: #34d399; /* Menta brillante para detalles */
  --color-white: #ffffff;
  --color-success: #10b981; /* Verde éxito brillante */
  --color-error: #ef4444; /* Rojo estándar vibrante */
  --color-accent: #fbbf24; /* Ámbar luminoso (Mejor contraste) */
  --hero-mask-start: rgba(5, 150, 105, 0.4);
  --hero-mask-end: rgba(6, 78, 59, 0.6);

  /* 2. Colores de UI (Fondos, Texto, Bordes) */
  --bg-color: #ffffff;
  --bg-alt-color: #ecfdf5; /* Fondo menta muy fresco*/
  --bg-soft-color: #f8fafc;
  --footer-bg-color: #022c22; /* Verde casi negro, muy elegante */
  --text-color: #020202; /* Negro casi puro */
  --text-light: #6b7280;
  --border-color: #e5e7eb;
  --border-color-soft: rgba(0, 0, 0, 0.05);
  --icon-faded-white: rgba(255, 255, 255, 0.2);

  /* 3. Sombras */
  --shadow-soft: 0 10px 15px -3px rgba(6, 95, 70, 0.05),
    0 4px 6px -2px rgba(6, 95, 70, 0.025); /* Sombra base para cards */
  --shadow-hover: 0 20px 25px -5px rgba(6, 95, 70, 0.1),
    0 10px 10px -5px rgba(6, 95, 70, 0.04); /* Sombra al pasar el mouse */
  --shadow-primary: 0 4px 6px rgba(5, 150, 105, 0.25); /* Sombra coloreada para botones */
  --shadow-strong: 0 4px 10px rgba(0, 0, 0, 0.2); /* Sombra para elementos elevados */
  --shadow-header: 0 2px 5px rgba(0, 0, 0, 0.05); /* Sombra para la barra de navegación */

  /* 4. Tipografía y Layout */
  --font-main: system-ui, -apple-system, sans-serif;
  --container-width: 1100px;
  --border-radius: 12px; /* Bordes un poco más redondeados (más moderno) */
  --spacing-section: 4rem 0;
}

/* --- RESET BÁSICO --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.6;
}

/* --- UTILIDADES --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: bold;
  box-shadow: var(--shadow-primary); /* Sombra sutil en color principal */
  transition: color 0.3s ease, background-position 0.4s ease;
}

.btn-primary {
  background: linear-gradient(
    to bottom,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--color-white);
  background-size: 100% 200%;
  background-position: 0 0;
}

.btn-primary:hover {
  background-position: 0 100%;
}

.btn-outline {
  border: 2px solid transparent;
  color: var(--primary-color);
  background: linear-gradient(var(--bg-color), var(--bg-color)) padding-box,
    linear-gradient(to right, var(--primary-color), var(--secondary-color))
      border-box;
  transition: background 0.4s ease, color 0.4s ease;
}

.btn-outline:hover {
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--color-white);
}

/* --- HEADER --- */
.main-header {
  background: var(--bg-color);
  box-shadow: var(--shadow-header);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img,
.logo svg {
  height: 40px; /* Altura ajustada para mantener proporción y layout */
  width: auto;
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-color);
}

/* Controles móviles (ocultos en escritorio) */
.mobile-controls {
  display: none;
}

/* Elementos solo escritorio */
.desktop-only {
  display: block;
}

/* Botón Acceder en Navegación */
.nav-btn-access {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background-image: linear-gradient(
    to right,
    var(--primary-color),
    var(--primary-light)
  );
  background-size: 200% auto;
  background-position: 0 0;
  color: var(--color-white) !important;
  border-radius: var(--border-radius);
  transition: background-position 0.4s ease;
}

.nav-btn-access:hover {
  background-position: 100% 0;
}

/* --- RESPONSIVE NAVIGATION (Mobile) --- */
@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }

  .mobile-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }

  /* Botón de usuario móvil (Icono) */
  .mobile-user-btn {
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.3s;
  }

  .mobile-user-btn:hover {
    color: var(--secondary-color);
  }

  /* Botón Hamburguesa */
  .hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    z-index: 110; /* Por encima del menú desplegable */
  }

  .hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Animación Hamburguesa a X */
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Menú Lateral (Off-canvas) */
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%; /* Oculto a la derecha */
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    padding-top: 6rem; /* Espacio para el header */
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    /* z-index menor que el header para que el logo y controles sigan visibles, 
       pero necesitamos que cubra la pantalla. Ajustaremos z-index del header si es necesario */
    z-index: 90;
  }

  .main-nav.active {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    font-size: 1.5rem;
    gap: 2.5rem;
  }
}

/* --- HERO SECTION --- */
.hero-section {
  padding: var(--spacing-section);
  /* Fondo con imagen y máscara de color para contraste */
  background: linear-gradient(
      135deg,
      var(--hero-mask-start),
      var(--hero-mask-end)
    ),
    url("assets/hero-bg-texture.jpg");
  background-size: cover;
  background-position: center;
  color: var(--color-white);
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap; /* Para móviles */
}

.hero-text {
  flex: 1;
  min-width: 300px;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

/* Ajustes de texto para fondo oscuro */
.hero-section .text-highlight {
  display: inline-block;
  background-color: var(--color-accent);
  color: var(--secondary-color);
  padding: 0.25rem 1rem;
  border-radius: 50px;
  font-weight: bold;
  margin-bottom: 1rem;
}

.hero-section .hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

/* Botones variantes para el Hero (Tonos claros) */
.hero-section .btn-primary {
  background-image: linear-gradient(
    to bottom,
    var(--color-white),
    var(--bg-alt-color)
  );
  background-size: 100% 200%; /* Recupera el efecto de slide */
  color: var(--secondary-color); /* Texto oscuro para contraste */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-section .btn-outline {
  background: transparent;
  border: 2px solid var(--color-white);
  color: var(--color-white);
  box-shadow: none;
}

.hero-section .btn-outline:hover {
  background-color: var(--color-white);
  color: var(--secondary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-image {
  flex: 1;
  min-width: 300px;
}

.hero-image img {
  width: 100%;
  border-radius: var(--border-radius);
}

/* --- FEATURES --- */
.features-section {
  padding: var(--spacing-section);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2rem;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

/* Detalle decorativo en títulos */
.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* --- COMPONENTES GENÉRICOS (Reutilizables) --- */

/* Utilidades de Texto */
.text-center {
  text-align: center;
}
.text-highlight {
  color: var(--primary-color);
  font-weight: bold;
}
.mb-small {
  margin-bottom: 1rem;
}
.mb-large {
  margin-bottom: 3rem;
}
.bg-alt {
  background-color: var(--bg-alt-color);
}

.text-balance {
  text-wrap: balance;
}

/* Contenedores específicos */
.container-narrow {
  max-width: 700px;
}

/* Grid de 2 columnas (Texto/Imagen o Comparativas) */
.grid-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: start;
}

/* Tarjetas Genéricas */
.card {
  background: var(--bg-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-color-soft);
  height: 100%;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(
    --primary-color
  ); /* Borde se ilumina con el color principal */
}

.card-highlight {
  border: 2px solid var(--primary-color);
  position: relative;
  overflow: hidden;
}

.card-success {
  border: 2px solid var(--color-success);
  position: relative;
  overflow: hidden;
}

.card-success:hover {
  border-color: var(--color-success);
}

.card-error {
  border: 2px solid var(--color-error);
  position: relative;
  overflow: hidden;
}

.card-error:hover {
  border-color: var(--color-error);
}

.highlight-box {
  background: linear-gradient(
    to top,
    var(--secondary-color),
    var(--primary-color)
  );
  color: var(--color-white);
  text-align: center;
  border: none;
  position: relative;
  overflow: hidden;
}

.highlight-box h3,
.highlight-box p,
.highlight-box strong {
  color: var(--color-white);
  position: relative;
  z-index: 1;
}

/* Botón adaptado para cajas destacadas */
.highlight-box .btn-primary {
  background-image: linear-gradient(
    to bottom,
    var(--color-white),
    var(--bg-alt-color)
  );
  background-size: 100% 200%;
  color: var(--secondary-color);
  box-shadow: var(--shadow-strong);
}

.highlight-box .btn-primary:hover {
  background-position: 0 100%;
}

/* Iconos destacados */
.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: inline-block;
}
.highlight-box .feature-icon {
  position: absolute;
  bottom: -30px;
  right: -30px;
  font-size: 13rem;
  color: var(--icon-faded-white);
  margin-bottom: 0;
  transform: rotate(-20deg);
  z-index: 0;
  pointer-events: none;
}

/* Variantes de Card */
.card-bg-soft {
  background-color: var(--bg-soft-color);
}

/* Componente de Precios */
.pricing-card {
  max-width: 500px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%; /* Para que funcione bien en flex */
}

/* Contenedor flexible para precios (juntos al centro) */
.pricing-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  align-items: center; /* center cuando el contenido de uno es más grande, stretch en caso contrario */
}

/* Tarjeta simple (Tercera opción) */
.pricing-card-simple {
  max-width: 1024px; /* Ancho combinado aprox de las dos superiores */
  margin: 0 auto;
  background: transparent;
  border: 1px solid var(--border-color);
  box-shadow: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 2rem 3rem;
  gap: 2rem;
}

.pricing-card-simple .pricing-info {
  flex: 1;
}

.pricing-card-simple .btn {
  margin-top: 0;
  min-width: 200px;
  text-align: center;
}
.pricing-card-simple .pricing-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.pricing-actions {
  margin-top: auto;
  width: 100%;
}

/* Responsive para la tarjeta horizontal */
@media (max-width: 768px) {
  .pricing-card-simple {
    flex-direction: column;
    text-align: center;
  }
  .pricing-card-simple .pricing-info {
    margin-bottom: 1.5rem;
  }
  .pricing-card-simple .btn {
    width: 100%;
  }
}

.price-display {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 1rem 0;
}

.price-original {
  text-decoration: line-through;
  color: var(--text-light);
  font-size: 1.25rem;
  display: block;
}

.price-original + .price-display {
  margin-top: 0;
}

.promo-badge {
  background-color: var(--color-accent);
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.price-period {
  font-size: 1rem;
  color: var(--text-light);
}

.list-centered-block {
  text-align: left;
  display: inline-block;
  margin: 0 auto 2rem auto;
}

.demo-link {
  display: block;
  text-align: center;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}

.demo-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}
.pricing-actions .demo-link {
  margin-bottom: 1rem;
}

/* Garantías (Debajo de precios) */
.guarantee-row {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-weight: bold;
}
.guarantee-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.guarantee-item i {
  color: var(--color-success);
  font-size: 1.2rem;
}

/* Listas Estilizadas */
.list-group {
  list-style: none;
  padding: 0;
}

.list-group li {
  margin-bottom: 0.8rem;
  padding-left: 1.8rem;
  position: relative;
}

.list-group li::before {
  position: absolute;
  left: 0;
  font-family: "remixicon"; /* Usar fuente de iconos */
  font-weight: normal;
  font-size: 1.2em;
  line-height: 1.5;
}

.list-check li::before {
  content: "\eb7b"; /* ri-check-line */
  color: var(--color-success);
}
.list-cross li::before {
  content: "\eb99"; /* ri-close-line */
  color: var(--color-error);
}
.list-arrow li::before {
  content: "\ea6c"; /* ri-arrow-right-line */
  color: var(--primary-color);
}

/* Botones extendidos */
.btn-full {
  width: 100%;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* --- FAQ ACCORDION --- */
.faq-container {
  margin-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 1.5rem 0;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-main);
  transition: color 0.3s;
}

.faq-trigger:hover {
  color: var(--primary-color);
}

.faq-icon {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-content p {
  padding-bottom: 1.5rem;
  color: var(--text-light);
}

/* Estado Activo del FAQ */
.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--primary-color);
}

/* --- FOOTER --- */
.main-footer {
  background: var(--footer-bg-color);
  color: var(--color-white);
  text-align: center;
  padding: 2rem 0;
  margin-top: auto;
}
