@charset "utf-8";
/* ============================================================
   메인 화면 전용. 색·치수 토큰은 client.css 의 것만 쓴다.
   섹션: .hero → .about-area(소개·공지) → .board-area(일정·역대 학술대회) → .quick → .gallery → .partner-band   (docs/main-site.md)
   영문 메인은 .about-area(소개·역대 학술대회) → .quick … 이다(알림공간이 영문에 없다).
   배경은 흰색과 연한 면을 번갈아 두어 선 없이 구역을 가른다.
   ============================================================ */

/* ── 히어로 슬라이드 ─────────────────────────────────────────
   슬라이드는 grid 한 칸에 겹쳐 두고 .is-on 하나만 보인다(site.js 의 heroSlider()).
   겹쳐 두면 가장 긴 슬라이드가 높이를 정해, 넘어갈 때 아래 내용이 들썩이지 않는다. */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-brand-deep);
  color: var(--color-on-dark);
}

.hero__slides { display: grid; }

.hero__slide {
  position: relative;
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s var(--ease), visibility 0.8s var(--ease);
}
.hero__slide.is-on { opacity: 1; visibility: visible; }

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  transform: scale(1.06);
  transition: transform 7s linear;
}
/* 보이는 동안 천천히 당겨지는 연출 */
.hero__slide.is-on .hero__bg { transform: scale(1); }

.hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-shade);
}
/* 그늘 방향 — 배너마다 admin 에서 고른다(tblHomeBanner.shade). 기본은 왼쪽 */
.hero__slide--shade-right::after { background: var(--hero-shade-right); }
.hero__slide--shade-center::after { background: var(--hero-shade-center); }
.hero__slide--shade-none::after { content: none; }

.hero__inner {
  position: relative;
  z-index: 1;
  padding-top: 40px;
  padding-bottom: 84px;
}

/* 글자는 배경보다 조금 늦게 올라온다 */
.hero__label, .hero__title, .hero__subtitle, .hero__info, .hero__actions {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--reveal-ease), transform 0.6s var(--reveal-ease);
}
.hero__slide.is-on .hero__label,
.hero__slide.is-on .hero__title,
.hero__slide.is-on .hero__subtitle,
.hero__slide.is-on .hero__info,
.hero__slide.is-on .hero__actions { opacity: 1; transform: none; }
.hero__slide.is-on .hero__title { transition-delay: 0.08s; }
.hero__slide.is-on .hero__subtitle { transition-delay: 0.16s; }
.hero__slide.is-on .hero__info { transition-delay: 0.24s; }
.hero__slide.is-on .hero__actions { transition-delay: 0.32s; }

.hero__label {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--color-gold);
  border-radius: var(--radius);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-gold-light);
}

