﻿:root {
  --bg: #ffffff;
  --bg-soft: #f3f9ff;
  --primary: #8ec9ff;
  --primary-deep: #5faeea;
  --text: #203247;
  --text-soft: #5c728a;
  --shadow: 0 10px 30px rgba(69, 128, 180, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --header-height: 72px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #eaf6ff 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, #f2f9ff 0%, transparent 25%),
    var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 10px;
  background: #fff;
  color: #0d2742;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 2000;
}

.skip-link:focus {
  top: 10px;
}

.site-header,
main,
.site-footer {
  width: min(100% - 24px, var(--container));
  margin: 0 auto;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 250, 255, 0.96) 100%);
  backdrop-filter: blur(8px);
  border: 1px solid #d9ecff;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 14px;
}

.nav-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-links a {
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 999px;
  color: #2a4d70;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: #e8f4ff;
  outline: none;
}

.section-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  border: 1px solid #dcedff;
  box-shadow: var(--shadow);
  margin-top: 22px;
  padding: clamp(16px, 3vw, 28px);
}

.hero {
  margin-top: 18px;
  text-align: center;
  padding-block: clamp(20px, 6vw, 56px);
}

.eyebrow {
  margin: 0;
  color: var(--primary-deep);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.hero h1 {
  margin: 8px 0 10px;
  line-height: 1.25;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.hero p {
  margin: 0 auto;
  max-width: 760px;
}

.hero-note {
  margin-top: 12px;
  color: #3d6a92;
  font-weight: 500;
}

.section-head h2,
.raw-section h2,
.faq h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

.section-head p {
  margin-top: 0;
  color: var(--text-soft);
}

.controls {
  display: grid;
  gap: 12px;
  margin-block: 16px 12px;
}

.control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn,
.btn,
.sort-select,
.search-input {
  font: inherit;
}

.filter-btn,
.btn {
  border: 1px solid #c6e4ff;
  background: #f6fbff;
  color: #1f4f77;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.filter-btn:hover,
.btn:hover,
.filter-btn:focus-visible,
.btn:focus-visible {
  background: #e5f3ff;
  transform: translateY(-1px);
  outline: none;
}

.filter-btn.active,
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.control-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.search-input,
.sort-select {
  border: 1px solid #c6e4ff;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  background: #fff;
  color: #17344d;
}

.search-input:focus-visible,
.sort-select:focus-visible {
  outline: 2px solid #8ec9ff;
  outline-offset: 1px;
}

.gallery-grid {
  columns: 2;
  column-gap: 12px;
  min-height: 180px;
}

.gallery-card {
  break-inside: avoid;
  margin: 0 0 12px;
  border: 1px solid #d8ecff;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  position: relative;
}

.image-wrap {
  position: relative;
  background: #eef7ff;
  min-height: 120px;
}

.gallery-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-image.is-loaded {
  opacity: 1;
}

.skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #ebf5ff 25%, #dfefff 37%, #ebf5ff 63%);
  background-size: 400% 100%;
  animation: shimmer 1.1s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.card-body {
  padding: 10px;
}

.card-caption {
  margin: 0 0 8px;
  font-weight: 500;
  color: #20496f;
}

.card-meta {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.download-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #c6e4ff;
  border-radius: 50%;
  text-decoration: none;
  background: #f4faff;
  color: #21557f;
  box-shadow: 0 4px 12px rgba(69, 128, 180, 0.14);
}

.download-logo::before {
  content: "\2193";
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.download-logo:hover,
.download-logo:focus-visible {
  background: #e5f3ff;
  border-color: #8ec9ff;
  outline: none;
}

.photo-open {
  all: unset;
  cursor: zoom-in;
  display: block;
}

.gallery-actions {
  display: grid;
  justify-items: center;
  margin-top: 8px;
  gap: 8px;
}

.gallery-status {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.raw-section p {
  margin-top: 0;
}

.muted-note {
  color: var(--text-soft);
  font-size: 0.92rem;
  padding: 10px 0px;
}

.faq details {
  border: 1px solid #d9ecff;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0;
  background: #fafdff;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  border: 1px solid #b9ddff;
  background: #ffffff;
  border-radius: 999px;
  width: 48px;
  height: 48px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  cursor: pointer;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 34, 51, 0.9);
  display: none;
  place-items: center;
  z-index: 1200;
  padding: 16px;
}

.lightbox.open {
  display: grid;
}

.lightbox-content {
  position: relative;
  width: min(100%, 980px);
  max-height: 92vh;
  background: #0f2637;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 14px;
}

.lightbox figure {
  margin: 0;
}

#lightbox-image {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  background: #0b1d2b;
}

#lightbox-caption {
  color: #d5ebff;
  margin-top: 8px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
}

.lightbox-close {
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
}

.lightbox-nav.prev {
  left: 10px;
}

.lightbox-nav.next {
  right: 10px;
}

#lightbox-download {
  display: inline-flex;
}

.lightbox-download-logo {
  position: absolute;
  top: 10px;
  right: 56px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.lightbox-download-logo:hover,
.lightbox-download-logo:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.75);
}

.site-footer {
  text-align: center;
  color: var(--text-soft);
  padding: 24px 0 38px;
}

.site-footer p {
  margin: 4px 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (min-width: 700px) {
  .gallery-grid {
    columns: 3;
  }
}

@media (min-width: 980px) {
  .gallery-grid {
    columns: 4;
  }
}

@media (min-width: 1280px) {
  .gallery-grid {
    columns: 5;
  }
}

@media (max-width: 760px) {
  .nav-links {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 6px;
  }

  .nav-links a {
    padding: 8px 11px;
    font-size: 0.92rem;
  }

  .top-nav {
    min-height: 64px;
    display: flex;
  }

  .control-row {
    justify-content: flex-end;
  }

  .lightbox-nav {
    top: auto;
    bottom: 12px;
    transform: none;
  }

  .lightbox-nav.prev {
    left: 14px;
  }

  .lightbox-nav.next {
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
