/*
Theme Name: Hello Elementor Medraweb
Theme URI: https://medraweb.com
Description: Versión personalizada del Hello Elementor Child con estilos globales de legibilidad y ajustes optimizados.
Author: Martín – Medraweb
Author URI: https://medraweb.com
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-medraweb
License: GNU General Public License v3 or later.
*/

/* ============================================================
   TIPOGRAFÍA FLUIDA GLOBAL (CSS MANDA, ELEMENTOR FALLBACK)
   ============================================================ */

  /* Helpers */

.block {
	display: block;
}

.stress {
	color: #3eedb8;
}

.pink {
	color: #f6a0e3;
}

.small {
	font-size: clamp(1.25rem, 1.15rem + 0.6vw, 1.5rem) !important;
}

.big {
	font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.2rem) !important;
}

.extra-big {
	font-size: clamp(2.5rem, 6vw, 6rem) !important;
}

:root {
  /* Base */
  --fs-body: clamp(1rem, 0.95rem + 0.3vw, 1.125rem) !important;

  /* Headings */
	
  --fs-h-special: clamp(2.5rem, 6vw, 6rem);
  --fs-h1: clamp(2.2rem, 1.6rem + 2.4vw, 3.2rem);
  --fs-h2: clamp(1.8rem, 1.4rem + 1.8vw, 2.4rem);
  --fs-h3: clamp(1.5rem, 1.25rem + 1.2vw, 1.9rem);
  --fs-h4: clamp(1.25rem, 1.15rem + 0.6vw, 1.5rem);
  --fs-h5: clamp(1.1rem, 1.05rem + 0.3vw, 1.25rem);
  --fs-h6: 1rem;

  /* Line heights (unitless) */
  --lh-body: 1.6;
  --lh-heading-tight: 1.12;
  --lh-heading: 1.25;

  /* Espaciados */
  --space-xs: 0.5em;
  --space-s: 0.75em;
  --space-m: 1em;
  --space-l: 1.5em;
  --space-xl: 2em;
  --space-2xl: 3em;

  /* Lectura */
  --measure: 75ch;

  /* Ajustes finos */
  --tracking-tight: -0.015em;
}

/* ============================================================
   BASE DEL DOCUMENTO
   ============================================================ */

body,
.elementor {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-wrap: break-word;
}

/* ============================================================
   HEADINGS SEMÁNTICOS (SOBRESCRIBEN ELEMENTOR)
   ============================================================ */

.elementor h1,
.elementor h2,
.elementor h3,
.elementor h4,
.elementor h5,
.elementor h6,
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

.elementor h1, h1 {
  font-size: var(--fs-h-special);
  line-height: var(--lh-heading-tight);
  letter-spacing: var(--tracking-tight);
}

.elementor h2, h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-heading-tight);
  letter-spacing: var(--tracking-tight);
}

.elementor h3, h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-heading);
}

.elementor h4, h4 {
  font-size: var(--fs-h4);
  line-height: var(--lh-heading);
}

.elementor h5, h5 {
  font-size: var(--fs-h5);
  line-height: var(--lh-heading);
}

.elementor h6, h6 {
  font-size: var(--fs-h6);
  line-height: var(--lh-heading);
}

/* ============================================================
   ELEMENTOR HEADINGS — APLICAR ESCALA FLUIDA REAL
   ============================================================ */

.elementor-widget-heading h1.elementor-heading-title {
  font-size: var(--fs-h-special);
  line-height: var(--lh-heading-tight);
  letter-spacing: var(--tracking-tight);
}

.elementor-widget-heading h2.elementor-heading-title {
  font-size: var(--fs-h2);
  line-height: var(--lh-heading-tight);
  letter-spacing: var(--tracking-tight);
}

.elementor-widget-heading h3.elementor-heading-title {
  font-size: var(--fs-h3);
  line-height: var(--lh-heading);
}

.elementor-widget-heading h4.elementor-heading-title {
  font-size: var(--fs-h4);
  line-height: var(--lh-heading);
}

.elementor-widget-heading h5.elementor-heading-title {
  font-size: var(--fs-h5);
  line-height: var(--lh-heading);
}

.elementor-widget-heading h6.elementor-heading-title {
  font-size: var(--fs-h6);
  line-height: var(--lh-heading);
}

/* Elementor heading widget */
/* .elementor .elementor-widget-heading .elementor-heading-title {
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
} */

/* ============================================================
   TEXTO EN ELEMENTOR
   ============================================================ */

.elementor .elementor-widget-text-editor {
  font-size: inherit;
  line-height: inherit;
}

.elementor .elementor-widget-text-editor p {
  font-size: inherit;
  line-height: inherit;
}

/* ============================================================
   BASE DE LEGIBILIDAD GLOBAL
   ============================================================ */

