:root {
  --point: #E0455B;
  --point-soft: #FFEEEE;
  --search-bg: #FFEEEE;
  --text: #222;
  --text-sub: #666;
  --line: #eee;
  --inner-width: 1200px;
  --gutter: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  color: var(--text);
  background: #fff;
  word-break: keep-all;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

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

/* ===== 상단 ===== */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 100px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo img {
  height: 56px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text strong {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-text span {
  font-size: 12px;
  font-weight: 500;
  color: #888;
  letter-spacing: 0.3px;
}

/* 검색창 */
.search {
  display: flex;
  align-items: center;
  width: 300px;
  height: 44px;
  padding: 0 8px 0 20px;
  background: var(--search-bg);
  border-radius: 22px;
}

.search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
}

.search input::placeholder {
  color: #c59a9f;
}

.search button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 20px;
  color: var(--point);
  cursor: pointer;
}

/* 햄버거 버튼 (모바일에서만 표시) */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 8px;
  border: none;
  background: none;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  height: 2px;
  background: var(--point);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== 네비게이션 ===== */
.gnb {
  background: var(--point);
}

.gnb ul {
  display: flex;
  justify-content: space-between;
}

.gnb li {
  flex: 1;
}

.gnb a {
  display: block;
  padding: 18px 0;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  transition: background 0.2s;
}

.gnb a:hover,
.gnb a.active {
  background: rgba(0, 0, 0, 0.12);
}

/* ===== 본문 ===== */
.main {
  min-height: 600px;
  padding-top: 40px;
  padding-bottom: 80px;
}

/* ===== 문서 레이아웃 (학교소개 등) ===== */
.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

/* 목차 */
.toc {
  position: sticky;
  top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.toc-title {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--point);
}

.toc a {
  display: block;
  padding: 6px 0;
  font-size: 15px;
  color: var(--text-sub);
  transition: color 0.2s;
}

.toc a:hover {
  color: var(--point);
}

.toc ol ol {
  padding-left: 14px;
}

.toc ol ol a {
  font-size: 14px;
}

/* 문서 본문 */
.doc {
  font-size: 16px;
  line-height: 1.8;
}

.doc-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--point);
  margin-bottom: 20px;
}

.notice {
  padding: 18px 22px;
  margin-bottom: 48px;
  background: var(--point-soft);
  border-left: 4px solid var(--point);
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  color: #555;
}

.doc section + section {
  margin-top: 56px;
}

.doc h2 {
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--point);
  font-size: 26px;
  font-weight: 700;
  color: var(--point);
}

.doc h3 {
  margin-bottom: 16px;
  font-size: 21px;
  font-weight: 700;
  color: var(--point);
}

.doc p + p {
  margin-top: 14px;
}

.doc b {
  font-weight: 700;
}

.doc .pt {
  font-weight: 600;
  color: var(--point);
}

/* 연혁 타임라인 */
.timeline {
  position: relative;
  margin-top: 28px;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 2px;
  background: var(--point-soft);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
}

.timeline li::before {
  content: '';
  position: absolute;
  top: 18px;
  left: -28px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--point);
  border-radius: 50%;
  background: #fff;
}

.timeline time {
  font-weight: 700;
  color: var(--point);
}

.timeline p {
  margin: 0;
}

/* 층별 안내 */
.floors {
  margin-top: 24px;
  border-top: 2px solid var(--point);
}

.floors li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
}

.floors strong {
  font-weight: 700;
  color: var(--point);
}

.floors small {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #999;
}

.floors p {
  margin: 0 !important;
}

/* ===== 반응형 ===== */

/* 태블릿 */
@media (max-width: 1024px) {
  .gnb a {
    font-size: 15px;
  }

  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .toc {
    position: static;
  }

  .toc > ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
  }

  .toc li {
    display: contents;
  }

  .toc ol ol {
    display: contents;
  }
}

/* 모바일 */
@media (max-width: 768px) {
  :root {
    --gutter: 16px;
  }

  .header-top {
    flex-wrap: wrap;
    height: auto;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .logo img {
    height: 40px;
  }

  .logo-text strong {
    font-size: 19px;
  }

  .logo-text span {
    font-size: 11px;
  }

  .menu-btn {
    display: flex;
  }

  .search {
    order: 3;
    width: 100%;
    height: 40px;
  }

  /* 네비게이션: 햄버거로 펼침 */
  .gnb {
    display: none;
  }

  .gnb.open {
    display: block;
  }

  .gnb ul {
    flex-direction: column;
    padding: 0;
  }

  .gnb a {
    padding: 14px var(--gutter);
    text-align: left;
    font-size: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .main {
    padding-top: 28px;
    padding-bottom: 60px;
  }

  .doc {
    font-size: 15px;
    line-height: 1.75;
  }

  .doc-title {
    font-size: 28px;
  }

  .notice {
    padding: 14px 16px;
    margin-bottom: 36px;
    font-size: 13px;
  }

  .doc section + section {
    margin-top: 44px;
  }

  .doc h2 {
    font-size: 22px;
  }

  .doc h3 {
    font-size: 18px;
  }

  .timeline li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .timeline li::before {
    top: 15px;
  }

  .floors li {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 4px;
  }

  .floors small {
    display: block;
    margin-left: 0;
  }
}
