/* ================================================
   MAIN_bbstab2 - 소통공간 탭 위젯 스타일
   왼쪽: 타이틀 + 탭 (가로) + 바로가기
   오른쪽: 텍스트 리스트 (날짜 + 제목 + 설명)
   ================================================ */

.MAIN_bbstab2 {
  width: 100%;
  float: left;
  position: relative;
  padding: 60px 0;
}

.MAIN_bbstab2 .contents-container {
  position: relative;
}

/* float 요소 높이 포함을 위한 clearfix */
.MAIN_bbstab2 .contents-container::after {
  content: "";
  display: table;
  clear: both;
}

/* ================================================
   왼쪽/오른쪽 분할 레이아웃
   ================================================ */
.MAIN_bbstab2 .bbstab2-layout {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

/* 왼쪽 영역: 타이틀 + 탭 */
.MAIN_bbstab2 .bbstab2-left {
  flex: 0 0 380px;
  max-width: 380px;
}

/* 오른쪽 영역: 게시물 리스트 */
.MAIN_bbstab2 .bbstab2-right {
  flex: 1;
  min-width: 0;
  border-left: 1px solid #e2e8f0;
  padding-left: 60px;
}

/* ================================================
   타이틀 영역 스타일
   ================================================ */
.MAIN_bbstab2 .bbstab2-title-area {
  margin-bottom: 20px;
}

.MAIN_bbstab2 .sub_stit1 {
  font-size: 14px;
  font-weight: 600;
  color: #dc2626;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.MAIN_bbstab2 .sub_stit2 {
  font-size: 36px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.2;
  margin-bottom: 16px;
}

.MAIN_bbstab2 .sub_stit3 {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
}

.MAIN_bbstab2 .sub_stit4,
.MAIN_bbstab2 .sub_stit5 {
  font-size: 14px;
  color: #94a3b8;
  margin-top: 8px;
}

/* ================================================
   탭 버튼 스타일 (가로 배치)
   ================================================ */
.MAIN_bbstab2 .bbstab2-tabs {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.MAIN_bbstab2 .bbstab2-tabs .tab-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.MAIN_bbstab2 .bbstab2-tabs .tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.MAIN_bbstab2 .bbstab2-tabs .tab:hover {
  border-color: #dc2626;
  color: #dc2626;
}

/* 활성화 탭: 빨간 배경 + 흰 글씨 */
.MAIN_bbstab2 .bbstab2-tabs .tab.on {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  font-weight: 600;
}

.MAIN_bbstab2 .bbstab2-tabs .tab .tab-label {
  line-height: 1;
}

/* 관리자 설정 아이콘 */
.MAIN_bbstab2 .bbstab2-tabs .tab_mix_icon {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #10b981;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.MAIN_bbstab2 .bbstab2-tabs .tab-wrapper:hover .tab_mix_icon {
  opacity: 1;
}

.MAIN_bbstab2 .bbstab2-tabs .tab_mix_icon i {
  font-size: 12px;
  color: #fff;
}

/* ================================================
   바로가기 링크
   ================================================ */
.MAIN_bbstab2 .bbstab2-goto {
  margin-top: 20px;
  padding-top: 20px;
}

.MAIN_bbstab2 .bbstab2-goto a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #1e293b;
  text-decoration: none;
  transition: color 0.2s;
}

.MAIN_bbstab2 .bbstab2-goto a:hover {
  color: #dc2626;
}

.MAIN_bbstab2 .bbstab2-goto a:hover .goto-icon {
  background: #dc2626;
}

.MAIN_bbstab2 .bbstab2-goto .goto-text {
  display: inline-flex;
  align-items: center;
}

.MAIN_bbstab2 .bbstab2-goto .goto-text::after {
  content: "•";
  margin-left: 12px;
  color: #94a3b8;
}

.MAIN_bbstab2 .bbstab2-goto .goto-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #1e293b;
  border-radius: 50%;
  transition: background 0.2s;
}

.MAIN_bbstab2 .bbstab2-goto .goto-icon i {
  font-size: 18px;
  color: #fff;
}

/* ================================================
   탭 콘텐츠 패널
   ================================================ */
.MAIN_bbstab2 .tab-content {
  display: none;
}

.MAIN_bbstab2 .tab-content.active {
  display: block;
}

.MAIN_bbstab2 .bbs_list_wrap {
  width: 100%;
}

/* ================================================
   게시물 리스트 아이템 스타일 (기본)
   ================================================ */
