/* ======= SISTEMA DE HERO RESPONSIVE 2025 ======= */
:root {
  --hero-justify: flex-start;
  --hero-align: center;
  --hero-justify-landscape: flex-end;
  --hero-align-landscape: center;
  --hero-justify-portrait: center;
  --hero-align-portrait: flex-end;
  --hero-box-max: min(680px, 75vw);
  --hero-box-max-landscape: 64%;
  --hero-box-max-portrait: 94%;
  --hero-title-size: clamp(1.8rem, 3.4vw, 2.9rem);
  --hero-subtitle-size: clamp(1rem, 2vw, 1.3rem);
  --hero-title-size-portrait: clamp(1.6rem, 6vw, 2.25rem);
  --hero-subtitle-size-portrait: clamp(0.95rem, 3.5vw, 1.1rem);
  --hero-padding: clamp(18px, 4vw, 72px);
  --hero-padding-portrait: clamp(18px, 5vw, 38px);
  --hero-padding-landscape: clamp(20px, 6vw, 110px);
  --hero-offset-x: 0px;
  --hero-offset-y: 0px;
  --hero-dynamic-scale: 1;
  --hero-scale-adjust: 1;
  --hero-dynamic-max: var(--hero-box-max);
  --hero-fit-max: 9999px;
  --hero-dynamic-justify: var(--hero-justify);
  --hero-dynamic-align: var(--hero-align);
  --hero-dynamic-padding: var(--hero-padding);
  --hero-padding-extra: 0px;
  --hero-shift-x: 0px;
  --hero-shift-y: 0px;
  --hero-nudge-x: 0px;
  --hero-nudge-y: 0px;
  --hero-viewport-scale: 1;
  --hero-panel-bg: rgba(0, 0, 0, 0.78);
  --hero-overlay-gap: clamp(18px, 5vw, 42px);
  --hero-overlay-floor: clamp(22px, 6vh, 46px);
  --hero-overlay-width: min(520px, 78vw);
  --hero-overlay-min: clamp(220px, 48vw, 480px);
  --hero-overlay-landscape-gap: clamp(16px, 5vw, 34px);
  --hero-overlay-landscape-width: min(60vw, 400px);
  --hero-overlay-landscape-min: clamp(200px, 40vw, 360px);
  --hero-box-align: flex-end;
  --hero-text-align: right;
  --hero-box-min-width: clamp(160px, 46vw, 420px);
}
.hero-dynamic,
.hero-section,
#hero,
#hero-sobre,
#hero-publicaciones,
#hero-talleres,
#hero-entrevistas,
#hero-interviews,
.hero-contacto {
  position: relative;
  display: flex;
  align-items: var(--hero-dynamic-align);
  justify-content: var(--hero-dynamic-justify);
  padding: calc(var(--hero-dynamic-padding) + var(--hero-padding-extra));
  min-height: clamp(68vh, 80vh, 92vh);
  height: clamp(72vh, 86vh, 94vh);
  color: #fff;
  overflow: hidden;
  background: var(--hero-bg, #000) center center / cover no-repeat;
  background-position: var(--hero-bg-position, center);
}

.hero-dynamic::before,
.hero-section::before,
#hero::before,
#hero-sobre::before,
#hero-publicaciones::before,
#hero-talleres::before,
#hero-entrevistas::before,
#hero-interviews::before,
.hero-contacto::before,
.hero-dynamic::after,
.hero-section::after,
#hero::after,
#hero-sobre::after,
#hero-publicaciones::after,
#hero-talleres::after,
#hero-entrevistas::after,
#hero-interviews::after,
.hero-contacto::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-dynamic::before,
.hero-section::before,
#hero::before,
#hero-sobre::before,
#hero-publicaciones::before,
#hero-talleres::before,
#hero-entrevistas::before,
#hero-interviews::before,
.hero-contacto::before {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.1) 14%,
    rgba(255, 255, 255, 0.06) 30%,
    rgba(0, 0, 0, 0.2) 48%,
    rgba(0, 0, 0, 0.4) 62%,
    rgba(0, 0, 0, 0.65) 82%,
    rgba(0, 0, 0, 0.78) 100%
  );
  z-index: 1;
}

