@charset "utf-8";

/* ==================================================
   1. 기본 설정 (Base)
================================================== */
.oc_board_wrap { 
    font-size: 12px; 
    font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif; 
    letter-spacing: -0.05em; 
}
.oc_board_wrap a { text-decoration: none; color: inherit; }
.oc_board_wrap * { box-sizing: border-box; }


/* ==================================================
   2. 목록(List) 페이지 스타일
================================================== */

/* 섹션 스타일 (카테고리 구분) */
.oc_section { 
    display: block;
    width: 100%;
    margin-bottom: 20px; 
    position: relative;
    clear: both;
}

.oc_header_bar {
    position: relative;
    background: #999;
    border-radius: 15px;
    height: 30px;
    line-height: 30px;
    color: #fff;
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
}
.oc_header_bar .cat_title { font-size: 14px; }

/* 리스트 그리드 레이아웃 */
.oc_list_ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: block;
}
.oc_list_ul:after {
    content: "";
    display: block;
    clear: both;
}

.oc_list_item {
    float: left;
    width: 19%;
    margin-right: 1.2%;
    margin-bottom: 40px;
    box-sizing: border-box;
    text-align: left;
}

/* 줄바꿈 처리 (5개씩 나열) */
.oc_list_item:nth-child(5n) { margin-right: 0; }
.oc_list_item:nth-child(5n+1) { clear: both; margin-left: 0; }

/* 반응형 목록 (미디어 쿼리) */
@media (max-width: 1200px) {
    .oc_list_item { width: 23%; margin-right: 2.6%; } /* 4개씩 */
    .oc_list_item:nth-child(5n) { margin-right: 2.6%; } 
    .oc_list_item:nth-child(5n+1) { clear: none; }
    
    .oc_list_item:nth-child(4n) { margin-right: 0; }
    .oc_list_item:nth-child(4n+1) { clear: both; }
}

@media (max-width: 768px) {
    .oc_list_item { width: 48%; margin-right: 4%; }   /* 2개씩 */
    .oc_list_item:nth-child(4n) { margin-right: 4%; } 
    .oc_list_item:nth-child(4n+1) { clear: none; }

    .oc_list_item:nth-child(2n) { margin-right: 0; }
    .oc_list_item:nth-child(2n+1) { clear: both; }
}


