@charset "utf-8";

/* 연혁 게시판 목록 */
.history-list {
    position: relative;
   /* font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif; */
}

.history-container {
    margin: 30px 0;
}

.history-year-group {
    margin-bottom: 50px;
}

.history-year-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3a8afd;
    position: relative;
}

.history-year-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100px;
    height: 2px;
    background: #2172f8;
}

.history-month-list {
    position: relative;
}

.history-item {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-month-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

.history-month {
    background: #3a8afd;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    min-width: 90px;
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: inset 0 2px 5px rgba(33, 135, 202, 0.3);
    margin-top: 10px;
}

.history-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 25px;
    position: relative;
    flex-grow: 1;
    transition: all 0.3s ease;
    box-shadow: 1px 1px 8px 0px rgba(232, 232, 232, 0.5);
    width: 100%;
    box-sizing: border-box;
}

.history-content:hover {
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #bed4f4;
}

.history-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #4a5568;
    word-break: break-all;
    min-height: 0px;
}

.history-admin {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    min-height: 40px;
}

.history-admin .m_btn {
    background: #3a8afd;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.history-admin .m_btn:hover {
    background: #2172f8;
    text-decoration: none;
    box-shadow: inset 0 2px 5px rgba(33, 135, 202, 0.3);
}

/* 체크박스 스타일 - 보이도록 수정 */
.chk_box {
    position: relative;
    display: inline-block;
}

.chk_box .selec_chk {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.chk_box label {
    position: relative;
    padding-left: 25px;
    color: #676e70;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
}

.chk_box label:hover {
    color: #2172f8;
}

.chk_box label span:first-child {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: #fff;
    border: 1px solid #d0d4df;
    border-radius: 3px;
}

.chk_box .selec_chk:checked + label span:first-child {
    background: #3a8afd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") no-repeat center;
    background-size: 12px;
    border-color: #3a8afd;
}

.chk_box .chk_text {
    margin-left: 5px;
}

/* 관리자 체크박스 스타일 */
.bo_list_admin {
    float: left;
    line-height: 34px;
}

.bo_list_admin .chk_box {
    position: relative;
    display: inline-block;
    margin-right: 10px;
}

.bo_list_admin .chk_box label {
    position: relative;
    padding-left: 25px;
    color: #676e70;
    cursor: pointer;
    font-size: 0.92em;
}

.bo_list_admin .chk_box label:hover {
    color: #2172f8;
}

.bo_list_admin .chk_box label span {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    background: #fff;
    border: 1px solid #d0d4df;
    border-radius: 3px;
}

.bo_list_admin .chk_box .selec_chk:checked + label span {
    background: #3a8afd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") no-repeat center;
    background-size: 12px;
    border-color: #1471f6;
}

.empty-history {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px dashed #e2e8f0;
}

.empty-history p {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 20px;
}

.btn_write {
    display: inline-block;
    background: #3a8afd;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #3a8afd;
}

.btn_write:hover {
    background: #2172f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 138, 253, 0.2);
    text-decoration: none;
}

/* 게시판 공통 스타일 */
.bo_fx {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#bo_list_total {
    line-height: 34px;
    font-size: 0.92em;
    color: #4e546f;
}

.btn_bo_user {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 5px;
}

.btn_bo_user > li {
    position: relative;
}

.btn_bo_adm {
    display: flex;
    gap: 5px;
}

.btn_bo_adm input,
.btn_bo_adm button {
    padding: 0 15px;
    height: 34px;
    border: 1px solid #d4d4d4;
    background: #fff;
    color: #666;
    text-decoration: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.92em;
}

.btn_bo_adm input:hover,
.btn_bo_adm button:hover {
    background: #f5f5f5;
    color: #000;
}

.btn_bo_user a {
    display: inline-block;
    padding: 0 15px;
    height: 34px;
    line-height: 34px;
    border: 1px solid #d5d5d5;
    background: #fff;
    color: #555;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.92em;
}

.btn_bo_user a:hover {
    background: #f5f5f5;
    color: #000;
    text-decoration: none;
}

/* 검색 폼 */
#bo_sch {
    margin: 20px 0;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#bo_sch legend {
    position: absolute;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
}

#bo_sch form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#bo_sch select {
    border: 1px solid #d0d3db;
    border-radius: 3px;
    padding: 8px 12px;
    background: white;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    height: 40px;
}

.sch_input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #d0d3db;
    border-radius: 3px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    height: 40px;
}