.hero-dynamic::after,
.hero-section::after,
#hero::after,
#hero-sobre::after,
#hero-publicaciones::after,
#hero-talleres::after,
#hero-entrevistas::after,
#hero-interviews::after,
.hero-contacto::after {
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0) 46%,
      rgba(0, 0, 0, 0.22) 60%,
      rgba(0, 0, 0, 0.5) 82%,
      rgba(0, 0, 0, 0.62) 100%
    ),
    radial-gradient(
      circle at 16% 52%,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.1) 28%,
      rgba(255, 255, 255, 0.04) 52%,
      rgba(0, 0, 0, 0) 72%
    );
  z-index: 2;
}


/* Remove left-side darkening on non-home heroes for mobile orientations */
@media (max-width: 768px), (max-width: 1024px) and (orientation: landscape) {
  :is(
      .hero-dynamic,
      .hero-section,
      #hero-sobre,
      #hero-publicaciones,
      #hero-talleres,
      #hero-entrevistas,
      #hero-interviews,
      .hero-contacto
    ):not(#hero)::before,
  :is(
      .hero-dynamic,
      .hero-section,
      #hero-sobre,
      #hero-publicaciones,
      #hero-talleres,
      #hero-entrevistas,
      #hero-interviews,
      .hero-contacto
    ):not(#hero)::after {
    background: none;
  }
}

/* Restore right-side shading only for the interviews hero on mobile orientations */
@media (max-width: 768px), (max-width: 1024px) and (orientation: landscape) {
  #hero-entrevistas::before,
  #hero-interviews::before {
    background:
      radial-gradient(
        circle at 88% 34%,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.62) 32%,
        rgba(0, 0, 0, 0) 60%
      ),
      linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 68%,
        rgba(0, 0, 0, 0.58) 84%,
        rgba(0, 0, 0, 0.85) 100%
      );
  }

  #hero-entrevistas::after,
  #hero-interviews::after {
    background:
      radial-gradient(
        circle at 92% 48%,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.5) 32%,
        rgba(0, 0, 0, 0) 68%
      ),
      linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 74%,
        rgba(0, 0, 0, 0.45) 88%,
        rgba(0, 0, 0, 0.78) 100%
      );
  }
}

/* Intensify the right-hand vignette on portrait mobile/tablet layouts */
@media (max-width: 900px) and (orientation: portrait) {
  #hero-entrevistas::before,
  #hero-interviews::before {
    background:
      radial-gradient(
        circle at 90% 32%,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.66) 34%,
        rgba(0, 0, 0, 0) 66%
      ),
      linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 64%,
        rgba(0, 0, 0, 0.6) 82%,
        rgba(0, 0, 0, 0.9) 100%
      );
  }

  #hero-entrevistas::after,
  #hero-interviews::after {
    background:
      radial-gradient(
        circle at 92% 48%,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.48) 36%,
        rgba(0, 0, 0, 0) 78%
      ),
      linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 70%,
        rgba(0, 0, 0, 0.5) 88%,
        rgba(0, 0, 0, 0.82) 100%
      );
  }
}

/* Darken and blur the right edge of the interviews hero on mobile */
@media (max-width: 768px) {
  #hero-entrevistas::before,
  #hero-interviews::before {
    background:
      radial-gradient(
        circle at 88% 50%,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.9) 22%,
        rgba(0, 0, 0, 0.75) 35%,
        rgba(0, 0, 0, 0) 55%
      ),
      linear-gradient(
        to right,
        rgba(0, 0, 0, 0.45) 0%,
        rgba(0, 0, 0, 0.85) 80%
      );
  }

  #hero-entrevistas::after,
  #hero-interviews::after {
    background:
      radial-gradient(
        circle at 86% 26%,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.76) 16%,
        rgba(0, 0, 0, 0.38) 34%,
        rgba(0, 0, 0, 0) 54%
      ),
      radial-gradient(
        circle at 94% 56%,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.52) 34%,
        rgba(0, 0, 0, 0.08) 72%
      ),
      linear-gradient(
        114deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.12) 52%,
        rgba(0, 0, 0, 0.6) 78%,
        rgba(0, 0, 0, 0.92) 100%
      );
  }
}

