/* ===========================================
   숲빛 킨더 — 공통 디자인 시스템
   따뜻하고 자연친화적인 톤 (발도르프 분위기)
   =========================================== */

:root {
  /* 색상: 흙, 나무, 양모, 가을 낙엽에서 온 팔레트 */
  --color-cream: #faf6ee;
  --color-cream-dark: #f2ead9;
  --color-wood: #8a5a3b;
  --color-wood-dark: #6b4429;
  --color-moss: #5f7a52;
  --color-moss-dark: #47603c;
  --color-clay: #c17a4e;
  --color-clay-light: #e8b896;
  --color-wool: #d9a441;
  --color-ink: #3c342a;
  --color-ink-soft: #6b5f52;
  --color-white: #ffffff;
  --color-border: #e4d9c5;

  --font-heading: "Gowun Batang", "Nanum Myeongjo", Georgia, serif;
  --font-body: "Gowun Dodum", "Pretendard", -apple-system, sans-serif;

  --radius-soft: 18px;
  --shadow-soft: 0 4px 20px rgba(107, 68, 41, 0.08);
  --shadow-hover: 0 8px 28px rgba(107, 68, 41, 0.14);

  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-cream);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-wood-dark);
  line-height: 1.4;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.6em; }
h3 { font-size: 1.25rem; }

p { color: var(--color-ink-soft); }

a {
  color: var(--color-moss-dark);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; border-radius: var(--radius-soft); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 헤더 / 내비게이션 ---------- */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
  position: relative;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-wood-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo .leaf { font-size: 1.3rem; }

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--color-ink);
  font-weight: 500;
  font-size: 0.94rem;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-moss-dark);
  border-bottom-color: var(--color-moss);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--color-wood-dark);
}

@media (max-width: 1040px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    border-bottom: 1px solid var(--color-border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; display: block; }
}

/* ---------- 히어로 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--color-cream-dark) 0%, var(--color-cream) 100%);
  padding: 72px 24px 88px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  color: var(--color-clay);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.hero h1 { margin: 0 auto 20px; max-width: 720px; }

.hero p.lead {
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 1.1rem;
}

.hero > * { position: relative; z-index: 2; }

/* ---------- 히어로 배경 애니메이션: 은은하게 떠다니는 자연 모티프 ---------- */
.hero-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-sun {
  position: absolute;
  top: -60px;
  right: 8%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 164, 65, 0.35) 0%, rgba(217, 164, 65, 0) 70%);
  animation: hero-pulse 7s ease-in-out infinite;
}

.hero-leaf {
  position: absolute;
  top: -40px;
  font-size: 2rem;
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(107, 68, 41, 0.12));
  animation-name: hero-drift;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}
.hero-leaf:nth-child(2) { left: 6%;  font-size: 1.7rem; animation-duration: 14s; animation-delay: 0s; }
.hero-leaf:nth-child(3) { left: 20%; font-size: 2.3rem; animation-duration: 18s; animation-delay: 2.5s; }
.hero-leaf:nth-child(4) { left: 38%; font-size: 1.6rem; animation-duration: 15s; animation-delay: 5.5s; }
.hero-leaf:nth-child(5) { left: 56%; font-size: 2.1rem; animation-duration: 19s; animation-delay: 1s; }
.hero-leaf:nth-child(6) { left: 73%; font-size: 1.7rem; animation-duration: 14.5s; animation-delay: 7s; }
.hero-leaf:nth-child(7) { left: 88%; font-size: 2.4rem; animation-duration: 17s; animation-delay: 3.8s; }

@keyframes hero-drift {
  0%   { transform: translate(0, -10%) rotate(0deg); opacity: 0; }
  6%   { opacity: 0.9; }
  50%  { transform: translate(22px, 140%) rotate(170deg); opacity: 0.85; }
  94%  { opacity: 0.5; }
  100% { transform: translate(-14px, 320%) rotate(320deg); opacity: 0; }
}

@keyframes hero-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.12); opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-leaf, .hero-sun { animation: none; opacity: 0.5; }
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--color-moss);
  color: var(--color-white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--color-moss-dark); box-shadow: var(--shadow-hover); }

