/* ============================================================
   notices.css — 공지사항 페이지 전용 스타일
   ============================================================ */

/* ── 페이지 상단 여백 (fixed nav 80px 보정) ── */
body {
  padding-top: 80px;
}
@media (max-width: 640px) {
  body {
    padding-top: 60px;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.notices-hero {
  background: var(--bg-base);
  text-align: center;
  padding: 60px 0 52px;
  border-bottom: 1px solid var(--border);
}

.notices-hero .section-eyebrow {
  color: var(--color-primary-dark);
}

.notices-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0;
}

/* ══════════════════════════════════════
   MAIN LIST
══════════════════════════════════════ */
.notices-main {
  background: var(--bg-surface);
  padding: 60px 0 80px;
}

.notices-list-page {
  max-width: 720px;
  margin: 0 auto;
}

/* ── 공지 아이템 ── */
.notice-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border);
  cursor: default;
  transition: background var(--transition);
}

.notice-item:first-child {
  border-top: 1px solid var(--border);
}

.notice-item:hover {
  background: var(--bg-base);
  margin: 0 calc(-1 * var(--space-4));
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  border-radius: var(--radius-sm);
}

/* ── 핀 배지 ── */
.notice-item-pin {
  flex-shrink: 0;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-dark);
  background: var(--color-trust-bg);
  border: 1px solid rgba(56, 131, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  white-space: nowrap;
  margin-top: 2px;
}

/* ── 콘텐츠 영역 ── */
.notice-item-body {
  flex: 1;
  min-width: 0;
}

/* ── 제목 ── */
.notice-item-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
}

/* ── 날짜 ── */
.notice-item-date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ══════════════════════════════════════
   ACCORDION
══════════════════════════════════════ */
.notice-accordion {
  display: block;
  padding: 0;
  border-bottom: 1px solid var(--border);
}
.notice-accordion:first-child { border-top: 1px solid var(--border); }

/* 아코디언 전체 */
.notice-accordion {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border) !important;
  margin-bottom: 10px;
  background: #fff;
}
.notice-accordion:first-child { border-top: 1px solid var(--border) !important; }

/* 아코디언 헤더 버튼 */
.notice-acc-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: none;
  padding: 18px 20px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  border-radius: 10px;
}
.notice-acc-header:hover {
  background: #F9FAFB;
}
.notice-acc-header[aria-expanded="true"] {
  background: #F5F3EF;
  border-radius: 10px 10px 0 0;
}

.notice-acc-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Q. 배지 */
.notice-item-title::before {
  content: 'Q.';
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 800;
  color: #fff;
  background: #3883FF;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
  line-height: 1.6;
}

/* 열린 상태 제목 강조 */
.notice-acc-header[aria-expanded="true"] .notice-item-title {
  color: #3883FF;
}

/* 화살표 아이콘 */
.notice-acc-chevron {
  flex-shrink: 0;
  color: #9CA3AF;
  transition: transform 0.22s ease;
  display: flex;
  align-items: center;
}
.notice-acc-chevron.is-open {
  transform: rotate(180deg);
  color: #3883FF;
}

/* 답변 영역 — max-height 트랜지션 */
.notice-acc-body {
  overflow: hidden;
  transition: max-height 0.25s ease;
  max-height: 0;
}
.notice-acc-body:not([hidden]) {
  max-height: 2000px;
}

.notice-acc-content {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: #374151;
  margin: 0;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  background: #FAFAF8;
}

/* ── 빈 상태 ── */
.notices-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-base);
  padding: var(--space-16) 0;
}

/* ══════════════════════════════════════
   MOBILE (≤ 640px)
══════════════════════════════════════ */
@media (max-width: 640px) {
  .notices-hero {
    padding: 48px 0 44px;
  }

  .notices-main {
    padding: 48px 0 64px;
  }

  .notice-item:hover {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    background: none;
  }

  .notice-item-title {
    font-size: var(--font-size-sm);
    white-space: normal;
  }

  .notice-acc-body {
    max-height: none !important;
    overflow-y: visible;
  }

  .notice-acc-header {
    min-height: 56px;
    padding: 14px 16px;
  }
}
