@import url("webchat.css?v=2");

/**
 * Estilos y variables compartidos del sitio.
 * Los colores se aplican desde site.config.js (colores, heroGradient).
 * Usa siempre var(--nombre) para que los cambios en site.config.js se reflejen en todo el sitio.
 *
 * Variables disponibles (definidas en :root, sobrescritas por site.config.js):
 * --bg, --bg-soft, --card, --text, --muted, --border
 * --accent, --accent-strong, --accent-soft, --accent-rgb (para rgba(var(--accent-rgb), 0.12))
 * --success, --success-soft, --success-rgb, --whatsapp
 * --gradient-1, --gradient-2, --gradient-3, --gradient-4 (desde heroGradient)
 * --radius, --radius-card, --radius-button, --shadow-soft, --max-width
 */
/* Valores por defecto; site.config.js sobrescribe colores (colores.*) para unificar todo el sitio */
:root {
  --bg: #f5f5f7;
  --bg-soft: #eef1f5;
  --card: #ffffff;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-rgb: 37, 99, 235;
  --accent-soft: rgba(var(--accent-rgb), 0.12);
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.12);
  --success-rgb: 34, 197, 94;
  --whatsapp: #25d366;
  --gradient-1: #5F8AC7;
  --gradient-2: #78A293;
  --gradient-3: #99C152;
  --gradient-4: #A6CE39;
  --radius: 16px;
  --radius-card: 20px;
  --radius-section: 28px;
  --radius-button: 999px;
  --radius-badge: 999px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
  --max-width: 1280px;
}

/* ========== CONTENIDO VISIBLE DESDE EL INICIO (SEO/CRAWLERS) ==========
   Antes el body se ocultaba con opacity:0 hasta que JS cargara.
   Eso hacía que crawlers (Google, ChatGPT) vieran la página vacía.
   Ahora el contenido es visible desde el HTML para SEO correcto. */
body {
  transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}

/* ========== BASE (estilo definitivo = index) ========== */
html {
  box-sizing: border-box;
  overflow-x: hidden;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Open Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, var(--bg-soft) 0, var(--border) 50%, var(--card) 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 30%, var(--accent-soft) 0%, transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(148, 163, 184, 0.06) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}
main {
  position: relative;
  z-index: 1;
}

/* Container: base para header, main, footer (todas las páginas) */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  box-sizing: border-box;
  min-width: 0;
}
.procesos-carousel,
.galeria-grid,
.index-section-grid,
.portfolio-grid,
.steps,
.contact-wrapper {
  min-width: 0;
}
.procesos-carousel .proceso-card,
.galeria-grid > * {
  min-width: 0;
}

/* Container responsive: padding coherente en todos los breakpoints */
@media (max-width: 720px) {
  .container {
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }
}
@media (max-width: 480px) {
  .container {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

/* Section header: barra lateral visible en móvil */
@media (max-width: 600px) {
  .section-header {
    padding-left: 0.5rem;
  }
}

/* Imágenes responsivas en todo el sitio */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Enlaces: sin subrayado por defecto (navbar, botones, etc.) */
a {
  color: inherit;
  text-decoration: none;
}

/* Skip-link: oculto hasta que el usuario hace foco (accesibilidad) */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* ========== HEADER / NAVBAR (estilo definitivo = index) ========== */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85), transparent);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  padding: 0.25rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-logo {
  width: 200px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  max-width: 100%;
}

.brand-text-main {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-text-sub {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

header nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--muted);
  position: relative;
  padding-bottom: 0.15rem;
  transition: color 0.18s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent), var(--accent-strong));
  transition: width 0.25s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Botones en navbar (usan colores del site.config) */
.btn {
  border-radius: var(--radius-button);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-button);
}

.btn-primary::before {
  content: "";
  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 ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.15);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
  border-radius: var(--radius-button);
  position: relative;
  overflow: hidden;
}