.sch_btn {
    background: #3a8afd;
    color: white;
    border: none;
    padding: 0 20px;
    height: 40px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sch_btn:hover {
    background: #2172f8;
}

/* 연혁 작성 폼 스타일 */
.write-form table {
    width: 100%;
    border-collapse: collapse;
}

.write-form th {
    background: #f8fafc;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border: 1px solid #e2e8f0;
    width: 120px;
}

.write-form td {
    padding: 15px;
    border: 1px solid #e2e8f0;
}

.write-form .frm_input {
    width: 50%;
    padding: 10px 12px;
    border: 1px solid #d0d3db;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}

.write-form .frm_input:focus {
    border-color: #3a8afd;
    outline: none;
    box-shadow: 0 0 0 3px rgba(58, 138, 253, 0.1);
}

/* 반 사이즈 입력 그룹 */
.write-form .half-size {
    width: 50%;
}

.write-form .input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.write-form .input-group .frm_input {
    flex: 1;
}

.write-form .input-text {
    color: #666;
    font-weight: 500;
}

.write-form .input-desc {
    display: block;
    color: #718096;
    font-size: 12px;
    margin-top: 3px;
}

.write-form select.frm_input {
    padding: 10px 8px;
    background: white;
    cursor: pointer;
    height: 40px;
    width: 50%;
}

.btn_confirm {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn_submit {
    background: #3a8afd;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #3a8afd;
}

.btn_submit:hover {
    background: #2172f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 138, 253, 0.2);
}

.btn_cancel {
    background: #a0aec0;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-left: 10px;
    transition: all 0.3s ease;
    border: 1px solid #a0aec0;
}

.btn_cancel:hover {
    background: #718096;
    transform: translateY(-2px);
    text-decoration: none;
}

/* 에디터 영역은 전체 크기 유지 */
.write-form .wr_content .frm_input {
    width: 100% !important;
}

.write-form #wr_content {
    width: 100% !important;
}

/* 자동등록방지 스타일 */
.write-form #captcha {
    width: 50%;
}

/* 페이지네이션 스타일 */
.write_pages {
    text-align: center;
    margin: 30px 0;
}

.write_pages a,
.write_pages strong {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 2px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    text-decoration: none;
    color: #666;
    background: white;
    transition: all 0.3s ease;
}

.write_pages a:hover {
    background: #f8fafc;
    color: #3a8afd;
    border-color: #3a8afd;
}

.write_pages strong {
    background: #3a8afd;
    color: white;
    border-color: #3a8afd;
}

.write_pages .pg_page {
    font-weight: bold;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .history-list.mobile .history-year-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .history-list.mobile .history-month-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .history-list.mobile .history-month {
        min-width: 80px;
        align-self: flex-start;
        margin-top: 0;
        padding: 10px 20px;
    }
    
    .history-list.mobile .history-content {
        padding: 20px;
        width: 100%;
    }
    
    .history-list.mobile .history-text {
        font-size: 1rem;
        min-height: auto;
    }
    
    .history-list.mobile .history-admin {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 15px;
        margin-top: 15px;
    }
    
    .history-list.mobile .chk_box .chk_text {
        display: none;
    }
    
    /* 게시판 버튼 그룹 반응형 */
    .history-list.mobile .bo_fx {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .history-list.mobile #bo_list_total {
        order: 1;
        width: 100%;
        text-align: left;
    }
    
    .history-list.mobile .btn_bo_adm {
        order: 2;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .history-list.mobile .btn_bo_user {
        order: 3;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* 작성 폼 반응형 */
    .write-form th,
    .write-form td {
        display: block;
        width: 100%;
    }
    
    .write-form th {
        padding-bottom: 5px;
        background: #f1f5f9;
        width: 100%;
    }
    
    .write-form td {
        padding-top: 5px;
        padding-bottom: 15px;
    }
    
    .write-form .frm_input,
    .write-form select.frm_input,
    .write-form .half-size,
    .write-form #captcha {
        width: 100% !important;
    }
    
    .write-form .input-group {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .write-form .input-group .frm_input {
        width: 100% !important;
    }
    
    .btn_submit,
    .btn_cancel {
        width: 100%;
        margin: 5px 0;
        text-align: center;
    }
    
    .btn_cancel {
        margin-left: 0;
    }
    
    /* 검색 폼 반응형 */
    #bo_sch form {
        flex-direction: column;
        align-items: stretch;
    }
    
    #bo_sch select,
    .sch_input,
    .sch_btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* PC 스타일 - 세로 라인 제거 */
.history-month-list:before {
    display: none;
}

.history-month-list {
    padding-left: 0;
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .history-content {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .history-year-title {
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .history-text {
        color: #cbd5e0;
    }
    
    .history-month {
        background: #3a8afd;
    }
    
    .empty-history {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .empty-history p {
        color: #a0aec0;
    }
    
    /* 체크박스 다크 모드 */
    .chk_box label span:first-child {
        background: #4a5568;
        border-color: #718096;
    }
    
    .bo_list_admin .chk_box label span {
        background: #4a5568;
        border-color: #718096;
    }
    
    /* 작성 폼 다크 모드 */
    .write-form th {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .write-form td {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .write-form .frm_input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .write-form .frm_input:focus {
        border-color: #3a8afd;
    }
    
    /* 검색 폼 다크 모드 */
    #bo_sch {
        background: #2d3748;
        border-color: #4a5568;
    }
}

/* 모든 카드 동일한 크기 유지 */
.history-item {
    width: 100%;
}

.history-content {
    width: 100%;
    min-width: 0;
}

/* 관리자 전용 메시지 스타일 */
.admin-write-notice {
    background: #fff6fa;
    border: 1px solid #f8e6ee;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    color: #f9267f;
    font-weight: 500;
}

.admin-write-notice i {
    margin-right: 5px;
}

/* 에디터 최소 높이 설정 */
.write-form .wr_content {
    min-height: 300px;
}

/* Font Awesome 아이콘 기본 스타일 */
.fa {
    display: inline-block;
    font: normal normal normal 14px/1 FontAwesome;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.fa-pencil:before {
    content: "\f040";
}

.fa-trash-o:before {
    content: "\f014";
}

.fa-files-o:before {
    content: "\f0c5";
}

.fa-arrows:before {
    content: "\f0b2";
}

.fa-list:before {
    content: "\f03a";
}

.fa-search:before {
    content: "\f002";
}

.sound_only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 월별 정렬 디자인 */
.history-month-content {
    display: flex;
    align-items: flex-start;
}

/* PC에서는 가로 줄로 정렬 */
@media (min-width: 769px) {
    .history-month {
        min-width: 100px;
        text-align: center;
    }
    
    .history-content {
        margin-left: 0;
    }
}