/* Plain CSS matching the saved site's layout, spacing and colours. */
* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: #666;
  background: #fff;
  font: 300 20px/1.7 Arial, sans-serif;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  color: #333;
  padding-bottom: 10px;
}

h1 {
  font-size: 30px;
  line-height: 1.3;
  font-weight: 700;
}

h2 {
  font-size: 25px;
  line-height: 1;
  font-weight: 500;
}

h3 {
  font-size: 20px;
  line-height: 1;
  font-weight: 500;
}

a {
  color: #2ea3f2;
  text-decoration: none;
}

a:hover {
  opacity: .7;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  font-family: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #2ea3f2;
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.container {
  width: 80%;
  max-width: 1080px;
  margin: auto;
}

.content-row {
  padding: 2% 0;
}

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  top: 5px;
  left: 5px;
  padding: 8px 15px;
  background: #fff;
  z-index: 100;
}

/* Header: original 80px bar, small logo, right-aligned navigation. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  box-shadow: 0 1px 0 #0000001a;
}

.header-inner {
  display: flex;
  align-items: center;
  height: 80px;
  gap: 22px;
}

.logo {
  margin-right: auto;
  line-height: 0;
}

.logo img {
  width: auto;
  height: 43.2px;
}

#navigation {
  display: flex;
  align-items: center;
  gap: 22px;
}

#navigation a {
  color: #0009;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

#navigation a[aria-current] {
  color: #2ea3f2;
}

.icon-button {
  border: 0;
  background: none;
  color: #333;
  padding: 0;
  width: 22px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.menu-toggle {
  display: none;
  color: #2ea3f2;
  width: 32px;
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
}

.site-header.scrolled .header-inner {
  height: 54px;
}

.site-header.scrolled .logo img {
  height: 30px;
}

.search-panel {
  position: absolute;
  inset: 0 0 auto;
  min-height: 80px;
  background: #fff;
  box-shadow: 0 1px 0 #0000001a;
}

.search-panel form {
  position: relative;
  display: flex;
  min-height: 80px;
  align-items: center;
}

.search-panel input {
  width: 100%;
  padding: 12px 40px 12px 0;
  background: none;
  border: 0;
  font-size: 16px;
  color: #333;
}

.search-close {
  position: absolute;
  right: 0;
  font-size: 30px;
}

.search-results:empty {
  display: none;
}

.search-results {
  padding: 10px 0 20px;
  font-size: 16px;
}

.search-results a {
  display: block;
  padding: 5px 0;
}

/* Three photo headers above the original coloured panels. */
.topics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 2560px;
  margin: auto;
}

.topic {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 460px;
}

.topic-image {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 460px;
  object-fit: cover;
  object-position: center;
}

.topic-content {
  flex: 1;
  color: #fff;
  padding: 20px 40px 40px;
  background: #ac1f27;
}

.topic:nth-child(2) .topic-content {
  background: #00003a;
}

.topic:nth-child(3) .topic-content {
  background: #821327;
}

.training .topic:nth-child(2) {
  background: #00003a;
}

.topic h1,
.topic h3 {
  color: #fff;
  text-align: center;
}

.topic-description {
  padding-top: 54px;
}

/* Contact form keeps its original fields and alignment. */
.contact-section {
  padding: 0 0 4%;
}

.contact-title {
  font-size: 26px;
  font-weight: 500;
  padding-bottom: 16px;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #eee;
  color: #555;
  font-size: 14px;
  padding: 16px;
  margin-bottom: 3%;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  opacity: 1;
  color: #999;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3%;
  margin-bottom: 3%;
}

.form-row input {
  margin-bottom: 0;
}

.submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -1.5%;
}

.submit-row button {
  color: #fff;
  background: #ac1f27;
  border: 0;
  border-radius: 0;
  font-size: 20px;
  line-height: 1.7;
  padding: .3em 1em;
}

.submit-row button:hover {
  background: #941a21;
}

.form-notice {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 12px;
  color: #777;
}

.form-status {
  font-size: 14px;
  line-height: 1.7;
  margin-top: 8px;
}

