/* Notice Board CSS - notice.css */
.notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.write-btn {
    background: #ff8080;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.write-btn:hover {
    background: #ff6666;
}

/* 전체 컨테이너 스타일 */
.notice-container {
  margin: 30px auto 100px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 탭 스타일 */
.tab {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
  gap: 0;
}

.tablinks {
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  position: relative;
  outline: none;
}

.tablinks:hover {
  color: #03c95c;
  /* background: #f8fafc; */
}

.tablinks.active {
  color: #03c95c;
  border-bottom-color: #03c95c;
  font-weight: 600;
}

.tablinks i {
  font-size: 14px;
  margin-right: 6px;
}

/* 제목 스타일 */
h2 {
  color: #1e293b;
  font-size: 28px;
  font-weight: 700;
  margin: 10px;
  position: relative;
}

/* 공지 목록 스타일 */
.notice_list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.notice_item {
  display: flex;              /* flex 적용 */
  align-items: center;        /* 수직 중앙 정렬 */
  justify-content: space-between; /* 양 끝 정렬 */
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  padding: 0; /* padding은 a 안으로 이동 */
}

.notice_item:last-child {
  border-bottom: none;
}

.notice_item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  transition: width 0.3s ease;
}

.notice_item:hover {
  background: #f8fafc;
}

.notice_item a {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  text-decoration: none;
  color: #334155;
  font-size: 15px;
  gap: 12px;
  flex: 1; /* 왼쪽 영역 채우기 */
}

.notice_item a:hover {
  color: #1e293b;
}

/* 수정, 삭제 버튼 */
.admin-btns {
  display: flex;
  gap: 6px;
  margin-right: 16px; /* 오른쪽 여백 */
}

.admin-btns button {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  background: #f8fafc;
  color: #334155;
  transition: all 0.2s;
}

.admin-btns button:hover {
  background: #d9d9d9;
}

.submit-container {
  text-align: center;
}

/* 뱃지 스타일 */
.notice_fix {
  padding: 4px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 뱃지 색상 변형 */
.notice_item a .notice_fix {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(128, 128, 128, 0.2);
}

/* 긴급공지 뱃지 */
.notice_item a .notice_fix[data-type="urgent"],
.notice_item a .notice_fix.urgent {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

/* 제목 */
.notice_item .title {
  flex: 1;
  font-weight: 500;
  line-height: 1.5;
  margin-right: auto;
}

/* 날짜 스타일 */
.notice_date {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 400;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 페이징 스타일 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding: 20px 0;
}

.pagination a {
    padding: 8px 7px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
    transition: all 0.2s ease;
}

.pagination a:hover {
  background: #ccc;
  color: #ffffff;
  font-size: 15px;
}

.pagination a.active {
  background: #ccc;
  color: #ffffff;
  font-size: 15px;
}

.pagination a span {
  font-size: 14px;
  color: #737373;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .notice-container {
    padding: 16px;
  }
  
  .tab {
    margin-bottom: 20px;
  }
  
  .tablinks {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .tablinks i {
    font-size: 13px;
    margin-right: 4px;
  }
  
  h2 {
    font-size: 24px;
  }
  
  .notice_item a {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 8px;
  }
  
  .notice_date {
    margin-left: 0;
    align-self: flex-end;
  }
  
  .pagination {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .pagination a {
    padding: 8px 12px;
    min-width: 36px;
    font-size: 14px;
  }
}

/* 모바일 최적화 */
@media (max-width: 480px) {
  .notice-container {
    padding: 12px;
  }
  
  .tablinks {
    font-size: 12px;
    padding: 8px 12px;
  }
  
  .tablinks i {
    font-size: 12px;
    margin-right: 4px;
  }
  
  .notice_item a {
    padding: 14px;
  }
  
  .notice_fix {
    font-size: 11px;
    padding: 3px 8px;
  }
}

/* 로딩 애니메이션 */
.loading {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* 접근성 개선 */
.notice_item a:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
  .notice-container {
    background: #0f172a;
    color: #e2e8f0;
  }
  
  .tab {
    background: transparent;
    border-bottom-color: #334155;
  }
  
  .tablinks {
    color: #94a3b8;
  }
  
  .tablinks:hover {
    background: #1e293b;
    color: #e2e8f0;
  }
  
  .tablinks.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
  }
  
  h2 {
    color: #f1f5f9;
  }
  
  .notice_list {
    background: #1e293b;
  }
  
  .notice_item {
    border-bottom-color: #334155;
  }
  
  .notice_item:hover {
    background: #334155;
  }
  
  .notice_item a {
    color: #e2e8f0;
  }
  
  .pagination a {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
  }
  
  .pagination a:hover {
    background: #334155;
    color: #e2e8f0;
  }
}

/* 공지사항 수정 */
.edit-form { max-width: 650px; margin: 50px auto; padding: 20px 40px; border:1px solid #e5e7eb; border-radius:10px; }
.edit-title {margin: 10px 0 40px;  }
.edit-form label { display:block; margin: 15px 0 0 5px; font-weight:600; font-size: 16px;}
.edit-form input, .edit-form select {width:100%; padding:8px; margin-top:5px; border:1px solid #cbd5e1; border-radius:6px; font-size:15px;}
.edit-form button {margin-top:30px; padding:9px 15px; background:#ff8080; color:#fff; border:none; border-radius:6px; cursor:pointer; font-size:15px;}
.edit-form button:hover { background:#ff4d4d; }
input[type="date"] {cursor: pointer;}