.hero__title {
  max-width: 720px;
  margin-top: 16px;
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hero__subtitle {
  max-width: 620px;
  margin-top: 10px;
  font-size: var(--fs-h3);
  line-height: 1.55;
  color: var(--color-on-dark-sub);
}

.hero__info { display: grid; gap: 2px; margin-top: 16px; }
.hero__info div { display: flex; gap: 16px; }
.hero__info dt { flex: none; min-width: 40px; font-weight: 600; color: var(--color-gold-light); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
/* admin 에서 색을 고른 버튼은 바탕·테두리가 인라인 style 이라 기본 hover 색이 듣지 않는다. 밝기만 살짝 낮춘다 */
.hero__actions .btn[data-custom-color]:hover { filter: brightness(0.9); }

/* '직접 배치' 배너 — admin 에서 끌어 놓은 좌표로 글·버튼을 놓는다(_hero.php 의 --x · --y).
   틀은 넓은 화면의 글 자리 1200 × 425 다. 가로는 틀 폭에 대한 비율로 바꿔 좁아져도 같은 자리에 오고,
   세로는 px 그대로다. 767px 이하에서는 아래 미디어쿼리 밖이라 차례대로 쌓인다.
   admin 미리보기(pages/home-admin.css 의 .home-banner-stage)가 같은 규칙을 복제한다. */
@media (min-width: 768px) {
  .hero__inner--free { padding-top: 0; padding-bottom: 0; }
  .hero__free { position: relative; height: 425px; }
  .hero__free .hero__label,
  .hero__free .hero__title,
  .hero__free .hero__subtitle,
  .hero__free .hero__info,
  .hero__free .hero__actions > .btn {
    position: absolute;
    left: calc(var(--x, 0) * 100% / 1200);
    top: var(--y, 0);
    margin: 0;
  }
  /* 버튼 묶음은 자리를 잡지 않는다. 버튼 하나하나가 틀 기준으로 놓인다 */
  .hero__free .hero__actions { display: contents; }
  .hero__free .hero__actions > .btn { white-space: nowrap; }
  /* 오른쪽으로 옮긴 글이 틀 밖으로 나가지 않게 남은 폭까지만 쓴다 */
  .hero__free .hero__title { max-width: min(720px, calc(100% - var(--x, 0) * 100% / 1200)); }
  .hero__free .hero__subtitle { max-width: min(620px, calc(100% - var(--x, 0) * 100% / 1200)); }
}

/* 넘기기 — 왼쪽 아래에 이전·점·다음·번호 */
.hero__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero__arrow {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-on-dark-line);
  border-radius: 50%;
  transition: border-color 0.2s var(--ease);
}
.hero__arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid var(--color-on-dark);
  border-right: 1.5px solid var(--color-on-dark);
}
.hero__arrow--prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.hero__arrow--next::before { transform: translate(-70%, -50%) rotate(45deg); }
.hero__arrow:hover { border-color: var(--color-on-dark); }

.hero__dots { display: flex; gap: 8px; }
.hero__dots button {
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-on-dark-line);
  transition: width 0.3s var(--ease), background-color 0.3s var(--ease);
}
.hero__dots button.is-on { width: 48px; background: var(--color-gold); }

.hero__count { margin-left: 6px; font-size: var(--fs-xs); letter-spacing: 0.08em; color: var(--color-on-dark-sub); }
.hero__count strong { color: var(--color-on-dark); }

@media (max-width: 1023px) {
  .hero__inner { padding-top: 36px; padding-bottom: 76px; }
  .hero__bg { object-position: 70% center; }
}

@media (max-width: 767px) {
  .hero__inner { padding-top: 28px; padding-bottom: 68px; }
  .hero__subtitle { font-size: var(--fs-body); }
  .hero__info div { flex-direction: column; gap: 0; }
  .hero__actions .btn { flex: 1; }
  .hero__controls { bottom: 22px; }
  .hero__arrow { display: none; }
}

/* ── 섹션 공통 머리(일정·공지) ── */
.block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.block-head__title { margin-top: 6px; font-size: var(--fs-h2); font-weight: 700; line-height: 1.3; }

.block-empty {
  padding: 64px 0;
  border: 1px dashed var(--color-line-strong);
  border-radius: var(--radius);
  text-align: center;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

/* ── 두 칸 줄: 연구회 소개·공지사항 / 연구회 일정·역대 학술대회 (영문 메인은 연구회 소개·역대 학술대회 한 줄) ──
   왼쪽을 넓게(7:5) 두고 두 칸의 높이를 맞춘다. grid 가 두 칸을 같은 높이로 늘이고,
   각 칸 안에서 목록이 남는 높이를 나눠 가져 마지막 줄의 선이 같은 높이에 온다. */
.about-area { padding: var(--section-y) 0; }
.board-area { padding: var(--section-y) 0; background: var(--color-bg-soft); }

.split {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
}
/* 한 줄로 자르는 제목(nowrap)이 칸을 밀어내지 않게 한다. grid 칸의 기본 최소 폭은 내용 폭이다 */
.split > * { min-width: 0; display: flex; flex-direction: column; }
/* 연구회 일정 · 역대 학술대회 줄은 반반 */
.split--half { grid-template-columns: 1fr 1fr; }
.split .block-head { margin-bottom: 18px; }

/* 가장 가까운 일정 하나를 크게 */
.next-event {
  position: relative;
  display: flex;
  flex: none;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-brand);
  color: var(--color-on-dark);
  transition: background-color 0.25s var(--ease);
}
.next-event:hover { background: var(--color-brand-dark); }