.MAIN_bbstab2 .bbs_list_wrap ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.MAIN_bbstab2 .bbs_list_wrap li {
  border-bottom: 1px solid #e2e8f0;
}

.MAIN_bbstab2 .bbs_list_wrap li:last-child {
  border-bottom: none;
}

.MAIN_bbstab2 .bbs_list_wrap li a {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  padding: 24px 0;
  text-decoration: none;
  transition: background 0.2s;
}

.MAIN_bbstab2 .bbs_list_wrap li a:hover {
  background: #f8fafc;
  margin: 0 -20px;
  padding: 24px 20px;
}

/* 날짜 영역 */
.MAIN_bbstab2 .bbs_list_wrap .item-date {
  flex: 0 0 80px;
  text-align: center;
}

.MAIN_bbstab2 .bbs_list_wrap .item-date .year {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.MAIN_bbstab2 .bbs_list_wrap .item-date .day {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

/* 텍스트 영역 */
.MAIN_bbstab2 .bbs_list_wrap .item-text {
  flex: 1;
  min-width: 0;
}

.MAIN_bbstab2 .bbs_list_wrap .item-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}

.MAIN_bbstab2 .bbs_list_wrap li a:hover .item-title {
  color: #dc2626;
}

.MAIN_bbstab2 .bbs_list_wrap .item-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================================================
   빈 리스트 스타일
   ================================================ */
.MAIN_bbstab2 .empty_li {
  padding: 60px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 15px;
}

/* ================================================
   latest 스킨 오버라이드 (JLS_textlist2 스킨용)
   ================================================ */
.MAIN_bbstab2 .JLS_textlist2 {
  width: 100%;
  padding: 0 !important;
}

.MAIN_bbstab2 .JLS_textlist2 ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.MAIN_bbstab2 .JLS_textlist2 li {
  border-bottom: 1px solid #e2e8f0;
}

.MAIN_bbstab2 .JLS_textlist2 li:last-child {
  border-bottom: none;
}

.MAIN_bbstab2 .JLS_textlist2 li a {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  padding: 24px 0;
  text-decoration: none;
  transition: background 0.2s;
}

.MAIN_bbstab2 .JLS_textlist2 li a:hover {
  background: #f8fafc;
  margin: 0 -20px;
  padding: 24px 20px;
}

/* 날짜 */
.MAIN_bbstab2 .JLS_textlist2 .date-box {
  flex: 0 0 80px;
  text-align: center;
}

.MAIN_bbstab2 .JLS_textlist2 .date-box .year {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.MAIN_bbstab2 .JLS_textlist2 .date-box .day {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

/* 텍스트 */
.MAIN_bbstab2 .JLS_textlist2 .text-box {
  flex: 1;
  min-width: 0;
}

.MAIN_bbstab2 .JLS_textlist2 .subject {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.MAIN_bbstab2 .JLS_textlist2 li a:hover .subject {
  color: #dc2626;
}

.MAIN_bbstab2 .JLS_textlist2 .content {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================================================
   반응형 - 태블릿
   ================================================ */
@media only all and (max-width: 1024px) {
  .MAIN_bbstab2 .bbstab2-layout {
    gap: 40px;
  }

  .MAIN_bbstab2 .bbstab2-left {
    flex: 0 0 300px;
    max-width: 300px;
  }

  .MAIN_bbstab2 .bbstab2-right {
    padding-left: 40px;
  }

  .MAIN_bbstab2 .sub_stit2 {
    font-size: 30px;
  }

  .MAIN_bbstab2 .bbstab2-tabs .tab {
    padding: 10px 20px;
    font-size: 14px;
  }

  .MAIN_bbstab2 .JLS_textlist2 li a,
  .MAIN_bbstab2 .bbs_list_wrap li a {
    gap: 20px;
  }

  .MAIN_bbstab2 .JLS_textlist2 .date-box .day,
  .MAIN_bbstab2 .bbs_list_wrap .item-date .day {
    font-size: 28px;
  }

  .MAIN_bbstab2 .JLS_textlist2 .subject,
  .MAIN_bbstab2 .bbs_list_wrap .item-title {
    font-size: 16px;
  }
}

/* ================================================
   반응형 - 모바일
   ================================================ */
@media only all and (max-width: 767px) {
  .MAIN_bbstab2 {
    padding: 40px 0;
  }

  .MAIN_bbstab2 .bbstab2-layout {
    flex-direction: column;
    gap: 30px;
  }

  .MAIN_bbstab2 .bbstab2-left {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .MAIN_bbstab2 .bbstab2-right {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
  }

  .MAIN_bbstab2 .bbstab2-title-area {
    margin-bottom: 15px;
  }

  .MAIN_bbstab2 .sub_stit2 {
    font-size: 26px;
  }

  /* 탭 가로 스크롤 */
  .MAIN_bbstab2 .bbstab2-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 5px;
  }

  .MAIN_bbstab2 .bbstab2-tabs::-webkit-scrollbar {
    display: none;
  }

  .MAIN_bbstab2 .bbstab2-tabs .tab {
    padding: 10px 20px;
    font-size: 14px;
  }

  .MAIN_bbstab2 .bbstab2-goto {
    margin-top: 20px;
  }

  /* 리스트 스타일 */
  .MAIN_bbstab2 .JLS_textlist2 li a,
  .MAIN_bbstab2 .bbs_list_wrap li a {
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
  }

  .MAIN_bbstab2 .JLS_textlist2 li a:hover,
  .MAIN_bbstab2 .bbs_list_wrap li a:hover {
    margin: 0;
    padding: 20px 0;
    background: transparent;
  }

  .MAIN_bbstab2 .JLS_textlist2 .date-box,
  .MAIN_bbstab2 .bbs_list_wrap .item-date {
    flex: none;
    display: flex;
    align-items: baseline;
    gap: 6px;
    text-align: left;
  }

  .MAIN_bbstab2 .JLS_textlist2 .date-box .year,
  .MAIN_bbstab2 .bbs_list_wrap .item-date .year {
    font-size: 14px;
    margin-bottom: 0;
  }

  .MAIN_bbstab2 .JLS_textlist2 .date-box .day,
  .MAIN_bbstab2 .bbs_list_wrap .item-date .day {
    font-size: 20px;
  }

  .MAIN_bbstab2 .JLS_textlist2 .subject,
  .MAIN_bbstab2 .bbs_list_wrap .item-title {
    font-size: 15px;
    margin-bottom: 4px;
  }

  .MAIN_bbstab2 .JLS_textlist2 .content,
  .MAIN_bbstab2 .bbs_list_wrap .item-desc {
    font-size: 13px;
  }
}

/* ================================================
   관리자 모드 스타일
   ================================================ */
.MAIN_bbstab2 .tab-content.tab_admin_mode {
  position: relative;
  border: 2px dashed #10b981;
  transition: all 0.2s ease;
}

.MAIN_bbstab2 .tab-content.tab_admin_mode:hover {
  border-color: #059669;
  background-color: rgba(16, 185, 129, 0.03);
}

/* 포커스 스타일 제거 */
.MAIN_bbstab2 .bbstab2-tabs [role="tab"] {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.MAIN_bbstab2 .bbstab2-tabs [role="tab"]:focus {
  outline: none;
  box-shadow: none;
}

.MAIN_bbstab2 .bbstab2-tabs [role="tab"]:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* 숨김 보장 */
[hidden] {
  display: none !important;
}

/* ================================================
   데코 영역 스타일
   ================================================ */
.MAIN_bbstab2 .deco_area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.MAIN_bbstab2 .deco_area_left {
  overflow: visible !important;
}

.MAIN_bbstab2 .deco_area_right {
  position: absolute;
  bottom: 0px;
  left: calc((100% - var(--container-width, 1560px)) / 2);
  right: 0;
  width: auto;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

@media (max-width: 1400px) {
  .MAIN_bbstab2 .deco_area_right {
    left: 0;
  }
}

.MAIN_bbstab2 .deco_img {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.MAIN_bbstab2 .deco_img img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* PC/모바일 표시 제어 */
.MAIN_bbstab2 .wg_pc_only {
  display: block;
}

.MAIN_bbstab2 .wg_mo_only {
  display: none;
}

@media only all and (max-width:767px) {
  .MAIN_bbstab2 .wg_pc_only {
    display: none;
  }
  .MAIN_bbstab2 .wg_mo_only {
    display: block;
  }
}

/* 관리자 모드 - 데코 이미지 편집 가능 상태 */
.MAIN_bbstab2 .deco_area.admin_mode {
  pointer-events: auto;
}

.MAIN_bbstab2 .deco_area.admin_mode .deco_img {
  pointer-events: auto;
  cursor: pointer;
  outline: 2px dashed transparent;
  outline-offset: 2px;
  transition: outline-color 0.2s ease;
}

.MAIN_bbstab2 .deco_area.admin_mode .deco_img:hover {
  outline-color: #f59e0b;
}
