/* =============================================
   Schedule Detail Page
   ============================================= */

/* ---- Hero ---- */
.sd-hero {
	position: relative;
	width: 100%;
	height: 100vh;
	min-height: 640px;
	padding-top: var(--header-height);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background-color: #f0f0f0;
}
.sd-hero-bg {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	z-index: 0;
}
.sd-hero-bg img {
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: center;
}
.sd-hero-overlay {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background:
		linear-gradient(to right, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.3) 40%, rgba(255,255,255,0) 70%),
		linear-gradient(to bottom, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 40%);
	pointer-events: none;
}

.sd-hero-content {
	position: relative;
	z-index: 10;
	width: 100%;
	max-width: 1200px;
	padding: 0 40px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 30px;
}

.sd-hero .hero-text-layout {
	text-align: left;
	color: var(--color-text-black);
}

.sd-hero .univ-name {
	font-size: 24px;
	font-weight: 700;
	color: var(--color-primary);
	margin-bottom: 5px;
	text-shadow: 0 0 8px rgba(255,255,255,1), 0 0 20px rgba(255,255,255,0.8), 0 0 40px rgba(255,255,255,0.5);
	line-height: 1.2;
}

.sd-hero .main-title {
	margin: 10px 0 15px;
}
.sd-hero .title-oc {
	font-size: 80px;
	font-weight: 900;
	line-height: 0.95;
	letter-spacing: 0.02em;
	color: var(--color-primary);
	text-shadow: 0 0 10px rgba(255,255,255,1), 0 0 25px rgba(255,255,255,0.9), 0 0 50px rgba(255,255,255,0.5);
	display: block;
}
.sd-hero .title-year {
	font-size: 90px;
	font-weight: 900;
	line-height: 1.0;
	color: var(--color-text-black);
	text-shadow: 0 0 10px rgba(255,255,255,1), 0 0 25px rgba(255,255,255,0.9), 0 0 50px rgba(255,255,255,0.5);
	display: block;
	margin-top: 10px;
}

.sd-hero .catch-copy {
	font-size: 42px;
	font-weight: 900;
	line-height: 1.3;
	color: var(--color-text-black);
	text-shadow: 0 0 10px rgba(255,255,255,1), 0 0 25px rgba(255,255,255,0.9), 0 0 50px rgba(255,255,255,0.6);
	margin: 15px 0 0;
	letter-spacing: 0.05em;
}

.sd-hero-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 320px;
	height: 80px;
	background: #00B900;
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	border-radius: 40px;
	text-decoration: none;
	box-shadow: 0 10px 20px rgba(0, 185, 0, 0.3);
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}
.sd-hero-btn:hover {
	background: #009900;
	transform: translateY(-2px);
	box-shadow: 0 15px 30px rgba(0, 185, 0, 0.4);
	color: #fff;
	opacity: 1;
}

