/*
Theme Name: RM Theme
Theme URI: https://rubenmerino.com/
Author: Rubén Merino
Description: Tema modular propio para contenidos, herramientas SEO/GEO y marca personal.
Version: 0.4.10
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: rm-theme
*/
:root{
  --rm-ink:#151b2d;--rm-muted:#515c6f;--rm-brand:#f73760;
  --rm-indigo:#4f578d;--rm-paper:#fff;--rm-cloud:#f4f5fa;--rm-stroke:#e0e4eb;--rm-night:#171b31;
  --rm-divider:#CDD5E1;--rm-radius:18px;--rm-max:var(--rm-canvas);--rm-canvas:var(--wp--style--global--wide-size,1220px);--rm-reading:760px;
}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--rm-paper);color:var(--rm-ink);font-family:Roboto,Inter,system-ui,-apple-system,"Segoe UI",sans-serif;line-height:1.65;font-weight:400}
a{color:var(--rm-ink);text-decoration-color:var(--rm-brand);text-underline-offset:.15em}
a:hover{text-decoration-thickness:2px}
a:focus-visible,button:focus-visible{outline:3px solid var(--rm-indigo);outline-offset:3px}
:where(h1,h2,h3,h4){font-weight:680;letter-spacing:-.025em;line-height:1.2;text-wrap:balance}
:where(p,li){text-wrap:pretty}
h1{font-size:clamp(2.3rem,3.15vw,3.5rem)}
h2{font-size:clamp(1.78rem,2.4vw,2.5rem)}
h3{font-size:clamp(1.15rem,1.45vw,1.44rem)}
.wp-site-blocks{overflow:hidden}
.wp-block-post-content > *{max-width:var(--rm-reading);margin-inline:auto}
.wp-block-post-content > .alignwide{max-width:var(--rm-max)}
.wp-block-post-content > .alignfull{max-width:none}
.rm-site-header{border-bottom:1px solid var(--rm-stroke);background:#fff}
.rm-header-inner{display:flex;align-items:center;justify-content:space-between;gap:1.25rem;max-width:var(--rm-max);margin:auto;padding:1.1rem 1.4rem}
.rm-logo a{font-weight:800;color:var(--rm-ink);text-decoration:none;letter-spacing:-.045em}
.rm-logo strong{color:var(--rm-brand)}
.rm-site-header .wp-block-navigation a{color:var(--rm-ink);text-decoration:none;font-size:.94rem;font-weight:600}
.rm-site-footer{background:var(--rm-night);color:#fff;padding:4rem max(1.5rem,calc((100vw - var(--rm-max))/2))}
.rm-site-footer a{color:#fff}
.rm-site-footer p{color:#d3d8e6}
.rm-site-footer .wp-block-site-title a{color:#fff}
.rm-section{padding:clamp(3.5rem,7vw,6rem) 1.5rem}
.rm-section--soft{background:var(--rm-cloud)}
.rm-section--night{background:var(--rm-night);color:white}
.rm-section--night :where(h1,h2,h3,p){color:inherit}
.rm-container{max-width:var(--rm-max);margin-inline:auto}
.rm-reading{max-width:var(--rm-reading);margin-inline:auto}
.rm-eyebrow{font-size:.74rem!important;text-transform:uppercase;letter-spacing:.14em;font-weight:750!important;color:var(--rm-ink);border-left:3px solid var(--rm-divider);padding-left:.7rem;margin-bottom:.85rem!important}
.rm-section--night .rm-eyebrow,.rm-contrast .rm-eyebrow{color:var(--rm-brand)}
.rm-lead{font-size:clamp(1.02rem,1.35vw,1.14rem);color:var(--rm-muted);line-height:1.6}
.rm-section--night .rm-lead{color:#d4d9e6}
.rm-split{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:clamp(2rem,5vw,5rem);align-items:center}
.rm-card{border:1px solid var(--rm-stroke);border-radius:var(--rm-radius);padding:2rem;background:#fff}
.rm-card h3{margin-top:0}
.rm-card p{color:var(--rm-muted)}
.rm-card:hover{border-color:#bfc7d4}
.rm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.25rem}
.rm-grid--two{grid-template-columns:repeat(2,minmax(0,1fr))}
.rm-kicker{color:var(--rm-indigo);font-weight:750;font-size:.82rem;text-transform:uppercase;letter-spacing:.08em}
.rm-stat{border-top:2px solid var(--rm-divider);padding:1rem 0}
.rm-stat strong{display:block;font-size:clamp(2rem,3vw,2.9rem);line-height:1.05}
.rm-rule{border-top:1px solid var(--rm-stroke)}
.rm-note{border-left:4px solid var(--rm-brand);padding:1.5rem 2rem;background:var(--rm-cloud);border-radius:0 14px 14px 0}
.rm-contrast{background:var(--rm-night);color:#fff;border-radius:24px;padding:clamp(2rem,5vw,4rem)}
.rm-contrast :where(h2,h3,p){color:inherit}
.rm-contrast .rm-lead{color:#d5d9e7}
.rm-steps{counter-reset:rmstep;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2rem}
.rm-steps > *{counter-increment:rmstep;border-top:1px solid var(--rm-stroke);padding-top:1.2rem}
.rm-steps > *::before{content:"0" counter(rmstep);display:block;color:var(--rm-ink);font-weight:800;margin-bottom:1.6rem}
.rm-table{width:100%;border-collapse:collapse}
.rm-table th,.rm-table td{padding:1rem;text-align:left;border-bottom:1px solid var(--rm-stroke)}
.rm-table th{font-size:.8rem;letter-spacing:.04em;text-transform:uppercase;color:var(--rm-muted)}
.rm-preview-visual{padding:2.5rem;background:linear-gradient(140deg,#232c4d,#151b2d);border-radius:20px;color:#fff;min-height:280px;display:flex;align-items:center}
.rm-preview-visual p{color:#f4f5fa}
.rm-button,.wp-block-button__link{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;background:var(--rm-brand);color:#fff!important;border:0;border-radius:100px;padding:.85rem 1.5rem;text-decoration:none;font-size:1.1875rem;font-weight:750;line-height:1.3}
.rm-button:hover,.wp-block-button__link:hover{background:var(--rm-brand);box-shadow:0 0 0 3px rgba(247,55,96,.18),0 7px 18px rgba(23,27,49,.10)}
.rm-button--secondary,.is-style-outline .wp-block-button__link{background:transparent!important;border:1px solid currentColor;color:inherit!important}
.rm-stack>*+*{margin-top:1rem}
.wp-block-details{border-bottom:1px solid var(--rm-stroke);padding:1rem 0}
.wp-block-details summary{font-weight:700;cursor:pointer}
.rm-meta{font-size:.84rem;color:var(--rm-muted)}
.rm-article{padding:3rem 1.5rem 5rem}
.rm-article-content{max-width:var(--rm-reading);margin:auto}
.rm-article-content :where(h2,h3){margin-top:2.8rem}
.rm-article-content p{font-size:1.0625rem;font-weight:400;line-height:1.78}
@media(max-width:900px){.rm-grid,.rm-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.rm-split{grid-template-columns:1fr}.rm-header-inner{flex-wrap:wrap}}
@media(max-width:640px){.rm-grid,.rm-steps{grid-template-columns:1fr}.rm-section{padding:3.5rem 1.15rem}.rm-site-footer{padding:3rem 1.15rem}.rm-card{padding:1.45rem}h1{font-size:clamp(2.25rem,7.5vw,3rem)}.rm-contrast{padding:2rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

.rm-static-page{width:min(760px,calc(100% - 40px));margin:0 auto;padding:clamp(36px,5vw,70px) 0;overflow-wrap:anywhere}
.rm-static-page h1{font-size:clamp(2.15rem,4vw,3.25rem);margin:0 0 30px}
.rm-static-page :is(h2,h3){margin-top:2em}

/* Optional directional text link, without a pink underline. */
.rm-text-link{display:inline-flex;align-items:center;gap:.55em;color:var(--rm-ink);text-decoration:none;font-weight:680}
.rm-text-link::after{content:"↗";font-weight:500;color:var(--rm-indigo)}
.rm-text-link:hover{text-decoration:underline;text-decoration-color:#9AA4B4}

/* RM Theme 0.3.14 — Footer links readable and consistent in the native theme. */
.rm-site-footer .wp-block-columns {
  display:grid!important;
  grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr);
  gap:clamp(30px,5vw,85px);
  max-width:var(--rm-max);
  width:100%;
  margin:0 auto!important;
  align-items:start;
}
.rm-site-footer .wp-block-column{min-width:0;flex-basis:auto!important}
.rm-site-footer :is(h3,.wp-block-site-title){
  color:#fff!important;font-size:1rem!important;
  font-weight:700!important;margin:0 0 16px!important;
}
.rm-site-footer .wp-block-column a,
.rm-site-footer .wp-block-site-title a{
  display:inline-block;
  text-decoration:none!important;
  color:#f3f5fb!important;
  background:none!important;
  font-size:.93rem!important;
  line-height:1.55!important;
  font-weight:500!important;
  letter-spacing:0;
}
.rm-site-footer .wp-block-column a:hover{text-decoration:underline!important;text-decoration-color:#ccd5e1!important}
.rm-site-footer .wp-block-column p{
  font-size:.92rem!important;
  font-weight:400!important;
  margin:0 0 9px!important;
  line-height:1.65;
}
.rm-site-footer .wp-block-column:first-child p{max-width:390px}
@media(max-width:800px){
  .rm-site-footer .wp-block-columns{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rm-site-footer .wp-block-column:first-child{grid-column:1/-1}
}
@media(max-width:500px){
  .rm-site-footer .wp-block-columns{grid-template-columns:1fr}
  .rm-site-footer .wp-block-column:first-child{grid-column:auto}
}

/* RM Theme 0.3.17 — Native single template supports two existing formats.
   Conventional posts retain a readable column. Complete editorial posts
   own their masthead and reading layout, never confined to 760px. */
.rm-article-shell{box-sizing:border-box}
body:not(.rm-pilots) .rm-article-shell{
  width:min(100% - 40px,760px);
  max-width:760px;
  margin:0 auto;
  padding:clamp(36px,4vw,70px) 0;
}
body:not(.rm-pilots) .rm-article-shell > .rm-article-content{
  max-width:760px;
  margin-inline:auto;
}
body.rm-pilots .rm-article-shell{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  display:block;
}
body.rm-pilots .rm-article-shell > .rm-article-content{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
body.rm-pilots .rm-article-shell > .rm-article-content > .rm-pilot-article-header{
  width:100%;
  max-width:none!important;
  margin-inline:0!important;
}
body.rm-pilots .rm-article-shell > .rm-article-content > .rm-pilot-reading-layout{
  max-width:var(--rm-canvas)!important;
  margin-inline:auto!important;
}


/* RM 0.4.2 · WordPress site-block gap must not separate the closing CTA and footer. */
body .wp-site-blocks > main.rm-pilot-main { margin-block-end:0!important; }
body .wp-site-blocks > footer.wp-block-template-part,
body .wp-site-blocks > .wp-block-template-part:last-child { margin-block-start:0!important; }
/* Keep the white label readable on brand-fill primary buttons in all states. */
.rm-button:is(:link,:visited,:hover,:focus-visible,:active),
.wp-block-button:not(.is-style-outline) .wp-block-button__link:is(:link,:visited,:hover,:focus-visible,:active) {color:#fff!important;}
