/* ============================================
   공지사항 스타일 - Linear Premium Redesign
   ============================================ */

/* 공지사항 목록 컨테이너 — 통짜 카드 */
.notice-list {
  background: var(--glass-bg, rgba(255,255,255,0.7));
  backdrop-filter: var(--glass-blur, blur(12px));
  -webkit-backdrop-filter: var(--glass-blur, blur(12px));
  border: 1px solid var(--glass-border, rgba(255,255,255,0.3));
  border-radius: var(--radius-premium, 16px);
  overflow: hidden;
  margin-bottom: 40px;
}

/* 공지사항 헤더 카드 (신규 스타일) */
.notice-header-card {
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notice-header-card .section-header {
  margin-bottom: 0 !important;
}

.notice-header-card .section-description {
  margin-top: 0 !important;
  color: var(--deep-sea-gray);
}

/* 공지사항 아이템 — 구분선으로 분리 */
.notice-item {
  position: relative;
  transition: background 0.2s ease;
}

.notice-item + .notice-item {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* 고정 공지 영역 뒤 구분선 */
.pinned-notices + .notice-item {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* pinned-notices 내부 아이템 구분선 */
.pinned-notices .notice-item + .notice-item {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* 호버 효과 */
.notice-item:hover {
  background: rgba(95, 178, 201, 0.06);
}

/* 고정된 공지사항 (Pinned) */
.notice-item.pinned {
  background: rgba(95, 178, 201, 0.08);
}

/* 공지사항 링크 — 좌: 제목, 우: 날짜 그리드 정렬 */
.notice-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 13px 20px;
  text-decoration: none;
  color: inherit;
  width: 100%;
  box-sizing: border-box;
}

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

/* 제목 Typography */
.notice-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--penguin-navy, #1D2F4E);
  line-height: 1.55;
  margin: 0;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.notice-item:hover .notice-title {
  color: var(--penguin-skyblue, #5FB2C9);
}

/* 배지 — 단일 색상, [카테고리] 스타일 */
.notice-badge {
  color: var(--penguin-skyblue, #5FB2C9);
  font-weight: 700;
  font-size: 0.95rem;
  margin-right: 2px;
  vertical-align: baseline;
}

/* 날짜 (우측 고정 정렬) */
.notice-date {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 핀 이모지 (제목 뒤 인라인) */
.notice-pin {
  font-size: 0.8em;
  margin-left: 3px;
  vertical-align: middle;
}

/* NEW 마크 — 제목 뒤 작은 N */
.notice-new-dot {
  display: inline-block;
  font-size: 0;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  margin-left: 6px;
  vertical-align: middle;
  animation: none;
}

.notice-new-dot::after {
  content: 'N';
  font-size: 0.7rem;
  font-weight: 800;
  color: #ef4444;
  vertical-align: middle;
}

/* ============================================
   공지 본문 내용 (detail 페이지)
   ============================================ */
.notice-content-wrapper h2,
.notice-content-wrapper h3 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #1D2F4E;
}

.notice-content-wrapper h2:first-child,
.notice-content-wrapper h3:first-child {
  margin-top: 0;
}

.notice-content-wrapper p {
  margin-bottom: 12px;
  line-height: 1.8;
}

.notice-content-wrapper ul,
.notice-content-wrapper ol {
  margin-bottom: 16px;
  padding-left: 20px;
}

.notice-content-wrapper li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.notice-content-wrapper hr {
  margin: 20px 0;
  border: none;
  border-top: 1px solid #e9ecef;
}

/* ============================================
   페이지네이션
   ============================================ */
.notice-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  position: relative;
  min-height: 40px;
}

.notice-pagination-wrap {
  width: 100%;
}

.notice-pagination-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.pagination-button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-button:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.pagination-button.active {
  background: #1D2F4E;
  color: white;
}

.pagination-button:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

/* 관리자 글쓰기 버튼 (인라인 배치) */
.write-notice-btn {
  position: static;
  background: #1D2F4E;
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(29, 47, 78, 0.25);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.write-notice-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(29, 47, 78, 0.35);
  background: #2a4366;
  opacity: 1 !important;
}

/* 관리자 전용 통계 패널 */
.admin-usage-panel {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-usage-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
}

.admin-usage-label {
  font-size: 0.78rem;
  color: #64748b;
}

.admin-usage-value {
  margin-top: 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1D2F4E;
}

.admin-usage-empty {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  font-size: 0.9rem;
}

/* ============================================
   반응형 디자인 (모바일 최적화)
   ============================================ */
@media (max-width: 768px) {
  .notice-list {
    border-radius: 12px;
  }

  .notice-link {
    padding: 12px 16px;
    gap: 10px;
  }

  .notice-title {
    font-size: 0.88rem;
  }

  .notice-date {
    font-size: 0.75rem;
  }

  .admin-usage-panel {
    grid-template-columns: 1fr;
  }

  /* 페이지네이션 중앙 정렬 보장 */
  .notice-pagination {
    margin-top: 24px;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* 모바일에서 작성 버튼 크기 조정 */
  .write-notice-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .notice-pagination-actions {
    justify-content: center;
  }
}