/* Ensure the vignette remains visible on horizontal mobile/tablet layouts */
@media (max-width: 1024px) and (orientation: landscape) {
  #hero-entrevistas::before,
  #hero-interviews::before {
    background:
      radial-gradient(
        circle at 94% 44%,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.58) 30%,
        rgba(0, 0, 0, 0) 60%
      ),
      linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 72%,
        rgba(0, 0, 0, 0.55) 88%,
        rgba(0, 0, 0, 0.86) 100%
      );
  }

  #hero-entrevistas::after,
  #hero-interviews::after {
    background:
      radial-gradient(
        circle at 88% 26%,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.7) 18%,
        rgba(0, 0, 0, 0.34) 36%,
        rgba(0, 0, 0, 0) 56%
      ),
      radial-gradient(
        circle at 90% 58%,
        rgba(0, 0, 0, 0.86) 0%,
        rgba(0, 0, 0, 0.46) 32%,
        rgba(0, 0, 0, 0) 74%
      ),
      linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 76%,
        rgba(0, 0, 0, 0.48) 90%,
        rgba(0, 0, 0, 0.82) 100%
      );
  }
}

/* Intensify the right-hand vignette on portrait mobile/tablet layouts */
@media (max-width: 900px) and (orientation: portrait) {
  #hero-entrevistas::before,
  #hero-interviews::before {
    background:
      linear-gradient(
        110deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.08) 32%,
        rgba(0, 0, 0, 0.34) 52%,
        rgba(0, 0, 0, 0.68) 70%,
        rgba(0, 0, 0, 0.94) 100%
      ),
      radial-gradient(
        circle at 92% 42%,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.7) 36%,
        rgba(0, 0, 0, 0.12) 72%
      );
  }

  #hero-entrevistas::after,
  #hero-interviews::after {
    background:
      radial-gradient(
        circle at 92% 58%,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.46) 36%,
        rgba(0, 0, 0, 0) 78%
      ),
      linear-gradient(
        112deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.08) 42%,
        rgba(0, 0, 0, 0.42) 70%,
        rgba(0, 0, 0, 0.82) 100%
      );
  }
}

/* Ensure the vignette remains visible on horizontal mobile/tablet layouts */
@media (max-width: 1024px) and (orientation: landscape) {
  #hero-entrevistas::before,
  #hero-interviews::before {
    background:
      linear-gradient(
        104deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.05) 38%,
        rgba(0, 0, 0, 0.28) 60%,
        rgba(0, 0, 0, 0.6) 78%,
        rgba(0, 0, 0, 0.88) 100%
      ),
      radial-gradient(
        circle at 94% 48%,
        rgba(0, 0, 0, 0.94) 0%,
        rgba(0, 0, 0, 0.6) 30%,
        rgba(0, 0, 0, 0.08) 68%
      );
  }

  #hero-entrevistas::after,
  #hero-interviews::after {
    background:
      radial-gradient(
        circle at 92% 62%,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.45) 32%,
        rgba(0, 0, 0, 0) 76%
      ),
      linear-gradient(
        106deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.12) 48%,
        rgba(0, 0, 0, 0.5) 80%,
        rgba(0, 0, 0, 0.84) 100%
      );
  }
}

/* Restore full brightness on desktop heroes for About/Sobre mí and Publications */
@media (min-width: 1025px) {
  #hero-sobre::before,
  #hero-sobre::after,
  #hero-publicaciones::before,
  #hero-publicaciones::after {
    background: none;
  }
}

/* Darken the right edge of the interviews hero on mobile and tablet (both orientations) */
@media (max-width: 1024px) {
  #hero-entrevistas::before,
  #hero-interviews::before {
    background:
      linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 40%,
        rgba(0, 0, 0, 0.35) 60%,
        rgba(0, 0, 0, 0.75) 78%,
        rgba(0, 0, 0, 0.9) 100%
      );
  }

  #hero-entrevistas::after,
  #hero-interviews::after {
    background:
      radial-gradient(
        circle at 88% 50%,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.65) 22%,
        rgba(0, 0, 0, 0.2) 52%,
        rgba(0, 0, 0, 0) 68%
      ),
      linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.08) 42%,
        rgba(0, 0, 0, 0.45) 70%,
        rgba(0, 0, 0, 0.88) 100%
      );
  }
}

