/* 공지사항 (/notice) — 목록에서 제목을 누르면 그 자리에서 펼쳐진다.
   펼치기는 <details>/<summary> 라 자바스크립트가 필요 없다. */

.notice {
  padding: 72px 0 120px;
  background: #ffffff;
}

.notice__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.notice__title {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -1px;
  color: #222222;
}

.notice__lead {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #666666;
}

.notice__list {
  margin-top: 40px;
  border-top: 2px solid #222222;
}

.notice__empty {
  margin: 0;
  padding: 80px 0;
  border-bottom: 1px solid #EEEEEE;
  text-align: center;
  font-size: 16px;
  color: #666666;
}

.notice-item {
  border-bottom: 1px solid #EEEEEE;
}

.notice-item__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 8px;
  cursor: pointer;
  list-style: none;
}

/* 삼각형 기본 표식을 지운다(브라우저마다 다른 두 가지를 모두 막는다). */
.notice-item__head::-webkit-details-marker {
  display: none;
}

.notice-item__head::marker {
  content: '';
}

.notice-item[open] .notice-item__head {
  background: #FAFAFA;
}

.notice-item__tags {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: #F5F5F5;
  font-size: 14px;
  font-weight: 500;
  color: #666666;
  white-space: nowrap;
}

.notice-tag--urgent {
  background: #C62828;
  font-weight: 700;
  color: #ffffff;
}

.notice-item__title {
  flex-grow: 1;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  color: #222222;
}

.notice-item__date {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 400;
  color: #666666;
}

.notice-item__chev {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.notice-item[open] .notice-item__chev {
  transform: rotate(180deg);
}

.notice-item__body {
  padding: 0 8px 32px;
}

.notice-item__content {
  padding: 24px 28px;
  border-radius: 12px;
  background: #FAFAFA;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  color: #222222;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 본문은 관리자 서식 편집기가 만든 HTML 이라 무엇이 들어올지 모른다.
   가로로 삐져나가는 것만 막는다. */
.notice-item__content img,
.notice-item__content video {
  max-width: 100%;
  height: auto;
}

.notice-item__content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.notice-item__content a {
  color: #1a5c9c;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .notice {
    padding: 40px 0 80px;
  }

  .notice__inner {
    padding: 0 16px;
  }

  .notice__title {
    font-size: 26px;
    letter-spacing: -0.65px;
  }

  .notice__lead {
    margin-top: 8px;
    font-size: 14px;
  }

  .notice__list {
    margin-top: 24px;
  }

  /* 좁은 화면에서는 한 줄에 다 못 들어간다. 태그·제목·날짜를 쌓고
     펼침 표시는 제목 오른쪽에 붙인다. */
  .notice-item__head {
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 2px;
  }

  .notice-item__title {
    flex-basis: 100%;
    order: 2;
    font-size: 16px;
    line-height: 1.45;
  }

  .notice-item__tags {
    order: 1;
  }

  .notice-item__chev {
    order: 1;
    margin-left: auto;
  }

  .notice-item__date {
    order: 3;
    font-size: 13px;
  }

  .notice-tag {
    height: 24px;
    padding: 0 8px;
    font-size: 12px;
  }

  .notice-item__body {
    padding: 0 2px 24px;
  }

  .notice-item__content {
    padding: 18px 16px;
    font-size: 15px;
    line-height: 1.7;
  }
}
