/* ================================================
   TOTAL_BBS6 - 공지 카드 스킨
   라벨(탭컬러) + 링크버튼 + 제목 + 본문 + 날짜
   모든 값 CSS 변수 → 실시간 반영 가능
   ================================================ */

.TOTAL_BBS6 {
  width: 100%;
  float: left;
}

/* 카드 전체 */
.TOTAL_BBS6 .bbs6_card {
  width: 100%;
  float: left;
  background: var(--bbs6-box-bg, #f5f5f5);
  border-radius: var(--bbs6-box-radius, clamp(12px, calc(0.94vw + 9px), 24px));
  padding: var(--bbs6-box-padding, clamp(20px, calc(1.56vw + 15px), 35px));
  box-sizing: border-box;
  border: var(--bbs6-border-width, 1px) solid var(--bbs6-border-color, transparent);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, border-width 0.3s ease;
}

.TOTAL_BBS6 .bbs6_card:hover {
  box-shadow: var(--bbs6-hover-shadow, none);
  border-color: var(--bbs6-hover-border-color, var(--bbs6-border-color, transparent));
  border-width: var(--bbs6-hover-border-width, var(--bbs6-border-width, 1px));
}

/* 카드 헤더: 라벨 + 링크버튼 */
.TOTAL_BBS6 .bbs6_card_head {
  width: 100%;
  float: left;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--bbs6-head-mb, clamp(14px, calc(0.78vw + 11.5px), 24px));
}

/* 라벨
   ★ WCAG 1.4.3 — 사용자가 옅은 탭 컬러 지정 시 흰 글씨가 안 보일 수 있음.
     안전장치: 어두운 반투명 그림자(text-shadow) + 미세 다크 테두리(외곽 1px)로
     배경색 무관하게 가독성 확보. 시각 디자인은 거의 영향 없음. */
