/*
Theme Name: CrearPyme LAGB Blank v4
Theme URI: https://crearpyme.com/
Author: OpenAI for CrearPyme
Author URI: https://openai.com/
Description: Theme clasico ultra neutro para Landing AI Blueprint y LAGB Open Import Bridge. v4 ajusta anchos utiles y responsive sin invadir la logica ni el contrato de los plugins.
Version: 4.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: crearpyme-lagb-blank-v4
*/

:root {
  --cp-shell: 1120px;
  --cp-content: 760px;
  --cp-canvas: 1280px;
  --cp-form: 920px;
  --cp-runtime-form: 760px;
  --cp-gutter: clamp(16px, 2.5vw, 32px);
  --cp-text: #111111;
  --cp-muted: #666666;
  --cp-line: #dddddd;
  --cp-bg: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cp-bg);
  color: var(--cp-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: inherit;
}

img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

input,
select,
textarea,
button {
  font: inherit;
}

.skip-link,
.lag-skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus,
.lag-skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--cp-line);
  z-index: 10000;
}

.screen-reader-text,
.lag-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  width: min(100% - (var(--cp-gutter) * 2), var(--cp-shell));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--cp-line);
  background: #ffffff;
}

.site-header__inner {
  min-height: 60px;
  display: flex;
  align-items: center;
}

.site-branding {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
}

.site-branding__title {
  font-size: 1rem;
  font-weight: 700;
}

.site-branding__tagline {
  font-size: 0.9rem;
  color: var(--cp-muted);
}

.site-main {
  padding: 32px 0 48px;
}

.entry,
.not-found {
  width: min(100%, var(--cp-content));
}

.entry-header {
  margin-bottom: 20px;
}

.entry-title,
.page-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  line-height: 1.15;
}

.entry-content > * {
  max-width: 100%;
}

.entry-content > * + * {
  margin-top: 1rem;
}

.site-footer {
  border-top: 1px solid var(--cp-line);
  color: var(--cp-muted);
  font-size: 0.95rem;
  padding: 20px 0 28px;
}

/* Canvas base para plugins. */
body.crearpyme-plugin-canvas,
body.lag-blank-template,
body.lag-open-bridge {
  background: #ffffff;
}

.canvas-page,
.lag-blank-page,
.lag-open-bridge-page {
  width: min(100%, var(--cp-canvas));
  margin: 0 auto;
}

.canvas-main,
.lag-blank-main,
.lag-open-bridge-main,
.crearpyme-plugin-canvas .site-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.canvas-content,
.lag-blank-page,
.lag-open-bridge-page,
.crearpyme-plugin-canvas .site-shell,
.crearpyme-plugin-canvas .entry,
.crearpyme-plugin-canvas .entry-content {
  width: 100%;
  max-width: none;
  margin: 0;
}

.canvas-content > * + *,
.crearpyme-plugin-canvas .entry-content > * + * {
  margin-top: 0;
}

/* Ajuste seguro de ancho para el formulario interno del original. */
body.crearpyme-has-lag-form .canvas-content,
body.crearpyme-has-lag-form .lag-blank-main,
body.crearpyme-has-lag-form .lag-blank-page {
  padding-inline: var(--cp-gutter);
}

body.crearpyme-has-lag-form .lag-form-wrapper {
  width: min(100%, var(--cp-form));
  max-width: var(--cp-form);
  margin-inline: auto;
}

/* Ajuste seguro de ancho para el formulario publico del bridge. */
body.crearpyme-has-lagb-bridge-form .canvas-content,
body.crearpyme-has-lagb-bridge-form .lag-open-bridge-main,
body.crearpyme-has-lagb-bridge-form .lag-open-bridge-page {
  padding-inline: var(--cp-gutter);
}

body.crearpyme-has-lagb-bridge-form .lag-runtime-form-wrap,
body.crearpyme-has-lagb-bridge-form .lagb-open-runtime-form-wrap {
  width: min(100%, var(--cp-runtime-form));
  max-width: var(--cp-runtime-form);
  margin: 24px auto;
  padding-inline: 0;
}

/* Mejoras de lectura en paginas normales. */
.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content table {
  max-width: 100%;
}

/* Responsive fino. */
@media (max-width: 900px) {
  :root {
    --cp-shell: 100%;
    --cp-content: 100%;
    --cp-form: 100%;
    --cp-runtime-form: 100%;
  }

  .site-main {
    padding: 28px 0 40px;
  }

  body.crearpyme-has-lag-form .lag-form-wrapper,
  body.crearpyme-has-lagb-bridge-form .lag-runtime-form-wrap,
  body.crearpyme-has-lagb-bridge-form .lagb-open-runtime-form-wrap {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --cp-gutter: 16px;
  }

  body {
    font-size: 15px;
    line-height: 1.6;
  }

  .site-header__inner {
    min-height: 52px;
  }

  .site-main {
    padding: 24px 0 32px;
  }

  .site-footer {
    padding: 18px 0 24px;
  }

  body.crearpyme-has-lag-form .canvas-content,
  body.crearpyme-has-lag-form .lag-blank-main,
  body.crearpyme-has-lag-form .lag-blank-page,
  body.crearpyme-has-lagb-bridge-form .canvas-content,
  body.crearpyme-has-lagb-bridge-form .lag-open-bridge-main,
  body.crearpyme-has-lagb-bridge-form .lag-open-bridge-page {
    padding-inline: 16px;
  }

  body.crearpyme-has-lagb-bridge-form .lag-runtime-form-wrap,
  body.crearpyme-has-lagb-bridge-form .lagb-open-runtime-form-wrap {
    margin: 20px auto;
  }
}
