/* ================================
   커뮤니티 페이지 스타일 (_board.css)
   ================================ */

/* 색상 및 레이아웃 정의 */
:root {
    --primary: #d9441a;
    --blue: #d9441a;
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
    --border: #ddd;
    --border-light: #e5e5e5;
    --border-lighter: #e9ecef;
    --bg: #fff;
    --bg-light: #f9f9f9;
    --bg-lighter: #f5f5f5;
    --bg-accent: #f8f9fa;
    --orange: #F08869;
    --orange-dark: #d9441a;
    --layoutwidth: 1400px;
}

/* h1 타이틀 - step0.jsp와 동일하게 적용 */
#sub_container .sub_cont h1 {
    font-family: 'koroad_bold' !important;
    font-size: 3.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 50px;
    text-align: left;
}

/* ================================
   상단 돈 애니메이션 영역
   ================================ */

/* 상단 영역 */
#sub_container .sub_cont .inner .top {
    /*position: relative;*/
    margin-bottom: 50px;
}

/* 돼지 이미지 */
#sub_container .sub_cont .top .pig {
    position: absolute;
    top: -88px;
    right: 0;
    z-index: -1;
}

/* 돈 애니메이션 공통 스타일 */
#sub_container .sub_cont .top .money {
    position: absolute;
    width: 60px;
    height: auto;
    right: 175px;
    top: -66px;
    transform: translate(50%, 50%);
    opacity: 0;
}

/* 첫 번째 돈 애니메이션 */
#sub_container .sub_cont .top .money.n-1 {
    animation: subMoneyBurst1 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
    subMoneyFloat1 3s ease-in-out infinite;
    animation-delay: 0s, 1.5s;
}

/* 두 번째 돈 애니메이션 */
#sub_container .sub_cont .top .money.n-2 {
    animation: subMoneyBurst2 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
    subMoneyFloat2 3s ease-in-out infinite;
    animation-delay: 0.1s, 1.6s;
}

/* 세 번째 돈 애니메이션 */
#sub_container .sub_cont .top .money.n-3 {
    animation: subMoneyBurst3 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
    subMoneyFloat3 3s ease-in-out infinite;
    animation-delay: 0.2s, 1.7s;
}

/* 돈 터지는 애니메이션 1 */
@keyframes subMoneyBurst1 {
    0% {
        transform: translate(50%, 50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translate(50%, 50%) scale(1.3) rotate(90deg);
    }
    50% {
        transform: translate(calc(50% + 50px), calc(50% - 70px)) scale(1.1) rotate(360deg);
    }
    100% {
        opacity: 0.7;
        transform: translate(calc(50% + 90px), calc(50% - 100px)) scale(1) rotate(720deg);
    }
}

/* 돈 터지는 애니메이션 2 */
@keyframes subMoneyBurst2 {
    0% {
        transform: translate(50%, 50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translate(50%, 50%) scale(1.3) rotate(-90deg);
    }
    50% {
        transform: translate(calc(50% - 40px), calc(50% - 50px)) scale(1.1) rotate(-360deg);
    }
    100% {
        opacity: 0.7;
        transform: translate(calc(50% - 80px), calc(50% - 80px)) scale(1) rotate(-720deg);
    }
}

/* 돈 터지는 애니메이션 3 */
@keyframes subMoneyBurst3 {
    0% {
        transform: translate(50%, 50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translate(50%, 50%) scale(1.3) rotate(60deg);
    }
    50% {
        transform: translate(calc(50% - 20px), calc(50% + 60px)) scale(1.1) rotate(540deg);
    }
    100% {
        opacity: 0.7;
        transform: translate(calc(50% - 50px), calc(50% + 110px)) scale(1) rotate(1080deg);
    }
}

/* 돈 떠다니는 애니메이션 1 */
@keyframes subMoneyFloat1 {
    0%, 100% {
        transform: translate(calc(50% + 90px), calc(50% - 100px)) rotate(720deg) translateY(0);
    }
    50% {
        transform: translate(calc(50% + 90px), calc(50% - 100px)) rotate(750deg) translateY(-10px);
    }
}

/* 돈 떠다니는 애니메이션 2 */
@keyframes subMoneyFloat2 {
    0%, 100% {
        transform: translate(calc(50% - 80px), calc(50% - 80px)) rotate(720deg) translateY(0);
    }
    50% {
        transform: translate(calc(50% - 80px), calc(50% - 80px)) rotate(750deg) translateY(-10px);
    }
}

/* 돈 떠다니는 애니메이션 3 */
@keyframes subMoneyFloat3 {
    0%, 100% {
        transform: translate(calc(50% - 50px), calc(50% + 110px)) rotate(720deg) translateY(0);
    }
    50% {
        transform: translate(calc(50% - 50px), calc(50% + 110px)) rotate(750deg) translateY(-10px);
    }
}

/* 서브 컨테이너 기본 스타일 */
#sub_container {
    background-size: 600px;
    background: url(../images/sub/bg_blue01.png) no-repeat 0 -10px;
}

/* 서브 콘텐츠 영역 */
#sub_container .sub_cont {
    padding: 100px 0;
    overflow: hidden;
    width: 100%;
}

/* 커뮤니티 inner 가로 너비 - 사업안내와 동일 */
#sub_container .sub_cont .inner {
    width: auto;
    padding-left: 3.750rem;
    padding-right: 3.750rem;
    max-width: var(--layoutwidth);
    margin: auto;
}

