/* =====================================================
   GLOBAL - Ricardo Lozano Child
   Base, variables, fondos y seguridad responsive
   ===================================================== */

:root {
  --rl-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --rl-ink: #071126;
  --rl-ink-soft: #334155;
  --rl-blue: #2f62ff;
  --rl-blue-dark: #102452;
  --rl-navy: #09142f;

  --rl-bg: #f6f8fb;
  --rl-white: #ffffff;
  --rl-border: #dbe4ee;

  --rl-content-max: 1280px;
  --rl-side-space: 48px;
  --rl-content-width: min(calc(100vw - (var(--rl-side-space) * 2)), var(--rl-content-max));

  --rl-radius-pill: 999px;
  --rl-radius-lg: 30px;

  --rl-speed: .25s;
  --rl-ease: cubic-bezier(.2, .8, .2, 1);

  --rl-shadow-soft: 0 18px 42px rgba(15, 23, 42, .08);
  --rl-shadow-blue: 0 22px 48px rgba(47, 98, 255, .18);

  --rl-admin-offset: 0px;
}

body.admin-bar {
  --rl-admin-offset: 32px;
}

@media (max-width: 782px) {
  body.admin-bar {
    --rl-admin-offset: 46px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  background: var(--rl-bg);
  color: var(--rl-ink);
  font-family: var(--rl-font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

button,
input,
textarea,
select {
  font: inherit;
}

:where(a, button, [role="button"], input, textarea, select):focus-visible {
  outline: 3px solid rgba(47, 98, 255, .36);
  outline-offset: 4px;
}

::selection {
  background: rgba(47, 98, 255, .18);
  color: var(--rl-ink);
}

/* GeneratePress / WordPress base */
#page,
.site-content,
#primary,
#main {
  background: var(--rl-bg);
}

.inside-article,
.entry-content {
  box-sizing: border-box;
}

/* Home */
.page-id-7 #page,
.page-id-7 .site-content,
.page-id-7 #primary,
.page-id-7 #main,
#post-7,
#post-7 .inside-article,
#post-7 .entry-content {
  background: var(--rl-bg) !important;
}

.page-id-7 .entry-title,
#post-7 .entry-title {
  display: none !important;
}

/* Helpers para secciones futuras */
.rl-container {
  width: var(--rl-content-width);
  max-width: var(--rl-content-max);
  margin-inline: auto;
}

.rl-page-section {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
}

/* Evita que bloques de Gutenberg generen scroll lateral */
.wp-block,
.gb-container,
.gb-grid-wrapper,
.gb-element {
  max-width: 100%;
  box-sizing: border-box;
}

/* Breakpoints globales */
@media (max-width: 1024px) {
  :root {
    --rl-side-space: 32px;
    --rl-content-max: 820px;
  }
}

@media (max-width: 767px) {
  :root {
    --rl-side-space: 24px;
    --rl-content-max: 100%;
  }
}

@media (max-width: 380px) {
  :root {
    --rl-side-space: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* =====================================================
   PATCH GLOBAL - GENERATEPRESS + HOMEPAGE
   Evita conflictos con personalizador
   ===================================================== */

/* Home limpia aunque GeneratePress esté en "contenedores separados" */
body.page-id-7.separate-containers .site-main,
body.page-id-7.separate-containers .inside-article,
body.page-id-7.one-container .site-content,
body.page-id-7 #primary,
body.page-id-7 #main,
body.page-id-7 #post-7,
body.page-id-7 #post-7 .inside-article {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Evita subrayados del personalizador en botones, menú, chips y bloques visuales */
.main-navigation a,
.site-header a,
.gb-button,
.gb-text,
.rl-button,
.rl-chip,
body.page-id-7 #post-7 .entry-content a {
  text-decoration: none !important;
}

/* GenerateBlocks usa clases tipo .gb-element-xxxx */
.wp-block,
.gb-container,
.gb-grid-wrapper,
[class*="gb-element"],
[class*="gb-media"] {
  max-width: 100%;
  box-sizing: border-box;
}

/* Seguridad extra contra scroll lateral en secciones full width */
body.page-id-7 .rl-page-section,
body.page-id-7 .rl-metodo-section,
body.page-id-7 .rl-about-section {
  max-width: none !important;
}

/* =====================================================
   PATCH GLOBAL - TEXTOS DE PARRAFO MAS CLAROS
   ===================================================== */

:root {
  --rl-ink-soft: #475569;
  --rl-text-soft: #64748b;
}

body {
  color: var(--rl-ink);
}

.entry-content p,
.entry-content li,
.wp-block-paragraph {
  color: var(--rl-ink-soft);
}

/* Mantiene los textos secundarios suaves sin lavar titulares ni botones */
.entry-content :where(p, li):not(
  .rl-metodo-card *,
  .rl-classes-card *,
  .rl-lessons-card *,
  .main-navigation *,
  .site-header *
) {
  color: var(--rl-ink-soft);
}

/* Movil: un punto mas suave y legible */
@media (max-width: 767px) {
  .entry-content :where(p, li):not(
    .rl-metodo-card *,
    .rl-classes-card *,
    .rl-lessons-card *,
    .main-navigation *,
    .site-header *
  ) {
    color: #475569;
  }
}