/* ------------------------------------------------------------------
   RESPONSIVE FIXES 2026
   Correcciones transversales de desbordes, sangrias y espaciado.
   Se carga despues de style.css en todos los idiomas.
------------------------------------------------------------------ */

html {
  max-width: 100%;
  overflow-x: clip;
}

body {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/*
 * style.css desactiva el ajuste de palabras con !important en todo el arbol.
 * Estas reglas restauran saltos seguros sin introducir guiones automaticos.
 */
body :where(
  p, li, dt, dd, figcaption, blockquote,
  h1, h2, h3, h4, h5, h6,
  a, button, label, span, strong, em
) {
  min-width: 0;
  max-width: 100%;
  -webkit-hyphens: none !important;
  hyphens: none !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
}

html[lang="zh-Hans"] body :where(
  p, li, dt, dd, figcaption, blockquote,
  h1, h2, h3, h4, h5, h6,
  a, button, label, span, strong, em
) {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  line-break: auto;
}

main,
main > *,
section,
article,
nav,
header,
footer,
figure,
div,
ul,
ol,
dl {
  min-width: 0;
}

main {
  width: min(1200px, calc(100% - 2rem));
  max-width: 1200px;
}

img,
video,
iframe,
canvas,
svg {
  max-width: 100%;
}

iframe,
canvas {
  display: block;
}

pre,
code {
  max-width: 100%;
}

pre {
  overflow-x: auto;
  white-space: pre-wrap;
}

table {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

/* Sangrias coherentes: la separacion entre parrafos reemplaza el indentado. */
.subtitulo,
.subtitulo2,
.parrafo,
p.parrafo:first-of-type {
  text-indent: 0 !important;
}

.parrafo,
.parrafo ul,
.parrafo ol {
  width: 100%;
}

.parrafo ul,
.parrafo ol {
  padding-inline-start: clamp(1.25rem, 4vw, 2rem);
}

.titulo,
.subtitulo,
.subtitulo2,
.home-hero__title,
.home-section__header h2,
.home-project-band__header h2,
.home-about__copy h2,
.home-closing h2 {
  text-wrap: balance;
}

.parrafo,
.home-hero__lead,
.home-section__intro,
.home-series-card__copy p,
.home-axis__copy p,
.home-project__description,
.home-about__copy p {
  text-wrap: pretty;
}

/* Cabecera y navegacion. */
.site-masthead__brand,
.site-masthead__copy {
  min-width: 0;
}

.site-masthead__brand {
  padding-block: 0.65rem;
}

.site-masthead__title,
.site-masthead__tagline {
  overflow-wrap: break-word !important;
}

.nav-menu,
.nav-menu > li,
.nav-menu a,
.dropdown-menu,
.dropdown-menu-sub {
  min-width: 0;
  max-width: 100%;
}

.nav-menu a {
  white-space: normal;
}

.dropdown-menu a,
.dropdown-menu-sub a {
  line-height: 1.25;
}

@media (min-width: 902px) and (max-width: 1180px) {
  .nav-menu {
    flex-wrap: wrap;
  }

  .nav-menu > li {
    flex: 0 1 auto;
  }

  .nav-lang-switch {
    margin-left: 0;
  }
}

@media (max-width: 901px) {
  :root {
    --header-h: 3.75rem;
  }

  .navbar {
    min-height: var(--header-h);
    padding-inline: 0.45rem;
  }

  .nav-toggle {
    margin-top: 0;
  }

  .nav-menu {
    top: var(--header-h);
    max-height: calc(100dvh - var(--header-h));
    padding: 0.75rem;
  }

  .nav-menu a,
  .dropdown-menu a,
  .dropdown-menu-sub a {
    width: 100%;
  }

  .dropdown-sub > .dropdown-menu-sub {
    margin-left: 0.75rem;
    max-width: calc(100% - 0.75rem);
  }

  .nav-lang-switch {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0.65rem 0;
  }
}

@media (max-width: 560px) {
  main {
    width: min(100% - 1.25rem, 1200px);
  }

  .site-masthead__brand {
    align-items: center;
    gap: 0.65rem;
  }

  .site-masthead__logo {
    width: 3rem;
    height: 3rem;
  }

  .site-masthead__title {
    font-size: clamp(1.55rem, 9vw, 2.35rem);
    line-height: 0.95;
  }

  .site-masthead__tagline {
    font-size: 0.72rem;
    line-height: 1.3;
  }
}

/* Portadas editoriales compartidas por ES, EN, MPD y CHN. */
.home-editorial,
.home-editorial > *,
.home-editorial .home-hero__copy,
.home-editorial .home-hero__media,
.home-editorial .home-section__header > *,
.home-editorial .home-project-band__header > *,
.home-editorial .home-product,
.home-editorial .home-product__body,
.home-editorial .home-series-card,
.home-editorial .home-axis,
.home-editorial .home-project,
.home-editorial .home-about__copy,
.home-editorial .home-closing > * {
  min-width: 0;
}

.home-editorial .home-hero {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.home-editorial .home-hero__title {
  max-width: min(12ch, 100%);
  font-size: clamp(2.75rem, 6.3vw, 6.35rem);
  letter-spacing: -0.045em;
  line-height: 0.96;
  overflow-wrap: break-word !important;
}

.home-editorial .home-hero__lead,
.home-editorial .home-section__intro,
.home-editorial .home-project-band__header p,
.home-editorial .home-about__copy p {
  max-width: min(100%, 42rem);
}

.home-editorial .home-actions {
  max-width: 100%;
}

.home-editorial .home-button {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.home-editorial .home-text-link {
  max-width: 100%;
  white-space: normal;
}

.home-editorial .home-section__header {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.home-editorial .home-project-band__header {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
}

.home-editorial .home-product h3,
.home-editorial .home-axis__copy h3,
.home-editorial .home-project__title,
.home-editorial .home-series-card__copy h3 {
  overflow-wrap: break-word !important;
}

.home-editorial .home-product__facts {
  grid-template-columns: minmax(max-content, auto) minmax(0, 1fr);
}

.home-editorial .home-product__facts dd {
  overflow-wrap: break-word !important;
}

.home-editorial .home-product__footer {
  flex-wrap: wrap;
}

.home-editorial .home-product__price {
  flex: 0 1 auto;
}

.home-editorial .home-product__state {
  flex: 1 1 8rem;
}

.home-editorial .home-series-card__copy {
  max-width: 100%;
}

.home-editorial .home-series-card__copy p {
  max-width: min(100%, 34rem);
}

.home-editorial .home-project {
  overflow-wrap: break-word !important;
}

.home-editorial .home-closing {
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
}

@media (max-width: 1000px) and (min-width: 761px) {
  .home-editorial .home-series-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .home-editorial .home-series-card--main {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 28rem;
  }

  .home-editorial .home-series-card:not(.home-series-card--main) {
    min-height: 18rem;
  }
}

@media (max-width: 900px) {
  .home-editorial .home-hero,
  .home-editorial .home-section__header,
  .home-editorial .home-project-band__header,
  .home-editorial .home-about,
  .home-editorial .home-closing {
    grid-template-columns: 1fr;
  }

  .home-editorial .home-hero {
    min-height: auto;
    gap: 2rem;
    padding-top: clamp(3.5rem, 10vw, 6rem);
  }

  .home-editorial .home-hero__media {
    order: -1;
  }

  .home-editorial .home-closing .home-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .home-editorial .home-section {
    padding-block: clamp(3.25rem, 12vw, 5rem);
  }

  .home-editorial .home-section__header {
    gap: 1.15rem;
    margin-bottom: 1.75rem;
  }

  .home-editorial .home-hero__title {
    max-width: 100%;
    font-size: clamp(2.45rem, 12.5vw, 4.5rem);
    line-height: 0.98;
  }

  .home-editorial .home-hero__media img {
    width: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: 4 / 5;
  }

  .home-editorial .home-project-band,
  .home-editorial .home-closing {
    padding: clamp(1.35rem, 6vw, 2rem);
  }

  .home-editorial .home-section__footer {
    justify-content: flex-start;
  }

  .home-editorial .home-axis {
    min-height: 0;
  }

  .home-editorial .home-axis__image {
    min-height: 15rem;
  }
}

@media (max-width: 480px) {
  .home-editorial .home-actions,
  .home-editorial .home-closing .home-actions {
    width: 100%;
  }

  .home-editorial .home-button {
    width: 100%;
    min-height: 3rem;
    padding-inline: 1rem;
  }

  .home-editorial .home-product__body,
  .home-editorial .home-axis__copy {
    padding: 1rem;
  }

  .home-editorial .home-series-card,
  .home-editorial .home-series-card--main {
    min-height: 21rem;
  }

  .home-editorial .home-series-card__copy {
    padding: 1rem;
  }
}