/* 오른쪽 아래의 가는 동심원 장식 */
.next-event::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 22px, var(--color-on-dark-line) 22px 23px);
  pointer-events: none;
}

.next-event__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 120px;
  padding: 18px 0;
  border-right: 1px solid var(--color-on-dark-line);
}
.next-event__month { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.2em; color: var(--color-gold-light); }
.next-event__day { font-size: 46px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.next-event__weekday { font-size: var(--fs-xs); color: var(--color-on-dark-sub); }

.next-event__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 20px 26px;
}
.next-event__meta { display: flex; align-items: center; gap: 10px; }
.next-event__dday { font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.04em; color: var(--color-gold-light); }
.next-event__title { margin: 4px 0 4px; font-size: 18px; font-weight: 700; line-height: 1.45; }
.next-event__lines { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.next-event__line { display: flex; align-items: center; gap: 8px; font-size: var(--fs-small); color: var(--color-on-dark-sub); }
.next-event__icon {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--color-gold-light);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 그다음 일정들 — 남는 높이를 나눠 가진다 */
.later-events { flex: 1; display: flex; flex-direction: column; margin-top: 4px; }
.later-events li { flex: 1; display: flex; }
.later-events a {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 20px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--color-line);
}
.later-events__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 64px;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
}
.later-events__date strong { font-size: 19px; line-height: 1.2; color: var(--color-brand); }
.later-events__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.later-events__title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.later-events__place { margin-top: 2px; font-size: var(--fs-small); color: var(--color-text-muted); }
.later-events__dday {
  flex: none;
  padding: 4px 10px;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-text-sub);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.later-events a:hover .later-events__title { color: var(--color-brand); }
.later-events a:hover .later-events__dday { border-color: var(--color-brand); color: var(--color-brand); }

/* 공지 — 줄들이 칸 높이를 고르게 나눠 가진다 */
.notice-list { flex: 1; display: flex; flex-direction: column; border-top: 2px solid var(--color-brand); }
.notice-list li { flex: 1; display: flex; }
.notice-list a {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0; /* 긴 제목(영문 메인의 역대 학술대회)이 줄을 넓혀 화면을 옆으로 밀지 않게 */
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--color-line);
}
.notice-list__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.notice-list a:hover .notice-list__title { color: var(--color-brand); }
.notice-list__new { flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--color-gold-dark); }
.notice-list time { flex: none; font-size: var(--fs-xs); color: var(--color-text-muted); }

/* 역대 학술대회 — 최근 세 건. 줄들이 칸 높이를 나눠 가진다(예전 학술 자료 칸의 모양을 이었다) */
.past-list { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.past-list li { flex: 1; display: flex; }
.past-list a {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 16px;
  padding: 14px 18px;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
/* 연도(크게)와 회차(작게)를 한 상자에. 회차를 모르는 행은 연도만 */
.past-list__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 64px;
  height: 52px;
  border-radius: 12px;
  background: var(--color-brand-soft);
  color: var(--color-brand);
  line-height: 1.2;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.past-list__badge strong { font-size: var(--fs-body); font-weight: 700; font-variant-numeric: tabular-nums; }
.past-list__badge span { font-size: 11px; font-weight: 600; color: var(--color-gold-dark); transition: color 0.25s var(--ease); }
.past-list__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
/* 행사명은 두 줄까지(영문 행사명이 길다), 일자·장소는 한 줄로 자른다 */
.past-list__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-weight: 700;
  line-height: 1.4;
}
.past-list__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-small);
  color: var(--color-text-sub);
}
.past-list__go { display: flex; flex: none; color: var(--color-text-muted); transition: color 0.25s var(--ease); }
.past-list__svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.past-list a:hover { border-color: var(--color-brand); transform: translateX(4px); }
.past-list a:hover .past-list__badge { background: var(--color-brand); color: var(--color-on-dark); }
.past-list a:hover .past-list__badge span { color: var(--color-gold-light); }
.past-list a:hover .past-list__go { color: var(--color-brand); }

