/* Content adaptation: keep the original palette, type scale, grid and breakpoints. */
#wrapper section > header,
#wrapper section > .content,
#wrapper section > footer {
  min-width: 0;
  overflow-wrap: break-word;
}
#wrapper section > .content > h3 {
  color: inherit;
}
.image.main img { height: auto; }
.contact-map {
  display: block;
  width: 100%;
  height: 450px;
  border: 0;
}
/* Preserve the alpha channel and show the entire supplied portrait. */
#wrapper > section.intro > .content {
  min-height: 100vh;
  height: 100%;
  align-self: stretch;
}
.image.fill.hero-portrait img {
  object-fit: contain;
  object-position: center bottom;
}
#wrapper ul.actions {
  flex-wrap: wrap;
  row-gap: 1rem;
}
#wrapper .button {
  max-width: 100%;
  height: auto;
  white-space: normal;
  background-color: #c0041e;
  border: 2px solid #fff;
  border-radius: 0.75rem;
  box-shadow: none;
  color: #fff !important;
  text-transform: uppercase;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
#wrapper .button:hover,
#wrapper .button:focus-visible,
#wrapper .button:active {
  background-color: #fff;
  border-color: #c0041e;
  color: #c0041e !important;
  box-shadow: none;
}
#wrapper .button:focus-visible {
  outline: 2px solid #c0041e;
  outline-offset: 3px;
}
/* Wide photos retain the complete teaching scene; portrait slots keep their grid. */
.gallery > a.landscape img {
  height: auto;
  min-height: 0;
}
.gallery > a:not(.landscape) img { object-position: center; }
@media screen and (max-width: 1152px) {
  #wrapper > section.intro > .content {
    min-height: 0;
    height: auto;
    aspect-ratio: 1123 / 1401;
  }
}
/* Let the longer required H1 use the available space inside the existing left column. */
@media screen and (min-width: 1153px) {
  #wrapper > section.intro > header { padding-left: 2rem; }
  #wrapper > section.intro > header > h1 { width: 100%; max-width: none; }
}
/* Keep bodies and teaching gestures intact in narrow two-column gallery slots. */
.gallery > a:not(.landscape) img {
  height: auto;
  min-height: 0;
}
@media screen and (min-width: 1153px) and (max-width: 1280px) {
  #wrapper > section.intro > header { padding-left: 0.5rem; padding-right: 7rem; }
  #wrapper > section.intro > header > h1::before { right: -3rem; width: 2rem; }
  #wrapper > section.intro > header > h1::after { right: -1rem; }
}
@media screen and (max-width: 736px) {
  #wrapper > section.intro > header > h1 { width: calc(100% + 0.5rem); }
}

@media screen and (min-width: 737px) and (max-width: 1152px) {
  #wrapper > section.intro > header > h1 { max-width: 26rem; }
}
/* Keep the original connector aligned after widening only the hero text area. */
@media screen and (min-width: 1153px) {
  #wrapper > section.intro > header::before {
    left: calc(50vw - 5rem);
    margin-left: 0;
  }
}
@media screen and (min-width: 1153px) and (max-width: 1280px) {
  #wrapper > section.intro > header::before { left: calc(50vw - 4rem); }
}

/* Widen only the introductory paragraph by 20%, within the existing column. */
#wrapper > section.intro > header > h1 + p {
  width: 24rem;
  max-width: 100%;
}

/* Training announcements share the existing hero colors and typography. */
#wrapper > section.intro > header > .training-ticker {
  max-width: 100%;
  margin-bottom: 2rem;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  padding: 1.75rem 0;
  min-height: 15.4rem;
}
.training-ticker[hidden],
.training-ticker [hidden] { display: none !important; }
.training-ticker-label { color: inherit; font-size: 1.05rem; }
.training-ticker-list { list-style: none; padding: 0; margin: 0.85rem 0 0; }
.training-ticker-list li { padding: 0; }
.training-ticker-list a { display: block; color: inherit; border: 0; }
.training-ticker-name, .training-ticker-date { display: block; }
.training-ticker-name { font-weight: 600; }
.training-ticker-date { font-size: 0.85rem; }
.training-ticker-list a:hover { text-decoration: underline; }
.training-ticker-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.275rem;
}
.training-ticker-controls button {
  background: transparent;
  border: 1px solid #fff;
  box-shadow: none;
  color: #fff !important;
  min-width: 2.75rem;
  height: 2.75rem;
  line-height: 1;
  padding: 0 0.6rem;
  letter-spacing: 0.05em;
}
.training-ticker-controls button:hover {
  background: #fff;
  color: #c0041e !important;
  box-shadow: none;
}
.training-ticker-counter { font-size: 0.75rem; }
.training-ticker :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media screen and (max-width: 1152px) {
  .training-ticker-controls { justify-content: flex-start; }
}
@media screen and (min-width: 1153px) and (max-width: 1280px) {
  #wrapper > section.intro > header > h1 + p { width: 25.2rem; }
}
@media screen and (max-width: 1152px) {
  #wrapper > section.intro > header > h1 + p {
    width: 100%;
    max-width: 30rem;
  }
}
