/* ========================================
   PÁGINA SOBRE MÍ
======================================== */

/* HERO */
.h5m-bio-hero {
  margin: 0;
  padding: clamp(80px, 9vw, 140px) 24px;
  background-color: #2c2c2c;
  color: #faf8f4;
}

.h5m-bio-hero__inner {
  width: min(100%, 1280px);
  margin-inline: auto;
}

.h5m-bio-hero__grid {
  align-items: center !important;
  gap: clamp(48px, 7vw, 110px);
  margin-bottom: 0;
}

.h5m-bio-hero h1 {
  position: relative;
  margin: 0 0 48px;
  max-width: 650px;
  color: #faf8f4;
  font-size: clamp(64px, 7vw, 108px);
  line-height: 0.9;
  letter-spacing: 0.01em;
}

.h5m-bio-hero h1::after {
  content: "";
  position: absolute;
  bottom: -24px;
  left: 0;
  width: 82px;
  height: 5px;
  border-radius: 999px;
  background-color: #ffde59;
}

.h5m-bio-hero p {
  max-width: 650px;
  margin: 0;
  color: #faf8f4;
  font-size: clamp(17px, 1.25vw, 21px);
  line-height: 1.75;
}

.h5m-bio-hero__image {
  position: relative;
  margin: 0;
}

.h5m-bio-hero__image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(250, 248, 244, 0.3);
  border-radius: 16px;
}


/* CONTENIDO BIOGRÁFICO */
.h5m-bio-content {
  margin: 0;
  padding: clamp(80px, 9vw, 140px) 24px;
  background-color: #faf8f4;
  color: #2c2c2c;
}

.h5m-bio-content__inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 1280px);
  margin-inline: auto;
}

.h5m-bio-section {
  padding: clamp(42px, 5vw, 72px) 0;
  border-top: 1px solid rgba(44, 44, 44, 0.28);
}

.h5m-bio-section:nth-child(odd) {
  padding-right: clamp(32px, 5vw, 80px);
}

.h5m-bio-section:nth-child(even) {
  padding-left: clamp(32px, 5vw, 80px);
  border-left: 1px solid rgba(44, 44, 44, 0.28);
}

.h5m-bio-section h2 {
  margin: 0 0 24px;
  color: #2c2c2c;
  font-size: clamp(34px, 3.5vw, 54px);
  line-height: 1;
}

.h5m-bio-section p {
  margin: 0;
  max-width: 62ch;
  color: #2c2c2c;
  font-size: 17px;
  line-height: 1.85;
}

.h5m-bio-section p + p {
  margin-top: 22px;
}


/* TABLET Y MÓVIL */
@media (max-width: 781px) {
  .h5m-bio-hero {
    padding: 72px 20px !important;
  }

  .h5m-bio-hero__grid {
    gap: 48px;
  }

  .h5m-bio-hero h1 {
    margin-bottom: 42px;
    font-size: clamp(54px, 16vw, 76px);
  }

  .h5m-bio-hero__image img {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
  }

  .h5m-bio-content {
    padding: 72px 20px;
  }

  .h5m-bio-content__inner {
    grid-template-columns: 1fr;
  }

  .h5m-bio-section,
  .h5m-bio-section:nth-child(odd),
  .h5m-bio-section:nth-child(even) {
    border-top: 1px solid rgba(44, 44, 44, 0.28);
    border-left: 0;
  }

.h5m-bio-section:last-child {
  padding-bottom: 0 !important;
}
  .h5m-bio-section h2 {
    margin-bottom: 20px;
  }

  .h5m-bio-section p {
    font-size: 16px;
    line-height: 1.8;
  }

  /* ========================================
   PADDING LATERAL GLOBAL EN MÓVIL
======================================== */

.h5m-bio-section,
.h5m-bio-section:nth-child(odd),
.h5m-bio-section:nth-child(even) {
  padding: 44px 24px !important;
  border-top: 1px solid rgba(44, 44, 44, 0.28);
  border-left: 0;
}
}

/* ========================================
   CORRECCIONES
======================================== */

/* Texto del botón de publicaciones académicas */
.h5m-academic .wp-block-button__link,
.h5m-academic .wp-block-button__link:visited {
  color: var(--global-palette3, #2c2c2c) !important;
}

.h5m-academic .wp-block-button__link:hover,
.h5m-academic .wp-block-button__link:focus {
  background-color: var(--global-palette3, #2c2c2c);
  color: #faf8f4 !important;
}


/* Eliminar huecos generados entre los grupos principales */
.entry-content.single-content > .wp-block-group {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

/* Ocultar posibles párrafos vacíos entre secciones */
.entry-content.single-content > p:empty {
  display: none;
}


/* Evitar separaciones automáticas entre bloques principales */
.entry-content.single-content {
  margin-block: 0 !important;
  padding-block: 0 !important;
}

.entry-content.single-content > .wp-block-group {
  margin-block: 0 !important;
}

.entry-content.single-content > :first-child {
  margin-top: 0 !important;
}

.entry-content.single-content > :last-child {
  margin-bottom: 0 !important;
}

/* Elimina el padding del grupo exterior que envuelve la página */
body.page .entry-content.single-content > .wp-block-group:first-child {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}