/* Refuerza el oscurecimiento del lado derecho en móviles pequeños */
@media (max-width: 768px) {
  #hero-entrevistas::before,
  #hero-interviews::before {
    background:
      radial-gradient(
        circle at 88% 50%,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.9) 22%,
        rgba(0, 0, 0, 0.75) 35%,
        rgba(0, 0, 0, 0) 55%
      ),
      linear-gradient(
        to right,
        rgba(0, 0, 0, 0.45) 0%,
        rgba(0, 0, 0, 0.85) 80%
      );
  }
}

#hero::before {
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.86) 0%,
      rgba(0, 0, 0, 0.78) 16%,
      rgba(0, 0, 0, 0.54) 28%,
      rgba(0, 0, 0, 0.22) 44%,
      rgba(0, 0, 0, 0) 60%
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.1) 14%,
      rgba(255, 255, 255, 0.06) 30%,
      rgba(0, 0, 0, 0.2) 48%,
      rgba(0, 0, 0, 0.4) 62%,
      rgba(0, 0, 0, 0.65) 82%,
      rgba(0, 0, 0, 0.78) 100%
    );
}

#hero::after {
  background:
    radial-gradient(
      circle at 12% 52%,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.5) 26%,
      rgba(0, 0, 0, 0.2) 50%,
      rgba(0, 0, 0, 0) 72%
    ),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.68) 0%,
      rgba(0, 0, 0, 0.48) 16%,
      rgba(0, 0, 0, 0.18) 40%,
      rgba(0, 0, 0, 0) 60%,
      rgba(0, 0, 0, 0) 100%
    ),
    radial-gradient(
      circle at 16% 52%,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.1) 28%,
      rgba(255, 255, 255, 0.04) 52%,
      rgba(0, 0, 0, 0) 72%
    );
}

.hero-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: flex;
  align-items: var(--hero-dynamic-align, flex-end);
  justify-content: var(--hero-dynamic-justify, flex-end);
  padding: var(--hero-overlay-gap);
  box-sizing: border-box;
  z-index: 3;
}

.hero-text,
.hero-panel,
.hero-content,
.hero-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: var(--hero-box-align, flex-end);
  justify-content: flex-end;
  text-align: var(--hero-text-align, right);
  width: min(
    var(--hero-fit-max, var(--hero-dynamic-max, var(--hero-overlay-width))),
    calc(100% - (var(--hero-overlay-gap) * 2))
  );
  max-width: min(
    var(--hero-fit-max, var(--hero-dynamic-max, var(--hero-overlay-width))),
    calc(100% - (var(--hero-overlay-gap) * 2))
  );
  min-width: min(
    var(--hero-box-min-width),
    calc(100% - (var(--hero-overlay-gap) * 2))
  );
  max-height: calc(100% - (var(--hero-overlay-gap) * 2));
  padding: clamp(14px, 3.8vw, 24px) clamp(16px, 4.8vw, 26px);
  background: rgba(0, 0, 0, 0.78);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2.6px);
  gap: clamp(8px, 2.8vw, 14px);
  word-break: normal;
  overflow-wrap: break-word;
  color: #f7f8f9;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  margin: 0;
  z-index: 4;
  flex-shrink: 1;
  transform: translate(
    calc(var(--hero-offset-x) + var(--hero-shift-x) + var(--hero-nudge-x)),
    calc(var(--hero-offset-y) + var(--hero-shift-y) + var(--hero-nudge-y))
  );
  transition: transform 320ms ease, max-width 320ms ease, padding 220ms ease;
}