#sub_container .sub_cont.sub_gallery {
    /* 갤러리 스타일 */
}

#sub_container .sub_cont.sub_gallery.ver_view {
    /* 버전 뷰 스타일 */
}

/* ================================
   게시판 기본 스타일
   ================================ */

/* 보드 레이아웃 */
.board_ly {
    background: var(--bg);
    min-width: 200px;
    padding: 18px 40px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'koroad_bold' !important;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 보드 래퍼 */
.board_wrap {
    background: var(--bg);
    width: 100%;
    max-width: var(--layoutwidth);
    margin: 0 auto;
    padding: 40px 60px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'koroad_bold' !important;
}

/* board_wrap이 inner와 함께 사용될 때 padding 제거 */
.board_wrap.inner {
    padding: 0;
    max-width: 100%;
}

/* 게시판 내부 콘텐츠에 padding 적용 */
.board_wrap.inner > * {
    padding-left: 40px;
    padding-right: 40px;
}

.board_wrap.inner > *:first-child {
    padding-top: 40px;
}

.board_wrap.inner > *:last-child {
    padding-bottom: 40px;
}

/* ================================
   게시판 목록 스타일
   ================================ */

/* 보드 상단 영역 */
.board_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.board_top.flexBox {
    display: flex;
}

.board_top.area02 {
    /* 특별 스타일 */
}

.board_top.m-column {
    flex-direction: column;
    align-items: flex-start;
}

/* 총 건수 표시 */
.bo_list_total {
    font-size: 14px;
    color: var(--text-light);
    font-weight: normal;
}

.bo_list_total strong {
    font-weight: 700;
    color: var(--text);
}

/* 검색 래퍼 */
.bo_sch_wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
}

.bo_sch_wrap.inflex {
    display: inline-flex;
}