.btn-whatsapp::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-whatsapp:hover::before {
  left: 100%;
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.nav-toggle {
  display: none;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 720px) {
  .nav {
    height: 60px;
    padding: 0.2rem 0;
  }
  .brand-logo {
    width: 120px;
    height: 42px;
    min-width: 100px;
  }
  .nav-toggle {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
  }
  .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    padding: 0.7rem 1.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    flex-direction: column;
    align-items: flex-start;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  .nav-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0;
  }
  nav.nav-open .nav-links {
    display: flex;
  }
  .nav .btn-primary {
    display: block;
    font-size: 0.85rem;
    padding: 0.75rem 1.25rem;
    min-height: 44px;
  }
}

/* Section header (barra lateral con color del tema) */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 2.5rem;
  position: relative;
}

/* ========== AVISO DE COOKIES (card estilo Uiverse, texto desde site.config.js) ========== */
.cookie-consent-overlay {
  position: fixed;
  left: 0;
  bottom: 0;
  right: auto;
  top: auto;
  width: auto;
  background: transparent;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0 max(1rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  z-index: 99998;
  font-family: "Open Sans", "Inter", system-ui, sans-serif;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}
.cookie-consent-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.cookie-consent-overlay .cookie-consent-box {
  pointer-events: auto;
}
.cookie-consent-box {
  width: 85%;
  max-width: 320px;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 1.5rem 1.5rem;
  position: relative;
}
.cookie-consent-box .cookie-consent-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  opacity: 0.7;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.cookie-consent-box .cookie-consent-close:hover {
  opacity: 1;
  color: #634647;
}
.cookie-consent-box .cookie-consent-icon-wrap {
  margin: 0 auto 1rem;
}
.cookie-consent-box .cookie-consent-icon-wrap svg {
  display: block;
  height: 40px;
  width: 56px;
}
.cookie-consent-box .cookie-consent-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #3f3f46;
  margin: 0 0 0.5rem 0;
  text-align: left;
  width: 100%;
}
.cookie-consent-box .cookie-consent-text {
  font-size: 0.875rem;
  text-align: justify;
  width: 100%;
  margin: 0 0 1.25rem 0;
  line-height: 1.5;
  color: #52525b;
}
.cookie-consent-box .cookie-consent-text a {
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.cookie-consent-box .cookie-consent-text a:hover {
  color: #634647;
}
.cookie-consent-box .cookie-consent-more {
  display: none; /* Botón "Más opciones" eliminado; se oculta por si hay caché antigua */
  font-size: 0.875rem;
  margin: 0 0 0.5rem 0;
  padding: 0;
  background: none;
  border: none;
  color: #52525b;
  cursor: pointer;
  font-weight: 600;
  align-self: flex-start;
  transition: color 0.2s ease;
}
.cookie-consent-box .cookie-consent-more:hover {
  color: #634647;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-consent-box .cookie-consent-accept {
  align-self: stretch;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  background: #ddad81;
  color: #634647;
  transition: background 0.2s ease, color 0.2s ease;
}
.cookie-consent-box .cookie-consent-accept:hover {
  background: #634647;
  color: #ddad81;
}

/* Footer: layout, redes, legal (común a index, 404, contacto, servicios) */
footer .container {
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.social-links {
  display: flex;
  gap: 0.8rem;
}
.social-links a {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.78rem;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.social-links a:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb, 37, 99, 235), 0.06);
}

/* Footer: "Powered by AtentoBot" solo; aviso de privacidad, cookies, términos y Admin en footer-legal */
.footer-credit {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}
.footer-credit__powered {
  font-weight: 600;
  color: var(--text);
}
.footer-credit__link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.footer-credit__link:hover {
  text-decoration: underline;
}
.footer-legal {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}
.footer-legal a {
  color: var(--muted);
  text-decoration: underline;
}

/* Webchat AtentoBot - estilos centralizados (homogeneizados con el sitio) - cargado al inicio del archivo */