.hero-text h1,
.hero-content h1 {
  color: #ffffff;
  font-size: calc(
    var(--hero-title-size) * var(--hero-dynamic-scale) * var(--hero-scale-adjust) *
      var(--hero-viewport-scale)
  );
  font-weight: 760;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.hero-text h2,
.hero-content h2,
.hero-content p {
  color: #e8e8e8;
  font-weight: 450;
  font-size: calc(
    var(--hero-subtitle-size) * var(--hero-dynamic-scale) * var(--hero-scale-adjust) *
      var(--hero-viewport-scale)
  );
  line-height: 1.42;
}

@media (min-width: 1025px) {
  .hero-text h1,
  .hero-panel h1,
  .hero-content h1,
  .hero-box h1 {
    text-align: center;
    margin-bottom: 0.35em;
    line-height: 1.15;
  }

  .hero-text h2,
  .hero-text p,
  .hero-panel h2,
  .hero-panel p,
  .hero-content h2,
  .hero-content p,
  .hero-box h2,
  .hero-box p {
    text-align: justify;
  }
}

/* ===== Configuración individual ===== */
#hero {
  --hero-bg: url("images/hero/hero-bg.jpg");
  --hero-bg-position: center 26%;
  --hero-focus-x: 18%;
  --hero-justify: flex-end;
  --hero-align: center;
  --hero-justify-landscape: flex-end;
  --hero-align-landscape: center;
  --hero-justify-portrait: center;
  --hero-align-portrait: flex-end;
  --hero-offset-y: clamp(7.25rem, 16vh, 11rem);
  --hero-offset-x: clamp(18px, 6vw, 46px);
  --hero-shift-y: 72px;
  --hero-box-max: min(440px, 60vw);
  --hero-box-max-landscape: 54%;
  --hero-box-max-portrait: 84%;
  --hero-dynamic-max: min(400px, 54vw);
  --hero-scale-adjust: 0.86;
  --hero-title-size: clamp(1.48rem, 2.6vw, 2.16rem);
  --hero-subtitle-size: clamp(0.84rem, 1.5vw, 1.04rem);
  --hero-title-size-portrait: clamp(1.36rem, 4.8vw, 1.92rem);
  --hero-subtitle-size-portrait: clamp(0.82rem, 2.8vw, 1.02rem);
}

#hero .hero-text,
#hero .hero-content {
  padding: clamp(12px, 2.1vw, 26px);
  border-radius: 12px;
}

#hero-sobre {
  --hero-bg: url("images/hero/hero-sobre.jpeg");
  --hero-bg-position: center 34%;
  --hero-focus-x: 14%;
  --hero-justify: flex-start;
  --hero-justify-landscape: flex-start;
  --hero-justify-portrait: center;
  --hero-align-portrait: flex-end;
  --hero-box-max: min(640px, 76vw);
}

#hero-publicaciones {
  --hero-bg: url("images/headers/publicaciones-header.jpeg");
  --hero-bg-position: center 46%;
  --hero-focus-x: 16%;
  --hero-justify: flex-start;
  --hero-justify-landscape: flex-end;
  --hero-justify-portrait: center;
  --hero-align-portrait: flex-end;
  --hero-box-max: min(600px, 78vw);
}

#hero-talleres {
  --hero-bg: url("images/headers/talleres-header.jpg");
  --hero-bg-position: center 32%;
  --hero-focus-x: 20%;
  --hero-justify: flex-start;
  --hero-justify-landscape: flex-end;
  --hero-justify-portrait: center;
  --hero-align-portrait: flex-end;
  --hero-box-max: min(620px, 78vw);
}

#hero.hero-dynamic,
#hero-sobre.hero-dynamic,
#hero-publicaciones.hero-dynamic,
#hero-talleres.hero-dynamic,
.hero-contacto.hero-dynamic {
  align-items: var(--hero-dynamic-align);
  justify-content: var(--hero-dynamic-justify);
  padding: calc(var(--hero-dynamic-padding) + var(--hero-padding-extra));
  min-height: clamp(68vh, 80vh, 92vh);
  height: clamp(72vh, 86vh, 94vh);
}

#hero-entrevistas,
#hero-interviews {
  --hero-bg: url("images/headers/entrevistas-header.jpg");
  --hero-bg-position: center 70%;
  --hero-focus-x: 82%;
  --hero-justify: flex-end;
  --hero-align: flex-end;
  --hero-justify-landscape: flex-end;
  --hero-align-landscape: flex-end;
  --hero-justify-portrait: center;
  --hero-align-portrait: flex-end;
  --hero-box-max: min(480px, 72vw);
  --hero-dynamic-max: min(420px, 64vw);
  --hero-fit-max: min(400px, 60vw);
  --hero-offset-x: 0px;
}

#hero-entrevistas::before,
#hero-interviews::before {
  background:
    radial-gradient(
      circle at 76% 18%,
      rgba(0, 0, 0, 0.8) 0%,
      rgba(0, 0, 0, 0.58) 26%,
      rgba(0, 0, 0, 0) 58%
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.1) 14%,
      rgba(255, 255, 255, 0.06) 30%,
      rgba(0, 0, 0, 0.2) 48%,
      rgba(0, 0, 0, 0.4) 62%,
      rgba(0, 0, 0, 0.65) 82%,
      rgba(0, 0, 0, 0.78) 100%
    );
}

