@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');

:root {
  --color-primary: #a70240;
  --color-primary-dark: #860233;
  --color-banner: #5a1530;
  --color-text: #212121;
  --color-muted: rgba(0, 0, 0, 0.64);
  --color-line: #e0e0e0;
  --header-h: 56px;
  --content-w: 960px;
  --font: 'Lato', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--color-text);
  background: #fff;
  line-height: 1.7;
  word-break: keep-all;
  padding-top: var(--header-h);
}
a { color: var(--color-primary); }
a:hover { text-decoration: underline; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--color-line);
}
.site-header .inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--color-text); font-size: 18px; font-weight: 300; }
.brand:hover { text-decoration: none; }
.brand img { height: 36px; width: auto; }

.gnb { display: flex; align-items: center; gap: 4px; }
.gnb > li { position: relative; }
.gnb > li > a, .gnb > li > button {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 10px;
  font-size: 14px; color: rgba(0, 0, 0, 0.8);
  background: none; border: 0; cursor: pointer;
}
.gnb > li > a:hover, .gnb > li > button:hover { color: var(--color-primary); text-decoration: none; }
.gnb > li.active > a, .gnb > li.active > button { color: #000; font-weight: 700; }
.gnb .caret { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); margin-left: 4px; }
.gnb .sub {
  position: absolute; top: 100%; right: 0;
  min-width: 200px; padding: 8px 0;
  background: #fff; border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: all 0.15s;
}
.gnb > li:hover .sub, .gnb > li:focus-within .sub, .gnb > li.open .sub { opacity: 1; visibility: visible; transform: none; }
.gnb .sub a { display: block; padding: 10px 20px; font-size: 14px; color: var(--color-text); white-space: nowrap; }
.gnb .sub a:hover { background: rgba(167, 2, 64, 0.08); text-decoration: none; }
.gnb .sub a.current { color: var(--color-primary); font-weight: 700; }

.menu-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 22px; height: 2px; background: #333; position: relative; margin: 0 auto; content: '';
}
.menu-toggle span::before { position: absolute; top: -7px; }
.menu-toggle span::after { position: absolute; top: 7px; }

/* ---------- Banner ---------- */
.hero {
  background: linear-gradient(rgba(33, 33, 33, 0.6), rgba(33, 33, 33, 0.6)), url('../images/banner-pattern.jpg') center / cover;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 24px;
}
.hero img { width: 100%; max-width: 380px; }

.page-banner {
  background: linear-gradient(rgba(33, 33, 33, 0.72), rgba(33, 33, 33, 0.72)), url('../images/banner-pattern.jpg') center / cover;
  background-color: var(--color-banner);
  color: #fff; text-align: center;
  padding: 64px 24px;
}
.page-banner h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 700; line-height: 1.3; }

/* ---------- Content ---------- */
.container { max-width: var(--content-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }
.section + .section { border-top: 1px solid var(--color-line); }
.section-title { color: var(--color-primary); font-size: 28px; font-weight: 700; text-align: center; margin-bottom: 32px; }
.content h2 { color: var(--color-primary); font-size: 26px; font-weight: 700; margin: 40px 0 16px; }
.content h3 { color: var(--color-primary); font-size: 20px; font-weight: 700; margin: 32px 0 12px; }
.content p { margin-bottom: 12px; }
.content ul.dot { padding-left: 20px; list-style: disc; margin-bottom: 12px; }
.content ul.dot li { margin-bottom: 6px; }
.content .lead { font-size: 15px; color: var(--color-muted); text-align: center; }
.text-center { text-align: center; }
.preparing { color: var(--color-muted); padding: 24px 0; }

/* Home */
.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 640px; margin: 0 auto; }
.home-cols figure { text-align: center; }
.home-cols img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.home-cols .photo img { object-fit: cover; }
.home-cols figcaption { margin-top: 16px; font-size: 15px; }
.home-cols .caption-accent { color: var(--color-primary); }
.contact { font-size: 14px; }
.contact strong { display: block; margin-bottom: 8px; }