.bo_sch_wrap form {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.bo_sch_wrap fieldset {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
}

/* 검색 캐테고리 선택 */
.selTxt {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: var(--bg);
    font-size: 14px;
    cursor: pointer;
    min-width: 100px;
    color: var(--text);
}

.selTxt:hover,
.selTxt:focus {
    border-color: var(--primary);
    outline: none;
}

/* 검색 입력창 래퍼 */
.sch_bar {
    display: flex;
    align-items: center;
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

/* 검색 입력창 */
.sch_input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    font-size: 14px;
    color: var(--text);
}

.sch_input:focus {
    outline: none;
}

/* 검색 버튼 */
.sch_btn {
    padding: 10px 15px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sch_btn img {
    width: 20px;
    height: 20px;
}

/* 사운드 온리 (접근성) */
.sound_only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 게시물 알림 영역 */
.board_noti {
    margin-bottom: 30px;
}

.board_noti ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.board_noti li {
    border-bottom: 1px solid var(--border-light);
    list-style: none;
}

.board_noti li:last-child {
    border-bottom: none;
}

.board_noti a {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 0;
    text-decoration: none;
    color: var(--text);
    transition: background-color 0.2s ease;
}

.board_noti li:hover a {
    background-color: var(--bg-accent);
    padding: 20px 10px;
    border-radius: 4px;
}

/* 게시물 번호 */
.board_noti .num {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--primary);
}

/* 게시물 콘텐츠 */
.board_noti .cont {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 게시물 제목 */
.board_noti .tit {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.board_noti a:hover .tit {
    color: var(--primary);
}

/* 게시물 작성일 */
.board_noti .date {
    font-size: 13px;
    color: var(--text-lighter);
    white-space: nowrap;
}

/* ================================
   페이지네이션
   ================================ */

.board_wrap .pg_wrap {
    margin-top: 65px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.board_wrap .pg_wrap a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.board_wrap .pg_wrap a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.board_wrap .pg_wrap a.active {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.board_wrap .pg_wrap a.pg_arw {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 16px;
}

.board_wrap .pg_wrap a.pg_pprev::before {
    content: "«";
}

.board_wrap .pg_wrap a.pg_prev::before {
    content: "‹";
}

.board_wrap .pg_wrap a.pg_next::before {
    content: "›";
}

.board_wrap .pg_wrap a.pg_nnext::before {
    content: "»";
}

/* ================================
   게시판 상세 보기 스타일
   ================================ */

/* 게시판 상세 헤더 */
.board_wrap .bo_view_hd {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.board_wrap .bo_view_hd.tc {
    text-align: center;
}

/* 게시물 제목 */
.board_wrap .bo_view_hd .tit {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 15px;
    word-break: break-word;
}

.board_wrap .bo_view_hd .tit.fw500 {
    font-weight: 500;
}

/* 게시물 정보 */
.board_wrap .bo_view_hd .info {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.board_wrap .bo_view_hd .info span {
    font-size: 13px;
    color: var(--text-lighter);
}

.board_wrap .bo_view_hd .info span + span {
    padding-left: 10px;
    margin-left: 10px;
    border-left: 1px solid #ddd;
}

.board_wrap .bo_view_hd .info span + span::before {
    display: none;
}

/* 게시물 파일 영역 */
.board_wrap .bo_view_file {
    padding: 20px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.file_tit {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 100px;
    font-weight: 600;
    color: var(--text);
}

.file_tit img {
    width: 20px;
    height: 20px;
}

.file_list {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.file_list a {
    padding: 5px 10px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.file_list a:hover {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* 게시물 본문 내용 */
.board_wrap .bo_view_cont {
    padding: 30px 0;
    line-height: 1.8;
    color: var(--text);
    font-size: 15px;
    word-break: break-word;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 30px;
}

.board_wrap .bo_view_cont img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.board_wrap .bo_view_cont figure {
    margin: 20px auto;
    text-align: center;
}

/* 버튼 영역 */
.btn_area {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 0;
}

.btn_area.tr {
    text-align: right;
}

/* 목록으로 버튼 - 사업신청 다음 버튼과 동일한 스타일 */
.btn_line_blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 200px;
    padding: 18px 40px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'koroad_bold' !important;
    border: none;
    background-color: var(--primary);
    color: #fff !important;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn_line_blue:hover {
    background-color: #d9441a;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 85, 41, 0.3);
}

.btn_line_blue img {
    width: 18px;
    height: 18px;
}


/* ================================
   FAQ 페이지 스타일
   ================================ */

/* 카테고리 탭 */
.faq_category_tab {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    align-items: center;
}

.faq_tab_btn {
    padding: 12px 24px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.faq_tab_btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.faq_tab_btn.active {
    background-color: #d9441a;
    border-color: #d9441a;
    color: #fff;
}

/* FAQ 아코디언 */
.faq_accordion {
    margin-bottom: 40px;
}

.faq_item {
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
}

.faq_item:hover {
    background-color: var(--bg-accent);
}

/* FAQ 질문 버튼 */
.faq_question {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    padding: 25px 0;
    background-color: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.faq_question:focus {
    outline: none;
}

.faq_item:hover .faq_question {
    padding-left: 10px;
    padding-right: 10px;
}

/* FAQ 번호 */
.faq_num {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #d9441a;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

/* FAQ 메인 콘텐츠 */
.faq_main {
    flex: 1;
}

.faq_category_label {
    margin-bottom: 8px;
}

.faq_category_badge {
    display: inline-block;
    padding: 5px 12px;
    background-color: #e8f4f8;
    color: #d9441a;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.faq_tit {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

/* FAQ 아이콘 */
.faq_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faq_arrow {
    font-size: 12px;
    color: var(--text-light);
    transition: transform 0.3s ease;
    display: inline-block;
}

.faq_question[aria-expanded="true"] .faq_arrow {
    transform: rotate(180deg);
}

/* FAQ 답변 영역 */
.faq_answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq_answer[style*="display: block"] {
    max-height: none;
    overflow: visible;
}

.faq_answer_inner {
    padding: 0 0 25px 60px;
    line-height: 1.8;
    color: var(--text-light);
    font-size: 14px;
    word-break: break-word;
}

.faq_answer_inner p {
    margin: 0;
}

.faq_answer_inner img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.faq_answer_inner figure {
    margin: 10px 0;
}

/* 애니메이션 */
@keyframes slideDown {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* FAQ 빈 상태 */
.faq_empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 16px;
}

/* ================================
   유틸리티
   ================================ */

.flexBox {
    display: flex;
}

.inflex {
    display: inline-flex;
}

.align-center {
    align-items: center;
}

.fw500 {
    font-weight: 500;
}

.fw600 {
    font-weight: 600;
}

.tr {
    text-align: right;
}

.tc {
    text-align: center;
}

/* ================================
   반응형 디자인
   ================================ */

@media (max-width: 768px) {
    #sub_container .sub_cont h1 {
        font-size: 2.8rem;
        margin-bottom: 40px;
    }

    .board_ly {
        padding: 30px 20px;
    }

    .board_wrap {
        padding: 30px 20px;
    }

    .board_wrap.inner > * {
        padding-left: 20px;
        padding-right: 20px;
    }

    .board_wrap.inner > *:first-child {
        padding-top: 30px;
    }

    .board_wrap.inner > *:last-child {
        padding-bottom: 30px;
    }

    .board_top {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .board_top.m-column {
        flex-direction: column;
        align-items: stretch;
    }

    .bo_sch_wrap {
        max-width: 100%;
    }

    .board_noti a {
        gap: 15px;
        padding: 15px 0;
    }

    .board_wrap .pg_wrap {
        gap: 3px;
    }

    .board_wrap .pg_wrap a {
        min-width: 32px;
        height: 32px;
        padding: 0 6px;
        font-size: 13px;
    }

    .board_wrap .pg_wrap a.pg_arw {
        min-width: 32px;
        width: 32px;
        height: 32px;
    }

    .board_wrap .bo_view_file {
        flex-direction: column;
        align-items: flex-start;
    }

    .file_list {
        width: 100%;
    }

    .board_wrap .bo_view_hd .tit {
        font-size: 18px;
    }

    /* FAQ 반응형 */
    .faq_category_tab {
        gap: 10px;
        margin-bottom: 30px;
    }

    .faq_tab_btn {
        padding: 10px 18px;
        font-size: 13px;
    }

    .faq_question {
        gap: 15px;
        padding: 20px 0;
    }

    .faq_num {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .faq_tit {
        font-size: 14px;
    }

    .faq_answer_inner {
        padding: 0 0 20px 50px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    #sub_container .sub_cont h1 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .board_ly {
        padding: 20px 15px;
    }

    .board_wrap {
        padding: 20px 15px;
    }

    .board_wrap.inner > * {
        padding-left: 15px;
        padding-right: 15px;
    }

    .board_wrap.inner > *:first-child {
        padding-top: 20px;
    }

    .board_wrap.inner > *:last-child {
        padding-bottom: 20px;
    }

    .bo_sch_wrap {
        flex-direction: column;
    }

    .bo_sch_wrap form {
        flex-direction: column;
    }

    .selTxt,
    .sch_bar {
        width: 100%;
    }

    .board_noti .num {
        min-width: 30px;
        font-size: 13px;
    }

    .board_noti .tit {
        font-size: 14px;
    }

    .board_noti .date {
        font-size: 12px;
    }

    .board_wrap .pg_wrap a {
        min-width: 28px;
        height: 28px;
        padding: 0 4px;
        font-size: 12px;
    }

    .board_wrap .pg_wrap a.pg_arw {
        min-width: 28px;
        width: 28px;
        height: 28px;
    }

    .board_wrap .bo_view_hd .tit {
        font-size: 16px;
    }

    .board_wrap .bo_view_hd .info {
        flex-direction: column;
        gap: 5px;
    }

    .board_wrap .bo_view_hd .info span + span {
        padding-left: 0;
        margin-left: 0;
        border-left: none;
    }

    .btn_area {
        flex-direction: column;
    }

    .btn_line_blue {
        width: 100%;
        text-align: center;
    }

    /* FAQ 모바일 반응형 */
    .faq_category_tab {
        gap: 8px;
        margin-bottom: 25px;
    }

    .faq_tab_btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .faq_question {
        gap: 12px;
        padding: 15px 0;
    }

    .faq_num {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .faq_category_badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    .faq_tit {
        font-size: 13px;
    }

    .faq_answer_inner {
        padding: 0 0 15px 45px;
        font-size: 12px;
    }

    .faq_empty {
        padding: 40px 15px;
        font-size: 14px;
    }
}

/* ================================
   추가 유틸리티
   ================================ */

figure {
    margin: 0 auto;
}
