@charset "UTF-8";

/* ===============================
전체일정 테이블
=============================== */
.schedule_table_wrap {
	width: 100%;
	overflow-x: auto;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	-webkit-overflow-scrolling: touch;
}

.schedule_table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	min-width: 1000px;
}

.schedule_table thead {
	background: linear-gradient(to right, #CD3939, #D85555);
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 10;
}

.schedule_table thead tr {
	height: auto;
	background:#2a3541
}

.schedule_table thead th {
	padding: 18px 14px;
	text-align: center;
	font-weight:600;
	font-size:19px;
	border-right: 1px solid rgba(255, 255, 255, 0.2);
	word-break: keep-all;
	color: #fff;
}

.schedule_table thead th:last-child {
	border-right: none;
}

.schedule_table thead .category_col {
	min-width: 120px;
	background:#2a3541;
	position: sticky;
	left: 0;
	z-index: 20; 
}

.schedule_table thead .date_col {
	min-width: 200px;
	padding: 12px 8px;
}

.schedule_table thead .date_title {
	display: none;
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 5px;
	color: #fff;
}

.schedule_table thead .date_value {
	display: block;
	font-size:21px;
	font-weight:600;
	margin-bottom: 3px;
	color: #fff;
	letter-spacing: 0.5px;
}

.schedule_table thead .date_nick {
	display: block;
	font-size:17px;
	font-weight: 500;
	opacity: 1;
	color: #fff;
}

/* 테이블 본문 */
.schedule_table tbody tr {
	border-bottom: 1px solid #E8E8E8;
	transition: background-color 0.3s ease;
}

.schedule_table tbody tr:hover {
	background-color: #FAFAFA;
}

.schedule_table tbody th,
.schedule_table tbody td {
	padding: 16px 12px;
	text-align: left;
	vertical-align: top;
}

.schedule_table tbody .category_col {
	min-width: 120px;
	padding: 16px 12px;
	background: #F5F2ED;
	font-weight: 600;
	vertical-align: middle;
	position: sticky;
	left: 0;
	z-index: 5;
	border-right: 1px solid #DDD;
}

.category_name {
	color: #1a0a0a;
	font-size:19px;
	font-weight: 700;
	word-break: keep-all;
	line-height: 1.4;
	padding: 5px 0;
	text-align: center;
}

.schedule_table tbody .date_col,
.schedule_table tbody .schedule_cell {
	min-width: 200px;
	padding: 12px 8px;
	vertical-align: top;
	border-right: 1px solid #E8E8E8;
}

.schedule_table tbody .schedule_cell:last-child {
	border-right: none;
}

/* 일정 아이템 */
.schedule_item {
	background: #FFFEF9;
	border-left: 5px solid #CD3939;
	padding:12px;
	margin-bottom: 12px;
	border-radius: 4px;
	font-size: 16px;
	transition: all 0.3s ease;
	cursor: pointer;
	border: 1px solid #EEE;
}

.schedule_item:last-child {
	margin-bottom: 0;
}

.schedule_item:hover {
	border-left-color: #FFD700;
	background: #FFFAF0;
	box-shadow: 0 3px 8px rgba(205, 57, 57, 0.15);
	border-color: #CD3939;
}

.schedule_thumb {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 10px;
	background: #f3f3f3;
	padding: 6px;
	min-height: 120px;
}

.schedule_thumb img {
	max-width: 100%;
	max-height: 220px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.schedule_time {
	color: #CD3939;
	font-weight:700;
	font-size: 16px;
	margin-bottom: 6px;
	word-break: normal;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
	letter-spacing:-1px;
}

.schedule_title {
	color: #0A0A0A;
	font-weight:600;
	font-size:19px;
	margin-bottom: 8px;
	line-height: 1.3;
	word-break: keep-all;
	/*display: -webkit-box;*/
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	letter-spacing: 0.2px;
}

.schedule_sub_title {
	color: #655757;
	font-weight: 500;
	font-size: 16px;
	margin-bottom: 8px;
	line-height: 1.35;
	word-break: keep-all;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.schedule_sub_title:empty {
	display: none;
}

.schedule_category_tag {
	display: inline-block;
	background: #CD3939;
	color: #fff;
	padding: 5px 10px;
	border-radius: 4px;
	font-size:15px;
	font-weight: 700;
	word-break: keep-all;
	letter-spacing: 0.4px;
}

/* 빈 상태 */
.schedule_empty {
	text-align: center;
	padding: 80px 20px;
	background: #F9FAFC;
	border-radius: 8px;
	border: 1px solid #E8E8E8;
}

.schedule_empty p {
	margin: 0;
	color: #655757;
	font-size: 18px;
	font-weight: 500;
	margin-bottom: 10px;
}

.schedule_empty .empty_desc {
	font-size: 14px;
	color: #9D8F87;
	font-weight: 400;
}

/* 반응형: 태블릿 (가로 스크롤을 유지하되 글씨/여백 최적화) */
@media screen and (max-width: 1024px) {
	.schedule_table thead .date_col {
		min-width: 150px;
		padding: 12px 8px;
	}

	.schedule_table thead .date_title {
		font-size: 19px;
		margin-bottom: 4px;
		font-weight: 600;
	}

	.schedule_table thead .date_value {
		font-size: 24px;
		margin-bottom: 2px;
		font-weight: 800;
	}

	.schedule_table thead .date_nick {
		font-size:17px;
		font-weight: 500;
	}

	.schedule_table tbody .schedule_cell {
		min-width: 150px;
		padding: 12px 8px;
	}

	.schedule_item {
		padding: 13px 10px;
		margin-bottom: 10px;
		font-size: 15px;
	}

	.schedule_time {
		font-size: 15px;
		margin-bottom: 4px;
		font-weight: 800;
	}

	.schedule_title {
		font-size: 19px;
		margin-bottom: 6px;
		font-weight: 700;
		display: block;
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
		-webkit-line-clamp: unset;
		line-clamp: unset;
		-webkit-box-orient: initial;
	}

	.schedule_sub_title {
		font-size: 15px;
		margin-bottom: 6px;
	}

	.schedule_category_tag {
		font-size: 15px;
		padding: 4px 10px;
		font-weight: 700;
	}
}

/* ★ 핵심 수정: 모바일 (세로형 리스트/카드 뷰로 완전 변환) */
@media screen and (max-width: 768px) {
	.schedule_table_wrap {
		border-radius: 0;
		box-shadow: none;
		background: transparent;
		overflow-x: visible; /* 가로 스크롤 제거 */
	}

	.schedule_table {
		min-width: 100%; /* 고정 너비 해제 */
		display: block;
	}

	/* 모바일에서는 기본 테이블 날짜 헤더 숨김 */
	.schedule_table thead {
		display: none;
	}

	.schedule_table tbody {
		display: block;
		width: 100%;
	}

	/* 표의 한 행(장소)을 모서리가 둥근 하나의 카드 박스로 변환 */
	.schedule_table tbody tr {
		display: block;
		margin-bottom: 20px;
		background: #fff;
		border-radius: 12px;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
		border: 1px solid #E8E8E8;
		overflow: hidden;
	}

	/* 장소 이름(단오제단, 수리마당 등)을 카드의 헤더로 변환 */
	.schedule_table tbody .category_col {
		display: block;
		width: 100%;
		position: static; /* 스티키 해제 */
		background: #1b233a;
		border-right: none;
		border-bottom: 1px solid #eee;
		padding: 16px 20px;
	}

	.category_name {
		color: #fff;
		font-size: 20px;
		text-align: left;
		padding: 0;
	}

	.schedule_table tbody .schedule_cell {
		display: block;
		width: 100%;
		box-sizing: border-box;
		border-right: none;
		border-bottom: 1px solid #F0F0F0;
		padding: 16px 20px;
	}

	.schedule_table tbody .schedule_cell:last-child {
		border-bottom: none;
	}

	/* 💡 핵심: CSS :has() 선택자를 활용해 내용(일정)이 없는 빈 날짜는 화면에서 아예 제거 */
	.schedule_table tbody .schedule_cell:not(:has(.schedule_item)) {
		display: none;
	}

	/* 💡 핵심: thead를 숨겼으므로 각 일정 상단에 날짜를 가상요소(::before)로 강제 주입 */
	.schedule_table tbody .schedule_cell::before {
		display: block;
		font-size: 15px;
		font-weight: 700;
		color: #CD3939;
		margin-bottom: 12px;
		padding-bottom: 8px;
		border-bottom: 1px dashed #E0E0E0;
	}

	/* HTML 구조에 맞춰 몇 번째 td인지 계산하여 날짜 텍스트 맵핑 */
	.schedule_table tbody .schedule_cell:nth-child(2)::before { content: "📅 6월 15일 (첫째날)"; }
	.schedule_table tbody .schedule_cell:nth-child(3)::before { content: "📅 6월 16일 (둘째날)"; }
	.schedule_table tbody .schedule_cell:nth-child(4)::before { content: "📅 6월 17일 (셋째날)"; }
	.schedule_table tbody .schedule_cell:nth-child(5)::before { content: "📅 6월 18일 (넷째날)"; }
	.schedule_table tbody .schedule_cell:nth-child(6)::before { content: "📅 6월 19일 (단오날)"; }
	.schedule_table tbody .schedule_cell:nth-child(7)::before { content: "📅 6월 20일 (여섯째날)"; }
	.schedule_table tbody .schedule_cell:nth-child(8)::before { content: "📅 6월 21일 (일곱째날)"; } /* HTML의 중복 오타 보정 */
	.schedule_table tbody .schedule_cell:nth-child(9)::before { content: "📅 6월 22일 (마지막날)"; }

	/* 모바일 일정 아이템 최적화 */
	.schedule_item {
		padding: 12px;
		margin-bottom: 0;
		font-size: 14px;
		border-left: 4px solid #CD3939;
		box-shadow: 0 1px 4px rgba(0,0,0,0.05);
	}

	.schedule_time {
		font-size: 14px;
		margin-bottom: 4px;
	}

	.schedule_title {
		font-size: 17px;
		margin-bottom: 6px;
		/*display: block;
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
		-webkit-line-clamp: unset;
		line-clamp: unset;
		-webkit-box-orient: initial;*/
	}

	.schedule_sub_title {
		font-size: 14px;
		margin-bottom: 6px;
	}

	.schedule_category_tag {
		font-size: 13px;
		padding: 4px 8px;
	}

	.schedule_thumb {
		min-height: auto;
	}

	.schedule_thumb img {
		max-height: 180px;
	}
}

/* ===============================
일자별 일정 (타임라인)
=============================== */
.date_selector_wrap {
    padding:15px 0;
	margin-bottom: 40px;
	width: 100%;
}

.date_selector {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.date_btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 20px;
	background: #E6E1D4;
	border: 2px solid transparent;
	border-radius: 50px;
	color: #655757;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.3s ease;
	cursor: pointer;
}

.date_btn:hover {
	background: #D9CFC1;
	/*border-color: #CD3939;*/
}

.date_btn.active {
	background: linear-gradient(135deg, #CD3939 0%, #E85C5C 100%);
	color: #fff;
	border-color: #B82E2E;
	box-shadow: 0 4px 12px rgba(205, 57, 57, 0.3);
}

.date_btn .date_num {
	display: block;
	font-size: 18px;
	font-weight: 700;
}

.date_btn .date_day {
	display: block;
	font-size: 14px;
	font-weight: 500;
}

/* 날짜 라벨 */
.date_label {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 6px;
	padding: 0 12px;
	min-width: 50px;
	height: 52px;
	background-color: transparent;
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	line-height: 1;
}

.date_label::before {
	position: absolute;
	content: "";
	top: 50%;
	left: 55%;
	transform: translate(-50%, -50%);
	width: 85px;
	height: 90px;
	background: url(/image/main/label.png) no-repeat center;
	background-size: contain;
	z-index: -1;
}

/* 선택된 날짜 정보 */
.selected_date_header {
	text-align: center;
	margin-bottom: 30px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
}

.selected_date_title {
	margin-bottom: 30px;
	font-size: 40px;
	font-weight: 800;
	color: #0A0A0A;
	letter-spacing: -0.5px;
	line-height: 1.2;
}

.today_badge {
	display: inline-block;
	background: linear-gradient(135deg, #E85C5C 0%, #CD3939 100%);
	color: #fff;
	padding: 6px 16px;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.5px;
	box-shadow: 0 3px 8px rgba(205, 57, 57, 0.25);
}

.selected_date_info {
	text-align: center;
	margin: 40px 0;
	padding: 20px;
	background: #F9FAFC;
	border-radius: 8px;
	border: 1px solid #E8E8E8;
}

.selected_date_info h3 {
	margin: 0;
	font-size: 32px;
	font-weight: 700;
	color: #0A0A0A;
}

/* 타임라인 컨테이너 */
.timeline_wrap {
	background: #fff;
	border: 1px solid #DDD;
	border-radius: 8px;
	overflow: visible;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hour_block {
	border-bottom: 1px solid #E8E8E8;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.hour_block.end_hour {
	border-bottom: 0;
	overflow: visible;
}

.hour_block.end_hour .hour_label {
	transform: translateY(-50%);
}

.hour_label {
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	line-height: 1;
	color: #7A7A7A;
}

.timeline_events {
	flex: 1;
	overflow-x: visible;
	position: relative;
}

.event_grid {
	display: grid;
	grid-template-columns: 80px repeat(var(--column-count), minmax(200px, 1fr));
	min-width: calc(80px + (var(--column-count) * 200px));
	height: auto;
}

.time_column {
	position: relative;
	border-right: 1px solid #E8E8E8;
	background: #F8F8F8;
}

.time_header {
	background: linear-gradient(135deg, #192445 0%, #25366A 100%);
	border-bottom: 2px solid #DDD;
}

.time_content {
	position: relative;
	background: #F8F8F8;
}

.event_column {
	position: relative;
	border-right: 1px solid #E8E8E8;
	min-width: 200px;
}

.event_column:last-child {
	border-right: none;
}

.column_header {
	position: sticky;
	top: 0;
	z-index: 3;
	padding: 14px 10px;
	/*background: linear-gradient(135deg, #F5F5F5 0%, #EFEFEF 100%);*/
    background: #1b233a;
	border-bottom: 2px solid #DDD;
	font-size: 16px;
	font-weight: 700;
	/*color: #2B1313;*/
    color: #ffff;
	text-align: center;
	word-break: keep-all;
	line-height: 1.3;
}

.column_content {
	position: relative;
	background: #FFFEF9;
}

.event_block {
	position: absolute;
	left: 5px;
	right: 5px;
	padding: 15px 30px;
	border-radius: 4px;
	color: #ffffff;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
	cursor: pointer;
	display: flex;
	/*flex-direction: column;*/
	justify-content: center;
	align-items: center;
	text-align: center;
	gap:10px;
	
}

.event_block.text_on_orange {
	color: #fff;
}

.event_block:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	transform: translateY(-2px);
	z-index: 10;
}

.event_time {
	font-size: 12px;
	font-weight: 500;
	/*margin-bottom: 4px;*/
	line-height: 1;
	text-shadow: none;
	color:rgba(255,255,255,0.8)
}

.event_title {
	font-size: 19px;
	font-weight: 600;
	line-height: 1.2;
	text-shadow: none;
	word-break: keep-all;
	color:#fff
}

.event_block.text_on_orange .event_time,
.event_block.text_on_orange .event_title {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 반응형 - 타블렛 */
@media screen and (max-width: 1024px) {
	.selected_date_header {
		margin-bottom: 25px;
		gap: 12px;
	}

	.selected_date_title {
		font-size: 32px;
		font-weight: 800;
	}

	/*.date_label {
		margin-top: 4px;
		height: 46px;
		min-width: 45px;
		font-size: 16px;
		padding: 0 10px;
	}

	.date_label::before {
		width: 45px;
		height: 46px;
	}*/

	.today_badge {
		padding: 5px 14px;
		font-size: 13px;
	}

	.date_selector {
		justify-content: flex-start;
		overflow-x: auto;
		padding-bottom: 10px;
	}

	.date_btn {
		flex-shrink: 0;
		padding: 10px 16px;
		font-size: 14px;
	}

	.date_btn .date_num {
		font-size: 16px;
	}

	.date_btn .date_day {
		font-size: 12px;
	}

	.selected_date_info h3 {
		font-size: 28px;
	}

	.event_grid {
		grid-template-columns: 70px repeat(var(--column-count), minmax(180px, 1fr));
		min-width: calc(70px + (var(--column-count) * 180px));
	}

	.hour_label {
		font-size: 12px;
	}

	.event_column {
		min-width: 180px;
	}

	.column_header {
		font-size: 14px;
		padding: 12px 8px;
	}

	.event_time {
		font-size: 11px;
		margin-bottom: 3px;
	}

	.event_title {
		font-size: 22px;
	}
}

/* 반응형 - 모바일 */
@media screen and (max-width: 768px) {
	.date_selector_wrap {
		margin-bottom: 10px;
	}

	.date_selector {
		gap: 8px;
	}

	.selected_date_header {
		margin-bottom: 25px;
		gap: 10px;
	}

	.selected_date_title {
		font-size: 26px;
		font-weight: 800;
	}

	/*.date_label {
		margin-top: 2px;
		height: 40px;
		min-width: 40px;
		font-size: 14px;
		padding: 0 8px;
	}

	.date_label::before {
		width: 40px;
		height: 40px;
	}*/

	.today_badge {
		padding: 4px 12px;
		font-size: 12px;
	}

	.date_btn {
		padding: 8px 12px;
		font-size: 12px;
		gap: 4px;
	}

	.date_btn .date_num {
		font-size: 13px;
	}

	.date_btn .date_day {
		font-size: 11px;
	}

	.selected_date_info {
		margin: 30px 0;
		padding: 15px;
	}

	.selected_date_info h3 {
		font-size: 24px;
	}

	.timeline_wrap {
		border-radius: 6px;
		overflow: hidden;
	}

	.timeline_events {
		overflow-x: auto;
		-ms-overflow-style: auto;
		scrollbar-width: thin;
	}

	.timeline_events::-webkit-scrollbar {
		height: 8px;
	}

	.timeline_events::-webkit-scrollbar-thumb {
		background: #c9c9c9;
		border-radius: 10px;
	}

	.timeline_events::-webkit-scrollbar-track {
		background: #efefef;
	}

	.event_grid {
		grid-template-columns: 60px repeat(var(--column-count), minmax(150px, 1fr));
		min-width: calc(60px + (var(--column-count) * 150px));
	}

	.hour_block {
		height: 50px;
		padding-top: 6px;
	}

	.hour_label {
		font-size: 11px;
	}

	.event_column {
		min-width: 150px;
	}

	.column_header {
		font-size: 13px;
		padding: 10px 6px;
	}

	.event_time {
		font-size: 10px;
	}

	.event_title {
		font-size: 18px;
	}
}

/*추가*/
.sub_program_box{display: grid; grid-template-columns: repeat(4, 1fr); gap:30px}
.sub_program_box .items {
	background: #F9FAFC; 
	border-radius: 20px; 
	border: 1px solid rgba(0, 0, 0, 0.05); 
	overflow: hidden; 
	position: relative; 
	cursor: pointer; 
	transition: border 0.3s, box-shadow 0.3s;
	display: flex;
	flex-direction: column;
}
.sub_program_box .items:hover{border:1px solid #F45757; box-shadow: 0 0 10px rgba(0,0,0,0.2)}
.sub_program_box .items .img_{border-radius: 20px; width: 100%; padding-top:120%; position: relative; overflow:hidden;}
.sub_program_box .items .img_ img{
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.sub_program_box .items .cont_{padding:15px 20px; flex: 1; }
.sub_program_box .items .cont_ h2 {
	color: #222; 
	font-size: 21px; 
	font-weight: 600; 
	margin-bottom: 5px;
	display: -webkit-box;
	line-clamp: 2;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.4;  
	max-height: 2.8em; 
	word-break: keep-all; 
}
.sub_program_box .items .day_{display: flex;  align-items: center; padding: 0 20px 20px;  gap: 5px; margin-top: auto;}
.sub_program_box .items .day_ span{color: #655757; font-size:14px}

.sub_program_box .label{position:absolute; top:0; left:20px; z-index:9; display:flex; align-items:center; justify-content: center; width:57px; height:68px;}
.sub_program_box .label:after{
	position:absolute;
	content:"";
	top:0;
	left:0;
	background:url(/image/main/label.png) no-repeat;
	width:57px;
	height:68px;
	z-index:-1
}
.sub_program_box .label span{font-size:15px; color:#fff; line-height:18px; transform:translate(-3px, -3px)}

@media (max-width: 1024px) {
	.sub_program_box {
		grid-template-columns: repeat(3, 1fr); 
	}
}
@media (max-width: 768px) {
	.sub_program_box {
		grid-template-columns: repeat(2, 1fr); 
		gap: 20px;
	}
}
@media (max-width: 640px) {
	.sub_program_box {
		gap: 15px;
	}
	.sub_program_box .items .day_ {
		display: none;
	}
	.sub_program_box .items .cont_ {
		padding-bottom: 20px;
	}
	.sub_program_box .items .cont_ h2 {
		font-size: 18px;
	}
}
@media (max-width: 480px) {
	.sub_program_box {
		grid-template-columns: repeat(2, 1fr); 
	}
	.sub_program_box .label{left:10px; width:47px; height:58px;}
	.sub_program_box .label:after{
		position:absolute;
		content:"";
		top:0;
		left:0;
		background:url(/image/main/label.png) no-repeat;
		background-size: 47px;
		width:47px;
		height:58px;
		z-index:-1
	}
	.sub_program_box .label span{font-size:13px; }
	.sub_program_box .items .cont_ h2 {
		font-size: 17px;
	}
	.sub_program_box .items .cont_{padding:15px;}
}