#hero-entrevistas::after,
#hero-interviews::after {
  background:
    radial-gradient(
      circle at 80% 32%,
      rgba(0, 0, 0, 0.82) 0%,
      rgba(0, 0, 0, 0.56) 28%,
      rgba(0, 0, 0, 0) 70%
    ),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0) 46%,
      rgba(0, 0, 0, 0.22) 60%,
      rgba(0, 0, 0, 0.5) 82%,
      rgba(0, 0, 0, 0.62) 100%
    ),
    radial-gradient(
      circle at 16% 52%,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.1) 28%,
      rgba(255, 255, 255, 0.04) 52%,
      rgba(0, 0, 0, 0) 72%
    );
}

@media (max-width: 1024px) {
  .hero-dynamic,
  .hero-section,
  .hero-contacto {
    --hero-overlay-gap: clamp(14px, 4.8vw, 28px);
    --hero-overlay-floor: clamp(16px, 5.4vh, 32px);
    --hero-overlay-width: min(84vw, 500px);
    --hero-overlay-min: clamp(180px, 52vw, 440px);
  }

  .hero-dynamic .hero-text,
  .hero-dynamic .hero-box,
  .hero-dynamic .hero-content {
    padding: clamp(12px, 3.8vw, 22px) clamp(14px, 4.8vw, 24px);
  }

  .hero-dynamic .hero-box h1,
  .hero-dynamic .hero-text h1,
  .hero-dynamic .hero-content h1 {
    width: 100%;
    font-size: clamp(1.48rem, 4.6vw, 2.08rem);
    line-height: 1.14;
    letter-spacing: 0.2px;
    margin: 0;
  }

  .hero-dynamic .hero-box p,
  .hero-dynamic .hero-text p,
  .hero-dynamic .hero-content p {
    width: 100%;
    font-size: clamp(0.98rem, 3.4vw, 1.18rem);
    line-height: 1.28;
    margin: 0;
    color: #f3f3f3;
  }
}

/* Móvil horizontal / landscape */
@media (orientation: landscape) and (max-width: 1024px) {
  .hero-dynamic,
  .hero-section,
  .hero-contacto {
    --hero-overlay-gap: clamp(16px, 5vw, 34px);
    --hero-overlay-floor: clamp(14px, 6vh, 30px);
    --hero-overlay-width: min(60vw, 400px);
    --hero-overlay-min: clamp(200px, 40vw, 360px);
    --hero-box-align: flex-end;
    --hero-text-align: right;
    justify-content: flex-end;
    align-items: flex-end;
  }

  .hero-dynamic .hero-text,
  .hero-dynamic .hero-box,
  .hero-dynamic .hero-content {
    margin-left: auto;
    padding: clamp(10px, 2.8vw, 16px) clamp(12px, 3.4vw, 18px);
    max-width: min(64vw, 420px);
    width: auto;
    width: fit-content;
    min-width: 0;
    margin-bottom: clamp(10px, 3vh, 24px);
  }

  .hero-dynamic .hero-box h1,
  .hero-dynamic .hero-text h1,
  .hero-dynamic .hero-content h1 {
    font-size: clamp(1.22rem, 2.6vw, 1.72rem);
    line-height: 1.1;
  }

  .hero-dynamic .hero-box p,
  .hero-dynamic .hero-text p,
  .hero-dynamic .hero-content p {
    font-size: clamp(0.9rem, 2.2vw, 1.02rem);
  }

  .hero-container {
    justify-content: flex-end;
    align-items: flex-end;
    padding: clamp(14px, 5vw, 42px);
    max-width: none;
  }
}

.hero-contacto {
  --hero-bg: url("images/headers/contacto-header.jpg");
  --hero-bg-position: center 42%;
  --hero-focus-x: 18%;
  --hero-justify: flex-start;
  --hero-justify-landscape: flex-end;
  --hero-justify-portrait: center;
  --hero-align-portrait: flex-end;
  --hero-box-max: min(620px, 80vw);
}

/* ===== Ajustes dinámicos para desktop (protección de rostros) ===== */
@media (min-width: 800px) and (max-width: 1024px) {
  #hero.hero-dynamic,
  #hero-sobre.hero-dynamic {
    --hero-fit-max: min(460px, 46vw);
    --hero-scale-adjust: 0.94;
    --hero-padding-extra: clamp(6px, 1.2vw, 14px);
    --hero-shift-x: clamp(12px, 4vw, 42px);
    --hero-shift-y: 3vh;
  }
}