.form-status:empty {
  display: none;
}

.contact-banner {
  max-width: 2560px;
  margin: auto;
  line-height: 0;
}

.contact-banner img {
  display: block;
  width: 100%;
}

/* The original four-column gallery, with 100 photos on each page. */
.gallery-section {
  padding: 4% 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 5.5%;
}

.gallery a {
  display: block;
  margin-bottom: 26.35%;
  line-height: 0;
  position: relative;
}

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 400 / 284;
  object-fit: cover;
}

.gallery a:hover {
  opacity: .8;
}

.gallery-pages {
  border-top: 1px solid #e2e2e2;
  padding-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.gallery-pages button {
  font-size: 14px;
  color: #666;
  padding: 0 3px;
  border: 0;
  background: none;
  min-width: 28px;
  min-height: 32px;
}

.gallery-pages button[aria-current] {
  color: #2ea3f2;
}

.lightbox {
  width: min(1000px, 96vw);
  max-width: 96vw;
  max-height: 95vh;
  padding: 36px 10px 10px;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: visible;
}

.lightbox::backdrop {
  background: #0b0b0be6;
}

.lightbox button {
  border: 0;
  background: none;
  color: #fff;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  font-size: 48px;
}

.lightbox-close {
  position: absolute;
  top: -12px;
  right: 5px;
}

.lightbox-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.lightbox-view img {
  width: calc(100% - 100px);
  height: min(70vh, 650px);
  object-fit: contain;
}

.lightbox p {
  text-align: right;
  padding-right: 50px;
  font-size: 12px;
}

body:has(.lightbox[open]) {
  overflow: hidden;
}

/* News flows left to right, with equal-height cards in each row. */
.news-section {
  padding: 4% 0;
}

.news-section h1 {
  margin-bottom: 2.75%;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 60px 5.5%;
  align-items: stretch;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #d8d8d8;
  background: #fff;
  overflow-wrap: anywhere;
}

.news-card>img {
  display: block;
  width: 100%;
}

.news-copy {
  flex: 1;
  padding: 19px;
  font-size: 14px;
  line-height: 1.7;
}

.news-copy h2 {
  font-size: 18px;
  line-height: 1.3;
  padding-bottom: 10px;
}

.post-meta {
  padding-bottom: 6px;
  font-size: 14px;
}

.news-copy h2 a {
  color: inherit;
}

.news-image-link {
  display: block;
  flex: none;
  line-height: 0;
}

.news-image-link img {
  display: block;
  width: 100%;
  aspect-ratio: 1.6;
  object-fit: cover;
}

.news-status {
  font-size: 14px;
  margin-bottom: 20px;
}

.news-status:empty {
  display: none;
}

.news-article {
  max-width: 800px;
}

.article-image {
  display: block;
  max-height: 500px;
  width: 100%;
  object-fit: contain;
  margin: 25px 0;
}

.article-body {
  color: #666;
  font-size: 18px;
}

.article-body p {
  margin-bottom: 1.3em;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.archive-notice {
  font-size: 14px;
  background: #eee;
  padding: 12px 16px;
  margin: 20px 0;
}

.article-back {
  display: inline-block;
  margin-bottom: 22px;
  font-size: 16px;
}

.site-footer {
  background: #171717;
  color: #666;
  padding: 15px 0 5px;
  font-size: 14px;
  line-height: 1.7;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}

.footer-inner p {
  padding-bottom: 10px;
}

.social-icons {
  display: flex;
  gap: 20px;
  padding-bottom: 10px;
  color: #666;
}

.social-icons span,
.social-icons svg {
  display: block;
  width: 24px;
  height: 24px;
}

.social-icons svg {
  fill: currentColor;
}

@media (min-width: 1350px) {
  .content-row {
    padding: 27px 0;
  }

  .contact-section {
    padding-bottom: 54px;
  }

  .gallery-section,
  .news-section {
    padding: 54px 0;
  }
}

@media (max-width: 980px) {
  .site-header {
    position: relative;
  }

  .site-header.scrolled .header-inner {
    height: 80px;
  }

  .site-header.scrolled .logo img {
    height: 43.2px;
  }

  .header-inner {
    flex-wrap: wrap;
    position: relative;
  }

  .menu-toggle:not([hidden]) {
    display: grid;
  }

  #navigation {
    flex-basis: 100%;
    flex-wrap: wrap;
    padding: 20px 0;
    gap: 20px;
    order: 3;
  }

  body:not(.js) .header-inner {
    height: auto;
    min-height: 80px;
    padding-block: 18px;
  }

  .js #navigation {
    display: none;
  }

  .js #navigation.open {
    display: flex;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 3px solid #2ea3f2;
    box-shadow: 0 2px 5px #0000001a;
    padding: 14px 5%;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }

  #navigation a {
    padding: 12px 0;
  }

  .js #navigation a {
    border-bottom: 1px solid #00000008;
  }

  .topics {
    grid-template-columns: 1fr;
  }

  .topic {
    width: 100%;
  }

  .content-row {
    padding: 30px 0;
  }

  .contact-section {
    padding-bottom: 50px;
  }

  .gallery-section,
  .news-section {
    padding: 50px 0;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 5.5%;
  }

  .gallery a {
    margin-bottom: 18.54%;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    flex-direction: column-reverse;
    gap: 0;
    text-align: center;
  }
}

