/* 폰트 및 기본 설정 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700;900&display=swap');

:root {
  --btn-bg: #FDC512;
  --text-main: #111;
  --text-sub: #5f5f5f;
  --background-color: #f0f3f5;
  --border-light: #e9e9e9;
  --c-accent: #202020; /* 페이지네이션 활성 색상 추가 */
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: #fff;
  margin: 0;
}

.notice-page-banner {
  margin: 24px 12px;
  background: linear-gradient(135deg, #F7F5FF 0%, #F2F0FF 100%);
  border-radius: 24px;
  padding: 30px 50px;
  height: 180px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 8px 25px rgba(180, 200, 220, 0.4), 
              inset 1px 1px 2px #ffffffa0;
  transition: all 0.3s ease-in-out;
}

.notice-page-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* HTML에 추가된 div를 위한 스타일 */
.banner-content {
  flex: 1;
}

.notice-page-banner h2 {
  font-size: 1.9rem;
  font-weight: 900;
  color: #403b39; /* 어두운 텍스트 색상으로 변경 */
  text-shadow: none; /* 텍스트 그림자 제거 */
  margin-bottom: 8px;
}

.notice-page-banner p {
  font-size: 1rem;
  line-height: 1.6;
  color: #635b58; /* 어두운 텍스트 색상으로 변경 */
  margin-top: 10px;
  text-align: left;
  text-shadow: none; /* 텍스트 그림자 제거 */
  max-width: 500px;
}

.notice-banner-image {
  flex-shrink: 0;
  width: 250px; 
  height: 100%;
  position: relative;
}

.notice-banner-img-element {
  position: absolute; 
  width: 270px;       
  height: auto;
  bottom: -68px;      
  right: 30px;        
  opacity: 0.9;
  transition: all 0.3s ease;
  z-index: 1; 
}

/* ▼▼▼ 세로 탭 레이아웃 스타일 ▼▼▼ */
.notice-main-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  padding: 0 40px;
  margin: 30px 0 80px;
  box-sizing: border-box;
  width: 100%;
}

.slider-tabs {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  width: 180px;
}

.notice-table-wrapper {
  flex-grow: 1;
  min-width: 0;
}

.tab-btn {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  background-color: transparent;
  color: var(--text-sub);
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.3s, box-shadow 0.3s;
  box-shadow: 4px 4px 8px #dce1e4, -4px -4px 8px #ffffff;
  text-align: left;
}

.tab-btn.active {
  color: #ffffff; /* 흰색 글씨로 변경 */
  box-shadow: inset 2px 2px 4px #dce1e4, inset -2px -2px 4px #ffffff;
}

.tab-btn:not(.active):hover {
  color: var(--text-main);
}

.tab-indicator {
  position: absolute;
  width: 100%;
  left: 0;
  background-color: #007BFF; /* 파란색 배경으로 변경 */
  border-radius: 12px;
  z-index: 1;
  transition: top 0.4s cubic-bezier(0.22, 1, 0.36, 1), height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  /* 은은한 불빛 효과 추가 */
  box-shadow: 0 4px 14px rgba(0, 123, 255, 0.25);
}


/* ▼▼▼ 공지사항 테이블 ▼▼▼ */
.notice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  color: #333;
}

/* 테이블 헤더(th) 스타일 */
.notice-table thead tr {
  border-bottom: 2px solid #e0e0e0;
}



/* 테이블 본문(tbody) 스타일 */
.notice-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.notice-table tbody tr:last-child {
  border-bottom: none;
}

.notice-table tbody tr:hover {
  background-color: #f5f5f5;
}

.notice-table th {
  padding: 12px 8px; /* 좌우 여백을 16px에서 8px로 줄입니다 */
  font-weight: 500;
  color: #555;
  background-color: #f9f9f9;
  text-align: center;
}

.notice-table td {
  padding: 14px 8px; /* 좌우 여백을 16px에서 8px로 줄입니다 */
  vertical-align: middle;
}

/* '공지' 칸의 왼쪽 여백도 함께 줄여줍니다 */
.notice-table .col-num {
  text-align: left;
  padding-left: 12px; /* 왼쪽 여백을 24px에서 12px로 줄입니다 */
  color: #666;
  font-size: 0.9rem;
}

.notice-table .col-date {
  text-align: center; /* 날짜 열은 중앙 정렬 유지 */
  color: #666;
  font-size: 0.9rem;
}

.notice-table .col-title {
  text-align: left;
}

/* NEW 배지 스타일 */
.badge-new {
  display: inline-block;
  background-color: #ff4d4f;
  color: white;
  font-size: 0.7em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 8px;
  font-weight: 700;
  vertical-align: middle;
}


/* ▼▼▼ [수정됨] 상세 내용 스타일 ▼▼▼ */
.notice-detail-row td {
  padding: 0;
}
.notice-content-body {
  padding: 30px 20px;
  line-height: 1.7;
  font-size: 0.95rem;
  background: #fdfdfd;
  text-align: left; /* 이 줄을 추가하여 상세 내용을 왼쪽으로 정렬합니다. */
}
.notice-content-image {
  max-width: 100%;
  height: auto;
  margin-top: 10px;
}
.btn-delete-notice {
  float: right;
  margin: 10px;
  padding: 5px 10px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
/* ▲▲▲ 상세 내용 스타일 수정 끝 ▲▲▲ */


/* ▼▼▼ 페이지네이션 스타일 ▼▼▼ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 28px 0;
}

.page {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50% !important;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  transition: background-color 0.15s;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 1rem;
}

.page:hover {
  background: #f1f3f5;
}

.page.active {
  background: var(--c-accent);
  color: #fff;
  pointer-events: none;
}

.page.disabled {
  color: #ced4da;
  cursor: not-allowed;
  background: transparent;
}

.pagination-ellipsis {
  color: var(--text-sub);
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
}

@media (max-width: 768px) {
  /* --- 1. 페이지 배너 모바일 스타일 --- */
  .notice-page-banner {
    height: auto;
    padding: 24px;
    margin: 16px;
    text-align: left;
  }
  .notice-page-banner h2 {
    font-size: 1.5rem;
  }
  .notice-page-banner p {
    font-size: 0.9rem;
  }
  .notice-banner-image {
    display: none;
  }

  /* --- 2. 메인 레이아웃 및 탭 버튼 재배치 --- */
  .notice-main-container {
    flex-direction: column; /* PC의 좌우 배치를 세로로 변경 */
    padding: 0 16px;
    gap: 24px;
  }
  
  .slider-tabs {
    flex-direction: row; /* 탭 버튼을 가로로 정렬 */
    justify-content: center; /* 탭들을 가운데 정렬 */
    width: 100%;
  }

  .tab-btn {
    font-size: 0.85rem;  /* 글씨 크기 축소 */
    padding: 8px 14px;  /* 버튼 내부 여백 축소 */
    white-space: nowrap; /* 버튼 내 글자 줄바꿈 방지 */
  }
    .tab-indicator {
    box-shadow: none;
    /* ▼▼▼ [핵심 수정] 파란색 배경으로 다시 변경 (JS와 연동) ▼▼▼ */
    background-color: #007BFF;
    /* ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ */
  }

  /* 3. 테이블 글씨 크기 조정 */
  .notice-table {
    font-size: 0.85rem;
  }
  .notice-table th,
  .notice-table td {
    padding: 12px 6px; /* 테이블 셀 내부 여백 조정 */
  }
  .notice-table .col-num,
  .notice-table .col-date {
    font-size: 0.8rem;
  }
}