.btn-outline {
  background: transparent;
  color: var(--color-wood-dark);
  border: 1.5px solid var(--color-wood);
}
.btn-outline:hover { background: var(--color-wood); color: var(--color-white); }

/* ---------- 섹션 공통 ---------- */
section {
  padding: 64px 24px;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 44px;
}

.section-alt {
  background: var(--color-cream-dark);
}

/* ---------- 카드 그리드 ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.card .icon { font-size: 1.8rem; margin-bottom: 12px; display: block; }

/* ---------- 페이지 상단(서브페이지 공통) ---------- */
.page-hero {
  background: var(--color-cream-dark);
  padding: 56px 24px;
  text-align: center;
}
.page-hero p { max-width: 600px; margin: 12px auto 0; }

/* ---------- 공지사항 ---------- */
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-item {
  background: var(--color-white);
  border-radius: var(--radius-soft);
  padding: 22px 26px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 20px;
  align-items: baseline;
  flex-wrap: wrap;
}
.notice-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--color-moss);
  color: var(--color-white);
  white-space: nowrap;
}
.notice-tag.important { background: var(--color-clay); }
.notice-item-important {
  border: 1px solid var(--color-clay-light);
  background: linear-gradient(0deg, var(--color-white), var(--color-white)),
              linear-gradient(0deg, rgba(193, 122, 78, 0.06), rgba(193, 122, 78, 0.06));
  background-blend-mode: normal;
}
.notice-date { color: var(--color-ink-soft); font-size: 0.9rem; white-space: nowrap; }
.notice-title { font-weight: 600; color: var(--color-ink); flex: 1; min-width: 200px; }
.notice-body { flex-basis: 100%; margin-top: 4px; font-size: 0.96rem; }
.notice-attach {
  flex-basis: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 14px;
  width: fit-content;
  background: var(--color-cream-dark);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-wood-dark);
}
.notice-attach:hover { background: var(--color-border); text-decoration: none; }

/* ---------- 갤러리 ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.gallery-item {
  border-radius: var(--radius-soft);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--color-white);
}
.gallery-item .ph {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--color-clay-light), var(--color-wool));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 2rem;
}
.gallery-caption { padding: 12px 14px; font-size: 0.9rem; color: var(--color-ink-soft); }

.gallery-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-ink-soft);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--color-moss); }
.filter-btn.active {
  background: var(--color-moss);
  border-color: var(--color-moss);
  color: var(--color-white);
}

/* ---------- 학사 일정 ---------- */
.term-block { margin-bottom: 40px; }
.term-block h3 {
  border-left: 4px solid var(--color-clay);
  padding-left: 14px;
  margin-bottom: 16px;
}
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  border-radius: var(--radius-soft);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.schedule-table th, .schedule-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.schedule-table th {
  background: var(--color-cream-dark);
  font-family: var(--font-heading);
  color: var(--color-wood-dark);
}
.schedule-table tr:last-child td { border-bottom: none; }

/* ---------- 행사 히스토리(타임라인) ---------- */
.timeline {
  position: relative;
  margin: 0 auto;
  max-width: 760px;
  padding-left: 28px;
  border-left: 3px solid var(--color-border);
}
.timeline-item {
  position: relative;
  margin-bottom: 36px;
  padding-left: 24px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-clay);
  border: 3px solid var(--color-cream);
}
.timeline-year {
  font-family: var(--font-heading);
  color: var(--color-clay);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* ---------- 철학 페이지 인용구 ---------- */
.quote-block {
  background: var(--color-cream-dark);
  border-left: 4px solid var(--color-wool);
  padding: 28px 32px;
  border-radius: 0 var(--radius-soft) var(--radius-soft) 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-wood-dark);
  margin: 32px 0;
}

/* ---------- 커리큘럼 ---------- */
.age-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

/* ---------- 푸터 ---------- */
.site-footer {
  background: var(--color-wood-dark);
  color: var(--color-cream-dark);
  padding: 48px 24px 28px;
  margin-top: 60px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-inner h4 { color: var(--color-cream); margin-top: 0; }
.footer-inner a { color: var(--color-cream-dark); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
  color: rgba(250, 246, 238, 0.6);
  text-align: center;
}

/* ---------- 유틸 ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.loading-msg { text-align: center; color: var(--color-ink-soft); padding: 24px; grid-column: 1 / -1; }
