/* ==========================================================================
   TAREXIS — notice.css
   공지사항 페이지 전용 레이어. notice.html + ko/notice.html 이 공유한다.
   공통 chrome(nav·footer·버튼·토큰)은 base.css 에 있다.
   ========================================================================== */

/* 짧은 목록에서도 footer 가 화면 하단에 붙도록 */
body { min-height: 100vh; display: flex; flex-direction: column; }

/* ── PAGE HEADER ── */
.notice-header {
  padding: 160px 60px 60px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(30,106,255,0.14) 0%, transparent 65%),
    linear-gradient(180deg, #07091E 0%, #0C1030 100%);
  position: relative;
}

.notice-header::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 70px 70px;
  pointer-events: none;
}

.notice-header-inner { max-width: 1160px; margin: 0 auto; position: relative; z-index: 1; }

.notice-title {
  font-size: clamp(2.2rem, 4.2vw, 3.2rem); font-weight: 800; line-height: 1.15;
  margin-bottom: 14px; letter-spacing: -0.5px;
}

.notice-sub { font-size: 1rem; color: var(--muted); max-width: 640px; }

/* 영문 페이지에서 "공고 원문은 국문" 임을 알리는 한 줄 안내 */
.locale-note {
  max-width: 1160px; margin: 20px auto 0;
  padding: 12px 18px;
  background: rgba(10,191,188,0.06);
  border: 1px solid rgba(10,191,188,0.25);
  border-radius: 10px;
  font-size: 0.82rem; color: var(--muted);
  position: relative; z-index: 1;
}
.locale-note strong { color: var(--teal); font-weight: 700; }

/* ── FILTER BAR ── */
.filter-bar {
  max-width: 1160px; margin: 0 auto;
  padding: 32px 60px 0;
  display: flex; gap: 10px; flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px; border-radius: 100px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--muted); font-size: 0.82rem; letter-spacing: 0.4px;
  font-family: inherit;
  transition: all 0.2s;
}
.filter-btn:hover { color: var(--white); border-color: rgba(30,106,255,0.4); }
.filter-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: white; border-color: transparent;
}

/* ── NOTICE LIST ── */
.notice-list-wrap {
  flex: 1;
  padding: 28px 60px 100px;
}

.notice-list {
  max-width: 1160px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 14px;
}

.notice-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.notice-item:hover { border-color: rgba(30,106,255,0.35); }
.notice-item.open { border-color: rgba(10,191,188,0.45); }

.notice-row {
  display: grid;
  grid-template-columns: 110px 130px 1fr auto auto;
  gap: 20px; align-items: center;
  padding: 22px 28px;
  cursor: pointer;
  user-select: none;
}

/* ── BADGE ──
   클래스 접미사는 ASCII 카테고리 키(agm / edisclosure / general).
   표시 라벨은 notice-render.js 의 로케일 사전에서 온다. */
.badge {
  display: inline-block;
  padding: 5px 12px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.6px;
  text-align: center;
  white-space: nowrap;
}
.badge-agm {
  background: rgba(30,106,255,0.18); color: #82AEFF;
  border: 1px solid rgba(30,106,255,0.35);
}
.badge-edisclosure {
  background: rgba(10,191,188,0.16); color: #4FE0DD;
  border: 1px solid rgba(10,191,188,0.4);
}
.badge-general {
  background: rgba(148,163,184,0.14); color: var(--muted);
  border: 1px solid rgba(148,163,184,0.3);
}

.notice-date {
  font-size: 0.86rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.notice-title-text {
  font-size: 1.02rem; font-weight: 600; color: var(--white);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.attach-icon { font-size: 1rem; color: var(--teal); opacity: 0.85; }

.toggle-arrow {
  font-size: 0.95rem; color: var(--muted);
  transition: transform 0.25s;
}
.notice-item.open .toggle-arrow { transform: rotate(180deg); color: var(--teal); }

/* ── DETAIL ── */
.notice-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  border-top: 0 solid var(--border);
}
.notice-item.open .notice-detail {
  max-height: 4000px;
  border-top: 1px solid var(--border);
}

.notice-detail-inner { padding: 28px 32px 32px; }

.notice-body {
  color: #C7D2E0; font-size: 0.96rem; line-height: 1.85;
  white-space: pre-wrap;
  word-break: keep-all;
}
.notice-body strong { color: var(--white); }
.notice-body a { color: var(--teal); text-decoration: underline; }

.notice-attachments {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}

.attach-label {
  font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}

.attach-list { display: flex; flex-direction: column; gap: 8px; }

.attach-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(10,191,188,0.08);
  border: 1px solid rgba(10,191,188,0.3);
  border-radius: 8px;
  color: var(--teal); font-size: 0.88rem;
  transition: all 0.2s;
  width: fit-content;
}
.attach-link:hover {
  background: rgba(10,191,188,0.16);
  transform: translateY(-1px);
}

.empty-state {
  max-width: 1160px; margin: 0 auto;
  text-align: center; padding: 80px 20px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 14px;
}

/* ── RESPONSIVE ── */
@media (max-width: 980px) {
  .notice-header { padding: 130px 24px 44px; }
  .locale-note { margin: 18px 24px 0; }
  .filter-bar { padding: 24px 24px 0; }
  .notice-list-wrap { padding: 24px 24px 80px; }
  .notice-row {
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    padding: 18px 20px;
  }
  .notice-date { display: none; }
  .notice-detail-inner { padding: 22px 22px 26px; }
}

@media (max-width: 600px) {
  .notice-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .notice-row .badge { grid-column: 1 / -1; justify-self: start; }
  .notice-title-text { white-space: normal; font-size: 0.96rem; }
}