@media (min-width: 1024px) and (max-width: 1440px) {
  #hero.hero-dynamic,
  #hero-sobre.hero-dynamic {
    --hero-fit-max: min(520px, 42vw);
    --hero-scale-adjust: 0.96;
    --hero-padding-extra: clamp(10px, 1.6vw, 20px);
    --hero-shift-x: clamp(18px, 3vw, 56px);
    --hero-shift-y: 2.6vh;
  }
}

@media (min-width: 1440px) {
  #hero.hero-dynamic,
  #hero-sobre.hero-dynamic {
    --hero-fit-max: min(560px, 38vw);
    --hero-scale-adjust: 1;
    --hero-padding-extra: clamp(12px, 1.8vw, 26px);
    --hero-shift-x: clamp(22px, 3.4vw, 68px);
    --hero-shift-y: 2.2vh;
  }
}

/* ===== Ajustes responsivos ===== */
@media (min-width: 1025px) and (max-width: 1200px) and (orientation: landscape) {
  .hero-dynamic,
  .hero-section,
  #hero,
  #hero-sobre,
  #hero-publicaciones,
  #hero-talleres,
  #hero-entrevistas,
  #hero-interviews,
  .hero-contacto {
    justify-content: var(--hero-dynamic-justify, var(--hero-justify-landscape, var(--hero-justify)));
    align-items: var(--hero-dynamic-align, var(--hero-align-landscape, var(--hero-align)));
    padding-inline: var(--hero-padding-landscape);
    --hero-nudge-y: clamp(12px, 3vh, 36px);
    --hero-viewport-scale: 0.92;
    --hero-panel-bg: rgba(0, 0, 0, 0.66);
  }

  .hero-container {
    max-width: var(--hero-box-max-landscape, var(--hero-box-max));
  }

  .hero-text h1,
  .hero-content h1 {
    font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  }

  .hero-text h2,
  .hero-content h2,
  .hero-content p {
    font-size: clamp(0.95rem, 1.7vw, 1.1rem);
  }

  .hero-text,
  .hero-panel,
  .hero-content,
  .hero-box {
    width: auto;
    width: fit-content;
    min-width: 0;
    max-width: min(
      var(--hero-box-max-landscape, var(--hero-box-max)),
      var(--hero-dynamic-max, 520px)
    );
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  .hero-dynamic,
  .hero-section,
  #hero,
  #hero-sobre,
  #hero-publicaciones,
  #hero-talleres,
  #hero-entrevistas,
  #hero-interviews,
  .hero-contacto {
    align-items: flex-end;
    justify-content: center;
    padding: var(--hero-padding-portrait);
    background-position: center top;
    --hero-viewport-scale: 1;
    --hero-nudge-y: 0px;
    --hero-box-align: center;
    --hero-text-align: center;
  }

  .hero-container {
    max-width: none;
    justify-content: center;
    align-items: flex-end;
    padding: clamp(16px, 6vw, 44px);
  }

  .hero-text,
  .hero-box,
  .hero-content {
    margin-bottom: clamp(12px, 5vh, 32px);
    margin-left: auto;
    margin-right: auto;
    max-width: min(520px, 92vw);
    width: min(520px, 92vw);
    padding: clamp(14px, 5vw, 24px) clamp(18px, 6vw, 28px);
  }

  .hero-text h1,
  .hero-content h1 {
    font-size: var(--hero-title-size-portrait);
  }

  .hero-text h2,
  .hero-content h2,
  .hero-content p {
    font-size: var(--hero-subtitle-size-portrait);
    line-height: 1.38;
  }
}

@media (max-width: 640px) and (orientation: landscape) {
  .hero-dynamic,
  .hero-section,
  #hero,
  #hero-sobre,
  #hero-publicaciones,
  #hero-talleres,
  #hero-entrevistas,
  #hero-interviews,
  .hero-contacto {
    align-items: flex-end;
    justify-content: flex-end;
    --hero-nudge-y: clamp(16px, 4vh, 42px);
    --hero-viewport-scale: 0.9;
    --hero-box-align: flex-end;
    --hero-text-align: right;
  }

  .hero-container {
    max-width: none;
    justify-content: flex-end;
    align-items: flex-end;
    padding: clamp(12px, 4.6vw, 32px);
  }

  .hero-text,
  .hero-panel,
  .hero-content,
  .hero-box {
    padding: clamp(12px, 3vw, 20px);
    border-radius: 12px;
    max-width: min(68vw, 420px);
    width: auto;
    width: fit-content;
    min-width: 0;
    margin-bottom: clamp(10px, 4vh, 22px);
  }
}

@media (max-width: 540px) {
  .hero-dynamic,
  .hero-section,
  #hero,
  #hero-sobre,
  #hero-publicaciones,
  #hero-talleres,
  #hero-entrevistas,
  #hero-interviews,
  .hero-contacto {
    padding: clamp(16px, 6vw, 28px);
  }

  .hero-container {
    max-width: 94vw;
  }
}

@media (max-height: 760px) and (orientation: landscape) {
  .hero-dynamic,
  .hero-section,
  #hero,
  #hero-sobre,
  #hero-publicaciones,
  #hero-talleres,
  #hero-entrevistas,
  #hero-interviews,
  .hero-contacto {
    align-items: flex-end;
    --hero-nudge-y: clamp(10px, 2.6vh, 26px);
    --hero-viewport-scale: 0.9;
  }

  .hero-container {
    transform: translate(var(--hero-offset-x), calc(var(--hero-offset-y) - 2vh));
    justify-content: flex-end;
    align-items: flex-end;
    padding-bottom: clamp(10px, 2vh, 24px);
  }
}

@media (min-width: 1400px) {
  .hero-container,
  .hero-content {
    max-width: var(--hero-dynamic-max, min(720px, 60vw));
  }
}

@media (min-width: 1024px) {
  .hero-dynamic,
  .hero-section,
  #hero,
  #hero-sobre,
  #hero-publicaciones,
  #hero-talleres,
  #hero-entrevistas,
  #hero-interviews,
  .hero-contacto {
    justify-content: flex-end;
    align-items: flex-end;
  }

  .hero-container {
    justify-content: flex-end;
    align-items: flex-end;
    padding-right: clamp(18px, 6vw, 78px);
  }

  .hero-text,
  .hero-panel,
  .hero-content,
  .hero-box {
    margin-left: auto;
    margin-right: clamp(18px, 6vw, 96px);
    max-width: min(500px, 42vw);
    width: auto;
    min-width: auto;
    text-align: justify;
    align-items: flex-end;
    justify-content: flex-end;
    transform: none;
    text-justify: inter-word;
    letter-spacing: normal;
    word-spacing: normal;
    hyphens: auto;
    gap: clamp(4px, 0.8vw, 10px);
  }

  .hero-text h1,
  .hero-content h1 {
    width: 100%;
    text-align: inherit;
    text-align-last: right;
    line-height: 1.1;
    margin: 0;
  }

  .hero-text h2,
  .hero-content h2,
  .hero-content p {
    width: 100%;
    text-align: inherit;
    text-align-last: right;
    line-height: 1.1;
    margin: 0;
  }
}

@media (min-width: 1025px) {
  #hero .hero-container,
  #hero-talleres .hero-container,
  #hero-entrevistas .hero-container,
  #hero-publicaciones .hero-container,
  #hero-sobre .hero-container,
  .hero-contacto .hero-container,
  .hero-contacto .hero-content {
    justify-content: flex-end !important;
    margin-left: auto !important;
    margin-right: 5vw !important;
  }

  #hero .hero-text h1,
  #hero .hero-text h2,
  #hero-talleres .hero-text h1,
  #hero-talleres .hero-text h2,
  #hero-entrevistas .hero-text h1,
  #hero-entrevistas .hero-text h2,
  #hero-publicaciones .hero-text h1,
  #hero-publicaciones .hero-text h2,
  #hero-sobre .hero-text h1,
  #hero-sobre .hero-text h2,
  .hero-contacto h1 {
    text-align: center !important;
  }

  #hero .hero-text p,
  #hero-talleres .hero-text p,
  #hero-entrevistas .hero-text p,
  #hero-publicaciones .hero-text p,
  #hero-sobre .hero-text p,
  .hero-contacto p {
    text-align: justify !important;
    line-height: 1.2 !important;
  }
}