.TOTAL_BBS6 .bbs6_label {
  display: inline-flex;
  align-items: center;
  padding: clamp(6px, calc(0.31vw + 5px), 10px) clamp(12px, calc(0.63vw + 10px), 20px);
  border-radius: 100px;
  color: #fff;
  font-size: clamp(12px, calc(0.31vw + 11px), 16px);
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
  line-height: 1.2;
  /* 가독성 보강 — 옅은 배경에서도 글자 식별 가능 */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* + 링크 버튼
   ★ WCAG 1.4.11 UI 컴포넌트 대비 (3:1 이상) — 테두리 #ccc(1.27:1) → #767676(4.5:1) */
.TOTAL_BBS6 .bbs6_link_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--bbs6-link-size, clamp(30px, calc(0.94vw + 27px), 42px));
  height: var(--bbs6-link-size, clamp(30px, calc(0.94vw + 27px), 42px));
  border-radius: 50%;
  border: 1.5px solid var(--bbs6-link-border, #767676);
  background: var(--bbs6-link-bg, transparent);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.TOTAL_BBS6 .bbs6_link_btn:hover {
  background: var(--bbs6-link-hover-bg, #000);
  border-color: var(--bbs6-link-hover-bg, #000);
}

.TOTAL_BBS6 .bbs6_link_btn:hover .bbs6_plus {
  transform: rotate(180deg);
}

.TOTAL_BBS6 .bbs6_link_btn:hover .bbs6_plus::before,
.TOTAL_BBS6 .bbs6_link_btn:hover .bbs6_plus::after {
  background: var(--bbs6-link-hover-color, #fff);
}

/* + 아이콘 (CSS로 그림) */
.TOTAL_BBS6 .bbs6_plus {
  position: relative;
  width: var(--bbs6-link-icon-size, clamp(12px, calc(0.47vw + 10.5px), 18px));
  height: var(--bbs6-link-icon-size, clamp(12px, calc(0.47vw + 10.5px), 18px));
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center center;
}

.TOTAL_BBS6 .bbs6_plus::before,
.TOTAL_BBS6 .bbs6_plus::after {
  content: '';
  position: absolute;
  /* ★ + 아이콘 색 #555(6.9:1)→#333(12.6:1) — 그래픽 대비 충분 확보 */
  background: var(--bbs6-link-color, #333);
  transition: background 0.25s ease;
}

.TOTAL_BBS6 .bbs6_plus::before {
  width: 100%;
  height: 2px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.TOTAL_BBS6 .bbs6_plus::after {
  width: 2px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

/* 카드 본문 */
.TOTAL_BBS6 .bbs6_card_body {
  width: 100%;
  float: left;
}

/* ★ 시맨틱 마크업 reset — h3/p/time/a 가 헤딩/단락 기본 스타일을 덮어쓰지 않게 */
.TOTAL_BBS6 .bbs6_card_body h3,
.TOTAL_BBS6 .bbs6_card_body p,
.TOTAL_BBS6 .bbs6_card_body time {
  margin: 0;
  padding: 0;
}
.TOTAL_BBS6 .bbs6_title_link {
  display: block;
  color: inherit;
  text-decoration: none;
  outline: none;
}
.TOTAL_BBS6 .bbs6_title_link:hover .bbs6_title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 제목 */
.TOTAL_BBS6 .bbs6_title {
  font-size: var(--bbs6-title-size, clamp(15px, calc(0.47vw + 13.5px), 21px));
  color: var(--bbs6-title-color, #111);
  font-weight: var(--bbs6-title-weight, 700);
  margin-bottom: var(--bbs6-title-mb, clamp(8px, calc(0.47vw + 6.5px), 14px));
  min-height: var(--bbs6-title-min-h, auto);
  line-height: var(--bbs6-title-lh, 1.5);
  letter-spacing: -0.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 본문
   ★ WCAG 1.4.3 일반 텍스트 4.5:1 — #666(5.07:1) 통과지만 #595959(7:1=AAA)로 안전선 상향 */
.TOTAL_BBS6 .bbs6_content {
  font-size: var(--bbs6-body-size, clamp(13px, calc(0.31vw + 12px), 17px));
  color: var(--bbs6-body-color, #595959);
  font-weight: var(--bbs6-body-weight, 400);
  margin-bottom: var(--bbs6-body-mb, clamp(12px, calc(0.63vw + 10px), 20px));
  min-height: var(--bbs6-body-min-h, auto);
  line-height: var(--bbs6-body-lh, 1.6);
  letter-spacing: -0.3px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 날짜
   ★ WCAG 1.4.3 — #999(2.62:1) 위반 → #666(5.07:1) 통과로 수정
   사용자가 위젯 옵션으로 더 옅게 지정해도, 기본값은 안전선 보장 */
.TOTAL_BBS6 .bbs6_date {
  font-size: var(--bbs6-date-size, clamp(12px, calc(0.31vw + 11px), 16px));
  color: var(--bbs6-date-color, #666);
  font-weight: var(--bbs6-date-weight, 400);
  margin-bottom: var(--bbs6-date-mb, 0);
  letter-spacing: 0;
}

/* 카드 높이 통일 모드 (위젯 루트 .bbs6-equal-height에서 제어) */
.bbs6-equal-height .TOTAL_BBS6 {
  height: 100%;
}
.bbs6-equal-height .TOTAL_BBS6 .bbs6_card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.bbs6-equal-height .TOTAL_BBS6 .bbs6_card_body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.bbs6-equal-height .TOTAL_BBS6 .bbs6_content {
  flex: 1;
}

/* 웹접근성: 포커스 — 키보드 사용자가 + 버튼 도달 시 시각 표시
   ★ WCAG 2.4.7 Focus Visible. 진한 검정+offset 으로 어떤 배경에서도 가시 */
.TOTAL_BBS6 .bbs6_link_btn:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

/* ★ WCAG 2.3.3 / KWCAG 5.4.2 — 사용자가 동작 줄이기 선호 시 회전 애니메이션 비활성 */
@media (prefers-reduced-motion: reduce) {
  .TOTAL_BBS6 .bbs6_link_btn,
  .TOTAL_BBS6 .bbs6_plus,
  .TOTAL_BBS6 .bbs6_plus::before,
  .TOTAL_BBS6 .bbs6_plus::after,
  .TOTAL_BBS6 .bbs6_card {
    transition: none !important;
  }
  .TOTAL_BBS6 .bbs6_link_btn:hover .bbs6_plus {
    transform: none !important;
  }
}

/* 강제 색상 모드 (Windows 고대비) — 시스템 컬러 따라가 가독성 보장 */
@media (forced-colors: active) {
  .TOTAL_BBS6 .bbs6_card {
    border: 1px solid CanvasText;
  }
  .TOTAL_BBS6 .bbs6_link_btn {
    border-color: CanvasText;
  }
  .TOTAL_BBS6 .bbs6_plus::before,
  .TOTAL_BBS6 .bbs6_plus::after {
    background: CanvasText;
  }
}

/* 인쇄 — 호버 그림자/애니메이션 제거 */
@media print {
  .TOTAL_BBS6 .bbs6_card {
    box-shadow: none !important;
    border: 1px solid #999 !important;
  }
  .TOTAL_BBS6 .bbs6_link_btn {
    display: none;
  }
}

/* ================================================
   모바일
   ================================================ */
@media only all and (max-width: 767px) {
  .TOTAL_BBS6 .bbs6_card_head {
    margin-bottom: 12px;
  }

  .TOTAL_BBS6 .bbs6_label {
    padding: 5px 12px;
    font-size: 12px;
  }
}