@media (max-width: 767px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }

  .form-row input {
    margin-bottom: 3%;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .gallery a {
    margin-bottom: 11.64%;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .news-section h1 {
    margin-bottom: 30px;
  }

  .contact-title {
    line-height: 1.3;
  }

  .lightbox-view img {
    width: calc(100% - 88px);
    height: 60vh;
  }

  .lightbox-view {
    gap: 0;
  }
}

@media (max-width: 479px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery a {
    margin-bottom: 11.5%;
  }

  .topic-content {
    padding-inline: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

/* Photo years use the original gallery grid and colours. */
.gallery-intro {
  font-size: 16px;
  margin-bottom: 22px;
}

.gallery-status {
  font-size: 14px;
  margin-bottom: 18px;
}

.gallery-status:empty {
  display: none;
}

.gallery-years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 36px;
}

.gallery-years button,
.gallery-retry,
.gallery-more-year {
  font: inherit;
  font-size: 14px;
  min-height: 42px;
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
  padding: 8px 15px;
  cursor: pointer;
}

.gallery-years button[aria-pressed=true] {
  color: #fff;
  background: #ac1f27;
  border-color: #ac1f27;
}

.gallery-year {
  margin-bottom: 35px;
}

.gallery-year-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 12px;
  margin-bottom: 30px;
}

.gallery-year-heading h2 {
  padding: 0;
  font-size: 26px;
}

.gallery-year-heading span {
  font-size: 14px;
}

.gallery-more-year {
  display: block;
  margin: 0 auto 35px;
}

.gallery-section .lightbox p {
  overflow-wrap: anywhere;
}

/* Optional contact details are grouped beside the contact-page-only form. */
.contact-page {
  padding: 36px 0 48px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 48px;
  margin-top: 28px;
}

.contact-layout:has(#contact-compose[hidden]) {
  grid-template-columns: 1fr;
}

#contact-info {
  margin: 20px 0;
  font-size: 16px;
  overflow-wrap: anywhere;
}

#contact-info dt {
  font-weight: 700;
  color: #333;
  margin-top: 20px;
}

#contact-info dd {
  margin: 4px 0 0;
}

.contact-address p {
  white-space: pre-line;
}

.contact-address a {
  display: inline-block;
  margin-top: 8px;
}

.contact-socials,
.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.contact-socials {
  margin-top: 28px;
  font-size: 16px;
}

.social-icons a {
  font-size: 14px;
  color: inherit;
  text-decoration: underline;
}

.contact-retry {
  font: inherit;
  font-size: 14px;
  padding: 8px 15px;
  background: #fff;
  border: 1px solid #ddd;
  color: #666;
}

@media (max-width: 800px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
