/* Toss 스타일 공지사항 페이지 */
:root {
  --primary-color: #006eff;
  --text-color: #333333;
  --light-gray: #f5f6fa;
  --medium-gray: #e6e8ef;
  --dark-gray: #8b95a1;
  --white: #ffffff;
  --border-radius: 16px;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
  font-family: "Noto Sans KR", sans-serif;
  background-color: var(--light-gray);
  color: var(--text-color);
  line-height: 1.6;
}

header i {
  cursor: pointer;
  transition: 0.3s;
}

header i:hover {
  color: #006eff;
}

/* 태블릿 화면에서 햄버거 메뉴 숨기기 */
@media (min-width: 768px) and (max-width: 1023px) {
  .head > li:nth-child(4) {
    display: none !important; /* !important로 우선순위 높임 */
  }

  /* 태블릿에서는 subMenu 보이게 설정 */
  .subMenu {
    display: flex !important;
  }
}

/* 헤더 스타일 */
@media (min-width: 1024px) {
  /*header*/
  header {
    letter-spacing: -1px;
    box-sizing: border-box;
    padding: 2vw 3vw;
    width: 100%;
    background-color: var(--white);
    z-index: 100;
    position: sticky;
    top: 0;
  }

  .head > li:nth-child(4) {
    display: none;
  }

  .head {
    align-items: center;
    display: flex;
    justify-content: space-between;
  }

  .subMenu {
    font-size: 0.8vw;
    font-weight: 400;
    display: flex;
    justify-content: center;
    gap: 4vw;
  }

  .subMenu li a {
    color: #555;
    transition: 0.3s;
  }

  .subMenu li:hover a {
    font-weight: 500;
    color: #006eff;
  }

  header img {
    width: 8vw;
  }

  header h2 {
    font-weight: 900;
    font-size: 2vw;
    color: #006eff;
  }
}

/* 공지사항 컨테이너 */
.notice-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* 공지사항 헤더 */
.notice-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notice-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
}

/* 검색 영역 */
.search-box {
  display: flex;
  max-width: 400px;
  position: relative;
  margin-left: auto;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 48px;
  border-radius: 8px;
  border: 1px solid var(--medium-gray);
  background-color: var(--white);
  font-size: 16px;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 110, 255, 0.1);
}

.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dark-gray);
}

/* 공지사항 카테고리 */
.notice-categories {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 0 0 16px 0;
  margin-bottom: 24px;
  scrollbar-width: none; /* Firefox */
}

