/* =========================================
   Main 2-Column Layout
   ========================================= */
.layout_grid.main_2col {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    padding-top: 20px;
    align-items: start;
}
.layout_grid.main_2col.sidebar_right {
    grid-template-columns: 1fr 260px;
}
.layout_grid.main_2col.sidebar_right .side_sidebar_2col { order: 2; }
.layout_grid.main_2col.sidebar_right .content_2col { order: 1; }

/* =========================================
   Sidebar
   ========================================= */
/* 기존 layout.css의 .side_box, login_box.css 스타일 그대로 재사용 */

/* Rank Badge */
.rank_badge { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 5px; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.rank_gold { background: #fef3c7; color: #b45309; }
.rank_silver { background: #f1f5f9; color: #475569; }
.rank_bronze { background: #fef9ee; color: #92400e; }
.rank_gray { background: #f8fafc; color: var(--text-mute); }

/* 인기급상승 */
.hot2_list { list-style: none; padding: 10px 14px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.hot2_list li { display: flex; align-items: center; gap: 8px; }
.hot2_title { font-size: 12px; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot2_title:hover { color: var(--point-color); }

/* 탭 게시글 */
.tab_widget_2col { overflow: hidden; }
.tab_nav_2col { display: flex; background: #f8fafc; border-bottom: 1px solid var(--border-color); }
.tab_btn_2 { flex: 1; padding: 9px 4px; font-size: 12px; font-weight: 700; border: none; background: none; color: var(--text-mute); cursor: pointer; border-right: 1px solid var(--border-color); transition: all 0.15s; }
.tab_btn_2:last-child { border-right: none; }
.tab_btn_2.active { background: #fff; color: var(--point-color); box-shadow: inset 0 2px 0 var(--point-color); }
.tab_panels_2col { padding: 10px 14px; }
.tab_panel_2 { display: none; }
.tab_panel_2.active { display: block; }

.side_post_list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.side_post_list li { display: flex; align-items: center; gap: 4px; }
.side_post_title { font-size: 12px; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.side_post_title:hover { color: var(--point-color); }
.side_post_cmt { font-size: 10px; color: var(--point-color); font-weight: 800; flex-shrink: 0; }

/* 포인트 랭킹 */
.point_rank_list { list-style: none; padding: 10px 14px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.point_rank_list li { display: flex; align-items: center; gap: 8px; }
.rank_nick { font-size: 12px; color: var(--text-main); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank_point { font-size: 11px; color: var(--text-mute); flex-shrink: 0; }

/* 공지사항 */
.side_notice_list { list-style: none; padding: 10px 14px; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.side_notice_list li { display: flex; align-items: center; }


/* =========================================
   Main Content Area
   ========================================= */
.content_2col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

/* sec_title reuse */
.content_2col .sec_title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.content_2col .sec_title h3 { font-size: 15px; font-weight: 800; color: var(--text-main); margin: 0; }

/* =========================================
   메인 배너 Swiper
   ========================================= */
.main_banner_2col { border-radius: 14px; overflow: hidden; }
.banner_swiper_2col { border-radius: 14px; overflow: hidden; }
.banner_slide_link { display: block; position: relative; width: 100%; aspect-ratio: 16/6; overflow: hidden; }
.banner_img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.banner_slide_link:hover .banner_img { transform: scale(1.06); }
.banner_no_img { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #1e2940; color: rgba(255,255,255,0.4); font-size: 13px; font-weight: 700; }
.banner_overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 60px 48px 40px; background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%); }
.banner_cat_badge { display: inline-block; background: var(--point-color); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; }
.banner_title { font-size: 26px; font-weight: 800; color: #fff; margin: 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.banner_swiper_2col .swiper-button-prev,
.banner_swiper_2col .swiper-button-next { color: #fff; background: rgba(0,0,0,0.3); width: 36px; height: 36px; border-radius: 50%; opacity: 0; transition: opacity 0.2s; }
.banner_swiper_2col .swiper-button-prev::after,
.banner_swiper_2col .swiper-button-next::after { font-size: 14px; }
.main_banner_2col:hover .swiper-button-prev,
.main_banner_2col:hover .swiper-button-next { opacity: 1; }
.banner_swiper_2col .swiper-pagination-bullet { background: #fff; }
.banner_swiper_2col .swiper-pagination-bullet-active { background: var(--point-color); }

/* =========================================
   실시간 인기글 + 유용한 정보 (50/50)
   ========================================= */
.dual_section_row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dual_col { background: #fff; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.dual_col .sec_title { padding: 14px 16px 12px; border-bottom: 1px solid var(--border-color); margin-bottom: 0; }
.dual_col .sec_title h3 { font-size: 15px; font-weight: 800; }

.realtime_list_2col { list-style: none; padding: 0 16px; margin: 0; }
.realtime_list_2col li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; line-height: 1.4; min-height: 40px; }
.realtime_list_2col li:last-child { border-bottom: none; }
.realtime_list_2col .title_link { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.realtime_list_2col .title_text { color: var(--text-main); text-decoration: none; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 13px; }
.realtime_list_2col .title_text:hover { text-decoration: underline; color: var(--point-color); }
.realtime_list_2col .cat_badge { display: inline-flex; align-items: center; justify-content: center; padding: 2px 7px; background: color-mix(in srgb, var(--point-color) 12%, transparent); color: var(--point-color); border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.realtime_list_2col .cmt_count { display: inline-flex; align-items: center; justify-content: center; height: 16px; min-width: 16px; padding: 0 4px; background: var(--point-color); color: #fff; border-radius: 3px; font-size: 10px; font-weight: 800; flex-shrink: 0; margin-left: 2px; margin-right: 0; }
.realtime_list_2col .n_icon { animation: none; }

/* =========================================
   포토갤러리
   ========================================= */
.photo_section_2col { background: transparent; }
.photo_section_2col .sec_title { padding: 0 0 12px; margin-bottom: 0; }
.photo_grid_2col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 0; }
.photo_item_2col { display: flex; flex-direction: column; gap: 7px; }
.photo_link_2col { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 3/2; position: relative; background: #f1f5f9; }
.photo_link_2col img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.photo_link_2col:hover img { transform: scale(1.05); }
.photo_link_2col .no_thumb_placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-mute); font-size: 10px; font-weight: 700; background: #f8fafc; }
.photo_item_title { font-size: 12px; font-weight: 600; color: var(--text-main); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo_item_2col:hover .photo_item_title { color: var(--point-color); }

.photo_hover_info { position: absolute; inset: 0; border-radius: 10px; background: rgba(0,0,0,0.55); display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.photo_link_2col:hover .photo_hover_info { opacity: 1; }
.phi_author { font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phi_stats { display: flex; gap: 8px; }
.phi_stat { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: rgba(255,255,255,0.9); font-weight: 600; }

/* =========================================
   추천 영상 콘텐츠
   ========================================= */
.video_curation_2col { background: transparent; }
.video_curation_2col .sec_title { padding: 0 0 12px; margin-bottom: 0; }
.video_split_2col { display: grid; grid-template-columns: 1.8fr 1fr; gap: 16px; margin-top: 0; }

/* 좌: 슬라이드쇼 */
.video_slideshow_wrap { border-radius: 10px; overflow: hidden; height: 100%; min-height: 200px; position: relative; background: #1e2940; }
.video_slideshow { width: 100%; height: 100%; position: relative; }
.vs_slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease; }
.vs_slide.active { opacity: 1; z-index: 1; }
.vs_slide.active .vs_img { animation: vsZoom 3.5s ease forwards; }
.vs_link { display: block; width: 100%; height: 100%; position: relative; }
.vs_img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vs_no_img { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: rgba(255,255,255,0.35); font-size: 12px; font-weight: 700; }
.vs_overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 60px 28px 24px; background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%); }
.vs_cat_badge { display: inline-block; background: var(--point-color); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 4px; margin-bottom: 8px; }
.vs_title { font-size: 22px; font-weight: 800; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }

@keyframes vsZoom {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
}

/* 우: 4카드 */
.video_cards_2col { display: flex; flex-direction: column; gap: 8px; }
.vc2_card { background: #fff; border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.vc2_card:hover, .vc2_card.vc2_active { border-color: var(--point-color); box-shadow: 0 2px 8px rgba(79,70,229,0.12); }
.vc2_link { display: flex; align-items: center; gap: 10px; }
.vc2_thumb { width: 72px; height: 48px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: #f1f5f9; }
.vc2_thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.vc2_card:hover .vc2_thumb img { transform: scale(1.05); }
.vc2_no_img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-mute); }
.vc2_info { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.vc2_title { font-size: 12px; font-weight: 600; color: var(--text-main); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vc2_card:hover .vc2_title, .vc2_card.vc2_active .vc2_title { color: var(--point-color); }
.vc2_meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.vc2_author { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-mute); min-width: 0; overflow: visible; background: transparent !important; }
.vc2_nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.vc2_author .level_badge { flex-shrink: 0; }
.vc2_vote { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: #ef4444; font-weight: 700; flex-shrink: 0; }
/* level_badge (게시판 스킨 common.css와 동일, 레이아웃 내 사용 위해 복사) */
.video_cards_2col .level_badge { display: inline-flex; align-items: center; justify-content: center; padding: 2px 6px; background: linear-gradient(135deg, var(--point-color) 0%, var(--sub-point-color) 100%); color: #fff; border-radius: 4px; font-size: 9px; font-weight: 800; line-height: 1; text-transform: uppercase; font-family: 'Lexend', sans-serif; box-shadow: 0 2px 4px rgba(79,70,229,0.2); text-shadow: 0 1px 1px rgba(0,0,0,0.1); position: relative; cursor: help; }
.video_cards_2col .level_badge .tooltip { display: block; position: absolute; bottom: 100%; left: 0; transform: translateY(-10px); background: #1e293b; color: #fff !important; padding: 10px 14px; border-radius: 10px; font-size: 11px; white-space: nowrap; visibility: hidden; opacity: 0; transition: all 0.2s ease; z-index: 100; pointer-events: none; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); text-align: center; font-family: 'Pretendard', sans-serif; text-shadow: none; border: 1px solid rgba(255,255,255,0.1); line-height: 1.5; }
.video_cards_2col .level_badge .tooltip::after { content: ''; position: absolute; top: 100%; left: 15px; border-width: 6px; border-style: solid; border-color: #1e293b transparent transparent transparent; }
.video_cards_2col .level_badge:hover .tooltip { visibility: visible; opacity: 1; transform: translateY(-6px); }
.video_cards_2col .level_badge .tooltip b { display: block; color: var(--point-color); font-size: 10px; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.video_cards_2col .level_badge .tooltip span { display: block; font-weight: 600; opacity: 0.9; }

/* =========================================
   최근게시글
   ========================================= */
.recent_section_2col { background: #fff; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.recent_section_2col .sec_title { padding: 14px 16px 12px; border-bottom: 1px solid var(--border-color); margin-bottom: 0; }

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1100px) {
    .dual_section_row { grid-template-columns: 1fr; }
    .photo_grid_2col { grid-template-columns: repeat(3, 1fr); }
    .video_split_2col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .layout_grid.main_2col,
    .layout_grid.main_2col.sidebar_right { display: flex; flex-direction: column; overflow-x: hidden; }
    .layout_grid.main_2col .content_2col { order: 1; width: 100%; min-width: 0; overflow: hidden; }
    .layout_grid.main_2col .side_sidebar { order: 2; width: 100%; min-width: 0; overflow: hidden; }
    .layout_grid.main_2col .side_sidebar > .side_box + .side_box { margin-top: 10px; }
    .layout_grid.main_2col .login_box { display: none; }

    /* 배너 - Swiper JS가 슬라이드 width를 3천만px로 잘못 계산하는 버그 방지 */
    .main_banner_2col { max-width: 100%; overflow: hidden; }
    .banner_swiper_2col { max-width: 100%; overflow: hidden; }
    .banner_swiper_2col .swiper-slide { width: 100% !important; max-width: 100vw !important; }
    .banner_swiper_2col .swiper-wrapper { max-width: none; }
    .banner_slide_link { aspect-ratio: 16/9; max-width: 100%; }
    .banner_img { max-width: 100% !important; width: 100% !important; }
    .banner_title { font-size: 16px; }
    .banner_overlay { padding: 40px 24px 20px; }

    /* 포토갤러리: 2열, 3번째+ 숨김 */
    .photo_section_2col { max-width: 100%; overflow: hidden; }
    .photo_grid_2col { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
    .photo_grid_2col .photo_item_2col:nth-child(n+3) { display: none; }

    /* 영상: 슬라이드쇼 + 썸네일 4개 가로 */
    .video_split_2col { grid-template-columns: 1fr; gap: 8px; }
    .video_slideshow_wrap { min-height: 200px; height: 220px; }
    .vs_title { font-size: 16px; }
    .vs_overlay { padding: 40px 20px 20px; }
    .video_cards_2col { display: flex; flex-direction: row; gap: 6px; }
    .vc2_card { padding: 0; border-radius: 8px; flex: 1; min-width: 0; }
    .vc2_link { flex-direction: column; gap: 0; }
    .vc2_thumb { width: 100%; height: auto; aspect-ratio: 16/9; border-radius: 8px; }
    .vc2_info { display: none; }

    /* 실시간 인기글 + 유용한 정보 */
    .dual_section_row { grid-template-columns: 1fr; }

    /* 이미지 위젯 overflow 방지 */
    .layout_grid.main_2col .side_sidebar img { max-width: 100% !important; height: auto !important; }
    .layout_grid.main_2col .content_2col img { max-width: 100% !important; }
    .layout_grid.main_2col .side_sidebar .widget_content { overflow: hidden; }
    .layout_grid.main_2col .side_sidebar .custom_widget_box { overflow: hidden; }
}