/* Greeting */
.greeting-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin: 16px 0 48px; }
.greeting-head h2 { margin: 24px 0 0; font-size: 32px; line-height: 1.4; }
.greeting-head img { width: 140px; flex-shrink: 0; }
.greeting p { margin-bottom: 20px; }
.greeting .sign { text-align: right; font-weight: 700; margin-top: 32px; }

/* Organization */
.org-title { text-align: center; margin: 24px 0 8px; }
.member { display: grid; grid-template-columns: 140px 1fr; gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--color-line); }
.member:last-child { border-bottom: 0; }
.member img { width: 140px; aspect-ratio: 140 / 224; object-fit: cover; background: #f2f2f2; }
.member h2 { margin: 0 0 16px; font-size: 22px; font-weight: 400; }
.member h2 b { font-weight: 700; }
.member li { font-size: 14px; margin-bottom: 6px; }

/* Chapters */
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; }
.chapter { border: 1px solid var(--color-line); border-radius: 6px; padding: 18px 20px; font-size: 14px; }
.chapter h3 { margin: 0 0 6px; font-size: 16px; }
.chapter p { margin: 0; word-break: break-all; }
.chapter.highlight { border-color: var(--color-primary); background: rgba(167, 2, 64, 0.04); }

/* Bylaws */
.bylaws h3 { border-bottom: 2px solid var(--color-primary); padding-bottom: 8px; }
.bylaws ol { padding-left: 0; margin: 4px 0 12px 16px; }
.bylaws ol li { margin-bottom: 4px; }

/* Buttons (관련사이트, AAC 상징) */
.btn-list { display: flex; flex-direction: column; gap: 20px; max-width: 960px; margin: 0 auto; }
.btn {
  display: block; text-align: center;
  padding: 10px 16px; border-radius: 4px; font-size: 15px;
  border: 1px solid var(--color-primary);
}
.btn:hover { text-decoration: none; opacity: 0.85; }
.btn-fill { background: var(--color-primary); color: #fff; }
.btn-line { background: #fff; color: var(--color-primary); }

/* News */
.calendar { width: 100%; border: 0; margin-bottom: 24px; }
.calendar.month { height: 600px; }
.calendar.agenda { height: 400px; }
.news-card { display: block; max-width: 640px; margin: 0 auto; text-align: center; color: var(--color-text); }
.news-card img { width: 100%; border-radius: 4px; margin-bottom: 16px; }
.news-card h2 { color: var(--color-primary); font-size: 22px; margin: 0; }
.article img { width: 100%; margin: 16px 0 32px; border-radius: 4px; }
.article p { margin-bottom: 16px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--color-line); padding: 32px 24px; text-align: center; font-size: 13px; color: var(--color-muted); }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .site-header .inner { padding: 0 16px; justify-content: flex-start; }
  .brand { font-size: 16px; }
  .menu-toggle { display: block; margin-left: auto; margin-right: -8px; }
  .gnb {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; overflow-y: auto; padding: 8px 0;
    display: none;
  }
  .nav-open .gnb { display: flex; }
  .gnb > li > a, .gnb > li > button { width: 100%; padding: 14px 24px; font-size: 16px; justify-content: space-between; }
  .gnb .sub { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; padding: 0 0 8px; }
  .gnb > li.open .sub { display: block; }
  .gnb > li:hover .sub { display: none; }
  .gnb > li.open:hover .sub { display: block; }
  .gnb .sub a { padding: 10px 40px; }
  .home-cols { grid-template-columns: 1fr; gap: 48px; }
  .home-cols figure:not(.photo) img { aspect-ratio: auto; max-width: 280px; margin: 0 auto; }
  .greeting-head { flex-direction: column-reverse; align-items: center; text-align: center; }
  .greeting-head h2 { font-size: 24px; }
  .member { grid-template-columns: 100px 1fr; gap: 20px; }
  .member img { width: 100px; }
}