.notice-categories::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.category-button {
  padding: 10px 20px;
  background-color: var(--white);
  border: 1px solid var(--medium-gray);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark-gray);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-button.active {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.category-button:hover {
  background-color: var(--medium-gray);
}

.category-button.active:hover {
  background-color: #0055cc;
}

/* 공지사항 목록 */
.notice-list {
  border-radius: var(--border-radius);
  overflow: hidden;
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.notice-item {
  padding: 24px;
  border-bottom: 1px solid var(--medium-gray);
  cursor: pointer;
  transition: all 0.2s ease;
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-item:hover {
  background-color: rgba(0, 110, 255, 0.03);
}

.notice-item.pinned {
  background-color: rgba(0, 110, 255, 0.05);
}

.notice-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
}

.notice-tag.important {
  background-color: #ffe8e8;
  color: #ff4d4f;
}

.notice-tag.update {
  background-color: #e6f7ff;
  color: #1890ff;
}

.notice-tag.event {
  background-color: #f6ffed;
  color: #52c41a;
}

.notice-item h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.notice-item h3 i {
  margin-right: 8px;
  color: var(--primary-color);
}

.notice-item .notice-date {
  font-size: 14px;
  color: var(--dark-gray);
  margin-right: 16px;
}

.notice-item .notice-summary {
  font-size: 15px;
  color: #666;
  margin-top: 8px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.notice-item .notice-info {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--dark-gray);
}

.notice-item .notice-info span {
  display: flex;
  align-items: center;
  margin-right: 16px;
}

.notice-item .notice-info i {
  margin-right: 4px;
}

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

.page-button {
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 18px;
  border: 1px solid var(--medium-gray);
  background-color: var(--white);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-button:hover {
  background-color: var(--medium-gray);
}

.page-button.active {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.page-button.prev,
.page-button.next {
  width: auto;
  padding: 0 16px;
}

/* 애니메이션 클래스 */
.fadeIn {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 태블릿 반응형 스타일 */
@media (max-width: 1023px) {
  .notice-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .search-box {
    width: 100%;
    max-width: none;
  }
}

/* 모바일 반응형 스타일 */
@media (max-width: 767px) {
  .notice-container {
    margin: 20px auto;
  }

  .notice-header h1 {
    font-size: 24px;
  }

  .notice-item {
    padding: 16px;
  }

  .notice-item h3 {
    font-size: 16px;
  }

  .notice-item .notice-summary {
    font-size: 14px;
  }
}

/* 푸터 스타일 */
@media (min-width: 1024px) {
  /*footer*/

  footer {
    color: #fff;
    padding: 3vw;
    box-sizing: border-box;
    width: 100%;
    background-color: #11005c;
  }

  footer img {
    width: 7vw;
  }

  .fotSub {
    padding: 2vw;
    margin-bottom: 2vw;
    border-bottom: 2px solid #006eff;
    display: flex;
    gap: 4vw;
    justify-content: center;
  }

  .fotSub h5 {
    font-size: 1vw;
    margin-bottom: 1vw;
  }

  .fotSub p {
    font-size: 0.8vw;
    cursor: pointer;
    opacity: 0.5;
    text-align: left;
    line-height: 1.5vw;
  }

  .fotSub2 {
    gap: 3vw;
    align-items: center;
    display: flex;
    justify-content: center;
  }

  .fotSub2 h3 {
    font-size: 0.8vw;
    margin-bottom: 1vw;
  }

  .fotSub2 li:nth-child(1) p {
    font-size: 0.65vw;
  }

  .fotSub2 li:nth-child(2) {
    font-size: 0.6vw;
    text-align: right;
  }

  .fotSub2 li:nth-child(2) p {
    line-height: 1vw;
    cursor: pointer;
  }
}

/* 태블릿 푸터 스타일 */
@media (min-width: 768px) and (max-width: 1023px) {
  /* 푸터 */
  footer {
    padding: 8vw 4vw; /* 패딩 증가 */
    background-color: #11005c;
    color: #fff;
  }

  footer img {
    width: 16vw; /* 크기 조정 */
  }

  .fotSub {
    padding: 5vw 0; /* 패딩 증가 */
    margin: 5vw 0; /* 여백 증가 */
    border-bottom: 2px solid #006eff;
    display: flex;
    flex-wrap: wrap;
    gap: 7vw; /* 간격 증가 */
    justify-content: flex-start;
  }

  .fotSub h5 {
    font-size: 2.2vw; /* 폰트 크기 증가 */
    margin-bottom: 3vw; /* 여백 증가 */
    color: #fff;
  }

  .fotSub p {
    font-size: 1.8vw; /* 폰트 크기 증가 */
    line-height: 3.2vw; /* 줄 간격 증가 */
    opacity: 0.7;
    transition: opacity 0.3s ease;
    cursor: pointer;
  }

  .fotSub p:hover {
    opacity: 1;
  }

  .fotSub2 {
    display: flex;
    flex-direction: column;
    gap: 5vw; /* 간격 증가 */
  }

  .fotSub2 h3 {
    font-size: 2.2vw; /* 폰트 크기 증가 */
    margin-bottom: 2.5vw; /* 여백 증가 */
  }

  .fotSub2 li:nth-child(1) p {
    font-size: 1.7vw; /* 폰트 크기 증가 */
    line-height: 2.8vw; /* 줄 간격 증가 */
    opacity: 0.7;
  }

  .fotSub2 li:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5vw; /* 간격 증가 */
    margin-top: 2vw; /* 상단 여백 추가 */
  }

  .fotSub2 li:nth-child(2) p {
    font-size: 1.7vw; /* 폰트 크기 증가 */
    opacity: 0.7;
    transition: opacity 0.3s ease;
    cursor: pointer;
    margin-right: 2.5vw; /* 여백 증가 */
  }

  .fotSub2 li:nth-child(2) p:hover {
    opacity: 1;
  }
}

/* 모바일 푸터 스타일 */
@media (max-width: 768px) {
  /* 푸터 */
  footer {
    color: #fff;
    padding: 8vw 5vw;
    box-sizing: border-box;
    width: 100%;
    background-color: #11005c;
  }

  footer img {
    width: 20vw;
  }

  .fotSub {
    padding: 10vw 0;
    margin-bottom: 2vw;
    border-bottom: 2px solid #006eff;
    display: flex;
    flex-direction: column;
    gap: 8vw;
    justify-content: center;
  }

  .fotSub h5 {
    font-size: 4vw;
    margin-bottom: 4vw;
  }

  .fotSub p {
    font-size: 3vw;
    cursor: pointer;
    opacity: 0.5;
    text-align: left;
    line-height: 5vw;
  }

  .fotSub2 {
    padding-top: 10vw;
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .fotSub2 li {
    width: 100%;
    margin-bottom: 5vw;
  }

  .fotSub2 h3 {
    font-size: 3vw;
    margin-bottom: 2vw;
  }

  .fotSub2 li:nth-child(1) p {
    font-size: 3vw;
    line-height: 5vw;
  }

  .fotSub2 li:nth-child(2) {
    font-size: 2.5vw;
    text-align: left;
  }

  .fotSub2 li:nth-child(2) p {
    line-height: 4vw;
    cursor: pointer;
  }
}

/* 토스 스타일 스켈레톤 로딩 효과 */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loadingSkeletonAnimation 1.5s infinite;
  border-radius: 4px;
}

@keyframes loadingSkeletonAnimation {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* 모바일 메뉴 */
.mobile-menu {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  background-color: white;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box;
  transition: top 0.5s ease-in-out;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 10px 30px;
}

@media (max-width: 767px) {
  .mobile-menu {
    height: 33%;
    padding-top: 20px;
    border-radius: 0;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .mobile-menu {
    height: 40%;
    padding-top: 30px;
    border-radius: 0 0 20px 20px;
    background-color: white;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 10px 30px;
  }
}

/* 태블릿 반응형 스타일 */
@media (min-width: 768px) and (max-width: 1023px) {
  /* 헤더 */
  header {
    padding: 3vw 4vw;
    position: relative;
    z-index: 10;
  }

  .head {
    align-items: center;
    display: flex;
    justify-content: space-between;
  }

  .head > li:nth-child(4) {
    display: block;
  }

  header img {
    width: 12vw;
  }

  header h2 {
    font-size: 3vw;
    font-weight: 900;
    color: #006eff;
  }

  .subMenu {
    font-size: 1.5vw;
    font-weight: 400;
    display: flex;
    justify-content: center;
    gap: 3vw;
  }

  .subMenu li a {
    color: #555;
    transition: 0.3s;
  }

  .subMenu li:hover a {
    font-weight: 500;
    color: #006eff;
  }
}

/* 모바일 반응형 스타일 */
@media (max-width: 768px) {
  /* 헤더 */
  header {
    padding: 4vw 5vw;
  }

  .head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4vw;
  }

  header img {
    width: 20vw;
  }

  header h2 {
    display: none;
    font-size: 5vw;
  }

  header i {
    font-size: 5vw;
  }

  .subMenu {
    display: none;
    font-size: 3vw;
    width: 100%;
    justify-content: space-between;
    gap: 2vw;
  }

  .head > li:nth-child(4) {
    display: block;
  }

  /* 페이지네이션 반응형 스타일 */
  @media (max-width: 480px) {
    /* 매우 작은 모바일 화면에서는 이전/다음의 텍스트 숨기고 아이콘만 표시 */
    .page-button.prev,
    .page-button.next {
      width: 36px;
      padding: 0;
    }

    .page-button.prev span,
    .page-button.next span {
      display: none;
    }

    /* 번호 버튼 크기 조정 */
    .page-button {
      width: 32px;
      height: 32px;
      font-size: 13px;
    }
  }

  @media (min-width: 481px) and (max-width: 767px) {
    /* 일반 모바일 화면에서는 이전/다음 텍스트 크기 조정 */
    .page-button.prev,
    .page-button.next {
      font-size: 12px;
      padding: 0 12px;
    }

    /* 번호 버튼 크기 조정 */
    .page-button {
      width: 34px;
      height: 34px;
      font-size: 13px;
    }
  }
}
