/* Text-length resilience shared by every locale.
   Keep the approved type sizes, image windows, breakpoints and motion. */
:where(
  .hero__content, .category-hero__content, .split, .about-industrial__grid,
  .service-detail-story, .tank-story, .tank-intro-grid, .greenhouse-intro,
  .card-grid, .service-grid, .audience-grid, .partner-panels, .legal-grid,
  .footer__grid, .form .row, .category-cta, .contact-leader-card,
  .hero-leader-card, .lead-layout, .latest-item, .article-body-layout
) > * {
  min-inline-size: 0;
}

:where(
  .hero-panel, .content-panel, .service-card, .audience-card, .partner-panel,
  .card, .quote-card, .legal-card, .career-role-card, .contact-mini-card,
  .article-card, .topic-pill, .latest-item
) {
  min-inline-size: 0;
  max-inline-size: 100%;
}

/* Prefer word boundaries and native hyphenation; an unbreakable compound
   must not force a grid column wider than its container. */
.hero h1,
.hero .hero-lead,
.section-head h2,
.service-card h3 {
  overflow-wrap: anywhere !important;
}

:where(
  .hero h1, .hero h2, .hero h3, .hero p,
  .service-card h3, .service-card p, .audience-card h3,
  .partner-panel h3, .card h3, .section-head h2,
  .service-detail-story h2, .category-cta h2,
  .article-card h3, .latest-item h3, .lead-copy h1,
  .topic-pill strong, .footer p, .footer li, .form label
) {
  min-inline-size: 0;
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

/* Minimum button sizes stay intact; longer labels may grow to a second line. */
.btn,
.primary-button,
.nav > .btn,
.service-card--clickable::after {
  min-inline-size: 0;
  max-inline-size: 100%;
  block-size: auto;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.btn,
.primary-button {
  padding-block: 8px;
}

.service-card--clickable::after {
  padding-block: 4px;
}

/* Grid stretching keeps equal card bottoms without percentage-height cycles. */
.service-grid--industrial > .service-card {
  height: auto;
  align-self: stretch;
}

.service-grid--industrial > .service-card > h3,
.service-grid--industrial > .service-card > p {
  flex-shrink: 0;
}

/* Phone numbers may wrap at spaces, never through a group of digits. */
.hero-contact-list--leaders .hero-leader-card .leader-phone {
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.form :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-inline-size: 0;
  max-inline-size: 100%;
}

/* The floating help label may also be longer in another language. */
html body .al-ai-chat__button {
  inline-size: auto;
  min-inline-size: 92px;
  max-inline-size: min(180px, calc(100vw - 24px));
  block-size: auto;
  min-block-size: 66px;
  padding: 10px 12px;
}

.al-ai-chat__button :is(span, strong) {
  min-inline-size: 0;
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 780px) {
  html body .al-ai-chat__button {
    min-inline-size: 60px;
    min-block-size: 52px;
    padding: 10px 8px;
  }

  html body .al-ai-chat__button span {
    display: none;
  }
}

/* The expanded language menu remains bounded with nineteen choices. */
.language-dropdown .language-switcher {
  max-block-size: min(390px, calc(100dvh - 100px));
  overscroll-behavior: contain;
}

.language-dropdown .language-switcher a,
.language-switcher__name {
  min-inline-size: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.language-switcher__short,
.language-switcher__flag {
  flex-shrink: 0;
}

@media (min-width: 781px) {
  .form .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1121px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Prominent copy breaks at words. Emergency wrapping does not add hyphens. */
.hero h1,
.hero h2,
.hero h3,
.hero .hero-lead,
.home-hero-title__service,
.section-head h2,
.category-hero :is(h1, h2, p) {
  overflow-wrap: break-word !important;
  word-break: normal;
  hyphens: none !important;
}

/* A single desktop row; the script switches to the existing menu when the
   actual translated labels, brand and language selector do not fit. */
.header {
  background: #fff;
}

.header__inner {
  position: relative;
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  width: min(1960px, calc(100% - 40px));
  min-height: 80px;
  gap: 12px;
  padding: 8px 0;
}

.header__inner > .brand {
  flex: 0 0 230px;
  min-width: 0;
  max-width: 230px;
  gap: 10px;
}

.header__inner > .brand img {
  width: 76px;
  flex-shrink: 0;
}

.header__inner > .brand strong {
  font-size: 15px;
}

.header__inner > .brand span {
  white-space: normal;
  line-height: 1.25;
}

.header__inner > .nav {
  flex: 1 1 auto;
  min-inline-size: 0;
  max-inline-size: none;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2px;
}

.header__inner > .nav > :is(a, .nav-dropdown) {
  flex: 0 0 auto;
  max-inline-size: none;
}

.header__inner > .nav > a,
.header__inner > .nav > .nav-dropdown > .nav-dropdown__button {
  min-height: 44px;
  padding-inline: 8px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.header__inner > .nav > a:not(.btn),
.header__inner > .nav > .nav-dropdown > .nav-dropdown__button {
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  color: var(--navy, #0b1728);
}

.header__inner > .nav > a:not(.btn):is(:hover, :focus-visible, [aria-current]),
.header__inner > .nav > .nav-dropdown > .nav-dropdown__button:is(:hover, :focus-visible, [aria-expanded="true"]) {
  color: var(--red, #ed182e);
  box-shadow: inset 0 -2px 0 currentColor;
}

.header__inner > .nav > .btn {
  padding-inline: 16px;
  white-space: nowrap;
  hyphens: none;
}

.header__inner > .language-dropdown {
  flex: 0 0 auto;
  margin-left: 0;
}

.header .menu-button {
  position: static;
  top: auto;
  right: auto;
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 54px;
  align-items: center;
  justify-content: center;
  transform: none;
  white-space: nowrap;
}

.header--compact .header__inner > .brand {
  margin-right: auto;
}

.header--compact .menu-button {
  display: inline-flex;
  order: 4;
  margin-left: 0;
}

.header--compact .nav {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  width: min(680px, 100%);
  max-height: calc(100dvh - 110px);
  display: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid var(--line, #d7dfe8);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgb(15 23 42 / 12%);
}

.header--compact .nav.is-open {
  display: flex;
}

.header--compact .nav > a,
.header--compact .nav > .nav-dropdown > .nav-dropdown__button {
  justify-content: flex-start;
  white-space: normal;
  text-align: left;
  overflow-wrap: break-word;
}

.header--compact .nav > .btn {
  justify-content: center;
}

.header--compact .nav-dropdown {
  width: 100%;
  padding-bottom: 0;
  margin-bottom: 0;
}

.header--compact .nav-dropdown__button {
  width: 100%;
}

.header--compact .nav.is-open .nav-dropdown__button {
  pointer-events: none;
}

.header--compact .nav-dropdown__menu {
  position: static;
  min-width: 0;
  margin-block: 4px 8px;
  box-shadow: none;
  background: #f7f9fb;
}

.header--compact .nav.is-open .nav-dropdown__menu {
  display: grid;
}

/* Synchronous measurement uses the real labels without painting a second row. */
.header--measuring .nav {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: max-content !important;
  max-width: none !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: visible !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.header--measuring .nav > :is(a, .nav-dropdown),
.header--measuring .nav-dropdown__button {
  width: auto !important;
  white-space: nowrap !important;
}

.header--measuring .nav-dropdown__menu {
  display: none !important;
}

@media (min-width: 1681px) {
  .header:not(.header--compact) .header__inner {
    display: grid !important;
    grid-template-columns: 230px minmax(0, 1fr) 230px;
  }

  .header:not(.header--compact) .header__inner > .brand {
    grid-column: 1;
  }

  .header:not(.header--compact) .header__inner > .nav {
    grid-column: 2;
    width: 100%;
  }

  .header:not(.header--compact) .header__inner > .language-dropdown {
    grid-column: 3;
    justify-self: end;
  }
}

@media (max-width: 780px) {
  .header__inner {
    width: calc(100% - 28px);
    min-height: 72px;
    gap: 8px;
  }

  .header__inner > .brand {
    flex: 1 1 auto;
    max-width: none;
  }

  .header__inner > .brand img {
    width: 64px;
  }

  .header__inner > .brand span {
    display: none;
  }

  .header__inner > .brand strong {
    white-space: normal;
    overflow: visible;
  }
}

/* The magazine lead was an absolutely positioned copy block inside a fixed
   height box. Translated copy now contributes to height instead of clipping. */
html:not(:lang(hu)) .lead-story {
  display: grid;
  height: auto;
  min-height: clamp(470px, 46vw, 590px);
}

html:not(:lang(hu)) .lead-story > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}

html:not(:lang(hu)) .lead-story > .lead-copy {
  position: relative;
  inset: auto;
  min-inline-size: 0;
  align-self: stretch;
}

@media (max-width: 740px) {
  html:not(:lang(hu)) .lead-story {
    min-height: 520px;
  }
}

/* Give company cover photos a little more room without fixing the content
   height. Reference layouts keep their own geometry; mobile stays unchanged. */
@media (min-width: 781px) {
  body:not(.references-page):not(.reference-project-page) .hero {
    --hero-extra-space: 12px;
    height: auto;
    max-height: none;
  }

  .category-hub .category-hero__content {
    padding-block: calc(clamp(72px, 9vw, 112px) + var(--hero-extra-space, 0px));
  }
}

.hero-contact-panel,
.hero-contact-panel .hero-panel-note {
  height: auto;
  max-height: none;
}

.hero-contact-panel .hero-panel-note {
  display: block;
  line-height: 1.55;
  text-wrap: pretty;
}

/* A brief summary remains supporting copy rather than a second headline. */
.category-hub .category-hero .category-summary {
  font-size: clamp(18px, 1.25vw, 20px);
  line-height: 1.5;
}

/* A modest desktop rhythm for narrower or shorter working viewports only.
   Mobile and tall large-desktop views retain the approved original sizing. */
@media (min-width: 1024px) and (max-width: 1440px) and (max-height: 850px),
       (min-width: 1441px) and (max-width: 1920px) and (max-height: 900px) {
  body:has(.hero__content) .section {
    padding-block: 76px;
  }

  .hero {
    min-height: calc(550px + 2 * var(--hero-extra-space, 0px));
  }

  .hero__content {
    padding-block: calc(82px + var(--hero-extra-space, 0px));
    gap: 40px;
  }

  .hero h1 {
    font-size: clamp(34px, 4.3vw, 54px);
  }

  .hero--telephely .home-hero-title + .hero-lead {
    font-size: clamp(22px, 2vw, 25px);
  }

  body:has(.hero__content) .section-head {
    margin-bottom: 28px;
  }

  body:has(.hero__content) .section-head h2 {
    font-size: clamp(26px, 2.2vw, 36px);
  }

  .audience-grid--primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .audience-grid--primary .audience-card {
    min-height: 480px;
    padding: 36px;
  }

  .audience-grid--primary .audience-card h3 {
    font-size: clamp(26px, 2.1vw, 32px);
  }

  .audience-grid--primary .audience-card__intro {
    margin-block: 14px 18px;
  }

  .partner-panel {
    min-height: 440px;
    padding: 36px;
  }

  .partner-panel h3 {
    font-size: clamp(26px, 1.8vw, 34px);
  }

  .service-grid--industrial > .service-card {
    padding: 20px;
  }

  .service-grid--industrial > .service-card > img {
    margin-bottom: 16px;
  }

  .service-grid--industrial .service-card > h3 {
    font-size: 22px;
  }

  .hero .actions .btn,
  .audience-grid--primary .btn,
  .partner-panel .btn,
  .form .btn {
    min-height: 44px;
    padding-inline: 18px;
  }
}

/* sitewide-hero-rhythm-20261109:start */
/* Introductory copy only: keep nested contact cards and custom home titles intact. */
.hero > .hero__content > div > h1:not(.home-hero-title) {
  line-height: 1.15;
  margin-bottom: 28px;
}
.hero > .hero__content > div > .eyebrow {
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 18px;
}
.hero > .hero__content > div > h1:not(.home-hero-title) + p:not(.eyebrow) {
  line-height: 1.6;
  margin-bottom: 28px;
}
.hero > .hero__content > div > .actions {
  gap: 14px;
  flex-wrap: wrap;
}
.hero > .hero__content > div > .actions > .btn {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}
.catalog-page-intro h1 {
  line-height: 1.15;
}
@media (max-width: 1120px) {
  .category-hub .category-hero__content,
  .career-hero .hero__content {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .category-hub .category-hero__content > aside,
  .career-hero .hero__content > aside {
    width: min(100%, 620px);
    justify-self: start;
  }
}
@media (max-width: 780px) {
  .hero > .hero__content > div > h1:not(.home-hero-title) {
    line-height: 1.16 !important;
    margin-bottom: 26px;
  }
  .hero > .hero__content > div > .eyebrow {
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin-bottom: 18px;
  }
  .hero > .hero__content > div > h1:not(.home-hero-title) + p:not(.eyebrow) {
    line-height: 1.6 !important;
    margin-bottom: 26px;
  }
}
/* sitewide-hero-rhythm-20261109:end */

/* magazine-sidebar-shrink-20261109: long translated labels stay inside their grid column. */
.magazine-aligned .article-sidebar { grid-template-columns: minmax(0, 1fr); }
.magazine-aligned .article-sidebar > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