/* No-image hero variant - Refined */
.sd-hero-noimg {
	background-color: #fff;
	background-image:
		/* グリッドパターン */
		linear-gradient(rgba(255, 102, 0, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 102, 0, 0.05) 1px, transparent 1px),
		/* ベースのグラデーション */
		radial-gradient(circle at 0% 0%, rgba(255, 240, 220, 0.8) 0%, rgba(255, 255, 255, 0) 50%),
		radial-gradient(circle at 100% 100%, rgba(255, 220, 180, 0.6) 0%, rgba(255, 255, 255, 0) 50%),
		linear-gradient(135deg, #fff 0%, #fffbf0 100%);
	background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%, 100% 100%;
	height: auto;
	min-height: 600px;
	padding: 140px 20px 80px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

/* Decorative elements container */
.sd-hero-decorations {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}

/* Floating Shapes */
.deco-shape {
	position: absolute;
	border-radius: 50%;
	opacity: 0.6;
	animation: float 12s infinite ease-in-out;
	mix-blend-mode: multiply;
}

/* Top Right Large Blob */
.deco-1 {
	width: 600px;
	height: 600px;
	top: -150px;
	right: -100px;
	background: radial-gradient(circle, rgba(255, 102, 0, 0.1) 0%, transparent 70%);
	animation-duration: 20s;
}

/* Bottom Left Medium Blob */
.deco-2 {
	width: 500px;
	height: 500px;
	bottom: -150px;
	left: -150px;
	background: radial-gradient(circle, rgba(255, 140, 0, 0.08) 0%, transparent 70%);
	animation-duration: 25s;
	animation-delay: -5s;
}

/* Small Accent Circle 1 */
.deco-3 {
	width: 150px;
	height: 150px;
	top: 15%;
	left: 10%;
	background: rgba(255, 165, 0, 0.15);
	filter: blur(40px);
	animation-duration: 15s;
	animation-delay: -2s;
}

/* Small Accent Circle 2 */
.deco-4 {
	width: 100px;
	height: 100px;
	bottom: 25%;
	right: 15%;
	background: rgba(255, 200, 150, 0.2);
	filter: blur(30px);
	animation-duration: 18s;
	animation-delay: -8s;
}

@keyframes float {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(20px, -20px) scale(1.05); }
	66% { transform: translate(-10px, 10px) scale(0.95); }
}

.sd-hero-noimg .sd-hero-content {
	align-items: center;
	position: relative;
	z-index: 1;
	text-align: center;
	gap: 40px;
}

.sd-hero-noimg .hero-text-layout {
	text-align: center;
}

.sd-hero-noimg .univ-name {
	font-size: 18px;
	color: var(--color-text-light);
	letter-spacing: 0.2em;
	margin-bottom: 20px;
	text-shadow: none;
	font-weight: 700;
}

.sd-hero-noimg .main-title {
	margin: 0;
	line-height: 1;
}

.sd-hero-noimg .title-oc {
	font-size: 100px;
	font-weight: 900;
	line-height: 0.9;
	letter-spacing: -0.02em;
	background: linear-gradient(45deg, var(--color-primary) 0%, #ff8c00 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	text-shadow: none;
	margin-bottom: 10px;
}

.sd-hero-noimg .title-year {
	font-size: 40px;
	font-weight: 900;
	color: var(--color-text-light);
	letter-spacing: 0.1em;
	display: block;
	text-shadow: none;
	margin-top: 5px;
}

.sd-hero-noimg .catch-copy {
	font-size: 50px;
	font-weight: 900;
	color: var(--color-text);
	text-shadow: none;
	margin: 0;
	line-height: 1.2;
	position: relative;
	padding-top: 30px;
}

.sd-hero-noimg .catch-copy::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 4px;
	background: var(--color-primary);
	border-radius: 2px;
	opacity: 0.3;
}

/* SP Responsive */
@media (max-width: 768px) {
	.sd-hero {
		height: auto;
		min-height: auto;
		flex-direction: column;
		justify-content: center;
		padding: 0;
	}
	.sd-hero-noimg {
		min-height: auto;
		padding: 100px 20px 60px;
	}
	.sd-hero-decorations {
		display: none; /* Mobile optimization: reduce animation load */
	}
	.sd-hero-noimg::before { /* Keep static background for mobile */
		content: '';
		position: absolute;
		border-radius: 50%;
		z-index: 0;
		pointer-events: none;
		width: 300px;
		height: 300px;
		top: -80px;
		right: -60px;
		background: radial-gradient(circle, rgba(255, 102, 0, 0.08) 0%, transparent 70%);
	}
	.sd-hero-noimg::after {
		content: '';
		position: absolute;
		border-radius: 50%;
		z-index: 0;
		pointer-events: none;
		width: 250px;
		height: 250px;
		bottom: -50px;
		left: -50px;
		background: radial-gradient(circle, rgba(255, 102, 0, 0.06) 0%, transparent 70%);
	}
	
	.sd-hero-btn {
		width: 100%;
		height: 60px;
		font-size: 16px;
	}
}


/* ---- Highlights ---- */
.sd-section-highlights {
	background: #f9f9f9;
}
.sd-highlights-grid {
	max-width: 960px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}
.sd-highlight-card {
	background: #fff;
	border-radius: 14px;
	padding: 24px 20px;
	text-align: left;
	box-shadow: 0 4px 15px rgba(0,0,0,0.05);
	transition: transform 0.3s, box-shadow 0.3s;
	border-top: 4px solid var(--color-primary);
}
.sd-highlight-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}
.sd-highlight-title {
	font-size: 15px;
	font-weight: 800;
	color: var(--color-text);
	margin: 0 0 10px;
	line-height: 1.4;
}
.sd-highlight-text {
	font-size: 13px;
	color: var(--color-text-light);
	line-height: 1.8;
	margin: 0;
}


/* ---- Timetable ---- */
.sd-section-timetable {
	background: #fff;
}
/* ---- Timetable Groups ---- */
.sd-timetable-group {
	margin-bottom: 32px;
}
.sd-timetable-group:last-child {
	margin-bottom: 0;
}
.sd-timetable-group-title {
	font-size: 16px;
	font-weight: 800;
	color: var(--color-text);
	margin: 0 0 14px;
	padding-left: 14px;
	border-left: 4px solid var(--color-primary);
	line-height: 1.4;
}
.sd-timeline-chart-wrap {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 4px 15px rgba(0,0,0,0.05);
	overflow: hidden;
}
.sd-timeline-chart {
	width: 100%;
	min-height: 300px;
}
#timelineDept {
	min-height: 360px;
}

@media (max-width: 768px) {
	.sd-timeline-chart-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.sd-timeline-chart {
		width: 800px;
		min-width: 800px;
	}
}

