/* =========================================================
   Sonríe más Lima · Estilos comunes de los widgets
   Variables de diseño, base, botones y piezas compartidas.
   Todo cuelga de .sml-w (raíz de cada widget) para no
   afectar al resto del sitio ni a la interfaz de Elementor.
   ========================================================= */

/* ---------- Fuentes alojadas en el plugin (OFL) ---------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/montserrat-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/montserrat-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/raleway-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/raleway-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Variables que no dependen del kit ---------- */
:root {
  --sml-header-h: 84px;
  --sml-maxw: 1240px;
  --sml-pad: clamp(20px, 5vw, 48px);
  --sml-section-y: clamp(76px, 9vw, 128px);
  --sml-ease: cubic-bezier(.22, .61, .36, 1);
  --sml-ease-out: cubic-bezier(.16, 1, .3, 1);
  --sml-adminbar: var(--wp-admin--admin-bar--height, 0px);
}
@media (max-width: 1024px) {
  :root { --sml-header-h: 72px; }
}

/* ---------- Colores y fuentes: salen de los globales de Elementor
   (Ajustes del sitio › Colores y Tipografía globales) con valores
   de respaldo. Se declaran en la raíz de cada widget porque Elementor
   define sus variables globales en <body class="elementor-kit-…">. ---------- */
