/*
Theme Name: LAG Blank Theme Universal
Theme URI: https://crearpyme.com
Author: Crear Pyme
Author URI: https://crearpyme.com
Description: Tema base minimalista para landings generadas por el plugin de Landing AI, con estilo universal profesional y legible.
Version: 1.2.0
Text Domain: lag-blank-theme-universal
*/

html, body {
  margin: 0;
  padding: 0;
}

/* Base de tipografía un poco más grande para mejor lectura */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  background: #e5e7eb; /* gris suave para reducir brillo */
  color: #0f172a;
  font-size: 16px;
}

/* Contenedor general para el contenido */
.lag-landing-shell {
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  font-size: 1.03rem; /* un poquito más grande dentro de la landing */
}

/* Evitar estilos agresivos del navegador */
img {
  max-width: 100%;
  height: auto;
}

a {
  color: #2563eb;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* =========================================
   ESTILO UNIVERSAL PARA EL FORMULARIO LAG
   ========================================= */

/* Paleta base configurable */
:root {
  --lag-color-primary: #2563eb;     /* Azul por defecto (puedes cambiarlo) */
  --lag-color-primary-dark: #1d4ed8;
  --lag-color-bg: #f3f4f6;
  --lag-color-surface: #f9fafb;    /* tarjetas menos brillantes */
  --lag-color-border: #d1d5db;
  --lag-color-text-main: #0f172a;
  --lag-color-text-muted: #4b5563;
  --lag-radius-card: 16px;
}

/* Bloques principales: hero, secciones, formulario */
.lag-landing-shell .lag-hero,
.lag-landing-shell .lag-section,
.lag-landing-shell .lag-form-wrapper {
  background: var(--lag-color-surface);
  border-radius: var(--lag-radius-card);
  border: 1px solid var(--lag-color-border);
  padding: 22px 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
}

/* Tipografía base */
.lag-landing-shell h1,
.lag-landing-shell h2,
.lag-landing-shell h3 {
  color: var(--lag-color-text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lag-landing-shell h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.8rem;
}

.lag-landing-shell h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
}

.lag-landing-shell h3 {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.lag-landing-shell p {
  color: var(--lag-color-text-muted);
  margin-bottom: 0.75rem;
}

/* FORMULARIO: campos e inputs */
.lag-landing-shell .lag-form label {
  display: block;
  font-size: 0.98rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--lag-color-text-main);
}

/* Más espacio entre campos */
.lag-landing-shell .lag-form .lag-field,
.lag-landing-shell .lag-form .lag-form-row,
.lag-landing-shell .lag-form p {
  margin-bottom: 14px;
}

.lag-landing-shell .lag-form input[type="text"],
.lag-landing-shell .lag-form input[type="email"],
.lag-landing-shell .lag-form input[type="tel"],
.lag-landing-shell .lag-form input[type="url"],
.lag-landing-shell .lag-form textarea,
.lag-landing-shell .lag-form select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 9px 11px;
  font-size: 0.97rem;
  background: #f3f4f6;
  color: var(--lag-color-text-main);
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
  line-height: 1.5;
}

.lag-landing-shell .lag-form input:focus,
.lag-landing-shell .lag-form textarea:focus,
.lag-landing-shell .lag-form select:focus {
  outline: none;
  border-color: var(--lag-color-primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  background: #ffffff;
}

/* Estados de error / éxito (compatibles con clases actuales) */
.lag-landing-shell .lag-form input.is-invalid,
.lag-landing-shell .lag-form textarea.is-invalid {
  border-color: #b91c1c;
}

.lag-landing-shell .lag-form input.is-valid,
.lag-landing-shell .lag-form textarea.is-valid {
  border-color: #16a34a;
}

.lag-landing-shell .lag-field-error {
  color: #b91c1c;
  font-size: 0.82rem;
  margin-top: 2px;
}

.lag-landing-shell .lag-form small,
.lag-landing-shell .lag-form .lag-help-text {
  font-size: 0.85rem;
}

/* Botón principal del formulario */
.lag-landing-shell .lag-form .lag-btn,
.lag-landing-shell .lag-form button[type="submit"],
.lag-landing-shell .lag-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--lag-color-primary), var(--lag-color-primary-dark));
  color: #ffffff;
  border-radius: 999px;
  border: none;
  padding: 11px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
  transition: transform .08s ease, box-shadow .08s ease, background .12s ease;
}

