:root {
  --bg: #f4f6f8;
  --text: #1a2330;
  --accent: #005c99;
  --surface: #ffffff;
  --border: #d9e0e6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background:
    linear-gradient(rgba(244, 246, 248, 0.9), rgba(244, 246, 248, 0.9)),
    url("/static/logo/logo.png") center / min(70vw, 640px) no-repeat fixed;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.container {
  width: min(1080px, 92%);
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.logo {
  font-size: 1.15rem;
  margin: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
}

main {
  padding: 2rem 0 3rem;
}

h2 {
  margin-top: 0;
}

.hero {
  background: linear-gradient(130deg, #e7f4ff, #ffffff);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.grid-links,
.cards-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stack {
  display: grid;
  gap: 1rem;
}

.search-form {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.search-form input[type="search"] {
  min-width: 220px;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.search-form button {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.news-link {
  color: inherit;
  text-decoration: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.news-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.news-detail {
  max-width: 800px;
}

.news-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.news-authors {
  margin-top: 0.4rem;
  color: #3f4f60;
  font-weight: 600;
}

.news-content {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.news-content p {
  margin: 0;
  flex-basis: 100%;
  white-space: pre-line;
}

.news-image-item {
  margin: 0;
  flex: 1 1 220px;
  max-width: 320px;
}

.news-image {
  width: 100%;
  border-radius: 10px;
  margin: 0;
  border: 1px solid var(--border);
  display: block;
}

.gallery-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.gallery-group-card {
  text-decoration: none;
  color: inherit;
}

.gallery-group-cover {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 0.65rem;
  display: block;
}

.gallery-thumb {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.gallery-thumb img,
.gallery-thumb video {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.gallery-video-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 30;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-modal-content {
  width: min(980px, 96vw);
}

.gallery-expanded {
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
  background: #000;
}

.gallery-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.gallery-nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
}

.gallery-modal.is-open .gallery-nav {
  display: block;
}

.gallery-prev {
  left: 16px;
}

.gallery-next {
  right: 16px;
}

.grid-links .card {
  text-decoration: none;
  color: inherit;
}

.meta {
  color: #526171;
  font-size: 0.92rem;
}

.tag-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1f2d3d;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.price {
  font-weight: 700;
  color: var(--accent);
}

.merch-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  display: block;
}

.person-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.job-card {
  display: flex;
  flex-direction: column;
}

.job-open-btn {
  margin-top: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}

.job-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.job-modal[hidden] {
  display: none;
}

.job-modal-panel {
  width: min(720px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  position: relative;
}

.job-modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  background: #fff;
}

.job-modal-description {
  white-space: pre-line;
}

.job-applicants {
  padding-left: 1.1rem;
}

.job-apply-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.job-apply-form input[type="text"] {
  min-width: 220px;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.job-apply-form button {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
}

.pagination-nav {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.pagination-link {
  display: inline-block;
  text-decoration: none;
  color: var(--accent);
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  background: var(--surface);
}

.pagination-status {
  color: #526171;
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem 0;
  color: #617285;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.footer-block strong {
  color: #2f3f50;
  display: block;
  margin-bottom: 0.25rem;
}

.footer-block p {
  margin: 0.15rem 0;
}

.footer-block a {
  color: var(--accent);
  text-decoration: none;
}

.footer-bottom {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .header-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .footer-bottom {
    margin-top: 0.7rem;
  }
}