/* 연구회 소개 — 제목과 윤곽선 "Since 2009", 소개 글, 설립 목적 세 칸 */
.about__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.about__title { margin-top: 6px; font-size: var(--fs-h2); font-weight: 700; line-height: 1.4; }
.about__since {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  font-size: 68px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  /* 윤곽선 글자(-webkit-text-stroke)는 쓰지 않는다. 가변 글꼴과 겹치면 GPU 없는 환경에서 그리기가 멈췄다 */
  color: var(--color-line-strong);
}
.about__since span {
  margin-bottom: 6px;
  font-size: var(--fs-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
}
.about__lead-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 14px; }
.about__lead { color: var(--color-text-sub); }
.about__lead-row .more { flex: none; }

.aims {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  flex: 1;
  margin-top: 24px;
}
/* 아이콘과 제목을 한 줄에 두어 높이를 줄인다 */
.aims__item {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  column-gap: 12px;
  padding: 20px 20px;
  background: var(--color-bg-soft);
  border-top: 3px solid var(--color-gold);
  border-radius: 0 0 10px 10px;
}
.aims__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--color-brand);
}
.aims__svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--color-gold-light);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* 제목이 길면(영문 등) 통째로 다음 줄로 밀리지 않고 아이콘 옆에서 줄바꿈한다 */
.aims__title { flex: 1; min-width: 0; font-size: var(--fs-body); font-weight: 700; line-height: 1.3; }
.aims__text { flex-basis: 100%; margin-top: 10px; font-size: var(--fs-small); line-height: 1.5; color: var(--color-text-sub); }

@media (max-width: 1023px) {
  .split { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 767px) {
  .aims { grid-template-columns: 1fr; }
  .about__since { font-size: 48px; }
  .about__lead-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .aims__text { margin-top: 4px; padding-left: 50px; }
}

@media (max-width: 767px) {
  .next-event__date { width: 88px; }
  .next-event__day { font-size: 38px; }
  .next-event__body { padding: 18px; }
  .next-event__title { font-size: var(--fs-body); }
  .later-events a { gap: 14px; }
  .notice-list time { display: none; }
}

/* ── 회원을 위한 공간 ──
   왼쪽 위 모서리를 금색 삼각형으로 물들이고, 오른쪽 아래에 큰 아이콘(테두리 없이 흐리게)을 둔다.
   마우스를 올리면 남색 바탕에 금빛이 번지고 아이콘이 살짝 돌며 금빛으로 밝아진다.
   바탕에는 간 소엽 선화(assets/images/section/quick-01.jpg)를 거의 보이지 않게 깐다. 진하기는 opacity 로만 고친다.
   그림 주소는 템플릿이 --quick-bg 로 준다. 고정 이미지는 S3 에 있어 화면이 주소를 바꿔 내기 때문이다(docs/storage.md). */
.quick { position: relative; isolation: isolate; padding: var(--section-y) 0; }
.quick::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--quick-bg) center / cover no-repeat;
  opacity: 0.07;
  pointer-events: none;
}

/* 칸 수는 HomeContent::SECTIONS['quick'] 의 4칸이다 */
.quick__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.quick__list > li { min-width: 0; }

.quick__card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 200px;
  overflow: hidden;
  padding: 32px 28px 24px;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

/* 마우스를 올리면 나타나는 남색 바탕과 금빛 번짐. 바탕을 따로 두어 서서히 겹쳐 나타나게 한다 */
.quick__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gold-glow), linear-gradient(160deg, var(--color-brand) 0%, var(--color-brand-deep) 100%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

/* 왼쪽 위 모서리를 삼각형으로 물들인다 */
.quick__card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  background: var(--color-gold);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  transition: background-color 0.35s var(--ease);
}

