@charset "utf-8";

/* [공통] 변수 및 초기화 */
:root {
    --primary-color: #0052A4; /* 코레일 블루 */
    --accent-color: #E21836;
    --max-width: 1200px;
    --status-ongoing: #27ae60;
    --status-waiting: #f39c12;
    --status-end: #888;
}

.sound_only, .btn_cke_sc {display:none;}

.bo_v_wrap { max-width: var(--max-width); margin: 0 auto; padding: 40px 20px; font-family: 'Pretendard', sans-serif; }

/* [목록] 카테고리 및 상단 영역 */
.bo_cate { margin-bottom: 30px; text-align: center; }
.bo_cate ul { display: inline-flex; gap: 10px; background: #f8f9fa; padding: 6px; border-radius: 50px; list-style: none; }
.bo_cate li a { display: block; padding: 10px 25px; border-radius: 40px; font-size: 15px; color: #666; text-decoration: none; }
.bo_cate li a#bo_cate_on { background: var(--primary-color); color: #fff; box-shadow: 0 4px 10px rgba(0,82,164,0.3); }

.list-top-nav { display: flex; justify-content: space-between; align-items: center; background: #f7f7f7; padding: 20px; margin-bottom: 20px; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }
.total-info { font-size: 15px; color: #666; }
.total-info strong { color: var(--primary-color); }

/* [목록] 행사/교육 카드형 레이아웃 */
.event_list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; padding: 20px 0; }
.event_card { border: 1px solid #eee; border-radius: 15px; overflow: hidden; transition: 0.3s; background: #fff; position: relative; text-decoration: none; }
.event_card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

.card_img { position: relative; padding-top: 140%; overflow: hidden; background: #f8f9fa; }
.card_img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }

.status_badge { position: absolute; top: 15px; left: 15px; padding: 5px 12px; border-radius: 5px; font-size: 13px; font-weight: 700; color: #fff; z-index: 10; }
.status_ongoing { background: var(--status-ongoing); }
.status_waiting { background: var(--status-waiting); }
.status_end { background: var(--status-end); }

.card_content { padding: 20px; }
.card_content .cat { font-size: 14px; color: var(--primary-color); font-weight: 600; margin-bottom: 8px; display: block; }
.card_content h3 { font-size: 19px; font-weight: 700; color: #111; margin-bottom: 12px; line-height: 1.4; height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card_info { font-size: 14px; color: #666; }
.card_info p { margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }

/* [상세보기] 정보 테이블 및 레이아웃 */
.view_header { padding: 50px 0; margin-bottom:50px; border-bottom: 1px solid #eee; }
.view_header h2 { font-size: 32px; font-weight: 800; color: #111; margin-bottom: 30px; }

.view_event_info { display: flex; gap: 40px; }
.view_poster { flex: 0 0 350px; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.view_poster img { width: 100%; display: block; }

.info_table { flex: 1; border-top: 2px solid #333; }
.info_row { display: flex; border-bottom: 1px solid #eee; padding: 12px 0; }
.info_label { flex: 0 0 120px; font-weight: 700; color: #111; }
.info_val { flex: 1; color: #555; }

.apply_box { text-align: center; margin-top: 50px; padding: 40px; background: #f8f9fa; border-radius: 15px; }
.btn_apply { display: inline-block; padding: 18px 60px; background: var(--primary-color); color: #fff; border-radius: 50px; font-size: 18px; font-weight: 700; text-decoration: none; }

/* [글쓰기] 입력 폼 스타일 */
.write_div { margin-bottom: 25px; }
.write_div label { display: block; font-weight: 700; color: #333; margin-bottom: 10px; font-size: 15px; }
.write_div .frm_input { width: 100%; height: 50px; border: 1px solid #ddd; border-radius: 8px; padding: 0 15px; font-size: 16px; box-sizing: border-box; }

.wr_grid_2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wr_grid_3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

.write_div.external_link { background: #f0f7ff; padding: 20px; border-radius: 12px; border: 1px dashed var(--primary-color); }

/* 버튼 공통 */
.btn_confirm { text-align: center; margin-top: 50px; display: flex; justify-content: center; gap: 10px; }
.btn_submit { background: var(--primary-color); color: #fff; padding: 15px 40px; border-radius: 8px; border: none; font-weight: 700; cursor: pointer; }
.btn_cancel { background: #fff; color: #666; border: 1px solid #ddd; padding: 15px 40px; border-radius: 8px; text-decoration: none; }

/* 상세보기 하단 버튼 영역 */
.view_btns { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 30px 0; 
    border-top: 1px solid #eee; 
    margin-top: 50px;
}

/* 파일 첨부 영역 */
.bo_w_flist { 
    margin-top: 10px; 
    border: 1px solid #eee; /* 점선보다 깔끔한 실선 권장 */
    padding: 10px 20px; 
    border-radius: 8px; 
    background: #fcfcfc; 
}
.bo_w_flist .frm_file { 
    display: flex;
    align-items: center; /* 파일 선택 버튼과 '선택된 파일 없음' 글씨 수직 중앙 정렬 */
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.bo_w_flist .frm_file:last-child { border-bottom: 0; }

/* 첨부파일 다운로드 영역 */
.view_file { 
    margin-top: 40px; 
    padding: 10px 20px; 
    background: #fff; 
    border-radius: 15px; 
    border: 1px solid #eee; 
}
.view_file h3 { 
    font-size: 18px; 
    font-weight: 700; 
    margin-bottom: 20px; 
    color: #333; 
    display: flex;
    align-items: center;
}
.view_file h3 i { 
    color: var(--primary-color); 
    margin-right: 10px; 
    font-size: 20px;
}
.view_file ul { list-style: none; padding: 0; margin: 0; }
.view_file li { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 0; 
    border-bottom: 1px solid #e9ecef; 
}
.view_file li:last-child { border-bottom: none; }

.view_file .file_info { 
    display: flex; 
    flex-direction: column; 
    gap: 4px;
}
.view_file .file_info strong { 
    font-size: 15px; 
    color: #111; 
    font-weight: 600;
    word-break: break-all;
}
.view_file .file_info span { 
    font-size: 13px; 
    color: #888; 
}


/* 버튼 디자인 통일 (최초 제공해주신 디자인 기준) */
.btn_b01, .btn_submit, .btn_cancel, .btn_admin, .sch_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important; /* 8px 라운드 통일 */
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease; /* 부드러운 전환 효과 */
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    height: 45px; /* 기본 높이 */
    padding: 0 25px;
}

/* 1. 기본/회색 버튼 (목록으로, 수정, 취소 등) */
.btn_b01, .btn_cancel, .btn_admin {
    background: #f5f5f5;
    color: #666;
}

/* 2. 강조 버튼 (글쓰기, 등록완료, 신청하기, 검색 등) */
.btn_submit, .sch_btn, .btn_apply_top {
    background: var(--primary-color, #0052A4) !important;
    color: #fff !important;
    border: none;
}

/* 상세페이지 전용 신청하기 버튼 (상단 배치용) */
.btn_apply_top {
    height: 55px;
    font-size: 17px;
    padding: 0 50px;
    margin-bottom: 10px;
}

/* 글쓰기 페이지 하단 확인버튼 전용 크기 */
.btn_confirm .btn_submit { width: 180px; height: 55px; }
.btn_confirm .btn_cancel { width: 120px; height: 55px; }

/* 모바일 대응 */
@media (max-width: 768px) {
    .btn_confirm .btn_submit, .btn_confirm .btn_cancel { flex: 1; width: auto; }
    .view_btns {
        flex-direction: column;
        gap: 15px;
    }
    .left_btns, .right_btns {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    .left_btns .btn_b01, .right_btns .btn_b01 {
        height: 50px; /* 모바일은 터치하기 쉽게 조금 더 크게 */
    }
    .view_event_info { flex-direction: column; }
    .view_poster { flex: none; width: 100%; }
    .wr_grid_2, .wr_grid_3 { grid-template-columns: 1fr; gap: 10px; }
    .event_list { grid-template-columns: 1fr; }

    .view_file li { flex-direction: column; align-items: stretch; gap: 15px; }
    .view_file .btn_b01 { width: 100%; }
}