/* ---- Programs by Department ---- */
.sd-section-programs {
	background: #fffaf0;
	position: relative;
	overflow: hidden;
}
.sd-section-programs::before {
	content: '';
	position: absolute; top: 0; left: 0;
	width: 100%; height: 100%;
	background: linear-gradient(135deg, var(--color-primary-light) 0%, transparent 50%);
	z-index: 0;
	clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
}
.sd-section-programs .container {
	position: relative;
	z-index: 1;
}
.sd-programs-list {
	max-width: 960px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}
.sd-program-block {
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0,0,0,0.05);
	transition: transform 0.3s, box-shadow 0.3s;
	display: flex;
	flex-direction: column;
}
.sd-program-block:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.sd-program-thumb {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}
.sd-program-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transition: transform 0.4s ease;
}
.sd-program-block:hover .sd-program-thumb img {
	transform: scale(1.05);
}
.sd-program-body {
	padding: 18px 20px 22px;
}
.sd-program-faculty {
	font-size: 16px;
	font-weight: 800;
	color: var(--color-text);
	margin: 0 0 10px;
	line-height: 1.3;
}
.sd-program-time {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	color: var(--color-primary);
	padding: 3px 10px;
	background: var(--color-primary-light);
	border-radius: 20px;
	margin-bottom: 8px;
}
.sd-program-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: var(--color-primary);
	padding: 2px 10px;
	border-radius: 20px;
	margin-left: 4px;
	margin-bottom: 8px;
}
.sd-program-desc {
	font-size: 13px;
	color: var(--color-text-light);
	line-height: 1.7;
	margin: 0;
}


/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
	.sd-hero {
		height: auto;
		min-height: auto;
		flex-direction: column;
		justify-content: center;
		padding: 0;
	}
	.sd-hero-noimg {
		min-height: auto;
		padding: 100px 20px 60px;
	}
	.sd-hero-noimg .sd-hero-content {
		gap: 30px;
	}
	.sd-hero-noimg .univ-name {
		/* display: none; */
	}
	.sd-hero-noimg .main-title {
		display: none;
	}
	.sd-hero-noimg .catch-copy {
		font-size: clamp(36px, 12vw, 64px);
		padding-top: 0;
		letter-spacing: -0.02em;
		line-height: 1.1;
		white-space: nowrap;
	}
	.sd-hero-noimg .catch-copy::before {
		display: none;
	}
	.sd-hero-noimg .catch-copy span {
		font-size: 0.45em !important;
		display: inline-block;
		vertical-align: middle;
		margin-left: 10px;
		background: var(--color-primary);
		color: #fff;
		padding: 4px 10px;
		border-radius: 4px;
		letter-spacing: 0.05em;
		font-weight: 700;
		line-height: 1.4;
	}
	
	/* Mobile optimization */
	.sd-hero-decorations {
		/* display: none; */ /* Keep decorations visible but static or simplified if needed */
		opacity: 0.5;
	}
	.deco-shape {
		animation: none; /* Disable animation for better performance on mobile */
	}
	.deco-1 {
		width: 300px; height: 300px;
		top: -50px; right: -50px;
	}
	.deco-2 {
		width: 250px; height: 250px;
		bottom: -50px; left: -50px;
	}
	.deco-3, .deco-4 {
		display: none; /* Hide smaller elements on mobile */
	}

	/* Remove pseudo-elements used previously as fallback */
	.sd-hero-noimg::before,
	.sd-hero-noimg::after {
		display: none;
	}

	.sd-hero-month { font-size: 52px; }
	.sd-hero-sep { font-size: 38px; }
	.sd-hero-day { font-size: 72px; }
	.sd-hero-weekday { font-size: 16px; padding: 3px 12px; }
	.sd-hero-time { font-size: 18px; }
	.sd-hero-btn { font-size: 14px; padding: 12px 32px; }

	.sd-highlights-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}
	.sd-highlight-card { padding: 18px 16px; }
	.sd-highlight-title { font-size: 14px; }
	.sd-highlight-text { font-size: 12px; }

	.sd-programs-list { grid-template-columns: 1fr; }
	.sd-program-faculty { font-size: 15px; }
	.sd-program-body { padding: 14px 16px 18px; }
	.sd-program-desc { font-size: 12px; }
}

@media (max-width: 480px) {
	.sd-hero {
		height: auto;
		min-height: auto;
	}
	.sd-hero-month { font-size: 44px; }
	.sd-hero-day { font-size: 60px; }
	.sd-hero-weekday { font-size: 14px; }
	.sd-hero-time { font-size: 16px; }
	.sd-hero-venue { font-size: 13px; }
	.sd-hero-btn { font-size: 13px; padding: 11px 28px; }

	.sd-highlights-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.sd-program-faculty { font-size: 14px; }
	.sd-program-body { padding: 12px 14px 16px; }
}
