/* Estilos globales para body y headings */
body {
  font-family: var(--font-content);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: #222;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ui);
  font-weight: var(--font-weight-bold);
  margin: 0 0 0.5em 0;
  line-height: 1.2;
  color: var(--color-independizate);
}

h1 { font-size: 2.5rem; } /* 40px */
h2 { font-size: 2rem; }   /* 32px */
h3 { font-size: 1.75rem; } /* 28px */
h4 { font-size: 1.5rem; }  /* 24px */
h5 { font-size: 1.25rem; } /* 20px */
h6 { font-size: 1rem; }    /* 16px */

h1 { color: var(--color-independizate); }

/* Links */
a {
  font-family: var(--font-ui);
  font-weight: var(--font-weight-medium);
  color: #0073e6;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.page-node-type-page .node__content {
  color: var(--color-text);
}


/* =========================================
   CUERPO DE LOS NODOS: ANCHURA ALINEADA
   CON HEADER Y FOOTER
========================================= */

/* Contenedor exterior */
.layout-content {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Contenedor interior del contenido */
.layout-content > .region-content {
  width: calc(100% - 40px);
  max-width: 1200px;
  min-width: 0;
  margin-inline: auto;
  padding: 1.5em 0 2em;
  box-sizing: border-box;
}

/* Pantallas de hasta 900 px */
@media (max-width: 900px) {
  .layout-content > .region-content {
    width: 100%;
    max-width: none;
    padding-right: 20px;
    padding-left: 20px;
  }
}

/* Pantallas muy grandes */
@media (min-width: 1441px) {
  .layout-content > .region-content {
    max-width: 1320px;
  }
}

/* =========================================
   TÍTULO DE LA PÁGINA
========================================= */

.layout-content .page-title {
  margin-top: 0;
  margin-bottom: 1em;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* =========================================
   CUERPO DEL NODO
========================================= */

.layout-content .node,
.layout-content .node__content,
.layout-content .field--name-body {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Evitar desbordamientos de imágenes */
.layout-content .field--name-body img {
  max-width: 100%;
  height: auto;
}

/* Adaptar tablas y contenido ancho */
.layout-content .field--name-body table {
  max-width: 100%;
}

/* Sangrados de títulos y párrafos dentro de un contenedor */
.sangrado-interior-1 {
  h3, h4 {
    margin: 1.4em 0 0.2em 0;
  }

  p {
    margin: 0.5em 0.5em 0.5em 0.9em;
  }
}

/* Incremento estándar de margen inferior */
.margin-bottom-increase-1 {
  margin-bottom: 4.1rem;
}

/* Respetar las preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .layout-content {
    scroll-behavior: auto;
  }
}
