/* News 페이지 (소식 목록 + 사진 기록). 색·모서리는 site.css 변수만 쓴다. 사진 카드는 gallery.js 가 만든다. */

/* 검색 줄 (Projects · Publications 와 같은 모양) */

/* 소식 종류 · 연도 고르기: 글자만, 고른 것은 남색 밑줄 (Projects 탭과 같은 모양) */

/* 소식 목록: 날짜 | 내용. 10개씩 페이지 나누기(site.js), 연도 제목은 쪽 안의 구분선 */
.news-archive { margin-top: 20px; border-top: 1px solid var(--line); }
.news-year[hidden] { display: none; }
.news-year h3 { padding: 28px 0 10px; border-bottom: 1px solid var(--navy); font-size: 20px; font-variant-numeric: tabular-nums; }
.news-original-item { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.news-original-item[hidden] { display: none; }
.news-original-item time { color: var(--muted); font-variant-numeric: tabular-nums; }
/* 종류는 글자로 넣지 않고 표시만 (members.js 가 소식 글자를 읽기 때문) */
.news-original-item time::after { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.news-original-item[data-category="PUBLICATIONS"] time::after { content: '논문'; }
.news-original-item[data-category="CONFERENCE"] time::after { content: '학회 발표'; }
.news-original-item[data-category="AWARDS"] time::after { content: '수상'; }
.news-original-item[data-category="NEW MEMBERS"] time::after { content: '새 구성원'; }
.news-original-item[data-category="LAB NEWS"] time::after { content: '연구실 소식'; }
.news-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 13.5px; }
.news-links a { color: var(--muted); border-bottom: 1px solid var(--line); transition: color .2s ease, border-color .2s ease; }
.news-links a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* 사진 기록 */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; margin-top: 20px; scroll-margin-top: 88px; }   /* 쪽을 넘기면 격자 맨 위로 — 머리글에 가리지 않게 */
/* 사진 기록도 소식 목록처럼 높이를 고정한 상자 안에서 스크롤 — 행사가 늘어도 페이지 길이는 그대로 */
.gallery-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.gallery-cover { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; padding: 0; border: 0; background: var(--bg2); overflow: hidden; cursor: zoom-in; }
.gallery-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-cover:hover img { transform: scale(1.03); }
.gallery-cover-empty { display: grid; place-items: center; color: var(--muted); font-size: 14px; cursor: default; }
.gallery-cover-count { position: absolute; right: 10px; bottom: 10px; padding: 2px 10px; border-radius: 999px; background: rgba(9,34,61,.75); color: #fff; font-size: 12.5px; }
.gallery-card-body { padding: 16px 18px 20px; }
.gallery-card-meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gallery-card h3 { margin-top: 4px; font-size: 16.5px; }
.gallery-description { margin-top: 6px; font-size: 14px; color: var(--ink); }

/* 사진 크게 보기 */
/* 사진 창: People 실적 창(members.css .member-dialog)과 같은 모양 — 흰 상자, 제목 줄 + 둥근 ×, 같은 그림자·어두운 바탕. 열림 효과는 site.css 의 dialog 공통 */
.gallery-lightbox { width: min(960px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: var(--radius); background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(9,34,61,.25); }
.gallery-lightbox[open] { display: flex; flex-direction: column; }
.gallery-lightbox::backdrop { background: rgba(9,34,61,.45); }
.gallery-lightbox-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.gallery-lightbox-caption { margin: 0; font-size: 18px; font-weight: 600; color: var(--ink); }
.gallery-lightbox-close { flex: none; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); font: inherit; font-size: 20px; line-height: 1; color: var(--navy); cursor: pointer; }
.gallery-lightbox-close:hover { border-color: var(--navy); }
.gallery-lightbox-frame { position: relative; background: var(--bg2); }
.gallery-lightbox-image { display: block; width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.gallery-lightbox-step { position: absolute; top: calc(50% - 20px); z-index: 1; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--navy); font-size: 0; cursor: pointer; opacity: .85; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 3px #fff); transition: opacity .2s ease; }   /* 꺾쇠만 (.rail-btn 과 같은 모양). 세로 사진은 양옆이 밝은 바탕이라 남색 + 흰 테 — 어두운 사진 위에서도 보임 */
.gallery-lightbox-step::before { content: ''; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; }
.gallery-lightbox-step.prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.gallery-lightbox-step.next::before { transform: translate(-70%, -50%) rotate(45deg); }
.gallery-lightbox-step:hover { opacity: 1; }
.gallery-lightbox-step.prev { left: 4px; }
.gallery-lightbox-step.next { right: 4px; }
.gallery-lightbox-step[hidden] { display: none; }
/* 사진 아래 여백 + 점(사진 수만큼): 누르면 그 사진으로 */
.gallery-lightbox-foot { display: flex; justify-content: center; gap: 10px; min-height: 10px; padding: 16px 24px 20px; }
.gallery-lightbox-foot button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; transition: background .2s ease; }
.gallery-lightbox-foot button:hover { background: var(--muted); }
.gallery-lightbox-foot button.is-on { background: var(--navy); }

@media (max-width: 860px) {
  .news-original-item { grid-template-columns: 1fr; gap: 4px; }
  .news-original-item time::after { display: inline; margin-left: 8px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
