/*--------------------------------------------------------------
홈페이지 스타일 (KBS 스타일 미디어 레이아웃)
--------------------------------------------------------------*/

/* =========================================
   기본 레이아웃 리셋 (홈 전용)
   ========================================= */

/* 홈 페이지에서 기본 테마 콘텐츠 여백 제거 */
.home #primary.home-content-area,
.page-template-default.home #primary {
	max-width: 100%;
	width: 100%;
	padding: 0;
	margin: 0;
	float: none;
}

.home .site-content {
	padding-top: 0;
}

.home #main.home-main {
	margin: 0;
	padding: 0;
}

.home-content-area {
	background: #f4f5f7;
}

/* =========================================
   공통 래퍼
   ========================================= */

.home-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* =========================================
   섹션 공통 스타일
   ========================================= */

.home-section {
	padding: 40px 0;
}

.home-section__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 22px;
}

.home-section__title {
	font-size: 20px;
	font-weight: 700;
	color: #0f1f3d;
	margin: 0;
	padding-left: 14px;
	position: relative;
	letter-spacing: -0.3px;
}

.home-section__title::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 4px;
	height: 22px;
	background: #1a56c4;
	border-radius: 2px;
}

.home-section__more {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	color: #666;
	text-decoration: none;
	transition: color 0.15s;
}

.home-section__more:hover {
	color: #1a56c4;
}

/* =========================================
   히어로 슬라이더
   ========================================= */

.home-hero-slider {
	position: relative;
	background: #111827;
	overflow: hidden;
}

.hero-swiper {
	width: 100%;
	height: 520px;
}

.swiper-slide {
	position: relative;
	overflow: hidden;
}

.hero-slide-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

.hero-slide-bg {
	position: absolute;
	inset: 0;
}

.hero-slide-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hero-slide-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		105deg,
		rgba(5, 15, 35, 0.82) 0%,
		rgba(10, 20, 50, 0.55) 45%,
		rgba(0, 0, 0, 0.15) 100%
	);
	z-index: 1;
}

.hero-slide-content {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	z-index: 2;
}

.hero-slide-inner {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 60px;
}

.hero-slide-category {
	display: inline-block;
	background: #1a56c4;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: 3px;
	margin-bottom: 14px;
}

.hero-slide-title {
	font-size: 34px;
	font-weight: 800;
	color: #fff;
	line-height: 1.3;
	margin: 0 0 14px;
	max-width: 620px;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
	letter-spacing: -0.5px;
}

.hero-slide-excerpt {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.82);
	max-width: 520px;
	line-height: 1.65;
	margin: 0 0 14px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-slide-date {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.55);
}

/* 슬라이더 placeholder (포스트 없을 때) */
.hero-slide-placeholder {
	background: linear-gradient(135deg, #0f1f3d 0%, #1a3a7c 100%);
}

/* Swiper 페이지네이션 커스텀 */
.hero-swiper-pagination {
	bottom: 24px !important;
}

.hero-swiper-pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: rgba(255, 255, 255, 0.45);
	opacity: 1;
	transition: all 0.3s;
}

.hero-swiper-pagination .swiper-pagination-bullet-active {
	width: 28px;
	border-radius: 4px;
	background: #fff;
}

/* Swiper 네비게이션 버튼 커스텀 */
.hero-swiper-prev,
.hero-swiper-next {
	width: 46px !important;
	height: 46px !important;
	background: rgba(0, 0, 0, 0.35) !important;
	border-radius: 50% !important;
	backdrop-filter: blur(4px);
	transition: background 0.2s;
}

.hero-swiper-prev:hover,
.hero-swiper-next:hover {
	background: rgba(0, 0, 0, 0.6) !important;
}

.hero-swiper-prev::after,
.hero-swiper-next::after {
	font-size: 16px !important;
	color: #fff;
}

/* =========================================
   광고 배너
   ========================================= */

.home-ad-banner {
	background: #fff;
	border-top: 1px solid #e8e9eb;
	border-bottom: 1px solid #e8e9eb;
}

.home-ad-banner--top {
	padding: 16px 0;
}

.home-ad-banner--bottom {
	padding: 28px 0;
}

.ad-banner-inner {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 50px;
}

/* 관리자용 플레이스홀더 */
.ad-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8f9fa;
	border: 2px dashed #d0d5de;
	color: #9ca3af;
	font-size: 12px;
	border-radius: 4px;
}

.ad-placeholder--728x90 {
	width: 728px;
	height: 90px;
	max-width: 100%;
}

.ad-placeholder--970x90 {
	width: 970px;
	height: 90px;
	max-width: 100%;
}

/* =========================================
   주요뉴스 섹션
   ========================================= */

.home-news {
	background: #fff;
	border-bottom: 1px solid #e8e9eb;
}

.news-grid {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 32px;
	align-items: start;
}

/* 메인 뉴스 */
.news-main__thumb {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 8px;
	background: #e5e7eb;
}

.news-main__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.news-main:hover .news-main__thumb img {
	transform: scale(1.04);
}

.news-main__body {
	padding-top: 16px;
}

.news-main__category {
	margin: 0 0 8px;
}

.news-main__category a {
	font-size: 12px;
	font-weight: 700;
	color: #1a56c4;
	text-decoration: none;
	letter-spacing: 0.3px;
}

.news-main__title {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 10px;
	letter-spacing: -0.3px;
}

.news-main__title a {
	color: #111827;
	text-decoration: none;
	transition: color 0.15s;
}

.news-main__title a:hover {
	color: #1a56c4;
}

.news-main__excerpt {
	font-size: 14px;
	color: #6b7280;
	line-height: 1.65;
	margin: 0 0 10px;
}

.news-main__meta {
	font-size: 12px;
	color: #9ca3af;
	margin: 0;
}