/* 오른쪽 아래의 큰 아이콘. 흐리게 두고, 마우스를 올리면 살짝 돌며 금색으로 밝아진다 */
.quick__icon {
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 72px;
  height: 72px;
  fill: none;
  stroke: var(--color-line-strong);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.35s var(--ease), transform 0.45s var(--ease);
}

.quick__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.35s var(--ease);
}
.quick__text {
  margin-top: 8px;
  padding-right: 8px;
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  transition: color 0.35s var(--ease);
}

/* 아래 줄 — 원형 화살표 버튼(바깥 링크 칸은 그 옆에 사이트 이름) */
.quick__foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-right: 64px; }
.quick__host {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  transition: color 0.35s var(--ease);
}

.quick__go {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-line-strong);
  border-radius: 50%;
  color: var(--color-brand);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.quick__arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s var(--ease);
}

.quick__card:hover { border-color: var(--color-brand); transform: translateY(-6px); }
.quick__card:hover::before { opacity: 1; }
.quick__card:hover::after { background: var(--color-gold-light); }
.quick__card:hover .quick__icon { stroke: var(--color-gold); transform: rotate(-12deg) scale(1.05); }
.quick__card:hover .quick__title { color: var(--color-on-dark); }
.quick__card:hover .quick__text { color: var(--color-on-dark-sub); }
.quick__card:hover .quick__go { background: var(--color-on-dark); border-color: var(--color-on-dark); }
.quick__card:hover .quick__arrow { transform: translateX(2px); }
.quick__card:hover .quick__host { color: var(--color-on-dark-sub); }

/* 바깥 사이트로 가는 칸 — 연한 면 바탕 + 남색 모서리. 이 사이트 안의 칸(흰 바탕 + 금색 모서리)과 한눈에 갈린다.
   마우스를 올렸을 때는 다른 칸과 같다(남색 바탕, 모서리 연한 금색). 화살표는 오른쪽 위로 비켜 난다 */
.quick__card--external { background: var(--color-bg-soft); }
.quick__card--external::after { background: var(--color-brand); }
.quick__card--external:hover .quick__arrow { transform: translate(1px, -1px); }

@media (max-width: 1023px) {
  .quick__list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .quick__list { gap: 12px; }
  .quick__card { min-height: 180px; padding: 26px 16px 18px; }
  .quick__card::after { width: 22px; height: 22px; }
  .quick__icon { right: 14px; bottom: 14px; width: 48px; height: 48px; }
  .quick__title { font-size: 17px; }
  .quick__text { padding-right: 0; }
  .quick__foot { margin-top: 16px; }
  /* 두 칸 격자라 칸이 좁아 사이트 이름이 오른쪽 아래 큰 아이콘과 겹친다. 바탕·모서리 색과 화살표로만 가른다 */
  .quick__host { display: none; }
  .quick__go { width: 34px; height: 34px; }
}

/* ── 갤러리 ──
   남색 바탕 위의 모자이크. 첫 사진을 크게(2×2), 나머지를 작게 두고
   캡션은 사진 위에 얹는다. 마우스를 올리면 사진이 당겨지고 캡션 아래 금색 선이 그어진다. */
.gallery {
  padding: var(--section-y) 0;
  /* 바로 아래 푸터(brand-deep)와 한 덩어리로 붙어 보이지 않게 한 단계 밝은 남색 */
  background: var(--color-brand);
  color: var(--color-on-dark);
}
.gallery .section-head__title { color: var(--color-on-dark); }
.gallery .eyebrow { color: var(--color-gold-light); }
.gallery .more { color: var(--color-on-dark-sub); }
.gallery .more:hover { color: var(--color-on-dark); }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 200px);
  gap: 16px;
}
.gallery__grid > li { min-width: 0; }
.gallery__grid > li:first-child { grid-column: span 2; grid-row: span 2; }
.gallery__grid > li:last-child { grid-column: span 2; }

.gallery__card {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: var(--color-brand);
}
.gallery__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.gallery__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--photo-shade);
  transition: opacity 0.4s var(--ease);
}

