/* COURSE-TOURISM-AND-PRINT-LAYOUT-1: A4 세로 인쇄 전용 (media="print" 로만 읽힘 - 화면 디자인에는 영향 없음)
   - 머리띠·메뉴·상단 사진·왼쪽 메뉴·공유/인쇄 단추·꼬리말·지도 조작 단추 숨김, 본문은 인쇄 폭(A4 - 여백)에 맞춤
   - 사진 갤러리: 슬라이드(한 장씩) 대신 모든 사진을 3열로, 사진 비율 그대로
   - 주변관광지·산별현황·안내 지도·그래프: 인쇄 폭 안, 카드가 쪽 경계에서 잘리지 않게
   - !important 는 슬라이드(slick)의 인라인 스타일과 원본 고정 폭(px)을 인쇄 때만 풀기 위해 필요한 곳에만 사용 */
@page { size: A4 portrait; margin: 14mm 12mm 16mm; }

html, body { background: #fff !important; color: #111; }
body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* 인쇄에 필요 없는 화면 요소 */
.rn-header, .rn-skip, .rn-drawer, .rn-gnb-bg, .rn-subvisual, .sub_left, .sub_icon, .rn-footer,
.tab_menu, .detail_down .download, .hs-map__help, .af-map-notice, .leaflet-control-container,
.photoGal_pre, .photoGal_next, .af-preview-bar, .rn-family { display: none !important; }

/* 본문 폭: 화면용 고정 폭·여백 해제 */
.sub_wrap, .sub_wrap .inner2, .sub_body, .sub_con, .sub_con .detail, .rn-main, .rn-inner {
	float: none !important; width: auto !important; min-width: 0 !important; max-width: none !important;
	margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important;
	box-shadow: none !important; background: #fff !important; overflow: visible !important;
}
.sub_body { padding-top: 0 !important; }
.sub_tit { margin: 0 0 4mm !important; padding: 0 0 2mm !important; border-bottom: 1px solid #999; }
.sub_tit .sub_nav { display: none !important; }

/* 글·제목 */
.sub_con, .sub_con p, .sub_con li, .sub_con dd, .sub_con dt { overflow-wrap: anywhere; }
.sub_con h3, .sub_con h4, .sub_con h5 { break-after: avoid; page-break-after: avoid; }
.sub_con hr { margin: 4mm 0 !important; border: 0; border-top: 1px solid #bbb; }
.sub_con a { color: inherit; text-decoration: none; }

/* 그림: 인쇄 폭 안, 비율 그대로 */
.sub_con img { max-width: 100% !important; height: auto !important; }
.illustration_map, .graph, .route, .course_info { break-inside: avoid; page-break-inside: avoid; }
.sub_con .detail .block .graph { width: auto !important; float: none !important; }
.detail_down { float: none !important; width: auto !important; }

/* 지도: 인쇄 폭에 맞춘 크기 (지도 스크립트가 인쇄 직전 이 크기로 경로 전체를 다시 맞춤) */
.sub_con .map { break-inside: avoid; page-break-inside: avoid; }
.af-map { width: 100% !important; height: 120mm !important; border: 1px solid #999; }
.leaflet-popup-pane { display: none !important; }

/* 사진 갤러리: 모든 사진 3열 (사진이 많으면 여러 쪽으로 자연스럽게) */
.sub_con .detail .photoGal { display: block !important; float: none !important; overflow: visible !important; height: auto !important; }
.photoGal_slide .slick-list { overflow: visible !important; height: auto !important; }
.photoGal_slide .slick-track, .photoGal_slide:not(.slick-initialized) {
	display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 3mm; width: auto !important; height: auto !important; transform: none !important;
}
.photoGal_slide .slick-slide, .photoGal_slide > li {
	position: static !important; left: auto !important; top: auto !important; opacity: 1 !important; visibility: visible !important;
	width: auto !important; height: auto !important; float: none !important; z-index: auto !important; break-inside: avoid; page-break-inside: avoid;
}
.photoGal_slide .slick-cloned { display: none !important; }
.photoGal_slide img { width: 100% !important; height: auto !important; transition: none !important; opacity: 1 !important; }   /* 슬라이드 늦은 받기(lazyLoad)가 남긴 반투명(opacity) 해제 */
.photoGal_slide img:not([src]) { display: none !important; }

/* 주변관광지·산별현황 카드: 2열, 카드는 쪽 경계에서 나누지 않음 */
.tour_list, .san_list { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 4mm; }
.tour_list .tour_item, .san_list .san_item { width: auto !important; margin: 0 !important; break-inside: avoid; page-break-inside: avoid; border: 1px solid #ccc; }
.tour_list .tour_item dd, .san_list .san_item dd { height: auto !important; }
.tour_list .tour_item dd img, .san_list .san_item dd img { width: 100% !important; height: auto !important; transform: none !important; }
.tour_list .af-fill, .san_list .af-fill { display: none !important; }
.tour_list .tour_item dt .more::after, .san_list .san_item dt .more::after { content: none; }
.af-sheet { display: none !important; }
/* 주변관광지 세부 코스 탭: 인쇄 때는 탭 대신 모든 묶음 (제목 포함) */
.af-tour-tabs { display: none !important; }
.af-tour-panel[hidden] { display: block !important; }
.af-tour--js .af-tour-panel .af-tour-sub { display: block !important; }
/* 포토갤러리 비율 고정 틀은 화면 전용 (인쇄는 3열 원래 비율) */
.photoGal.af-gal-fixed .photoGal_slide li { aspect-ratio: auto !important; background: none !important; }