/* 뉴스 사이드 목록 */
.news-list {
	display: flex;
	flex-direction: column;
}

.news-list__item {
	display: grid;
	grid-template-columns: 92px 1fr;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid #f3f4f6;
	text-decoration: none;
	transition: background 0.15s;
}

.news-list__item:first-child {
	border-top: 1px solid #e8e9eb;
}

.news-list__thumb {
	width: 92px;
	height: 62px;
	overflow: hidden;
	border-radius: 5px;
	background: #e5e7eb;
	flex-shrink: 0;
}

.news-list__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.news-list__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
}

.news-list__title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	color: #111827;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.15s;
}

.news-list__item:hover .news-list__title {
	color: #1a56c4;
}

.news-list__meta {
	font-size: 11px;
	color: #9ca3af;
	margin: 0;
}

.news-list__sep {
	margin: 0 4px;
}

/* =========================================
   영상 섹션 공통
   ========================================= */

.home-videos {
	background: #f4f5f7;
}

.home-short-videos {
	background: #fff;
}

/* 비디오 카드 공통 */
.video-card {
	display: block;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	text-decoration: none;
	transition: box-shadow 0.2s, transform 0.2s;
}

.video-card:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.13);
	transform: translateY(-2px);
}

.video-card__thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #1f2937;
}

.video-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.video-card:hover .video-card__thumb img {
	transform: scale(1.06);
}

.video-card__thumb-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

/* 재생 버튼 오버레이 */
.video-card__play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.2);
	opacity: 0;
	transition: opacity 0.2s;
}

.video-card:hover .video-card__play {
	opacity: 1;
}

.video-card__play svg {
	width: 52px;
	height: 52px;
}

.video-card__body {
	padding: 14px 16px 16px;
}

.video-card__category {
	font-size: 11px;
	font-weight: 700;
	color: #1a56c4;
	margin: 0 0 6px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

.video-card__title {
	font-size: 15px;
	font-weight: 600;
	color: #111827;
	line-height: 1.45;
	margin: 0 0 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	letter-spacing: -0.2px;
}

.video-card__meta {
	font-size: 12px;
	color: #9ca3af;
	margin: 0;
}

/* 2열 그리드 */
.videos-grid--2col {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}

/* 4열 그리드 */
.videos-grid--4col {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
}

/* 짧은 영상 카드 - 약간 작게 */
.video-card--small .video-card__body {
	padding: 10px 12px 14px;
}

.video-card--small .video-card__title {
	font-size: 13px;
}

.video-card--small .video-card__play svg {
	width: 40px;
	height: 40px;
}

/* =========================================
   프로그램 섹션
   ========================================= */

.home-programs {
	background: #f4f5f7;
}

.programs-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 18px;
}

.program-card {
	display: block;
	text-decoration: none;
}

.program-card__thumb {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 10px;
	background: #e5e7eb;
	transition: box-shadow 0.2s;
}

.program-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.program-card:hover .program-card__thumb {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.program-card:hover .program-card__thumb img {
	transform: scale(1.06);
}

/* 썸네일 없을 때 이니셜 표시 */
.program-card__thumb-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #1a56c4 0%, #0f3a8f 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.program-card__thumb-placeholder span {
	font-size: 28px;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.9);
}

.program-card__title {
	font-size: 13px;
	font-weight: 600;
	color: #111827;
	line-height: 1.45;
	margin: 10px 0 4px;
	text-align: center;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.15s;
}

.program-card:hover .program-card__title {
	color: #1a56c4;
}

.program-card__meta {
	font-size: 11px;
	color: #9ca3af;
	text-align: center;
	margin: 0;
}

/* =========================================
   섹션 구분선 (순서 무관하게 인접한 .home-section 사이에 적용)
   ========================================= */

.home-section + .home-section {
	border-top: 1px solid #e8e9eb;
}

/* =========================================
   홈 푸터 여백 제거
   ========================================= */

.home .site-footer {
	margin-top: 0;
}

.home .site-footer .wrap {
	padding-top: 0;
}

.home .site-footer .widget-area {
	display: none;
}

/* =========================================
   반응형 - 태블릿 (1024px)
   ========================================= */

@media ( max-width: 1024px ) {
	.home-wrap {
		padding: 0 20px;
	}

	.hero-swiper {
		height: 420px;
	}

	.hero-slide-title {
		font-size: 26px;
	}

	.programs-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* =========================================
   반응형 - 모바일 (768px)
   ========================================= */

@media ( max-width: 768px ) {
	.hero-swiper {
		height: 280px;
	}

	.hero-slide-inner {
		padding: 0 24px;
	}

	.hero-slide-category {
		font-size: 10px;
		padding: 4px 9px;
	}

	.hero-slide-title {
		font-size: 20px;
		margin-bottom: 8px;
	}

	.hero-slide-excerpt {
		display: none;
	}

	.home-section {
		padding: 28px 0;
	}

	.home-section__title {
		font-size: 17px;
	}

	/* 뉴스: 1열로 변경 */
	.news-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	/* 영상: 1열로 변경 */
	.videos-grid--2col {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	/* 짧은 영상: 2열 */
	.videos-grid--4col {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	/* 프로그램: 3열 */
	.programs-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 12px;
	}

	.ad-placeholder--728x90,
	.ad-placeholder--970x90 {
		width: 100%;
		height: 60px;
		font-size: 11px;
	}
}

/* =========================================
   반응형 - 소형 모바일 (480px)
   ========================================= */

@media ( max-width: 480px ) {
	.hero-swiper {
		height: 220px;
	}

	.hero-slide-title {
		font-size: 17px;
	}

	.videos-grid--4col {
		grid-template-columns: repeat(2, 1fr);
	}

	.programs-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