.sml-w,
.sml-cita,
.sml-reclamo,
.sml-form {
  --sml-black: var(--e-global-color-smlblack, #000000);
  --sml-graphite: var(--e-global-color-smlgraph, #1c1c1c);
  --sml-graphite-2: var(--e-global-color-smlgraph2, #242424);
  --sml-graphite-3: var(--e-global-color-smlgraph3, #2c2c2c);
  --sml-gold: var(--e-global-color-smlgold, #C9973A);
  --sml-gold-hi: var(--e-global-color-smlgoldhi, #d9ab55);
  --sml-white: var(--e-global-color-smlwhite, #ffffff);
  --sml-text: var(--e-global-color-smltext, rgba(255, 255, 255, .76));
  --sml-text-dim: var(--e-global-color-smltextdim, rgba(255, 255, 255, .56));
  --sml-line: rgba(255, 255, 255, .12);
  --sml-line-strong: rgba(255, 255, 255, .22);
  --sml-error: #ef9a80;
  --sml-f-head: var(--e-global-typography-smltit-font-family, "Montserrat"), system-ui, -apple-system, "Segoe UI", sans-serif;
  --sml-f-body: var(--e-global-typography-smltxt-font-family, "Raleway"), system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base de cada widget ---------- */
.sml-w {
  position: relative;
  background: var(--sml-graphite);
  color: var(--sml-text);
  font-family: var(--sml-f-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  text-align: left;
  font-feature-settings: "lnum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.sml-w *, .sml-w *::before, .sml-w *::after { box-sizing: border-box; }

html .sml-w [hidden] { display: none !important; }
html .sml-w img { display: block; max-width: 100%; height: auto; border: 0; border-radius: 0; box-shadow: none; }
html .sml-w svg { flex-shrink: 0; }
html .sml-w a { color: inherit; text-decoration: none; box-shadow: none; }
html .sml-w button {
  display: inline-block; min-height: 0; margin: 0; padding: 0;
  font: inherit; color: inherit; letter-spacing: inherit; text-align: inherit; text-transform: none; white-space: normal;
  background: none; border: 0; border-radius: 0; box-shadow: none;
  cursor: pointer; transition: none; -webkit-user-select: auto; user-select: auto;
}
html .sml-w :is(ul, ol) { margin: 0; padding: 0; list-style: none; }
html .sml-w li { margin: 0; }
html .sml-w :is(figure, blockquote, dl, dd, dt) { margin: 0; padding: 0; }
html .sml-w address { margin: 0; font-style: normal; }
html .sml-w figcaption { color: inherit; font-size: inherit; font-style: normal; font-weight: inherit; line-height: inherit; }
html .sml-w summary { display: block; }
html .sml-w table { margin: 0; font-size: inherit; }
html .sml-w :is(h1, h2, h3, h4, h5, h6) {
  margin: 0; padding: 0;
  font-family: var(--sml-f-head);
  color: var(--sml-white);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.01em;
  text-transform: none;
  text-wrap: balance;
}
html .sml-w p { margin: 0; text-wrap: pretty; }
html .sml-w strong { font-weight: 600; }

.sml-w :focus-visible { outline: 2px solid var(--sml-gold); outline-offset: 3px; border-radius: 2px; }
.sml-w a:focus-visible, .sml-w button:focus-visible { box-shadow: none; }

.sml-w .sml-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sml-w .sml-container { width: 100%; max-width: var(--sml-maxw); margin-inline: auto; padding-inline: var(--sml-pad); }
.sml-w.sml-section { padding-block: var(--sml-section-y); }
.sml-w.sml-has-line { border-top: 1px solid var(--sml-line); }

/* Títulos: el aspecto va por clase, no por etiqueta (H1–H4 elegibles) */
.sml-w .sml-title { font-size: clamp(1.95rem, 3.4vw, 2.9rem); letter-spacing: -.02em; }
.sml-w .sml-subtitle { font-size: 1.2rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; }

.sml-w .sml-section-head { display: grid; gap: 18px; max-width: 640px; margin-bottom: clamp(44px, 6vw, 72px); }
.sml-w .sml-section-head p { color: var(--sml-text); font-size: 1.125rem; }

/* ---------- Botones y enlaces ---------- */
.sml-w .sml-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--sml-f-head); font-weight: 600; font-size: .92rem; letter-spacing: .01em; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: background-color .25s var(--sml-ease), color .25s var(--sml-ease), border-color .25s var(--sml-ease), transform .25s var(--sml-ease);
}
.sml-w .sml-btn svg { width: 20px; height: 20px; }
.sml-w .sml-btn:active { transform: translateY(1px); }
.sml-w .sml-btn-sm { min-height: 44px; padding: 0 22px; font-size: .86rem; }
.sml-w .sml-btn-sm svg { width: 18px; height: 18px; }

.sml-w .sml-btn-gold { background: var(--sml-gold); color: var(--sml-black); }
.sml-w .sml-btn-gold:hover, .sml-w .sml-btn-gold:focus-visible { background: var(--sml-gold-hi); color: var(--sml-black); }

.sml-w .sml-btn-ghost { border-color: var(--sml-line-strong); color: var(--sml-white); background: transparent; }
.sml-w .sml-btn-ghost:hover, .sml-w .sml-btn-ghost:focus-visible { border-color: var(--sml-gold); color: var(--sml-gold-hi); background: transparent; }

.sml-w .sml-link-gold {
  display: inline-block;
  color: var(--sml-gold);
  font-family: var(--sml-f-head); font-weight: 500; font-size: .95rem;
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size .35s var(--sml-ease), color .25s var(--sml-ease);
}
.sml-w .sml-link-gold:hover { color: var(--sml-gold-hi); background-size: 40% 1px; }

.sml-w .sml-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* ---------- Arco de sonrisa (portadas) ---------- */
.sml-w .sml-smile-arc { display: block; width: min(400px, 72%); height: auto; margin: 20px 0 24px; overflow: visible; }
.sml-w .sml-smile-arc path {
  fill: none; stroke: var(--sml-gold); stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: sml-draw 1.6s .55s var(--sml-ease-out) forwards;
}
.sml-w .sml-smile-arc circle { fill: var(--sml-gold); opacity: 0; animation: sml-fade-in .4s 1.9s var(--sml-ease) forwards; }

/* ---------- Barra de datos (portadas) ---------- */
.sml-w .sml-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sml-w .sml-facts li { display: grid; gap: 2px; padding: 22px 24px; border-left: 1px solid var(--sml-line); }
.sml-w .sml-facts li:first-child { border-left: 0; padding-left: 0; }
.sml-w .sml-facts strong {
  display: flex; align-items: center; gap: 3px; min-height: 26px;
  font-family: var(--sml-f-head); font-weight: 500; font-size: 1.05rem; line-height: 1.65; color: var(--sml-white);
}
.sml-w .sml-facts span { font-size: .88rem; color: var(--sml-text-dim); line-height: 1.4; }
.sml-w .sml-facts-stars svg { width: 17px; height: 17px; color: var(--sml-gold); }

/* ---------- Estrellas ---------- */
.sml-w .sml-stars { display: inline-flex; gap: 3px; color: var(--sml-gold); }
.sml-w .sml-stars svg { width: 16px; height: 16px; }

/* ---------- Lista de principios (arco + título + texto) ---------- */
.sml-w .sml-principles { margin: 40px 0 36px; display: grid; }
.sml-w .sml-principles li {
  display: grid; grid-template-columns: 40px 1fr; column-gap: 18px; row-gap: 6px;
  padding: 22px 0; border-top: 1px solid var(--sml-line);
}
.sml-w .sml-principles li:last-child { border-bottom: 1px solid var(--sml-line); }
.sml-w .sml-principle-mark { grid-row: span 2; width: 40px; height: 14px; margin-top: 6px; color: var(--sml-gold); }
.sml-w .sml-principles .sml-principle-title { font-size: 1.1rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.sml-w .sml-principles p { color: var(--sml-text); font-size: 1rem; }

/* ---------- Puntos con arco dorado ---------- */
.sml-w .sml-points { display: grid; gap: 10px; margin-top: 20px; }
.sml-w .sml-points li { position: relative; padding-left: 30px; font-size: 1rem; color: rgba(255, 255, 255, .86); }
.sml-w .sml-points li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 16px; height: 7px;
  border: 1.6px solid var(--sml-gold); border-top: 0; border-radius: 0 0 16px 16px;
}
.sml-w .sml-points a { color: var(--sml-gold); }

/* ---------- Animaciones ---------- */
@keyframes sml-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sml-draw { to { stroke-dashoffset: 0; } }
@keyframes sml-fade-in { to { opacity: 1; } }

/* Aparición suave al hacer scroll (common.js añade .sml-reveal solo si hay JavaScript) */
.sml-reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--sml-ease-out), transform .9s var(--sml-ease-out); transition-delay: var(--sml-rd, 0s); }
.sml-reveal.sml-is-in { opacity: 1; transform: none; }
.sml-reveal-img img { transform: scale(1.06); transition: transform 1.6s var(--sml-ease-out); transition-delay: var(--sml-rd, 0s); }
.sml-reveal-img.sml-is-in img { transform: none; }

/* Columna fija: en secciones de dos columnas, la más corta acompaña el scroll */
@media (min-width: 961px) {
  .sml-is-sticky-col { position: sticky; top: calc(var(--sml-header-h) + 28px + var(--sml-adminbar)); align-self: start; }
}

/* ---------- Responsive de piezas comunes ---------- */
@media (max-width: 1024px) {
  .sml-w .sml-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sml-w .sml-facts li { padding: 18px 20px; }
  .sml-w .sml-facts li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .sml-w .sml-facts li:nth-child(n+3) { border-top: 1px solid var(--sml-line); }
}
@media (max-width: 760px) {
  .sml-w .sml-smile-arc { margin: 16px 0 20px; width: 72%; }
  .sml-w .sml-facts li { padding: 16px 14px; }
  .sml-w .sml-facts strong { font-size: .98rem; }
  .sml-w .sml-facts span { font-size: .82rem; }
  .sml-w .sml-facts-stars svg { width: 15px; height: 15px; }
  .sml-w .sml-principles li { grid-template-columns: 30px 1fr; column-gap: 14px; }
  .sml-w .sml-principle-mark { width: 30px; }
  .sml-w .sml-points li { font-size: .95rem; }
  .sml-w .sml-ctas .sml-btn { flex: 1 1 100%; }
}

/* Accesibilidad: movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .sml-w *, .sml-w *::before, .sml-w *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .sml-w .sml-smile-arc path { stroke-dashoffset: 0; }
}
