/* ==========================================
   공지사항 페이지 - Toss-Inspired Design
   ========================================== */

/* 메인 컨테이너 */
.notice-main {
  min-height: calc(100vh - 200px);
  background: #f9fafb;
  padding: 60px 0 80px;
}

.notice-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================
   페이지 헤더
   ========================================== */
.page-header {
  text-align: center;
  margin-bottom: 48px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: #191f28;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

.page-description {
  font-size: 16px;
  color: #6b7684;
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}

/* ==========================================
   검색 영역
   ========================================== */
.search-section {
  margin-bottom: 32px;
}

.search-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b95a1;
  font-size: 18px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 56px;
  padding: 0 20px 0 52px;
  border: 1px solid #e5e8eb;
  border-radius: 12px;
  font-size: 15px;
  color: #191f28;
  background: #ffffff;
  transition: all 0.2s ease;
  outline: none;
}

.search-input::placeholder {
  color: #adb5bd;
}

.search-input:focus {
  border-color: #3182f6;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.1);
}

/* ==========================================
   공지사항 목록
   ========================================== */
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

/* 공지 카드 */
.notice-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 16px;
  padding: 24px 28px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.notice-card:hover {
  border-color: #d1d6db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* 중요 공지 */
.notice-card.important {
  background: rgba(var(--brand-color-rgb), 0.02);
  border: 1px solid rgba(var(--brand-color-rgb), 0.15);
}

.notice-card.important:hover {
  border-color: rgba(var(--brand-color-rgb), 0.25);
  box-shadow: 0 4px 16px rgba(var(--brand-color-rgb), 0.08);
}

/* 카드 헤더 */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-date {
  font-size: 14px;
  color: #8b95a1;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* 배지 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.badge-important {
  background: var(--primary-accent);
  color: var(--primary-color);
}

.badge-new {
  background: #e3f2fd;
  color: #1976d2;
}

/* 카드 타이틀 */
.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #191f28;
  margin: 0 0 8px 0;
  line-height: 1.5;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.notice-card:hover .card-title {
  color: #3182f6;
}

.notice-card.important:hover .card-title {
  color: var(--brand-color, #a50808);
}

/* 카드 설명 */
.card-description {
  font-size: 15px;
  color: #6b7684;
  margin: 0 0 16px 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 카드 푸터 */
.card-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid #f2f4f6;
}

.footer-views {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #8b95a1;
}

.footer-views i {
  font-size: 14px;
}

/* ==========================================
   페이지네이션
   ========================================== */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e5e8eb;
  border-radius: 10px;
  background: #ffffff;
  color: #4e5968;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.page-btn:hover:not(:disabled) {
  background: #f2f4f6;
  border-color: #d1d6db;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 4px;
}

.page-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #4e5968;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-num:hover {
  background: #f2f4f6;
}

.page-num.active {
  background: #191f28;
  color: #ffffff;
  font-weight: 600;
}

/* ==========================================
   반응형 디자인
   ========================================== */
@media (max-width: 768px) {
  .notice-main {
    padding: 40px 0 60px;
  }

  .notice-container {
    padding: 0 16px;
  }

  .page-header {
    margin-bottom: 32px;
  }

  .page-title {
    font-size: 26px;
  }

  .page-description {
    font-size: 15px;
  }

  .search-input {
    height: 52px;
    font-size: 14px;
  }

  .notice-card {
    padding: 20px 20px;
    border-radius: 14px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-description {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .page-btn,
  .page-num {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 24px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .pagination-wrapper {
    gap: 6px;
  }

  .page-btn,
  .page-num {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }
}

/* ==========================================
   애니메이션
   ========================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notice-card {
  animation: fadeInUp 0.5s ease backwards;
}

.notice-card:nth-child(1) { animation-delay: 0.05s; }
.notice-card:nth-child(2) { animation-delay: 0.1s; }
.notice-card:nth-child(3) { animation-delay: 0.15s; }
.notice-card:nth-child(4) { animation-delay: 0.2s; }
.notice-card:nth-child(5) { animation-delay: 0.25s; }
.notice-card:nth-child(6) { animation-delay: 0.3s; }
.notice-card:nth-child(7) { animation-delay: 0.35s; }
.notice-card:nth-child(8) { animation-delay: 0.4s; }

/* ==========================================
   공지사항 상세 페이지
   ========================================== */
.detail-header {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 24px;
}

.detail-header .badge {
  margin-bottom: 16px;
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
  color: #191f28;
  margin: 0 0 20px 0;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid #f2f4f6;
}

.meta-date,
.meta-views {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #8b95a1;
}

.meta-date i,
.meta-views i {
  font-size: 16px;
}

.detail-content {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 24px;
  font-size: 16px;
  color: #4e5968;
  line-height: 1.8;
  min-height: 300px;
}

.detail-navigation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.detail-navigation .nav-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.detail-navigation .nav-item:not(.disabled):hover {
  border-color: #d1d6db;
  background: #f9fafb;
}

.detail-navigation .nav-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.detail-navigation .nav-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #8b95a1;
  font-weight: 500;
}

.detail-navigation .nav-title {
  font-size: 15px;
  color: #191f28;
  font-weight: 500;
}

.detail-navigation .nav-item:not(.disabled):hover .nav-title {
  color: #3182f6;
}

.detail-actions {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.btn-list {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: #191f28;
  color: #ffffff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-list:hover {
  background: #2c3440;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 31, 40, 0.2);
  color: #ffffff;
}

/* 상세 페이지 반응형 */
@media (max-width: 768px) {
  .detail-header,
  .detail-content {
    padding: 28px 24px;
    border-radius: 16px;
  }

  .detail-title {
    font-size: 22px;
  }

  .detail-content {
    font-size: 15px;
  }

  .detail-navigation .nav-item {
    padding: 16px 20px;
  }
}

@media (max-width: 480px) {
  .detail-header,
  .detail-content {
    padding: 24px 20px;
  }

  .detail-title {
    font-size: 20px;
  }
}
