/* Extra styles for news/gallery pages only */

/* Site header & footer (all pages except index) */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.78);
  border-bottom: 1px solid #333;
}

.site-header.is-scrolled {
  background: rgba(0, 0, 0, 0.92);
}

.site-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-logo {
  display: inline-block;
}

.site-logo img {
  display: block;
  height: 32px;
  width: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.site-nav a {
  color: #838383;
  text-decoration: none;
  border: 1px solid #333;
  padding: 6px 10px;
  line-height: 18px;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid #333;
  margin-top: 22px;
}

.site-footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 16px;
  box-sizing: border-box;
  text-align: center;
  color: #838383;
  font-size: 12px;
}

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  box-sizing: border-box;
}

.page-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.page-header a {
  color: #838383;
  text-decoration: none;
  border: 1px solid #333;
  padding: 6px 10px;
  line-height: 18px;
}

.page-header a:hover {
  text-decoration: underline;
}

.page-title {
  margin: 12px 0 8px;
  font-size: 20px;
  line-height: 28px;
  font-weight: bold;
  color: #838383;
}

/* Channel box (gallery top tabs + multi-row links) */

.channel-box {
  border: 1px solid #333;
  box-sizing: border-box;
  margin: 8px 0 14px;
}

.channel-tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #333;
}

.channel-tabs a {
  display: block;
  padding: 12px 26px;
  color: #838383;
  text-decoration: none;
  border-right: 1px solid #333;
  box-sizing: border-box;
}

.channel-tabs a:hover {
  text-decoration: underline;
}

.channel-tabs a.is-active {
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.channel-panel {
  padding: 14px 16px;
}

.channel-row,
.channel-subrow {
  line-height: 30px;
  word-break: break-word;
}

.channel-row a,
.channel-subrow a {
  color: #838383;
  display: inline-block;
  text-decoration: none;
}

.channel-row a:hover,
.channel-subrow a:hover {
  text-decoration: underline;
}

.channel-subrow {
  margin: 10px 0;
  padding: 6px 10px;
  border: 1px solid #333;
  background: rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

.channel-subrow a.is-selected {
  text-decoration: underline;
}

.sep {
  margin: 0 10px;
  color: #555;
}

/* News */

.news-layout {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.news-left {
  flex: 0 0 260px;
  border: 1px solid #333;
  box-sizing: border-box;
}

.news-left-title {
  padding: 10px 12px;
  border-bottom: 1px solid #333;
  background: rgba(255, 255, 255, 0.04);
}

.news-list {
  padding: 8px 0;
}

.news-list a {
  display: block;
  padding: 10px 12px;
  color: #838383;
  text-decoration: none;
}

.news-list a:hover {
  text-decoration: underline;
}

.news-list a.is-active {
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.news-right {
  flex: 1 1 auto;
  border: 1px solid #333;
  box-sizing: border-box;
  padding: 14px 16px;
}

.news-detail-title {
  font-size: 18px;
  line-height: 26px;
  font-weight: bold;
  margin-bottom: 10px;
}

.news-detail-body p {
  margin: 0 0 10px;
}

@media (max-width: 760px) {
  .news-layout {
    flex-direction: column;
  }

  .news-left {
    flex-basis: auto;
  }
}

.news-hero {
  width: 100%;
  margin: 8px 0 14px;
  border: 1px solid #333;
  box-sizing: border-box;
}

.news-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.news-meta {
  margin-bottom: 12px;
}

.news-content {
  border-top: 1px solid #333;
  padding-top: 12px;
}

/* Author */

.author-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border: 1px solid #333;
  padding: 16px;
  box-sizing: border-box;
}

.author-photo {
  flex: 0 0 320px;
  border: 1px solid #333;
  box-sizing: border-box;
}

.author-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.author-content {
  flex: 1 1 auto;
}

.author-content p {
  margin: 0 0 10px;
}

@media (max-width: 760px) {
  .author-layout {
    flex-direction: column;
  }

  .author-photo {
    flex-basis: auto;
    width: 100%;
    max-width: 420px;
  }
}

/* Gallery */

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}

.gallery-item {
  width: 25%;
  padding: 8px;
  box-sizing: border-box;
  text-decoration: none;
  color: #838383;
}

.thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid #333;
  box-sizing: border-box;
  display: block;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
}

/* Fallback for older browsers without aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
  .thumb {
    height: 0;
    padding-top: 100%;
  }
}

.thumb img {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-caption {
  display: block;
  margin-top: 6px;
}

.lightbox {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-inner {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  border: 1px solid #333;
}

.lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: 86vh;
}

.lightbox-hint {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  color: #838383;
  font-size: 12px;
}
