:root {
  --cassiopeia-color-primary: #0688b8;
  --cassiopeia-color-link: #046f99;
  --cassiopeia-color-hover: #034e6c;
  --kk-surface: #ffffff;
  --kk-border: #dfe8ed;
  --kk-shadow: 0 12px 34px rgba(18, 49, 64, 0.09);
}

body.site {
  background: #f3f7f9 url('/images/bg2.jpg') center top / cover fixed no-repeat;
  color: #24343c;
}

.container-header {
  background: linear-gradient(118deg, #071d28 0%, #07445e 62%, #0688b8 100%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

.container-header .navbar-brand img {
  width: auto;
  max-height: 76px;
  filter: brightness(0) invert(1);
}

.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span {
  font-weight: 650;
  letter-spacing: 0.015em;
}

.site-grid > .grid-child,
.container-component {
  max-width: 1200px;
}

main {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--kk-border);
  border-radius: 12px;
  box-shadow: var(--kk-shadow);
  margin-block: 1.5rem 2.5rem;
  padding: clamp(1rem, 2.7vw, 2.5rem);
}

h1,
h2,
h3,
.h1,
.h2,
.h3 {
  color: #123b4c;
}

.legacy-content {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
}

.legacy-content > .legacy-image,
.legacy-content > .legacy-text,
.legacy-content > .legacy-module,
.legacy-content > .legacy-video,
.legacy-content > .legacy-map,
.legacy-content > p {
  grid-column: 1 / -1;
}

.legacy-image {
  margin: 0 0 0.5rem;
  overflow: hidden;
  border-radius: 10px;
}

.legacy-image img {
  display: block;
  width: 100%;
  max-height: 660px;
  object-fit: cover;
}

.legacy-content.legacy-gallery > .legacy-image {
  grid-column: span 6;
  display: flex;
  align-items: center;
  margin: 0;
  background: var(--kk-surface);
  border: 1px solid var(--kk-border);
  box-shadow: 0 6px 18px rgba(18, 49, 64, 0.07);
}

.legacy-content.legacy-gallery-single > .legacy-image {
  grid-column: 1 / -1;
}

.legacy-content.legacy-gallery > .legacy-image img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.legacy-feature {
  grid-column: span 3;
  background: var(--kk-surface);
  border: 1px solid var(--kk-border);
  border-top: 4px solid #10a6d7;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(18, 49, 64, 0.07);
  padding: 1.1rem;
}

.legacy-feature h3 {
  font-size: 1.15rem;
  margin-top: 0;
}

.legacy-text,
.legacy-module,
.legacy-map {
  line-height: 1.7;
}

.legacy-content > .sponsor-card {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1rem;
  background: var(--kk-surface);
  border: 1px solid var(--kk-border);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(18, 49, 64, 0.07);
}

.sponsor-card p:last-of-type {
  margin-bottom: 0;
}

.sponsor-card img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 150px;
  margin-top: auto;
  object-fit: contain;
}

.legacy-content > .sponsor-more {
  grid-column: 1 / -1;
}

.legacy-text img,
.item-page img {
  max-width: 100%;
  height: auto;
}

.legacy-video {
  aspect-ratio: 16 / 9;
}

.legacy-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}

.btn-primary {
  background-color: #0688b8;
  border-color: #0688b8;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #034e6c;
  border-color: #034e6c;
}

@media (max-width: 900px) {
  .legacy-feature,
  .legacy-content > .sponsor-card,
  .legacy-content.legacy-gallery > .legacy-image {
    grid-column: span 6;
  }

  .legacy-content.legacy-gallery-single > .legacy-image {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  body.site {
    background-attachment: scroll;
  }

  main {
    border-radius: 0;
    margin-block: 0.75rem 1.5rem;
  }

  .legacy-feature,
  .legacy-content > .sponsor-card,
  .legacy-content.legacy-gallery > .legacy-image {
    grid-column: 1 / -1;
  }
}
