/* Video previews use a shared landscape frame; the player keeps the source ratio. */
.films-section { padding-block: clamp(50px, 6vw, 84px); background: #f2f6fa; }
.footage-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 30px;
  margin-bottom: clamp(22px, 3vw, 38px);
}
.footage-heading h2 { margin: 0 0 10px; font-size: clamp(30px, 3.3vw, 48px); font-weight: 700; }
.footage-heading p { margin: 0; color: #455f78; font-size: clamp(16px, 1.25vw, 18px); }
.footage-heading .text-link { margin: 0; color: #154e89; font-size: 16px; }

.footage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.1vw, 32px);
}
.footage-grid:has(> :nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.footage-grid article { min-width: 0; }
.footage-card {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid #dae4ee;
  border-radius: 4px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.footage-card:hover { border-color: #94aec9; box-shadow: 0 8px 22px #102b4712; }
.footage-card:focus-visible { outline: 2px solid #154e89; outline-offset: 4px; }
.footage-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #d6e1eb; }
.footage-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; transition: transform .28s; }
.footage-card:hover img { transform: scale(1.025); }
.footage-play,
.footage-duration {
  position: absolute;
  bottom: 12px;
  background: #0b253de6;
  color: #fff;
}
.footage-play {
  display: grid;
  place-items: center;
  inset-inline-start: 12px;
  width: 43px;
  height: 43px;
  border: 1px solid #ffffff9c;
  border-radius: 50%;
}
.footage-play::after {
  content: '';
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #fff;
}
.footage-duration { inset-inline-end: 12px; padding: 3px 8px; border-radius: 2px; font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.footage-copy { padding: clamp(15px, 1.7vw, 24px); }
.footage-copy h3 { margin: 0 0 7px; color: #102b47; font-size: clamp(18px, 1.65vw, 24px); font-weight: 700; line-height: 1.35; }
.footage-copy p { margin: 0; color: #455f78; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.6; }

html:has(#footage-player[open]) { overflow: hidden; }
#footage-player {
  width: min(900px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: clamp(12px, 2vw, 22px);
  overflow: auto;
  border-radius: 4px;
  background: #102b47;
  color: #fff;
}
#footage-player[data-orientation="portrait"] { width: min(510px, calc(100% - 24px)); }
#footage-player::backdrop { background: #04182de6; }
.footage-player-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
#footage-title { margin: 0; font-size: clamp(18px, 2.2vw, 26px); font-weight: 700; line-height: 1.25; }
.footage-close { flex: 0 0 44px; height: 44px; padding: 0; border: 1px solid #ffffff72; border-radius: 2px; background: transparent; color: #fff; font-size: 28px; line-height: 1; }
.footage-close:hover { background: #294965; }
#footage-player video { display: block; width: 100%; max-height: 70dvh; margin: 0 auto; aspect-ratio: 16 / 9; object-fit: contain; background: #061a2c; direction: ltr; }
#footage-player[data-orientation="portrait"] video { width: min(100%, calc(70dvh * .5625)); aspect-ratio: 9 / 16; }
.footage-direct { display: table; margin: 10px auto 0; padding: 4px 6px; color: #e1ecf7; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1050px) {
  .footage-grid:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .footage-grid, .footage-grid:has(> :nth-child(4)) { grid-template-columns: minmax(0, 1fr); }
  .footage-heading { align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  .footage-card, .footage-cover img { transition: none; }
  .footage-card:hover img { transform: none; }
}

/* Catalogue cards and reader. */
.catalog-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 30px);
  align-items: stretch;
}
#catalog .section-heading h2 { font-size: clamp(38px, 4.3vw, 66px); font-weight: 730; }
#catalog .section-heading .text-link { color: #154e89; font-size: 16px; }
#catalog .section-links :is(.btn, .text-link) { font-size: 16px; }
.catalogue-download { display: flex; justify-content: end; margin-bottom: 24px; }
.catalogue-download .btn { background: #154e89; border-color: #154e89; color: #fff; font-size: 16px; }
.catalog-grid > .catalog-card {
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d3e0ec;
  border-radius: 2px;
  background: #fff;
  color: #102d50;
  text-align: start;
  transition: border-color .2s, box-shadow .2s;
}
.catalog-grid > .catalog-card:hover { border-color: #1254a0; box-shadow: 0 10px 25px #102d5014; }
.catalog-grid > .catalog-card:focus-visible { outline: 3px solid #1254a0; outline-offset: 3px; }
#catalog [hidden] { display: none; }
.catalog-sheet {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  background: #e5e9e1;
  border-radius: 2px;
  isolation: isolate;
}
.catalog-sheet .catalog-photo {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  inset: 0;
}
.catalog-grid .catalog-sheet, .catalog-enlarged .catalog-sheet { padding: 0; }
.catalog-grid .catalog-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px 12px;
  padding: clamp(13px, 1.5vw, 22px);
  color: #102d50;
  line-height: 1.3;
  letter-spacing: normal;
}
.catalog-card-meta > strong { font-size: clamp(20px, 2.1vw, 29px); font-weight: 740; }
.catalog-grid .catalog-card-meta > span {
  padding: 0;
  color: #1254a0;
  font-size: clamp(16px, 1.23vw, 18px);
  font-weight: 650;
  letter-spacing: normal;
}
.catalog-card-meta b { margin-inline-start: 3px; font-weight: inherit; }

dialog.catalog-viewer {
  width: min(720px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: clamp(14px, 2vw, 24px);
  overflow: auto;
  border-radius: 4px;
  background: #f3f7fb;
}
dialog.catalog-viewer::backdrop { background: #061c32e0; }
.catalog-viewer #detail-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; width: 100%; }
.catalog-viewer .close {
  display: grid;
  place-items: center;
  top: 12px;
  right: auto;
  inset-inline-end: 12px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ccdceb;
  border-radius: 2px;
  background: #fff;
  color: #102d50;
  line-height: 1;
}
.catalog-viewer-title {
  min-height: 36px;
  margin: 0;
  padding-inline-end: 48px;
  color: #102d50;
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 740;
  line-height: 1.2;
}
html.catalog-is-open { overflow: hidden; }
.catalog-enlarged { min-width: 0; display: flex; justify-content: center; align-items: center; }
.catalog-enlarged .catalog-sheet {
  flex: 0 0 auto;
  width: clamp(0px, calc((100dvh - 218px) * .707), 100%);
  min-width: min(124px, 100%);
  max-width: 590px;
  box-shadow: 0 8px 26px #102d5026;
}
.catalog-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px clamp(5px, 2vw, 18px);
  width: 100%;
  color: #102d50;
  line-height: 1.25;
}
.catalog-tools button {
  min-height: 46px;
  padding: 6px clamp(5px, 1.5vw, 14px);
  border: 1px solid #b5cce2;
  border-radius: 2px;
  background: #fff;
  color: #1254a0;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 650;
  line-height: 1.2;
}
.catalog-tools button:enabled:hover, .catalog-viewer .close:hover { background: #e0edfb; }
.catalog-tools button:disabled { color: #52677d; border-color: #dce5ee; background: #eef3f8; cursor: default; }
.catalog-viewer :is(a, button):focus-visible { outline: 2px solid #1254a0; outline-offset: 2px; }
.catalog-page-count { font-size: clamp(19px, 2.75vw, 24px); font-weight: 740; font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; }
.catalog-original { grid-column: 1 / -1; justify-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding-inline: 8px; color: #1254a0; font-size: 16px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1100px) {
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .homepage .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .catalog-grid { gap: 12px; }
}
@media (max-width: 340px) {
  .catalog-grid, .homepage .catalog-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-grid > .catalog-card { transition: none; }
}