/* Párrafos (contenido largo) */
.single-post p,
.legal-page p,
.elementor-widget-text-editor p {
  margin-bottom: var(--space-m);
  line-height: var(--lh-body);
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

/* Listas */
.single-post ul,
.single-post ol,
.legal-page ul,
.legal-page ol,
.elementor-widget-text-editor ul,
.elementor-widget-text-editor ol {
  margin-bottom: var(--space-m);
  padding-left: 1.4em;
}

/* Ítems de lista */
.single-post li,
.legal-page li,
.elementor-widget-text-editor li {
  margin-bottom: var(--space-xs);
  line-height: var(--lh-body);
}

/* Listas anidadas */
.single-post ul ul,
.single-post ol ol,
.single-post ul ol,
.single-post ol ul,
.legal-page ul ul,
.legal-page ol ol,
.legal-page ul ol,
.legal-page ol ul,
.elementor-widget-text-editor ul ul,
.elementor-widget-text-editor ol ol,
.elementor-widget-text-editor ul ol,
.elementor-widget-text-editor ol ul {
  margin-top: var(--space-xs);
  margin-bottom: var(--space-xs);
}

/* Encabezados dentro de contenido */
.single-post h1,
.single-post h2,
.single-post h3,
.single-post h4,
.single-post h5,
.single-post h6,
.legal-page h1,
.legal-page h2,
.legal-page h3,
.legal-page h4,
.legal-page h5,
.legal-page h6,
.elementor-widget-text-editor h1,
.elementor-widget-text-editor h2,
.elementor-widget-text-editor h3,
.elementor-widget-text-editor h4,
.elementor-widget-text-editor h5,
.elementor-widget-text-editor h6 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-s);
}

/* ============================================================
   CITAS
   ============================================================ */

.single-post blockquote,
.legal-page blockquote,
.elementor-widget-text-editor blockquote {
  margin: var(--space-l) 0;
  padding: var(--space-m) var(--space-l);
  border-left: 4px solid #ccc;
  font-style: italic;
  line-height: var(--lh-body);
}

/* ============================================================
   IMÁGENES
   ============================================================ */

.single-post img,
.legal-page img,
.elementor-widget-text-editor img,
.wp-block-image img {
  margin-block: var(--space-l);
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

#header-logo img {
	margin-block: 0;
}

/* ============================================================
   TABLAS
   ============================================================ */

.single-post table,
.legal-page table,
.elementor-widget-text-editor table {
  width: 100%;
  border-collapse: collapse;
  margin-block: var(--space-l);
  font-size: 0.95em;
}

.single-post th,
.single-post td,
.legal-page th,
.legal-page td,
.elementor-widget-text-editor th,
.elementor-widget-text-editor td {
  padding: var(--space-xs) var(--space-s);
  border: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
}

.single-post th,
.legal-page th,
.elementor-widget-text-editor th {
  background: #f7f7f7;
  font-weight: 600;
}

/* ============================================================
   CÓDIGO
   ============================================================ */

.single-post code,
.legal-page code,
.elementor-widget-text-editor code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
  background: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

.single-post pre,
.legal-page pre,
.elementor-widget-text-editor pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
  line-height: 1.45;
  background: #f5f5f5;
  padding: var(--space-m);
  overflow-x: auto;
  border-radius: 6px;
  tab-size: 2;
}

.single-post pre code,
.legal-page pre code,
.elementor-widget-text-editor pre code {
  background: transparent;
  padding: 0;
}

/* ============================================================
   BLOG (single post)
   ============================================================ */

.single-post #content,
.single-post .single-post {
  max-width: min(var(--measure), 100%);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ============================================================
   PÁGINAS LEGALES
   ============================================================ */

.legal-page #content {
  max-width: min(var(--measure), 100%);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  padding-block: clamp(2rem, 5vw, 3rem);
}

/* ============================================================
   ENLACES EN CONTENIDO
   ============================================================ */

.single-post a,
.legal-page a,
.elementor-widget-text-editor a {
  color: var(--e-global-color-accent, #0055ff);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.15em;
}

.single-post a:hover,
.legal-page a:hover,
.elementor-widget-text-editor a:hover {
  opacity: 0.85;
}


/* ============================================================
   CÓDIGO EXTRA
============================================================ */

/* TARJETAS AUTORES */

/* Card autor */

.mw-autor-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;

  margin-top: 0;
  margin-bottom: 20px;

  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;

  background: transparent;

  border: 1px solid #9E1528;
  border-radius: 16px;

  box-shadow: 0 10px 22px rgba(0,0,0,0.15);
}

.mw-autor-card * {
  box-sizing: border-box;
}


/* Avatar */

.mw-autor-card__avatar {
  flex: 0 0 auto;

  width: 60px;
  height: 60px;

  border-radius: 999px;
  overflow: hidden;

  border: 2px solid #9E1528;

  display: flex;
  align-items: center;
  justify-content: center;
}

.mw-autor-card__avatar img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center center;

  display: block;
}


/* Contenido */

.mw-autor-card__content {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}


/* Nombre autor */

.mw-autor-card__name {
  font-family: "Glacial Indifference", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #3EEDB8;
  margin-bottom: 4px;
}


/* Bio */

.mw-autor-card__bio {
  font-size: 0.9rem;
  color: #ffffff;
  opacity: 0.9;
}

.mw-autor-card__bio p {
  margin: 0;
}


/* Responsive */

@media (max-width: 420px) {

  .mw-autor-card {
    padding: 12px 14px;
  }

  .mw-autor-card__avatar {
    width: 52px;
    height: 52px;
  }

}