/* The same masthead is used by the classic and unified public templates. */
.fm-header > .fm-header-top,
.fm-unified-header > .fm-unified-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px) minmax(0, 1fr);
  align-items: center;
  gap: 12px 20px;
}
.fm-header-top > .fm-masthead-brand,
.fm-unified-top > .fm-masthead-brand {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  min-width: 0;
}
.fm-header-top > .fm-masthead-about,
.fm-unified-top > .fm-masthead-about {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  display: block;
  width: 100%;
  max-width: 420px;
  min-width: 0;
  line-height: 0;
  border-radius: 4px;
  text-decoration: none;
}
.fm-masthead-about > img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 5 / 1;
  object-fit: contain;
  border-radius: 4px;
}
.fm-header-top > .fm-unified-languages,
.fm-unified-top > .fm-unified-languages,
.fm-header-top > .fm-languages {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  justify-content: flex-end;
  margin-inline: 0;
  width: auto;
  min-width: 0;
  flex-wrap: wrap;
}
.fm-header-top > .fm-menu-toggle {
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
}
.fm-header .fm-masthead-about:focus-visible,
.fm-unified-header .fm-masthead-about:focus-visible {
  outline: 3px solid #f1d59b;
  outline-offset: 5px;
}
/* Equal outside columns keep the banner centered, independently of language. */
@media (max-width: 1100px) {
  .fm-header > .fm-header-top,
  .fm-unified-header > .fm-unified-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 12px;
  }
  .fm-header-top > .fm-masthead-about,
  .fm-unified-top > .fm-masthead-about {
    grid-column: 1 / -1;
    grid-row: 1;
    width: min(100%, 420px);
  }
  .fm-header-top > .fm-masthead-brand,
  .fm-unified-top > .fm-masthead-brand {
    grid-column: 1;
    grid-row: 2;
  }
  .fm-header-top > .fm-unified-languages,
  .fm-unified-top > .fm-unified-languages,
  .fm-header-top > .fm-languages {
    grid-column: 2;
    grid-row: 2;
  }
  .fm-header-top > .fm-menu-toggle {
    grid-column: 2;
    grid-row: 3;
  }
}
@media (max-width: 700px) {
  .fm-header > .fm-header-top,
  .fm-unified-header > .fm-unified-top {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 10px;
    padding-block: 14px;
  }
  .fm-header-top > .fm-masthead-about,
  .fm-unified-top > .fm-masthead-about {
    width: min(100%, 360px);
  }
  .fm-header-top > .fm-masthead-brand,
  .fm-unified-top > .fm-masthead-brand {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
  }
  .fm-header-top > .fm-unified-languages,
  .fm-unified-top > .fm-unified-languages,
  .fm-header-top > .fm-languages {
    grid-column: 1;
    grid-row: 3;
    justify-self: center;
    justify-content: center;
    width: 100%;
    border-block-start: 0;
    padding-block-start: 0;
  }
  .fm-header-top > .fm-menu-toggle {
    grid-column: 1;
    grid-row: 4;
    margin-inline: 0;
  }
}
@media print {
  .fm-masthead-about { display: none !important; }
}
/* Keep the navigation labels readable on the narrowest phone widths. */
@media (max-width: 360px) {
  .fm-unified-main > .fm-unified-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