.lag-landing-shell .lag-form .lag-btn:hover,
.lag-landing-shell .lag-form button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.45);
}

/* Mensaje global de error */
.lag-landing-shell .lag-form-error-global,
.lag-landing-shell .lag-global-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 12px;
  color: #b91c1c;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* Overlay de progreso (coherente con el estilo) */
.lag-landing-shell .lag-progress {
  background: #ffffff;
  color: var(--lag-color-text-main);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.lag-landing-shell .lag-progress-msg {
  font-size: 0.9rem;
  color: var(--lag-color-text-muted);
}

.lag-landing-shell .lag-progress-msg strong {
  color: var(--lag-color-primary-dark);
}

/* Responsivo: afinar paddings en móvil */
@media (max-width: 640px) {
  .lag-landing-shell {
    padding: 18px 12px 28px;
  }
  .lag-landing-shell .lag-hero,
  .lag-landing-shell .lag-section,
  .lag-landing-shell .lag-form-wrapper {
    padding: 18px 14px;
  }
}

/* === Ajuste extra: reducir brillo del formulario y unificar fondo === */

/* Superficie más suave para tarjetas */
:root {
  --lag-color-surface: #eef2f7; /* un gris muy claro, menos brillante que el blanco */
}

/* Formularios y secciones con fondo más cercano al del body */
.lag-landing-shell .lag-hero,
.lag-landing-shell .lag-section,
.lag-landing-shell .lag-form-wrapper {
  background: var(--lag-color-surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05); /* sombra más suave */
}

/* El propio bloque del formulario no queda "encajonado" en blanco puro */
.lag-landing-shell .lag-form {
  background: transparent;
}

/* Inputs un pelín más oscuros para que el contraste sea cómodo */
.lag-landing-shell .lag-form input[type="text"],
.lag-landing-shell .lag-form input[type="email"],
.lag-landing-shell .lag-form input[type="tel"],
.lag-landing-shell .lag-form input[type="url"],
.lag-landing-shell .lag-form textarea,
.lag-landing-shell .lag-form select {
  background: #e5e7eb;
}

/* Overlay de progreso también con fondo menos brillante */
.lag-landing-shell .lag-progress {
  background: #eef2f7;
}

/* === Modo más oscuro para reducir brillo del formulario === */

/* Fondo general oscuro tipo dashboard */
body {
  background: #020617;
  color: #e5e7eb;
}

/* Ajuste de paleta para modo oscuro suave */
:root {
  --lag-color-primary: #38bdf8;
  --lag-color-primary-dark: #0ea5e9;
  --lag-color-bg: #020617;
  --lag-color-surface: #020617;
  --lag-color-border: #1f2937;
  --lag-color-text-main: #e5e7eb;
  --lag-color-text-muted: #9ca3af;
}

/* Tarjetas casi al mismo tono que el fondo, con borde y sombra ligera */
.lag-landing-shell .lag-hero,
.lag-landing-shell .lag-section,
.lag-landing-shell .lag-form-wrapper {
  background: #020617;
  border-color: #1f2937;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.65);
}

/* Inputs con fondo oscuro pero legible */
.lag-landing-shell .lag-form input[type="text"],
.lag-landing-shell .lag-form input[type="email"],
.lag-landing-shell .lag-form input[type="tel"],
.lag-landing-shell .lag-form input[type="url"],
.lag-landing-shell .lag-form textarea,
.lag-landing-shell .lag-form select {
  background: #020617;
  border-color: #1f2937;
  color: #e5e7eb;
}

/* Placeholder algo más claro */
.lag-landing-shell .lag-form input::placeholder,
.lag-landing-shell .lag-form textarea::placeholder {
  color: #6b7280;
}

/* Mensajes de texto */
.lag-landing-shell p {
  color: #9ca3af;
}

/* Overlay de progreso con mismo tono oscuro */
.lag-landing-shell .lag-progress {
  background: #020617;
  border-color: #1f2937;
  color: #e5e7eb;
}

/* Botón principal se mantiene brillante para guiar la acción */
.lag-landing-shell .lag-form .lag-btn,
.lag-landing-shell .lag-form button[type="submit"],
.lag-landing-shell .lag-form input[type="submit"] {
  background: linear-gradient(135deg, var(--lag-color-primary), var(--lag-color-primary-dark));
  color: #0f172a;
}

/* ================================
   VARIANTE VERDE PARA UNA LANDING
   ================================ */

.lag-landing-shell.lag-style-verde {
  /* Cambiamos las variables SOLO dentro de esta landing */
  --lag-color-primary: #22c55e;
  --lag-color-primary-dark: #16a34a;
  --lag-color-surface: #0c1720; /* cartas un poco más claras */
}

/* Fondo ligeramente ajustado para esta variante (opcional) */
.lag-landing-shell.lag-style-verde {
  background: #020617;
}

/* === Estilos oscuros para el select de "Cargar un ejemplo rápido" === */
.lag-landing-shell .lag-form select {
  background-color: #020617;
  color: #e5e7eb;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 9px 11px;
}

/* Opciones del desplegable */
.lag-landing-shell .lag-form select option {
  background-color: #020617;
  color: #e5e7eb;
}

/* Primera opción tipo placeholder ("Selecciona un ejemplo") más suave */
.lag-landing-shell .lag-form select option[disabled],
.lag-landing-shell .lag-form select option[value=""] {
  color: #6b7280;
}

/* Opcional: quitar apariencia nativa fuerte */
.lag-landing-shell .lag-form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* === FIX: Select oscuro visible también cuando está cerrado === */
.lag-landing-shell select,
.lag-landing-shell .lag-form select {
  background-color: #020617 !important;
  color: #e5e7eb !important;
  border: 1px solid #1f2937 !important;
  border-radius: 10px;
  padding: 9px 11px;
}

/* Opciones del desplegable */
.lag-landing-shell select option,
.lag-landing-shell .lag-form select option {
  background-color: #020617;
  color: #e5e7eb;
}

/* Placeholder más suave */
.lag-landing-shell select option[disabled],
.lag-landing-shell select option[value=""],
.lag-landing-shell .lag-form select option[disabled],
.lag-landing-shell .lag-form select option[value=""] {
  color: #9ca3af;
}

/* Mantener apariencia consistente */
.lag-landing-shell select,
.lag-landing-shell .lag-form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* =========================================
   Ajustes extra de diseño (sin más espacio vertical)
   ========================================= */

/* 2. Limitar ancho del formulario en desktop y centrarlo */
@media (min-width: 1024px) {
  .lag-landing-shell .lag-form-wrapper {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* 3. Más jerarquía al título principal y primer párrafo */
.lag-landing-shell h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  margin-bottom: 1rem;
}

.lag-landing-shell p:first-of-type {
  font-size: 0.98rem;
}

/* 4. Botón principal un poco más grande */
.lag-landing-shell .lag-form .lag-btn,
.lag-landing-shell .lag-form button[type="submit"],
.lag-landing-shell .lag-form input[type="submit"] {
  padding: 12px 26px;
  font-size: 1rem;
}

/* 5. Ajustes mobile para que no se sienta apretado */
@media (max-width: 640px) {
  .lag-landing-shell {
    padding: 16px 10px 28px;
  }
  .lag-landing-shell .lag-form-wrapper {
    padding: 16px 12px;
  }
}

/* =========================================
   Fix: Colores legibles en la landing generada (modo claro)
   ========================================= */

/* La landing generada usa .lag-landing-basic con fondo claro.
   Aquí forzamos texto oscuro solo dentro de esa estructura,
   sin afectar el formulario oscuro. */
.lag-landing-basic {
  color: #0f172a;
}

/* Títulos y textos principales en la landing */
.lag-landing-basic h1,
.lag-landing-basic h2,
.lag-landing-basic h3,
.lag-landing-basic p,
.lag-landing-basic li,
.lag-landing-basic .lag-service-title,
.lag-landing-basic .lag-service-blurb {
  color: #0f172a;
}

/* Textos secundarios ligeramente más suaves */
.lag-landing-basic .lag-muted,
.lag-landing-basic .lag-location-meta,
.lag-landing-basic .lag-faq-question,
.lag-landing-basic .lag-faq-answer {
  color: #4b5563;
}