.gallery__caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gallery__caption::after {
  content: "";
  width: 32px;
  height: 2px;
  margin-top: 10px;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.gallery__date { font-size: var(--fs-xs); letter-spacing: 0.06em; color: var(--color-gold-light); }
.gallery__title {
  font-size: var(--fs-small);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery__grid > li:first-child .gallery__caption { left: 28px; bottom: 26px; }
.gallery__grid > li:first-child .gallery__title { font-size: 20px; white-space: normal; }

.gallery__card:hover img { transform: scale(1.07); }
.gallery__card:hover .gallery__caption::after { transform: scaleX(1); }

.gallery__empty {
  padding: 64px 0;
  border: 1px dashed var(--color-on-dark-line);
  border-radius: var(--radius);
  text-align: center;
  font-size: var(--fs-small);
  color: var(--color-on-dark-sub);
}

@media (max-width: 1023px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: 280px repeat(2, 160px); }
  .gallery__grid > li:first-child { grid-row: span 1; }
  .gallery__grid > li:last-child { grid-column: span 1; }
}

@media (max-width: 767px) {
  .gallery__grid { grid-template-rows: 220px repeat(2, 130px); gap: 10px; }
  .gallery__caption { left: 14px; right: 14px; bottom: 12px; }
  .gallery__grid > li:first-child .gallery__caption { left: 18px; bottom: 16px; }
  .gallery__grid > li:first-child .gallery__title { font-size: var(--fs-body); }
}

/* ── 협력사 띠 (_partners.php) ──
   푸터 바로 위 흰 띠에서 로고가 왼쪽으로 끝없이 흘러간다. 대한신경면역학회 홈의 후원사 띠와 구성이 같다.
   템플릿이 한 회차를 두 번 그리고, 트랙을 절반만큼 옮긴 뒤 처음으로 돌아가 이음매가 보이지 않는다.
   흐르는 시간은 admin 띠 설정에서 인라인 --partner-roll 로 온다. 위 갤러리(남색)와 아래 푸터 사이라 선 없이도 경계가 선다. */
.partner-band {
  padding: 26px 0;
  background: var(--color-bg);
}
.partner-band__viewport {
  overflow: hidden;
  /* 양 끝을 흐리게 지운다. 마스크는 투명도만 보므로 색은 어느 불투명한 토큰이어도 같다 */
  -webkit-mask-image: linear-gradient(90deg, transparent, var(--color-bg) 6%, var(--color-bg) 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, var(--color-bg) 6%, var(--color-bg) 94%, transparent);
}
.partner-band__track {
  display: flex;
  width: max-content;
  animation: partner-roll var(--partner-roll, 40s) linear infinite;
}
/* 마우스를 올리거나 키보드 초점이 들어오면 멈춘다 */
.partner-band__viewport:hover .partner-band__track,
.partner-band__track:focus-within { animation-play-state: paused; }

@keyframes partner-roll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.partner-band__track > li { flex: none; padding: 0 10px; }
/* 한 칸 168 × 72. 링크가 있으면 <a>, 비웠으면 <span> 이라 태그가 아니라 클래스로 고른다 */
.partner-band__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 168px;
  height: 72px;
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease);
}
a.partner-band__item:hover { border-color: var(--color-brand); }
.partner-band__item img {
  display: block;
  width: auto;
  height: auto;
  max-width: 78%;
  max-height: 60%;
  object-fit: contain;
}

@media (max-width: 767px) {
  .partner-band { padding: 18px 0; }
  .partner-band__item { width: 132px; height: 60px; }
}

/* 움직임을 줄이는 설정이면 흐르지 않고 한 벌만 두어 손으로 옆으로 넘겨 본다.
   client.css 의 공통 규칙(애니메이션 0.01ms)에만 맡기면 무한 반복이 깜박임이 되므로 여기서 끈다. */
@media (prefers-reduced-motion: reduce) {
  .partner-band__viewport { overflow-x: auto; }
  .partner-band__track { animation: none; }
  .partner-band__track > li[aria-hidden="true"] { display: none; }
}