/* ==================================================
   3. 공통 요소 (Common)
================================================== */
/* 글쓰기 버튼 (+) */
.btn_add_post {
    position: absolute;
    right: 15px;
    top: 0;
    font-size: 20px;
    color: #fff;
    text-decoration: none;
    line-height: 28px;
    transition: color 0.3s;
}
.btn_add_post:hover { color: #eee; }

/* 상단 정보 (년도/출처) */
.item_top_info {
    display: block;
    overflow: hidden;
    color: #888;
    font-size: 11px;
    margin-bottom: 2px;
}
.info_year { float: left; }
.info_comm { float: right; }

/* 썸네일 박스 */
.item_img_box {
    display: block;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    margin-bottom: 8px;
    position: relative;
    background: #f8f8f8;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}
.item_img_box_inner {
    width: 100%;
    padding-top: 133.33%; /* 3:4 비율 */
    position: relative;
}
.item_img_box img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.item_img_box:hover img {
    transform: scale(1.08);
}

/* 텍스트 정보 */
.item_bottom_info { line-height: 1.4; text-align: left; }
.community_name {
    font-weight: 800;
    color: #222;
    font-size: 13px;
    display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.char_name {
    color: #444;
    font-size: 12px;
    display: block;
    margin-bottom: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.relation_name {
    color: #666;
    font-size: 11px;
    display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 아이콘 스타일 */
.heart_icon { color: #cc0000; font-size: 10px; margin-right: 2px; vertical-align: middle; }
.circle_icon { color: #888; font-size: 10px; margin-right: 2px; vertical-align: middle; }

/* 빈 목록 스타일 */
.empty_list { 
    clear: both;
    text-align: center; 
    padding: 50px 0; 
    color: #999; 
    background: #fafafa;
    border-radius: 10px;
    font-size: 13px;
    width: 100%;
    float: none;
}


/* ==================================================
   4. 상세(View) 페이지 레이아웃
================================================== */

/* 전체 래퍼: 가로 너비 확장(1250px) 및 중앙 정렬 */
.oc_view_wrap {
    width: 100% !important;
    max-width: 1250px !important; /* 가로폭 확장 */
    margin: 50px auto;
    margin-top: 3vh !important;
    margin-bottom: 0 !important;
    font-family: 'Noto Sans KR', sans-serif;
    box-sizing: border-box;
    height: 90vh;
    display: flex;
    justify-content: center;
    transform-origin: top center;
}

/* 내부 플렉스 컨테이너: 줄바꿈 방지(nowrap) 적용 */
.view_flex_container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px !important;       /* 간격 조정 */
    flex-wrap: nowrap !important; /* 줄바꿈 절대 금지 */
    position: relative;
    padding-top: 40px;
    transform: scale(1);
}

/* [왼쪽] 이미지 영역 */
.left_img_area {
    width: 580px;
    height: 720px;
    background: transparent;
    
    /* 레이아웃 고정 설정 */
    flex-shrink: 0 !important;
    
    /* 둥근 모서리 및 넘침 숨김 (이미지 잘림 해결) */
    border-radius: 15px; 
    overflow: hidden;
    position: relative;
    
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.left_img_area .img_inner {
    width: 100%; 
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.left_img_area img {
    width: auto;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 15px;
}

.left_img_area .img_dummy {
    width: 100%;
    height: 720px;
    color: #555;
    line-height: 720px;
    text-align: center;
    background: #eee;
}

/* [오른쪽] 정보 영역 */
.right_info_area {
    width: 450px !important;   /* 너비 확장 */
    flex-shrink: 0 !important; /* 찌그러짐 방지 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-top: 0;
    position: relative;
}

/* 상단 목록 버튼 */
.nav_top_right {
    position: absolute;
    top: -40px;
    right: 0;
    width: auto;
    height: 30px;
    z-index: 10;
    text-align: right;
    margin: 0;
}
.btn_back_list img {
    width: 24px !important;
    height: auto !important;
    max-width: none !important;
    border: 0;
    opacity: 0.5;
    transition: opacity 0.3s;
}
.btn_back_list:hover img { opacity: 1; }

/* [오른쪽] 정보 카드 스타일 */
.info_card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #ddd;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    height: 600px;
    display: flex;
    flex-direction: column;
}

/* 카드 헤더 */
.card_header {
    background: #e0e0e0;
    height: 35px;
    line-height: 35px;
    padding: 0 15px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #d0d0d0;
}

/* 카드 본문 */
.card_body {
    padding: 0 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ch_year, .ch_source {
    font-size: 11px;
    color: #555;
    z-index: 2;
    line-height: 35px;
}
.ch_comm {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: bold;
    color: #333;
    text-align: center;
    width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 1;
    line-height: 35px;
}

/* 타이틀 섹션 */
.title_section {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}
.char_name_kr {
    font-size: 28px;
    font-weight: 800;
    color: #000;
    margin: 0;
    letter-spacing: -1.5px;
    line-height: 1.2;
}
.char_name_en {
    font-size: 13px;
    color: #444;
    margin-top: 5px;
    letter-spacing: -1.2px;
    font-family: 'Verdana', sans-serif;
}
.relation_info {
    text-align: right;
    font-size: 11px;
    color: #666;
    letter-spacing: -1.2px;
    margin-top: 10px;
    margin-right: 10px;
    font-weight: bold;
}
/* 앤캐/관계캐가 연속될 때 간격 조정 */
.relation_info + .relation_info {
    margin-top: 2px !important;
}

.card_hr {
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 0 0 20px 0;
}

/* 메모 컨텐츠 (스크롤바 숨김) */
.memo_content {
    font-size: 12px;
    line-height: 1.7;
    color: #333;
    text-align: justify;
    word-break: break-all;
    
    overflow-y: auto;
    flex-grow: 1;
    padding: 0 10px;
    
    -ms-overflow-style: none; /* IE, Edge */
    scrollbar-width: none;    /* Firefox */
}
.memo_content::-webkit-scrollbar { display: none; }

.memo_content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

/* 카드 푸터 */
.card_footer { text-align: right; padding: 0; }
.btn_txt_action {
    font-size: 11px;
    color: #999;
    text-decoration: none;
    margin-left: 8px;
}
.btn_txt_action:hover {
    color: #333;
    text-decoration: underline;
}

/* 화면 높이에 따른 반응형 축소 (뷰 페이지용) */
@media (max-height: 900px) {
    .oc_view_wrap {
        transform: scale(0.85);
        margin-top: 2vh !important;
    }
}
@media (max-height: 768px) {
    .oc_view_wrap {
        transform: scale(0.75);
        margin-top: 1vh !important;
    }
}