.gallery-page {
  background: #f6fafc;
}

.gallery-page :is(.listing-hero, .gallery-hero, .download-hero) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-bottom: 96px;
  background: linear-gradient(115deg, #064b92, #087fba 58%, #009b9d);
}

.gallery-page :is(.listing-hero, .gallery-hero, .download-hero)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("body-contours.svg?v=2") center / 640px 480px repeat;
  opacity: 0.16;
  pointer-events: none;
}

.gallery-page :is(.listing-hero, .gallery-hero, .download-hero)::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, #76bddb, #00c4b3, #76bddb);
}

.gallery-page :is(.listing-hero, .gallery-hero, .download-hero) h1 {
  text-shadow: none;
  line-height: 1.35;
}

.gallery-page .listing-hero p {
  opacity: 0.92;
}

.gallery-page .listing-main {
  padding-top: 0;
}

.gallery-page .filters {
  position: relative;
  margin-top: -28px;
  margin-bottom: 36px;
  padding: 14px;
  background: #fff;
  border: 1px solid #dfedf3;
  border-radius: 18px;
  box-shadow: 0 12px 36px #064b9210;
  scrollbar-width: thin;
}

.gallery-page .filter {
  padding: 9px 20px;
  background: #f5fafc;
  border-color: transparent;
  color: #31566e;
  transition: background 0.2s, color 0.2s;
}

.gallery-page .filter:hover {
  background: #e6f5fa;
  color: #0066cc;
}

.gallery-page .filter.active {
  color: #fff;
  background: linear-gradient(110deg, #0066cc, #008d9e);
  box-shadow: 0 4px 12px #0066cc25;
}

.gallery-page .card-grid {
  gap: 26px;
}

.gallery-page .card {
  display: flex;
  flex-direction: column;
  border-color: #dfedf3;
  border-radius: 18px;
  box-shadow: 0 6px 24px #064b9208;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.gallery-page .card:hover {
  border-color: #96d2e5;
  box-shadow: 0 16px 36px #064b9218;
}

.gallery-page .cover img {
  transition: transform 0.4s;
}

.gallery-page .card:hover .cover img {
  transform: scale(1.04);
}

.gallery-page .card .body {
  flex: 1;
  padding: 22px;
}

.gallery-page .category,
.gallery-page .crumb {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  color: #08798c;
  background: #e9f8f8;
}

.gallery-page .body h2 {
  margin-block: 14px;
  color: #153d57;
  line-height: 1.7;
}

.gallery-page .count {
  padding-top: 12px;
  border-top: 1px solid #edf4f7;
  color: #5d788a;
}

.gallery-page .pager a {
  border: 1px solid #c8e4ef;
  background: #fff;
}

.gallery-page .pager a:hover {
  background: #eaf7fc;
}

.gallery-page .crumb {
  border: 1px solid #ffffff40;
  color: #fff;
  background: #ffffff18;
  opacity: 1;
}

.gallery-page .photo-card {
  border: 1px solid #d9eaf1;
  border-radius: 18px;
}

.gallery-page .intro {
  padding-inline-start: 20px;
  border-inline-start: 3px solid #00a6b5;
}

.downloads-page .card {
  flex-direction: row;
  padding: 24px;
  gap: 18px;
}

.downloads-page .card > div:last-child {
  flex: 1;
  min-width: 0;
}

.downloads-page :is(.icon, .file-icon) {
  color: #007f9a;
  background: linear-gradient(135deg, #e7f5fd, #e1f7f2);
  border: 1px solid #cce8ef;
}

.downloads-page .icon {
  font-family: system-ui, sans-serif;
  font-size: 1.7rem;
}

.downloads-page .card h2 {
  margin-block: 14px;
  color: #153d57;
  line-height: 1.7;
}

.downloads-page .file-card {
  padding: 24px;
  border-color: #dfedf3;
  box-shadow: 0 6px 24px #064b9208;
}

.downloads-page .file-name {
  color: #153d57;
}

.downloads-page .file-actions a {
  min-height: 44px;
  padding-inline: 20px;
}

.downloads-page .file-actions .save {
  background: linear-gradient(110deg, #0066cc, #008d9e);
  box-shadow: 0 4px 12px #0066cc20;
}

.downloads-page .file-actions .view {
  color: #0066cc;
  background: #f5fafc;
  border-color: #c8e4ef;
}

.downloads-page .file-actions a:hover {
  filter: brightness(0.95);
}

@media (max-width: 600px) {
  .gallery-page :is(.listing-hero, .gallery-hero, .download-hero) {
    padding-bottom: 68px;
  }

  .gallery-page .filters {
    margin-bottom: 24px;
    padding: 10px;
  }

  .gallery-page .card-grid {
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-page .card,
  .gallery-page .cover img {
    transition: none;
    transform: none !important;
  }
}
