/* =========================================
   [Design System] 
   ========================================= */
:root {
	--brand-blue: #2563eb;
	--brand-navy: #0f172a; /* Hero Background */
	--text-main: #0f172a;
	--text-sub: #64748b;
	--bg-main: #ffffff;
	--bg-sub: #f8fafc;
	
	/* Card Styles */
	--card-bg: #ffffff;
	--card-border: #e2e8f0;
	--card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	--card-hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	
	--max-width: 1400px; /* Wide Layout */
}


.section-hero-bg {
	background: radial-gradient(circle at 50% 30%, rgba(29, 78, 216, 0.15) 0%, transparent 50%),
				linear-gradient(180deg, #020617 0%, #0f172a 100%);
	color: white;
	position: relative;
	padding-bottom: 120px;
}
.section-hero-bg::before {
	content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
	background-image: 
		radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
	background-size: 40px 40px;
	opacity: 0.2;
	pointer-events: none;
}

.hero-highlight { 
	position: relative; display: inline-block; z-index: 1; 
	background: linear-gradient(120deg, #60a5fa, #22d3ee);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}


/* --- Hero Section (Navy Theme) --- */
.hero-section {
	background-color: var(--brand-navy);
	background-image: radial-gradient(circle at 50% 0%, #1e3a8a 0%, #0f172a 70%);
	color: white;
	padding-top: 120px;
	padding-bottom: 140px; /* Space for card overlap */
	text-align: center;
	position: relative;
	overflow: hidden;
}

.hero-glow {
	position: absolute;
	top: -50%; left: 50%; transform: translateX(-50%);
	width: 100%; height: 200%;
	background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
	pointer-events: none;
}

.hero-badge {
	display: inline-block;
	background: rgba(30, 58, 138, 0.5);
	border: 1px solid rgba(96, 165, 250, 0.3);
	color: #93c5fd;
	padding: 6px 16px;
	border-radius: 100px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 24px;
	backdrop-filter: blur(4px);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.hero-title {
	font-weight: 600;
	line-height: 1.25;
	margin-bottom: 24px;
	letter-spacing: -0.02em;
	position: relative;
	z-index: 10;
}

.hero-title .highlight {
	color: #60a5fa;
	display: inline-block;
	position: relative;
}

.hero-desc {
	color: #cbd5e1;
	max-width: 700px;
	margin: 0 auto;
	line-height: 1.6;
	position: relative;
	z-index: 10;
	word-break: keep-all;
	opacity: 0.9;
}

/* --- Category Filter Cards (Overlapping) --- */
.category-row-container {
	padding: 0;
	position: relative;
	z-index: 30;
	margin-bottom: 60px;
}

.category-row {
	display: grid;
	padding:0 24px;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
	max-width: var(--max-width);
	margin: 0 auto;
}

.cat-card {
	background: white;
	border-radius: 20px;
	padding: 28px;
	height: 150px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	border: 2px solid transparent;
	position: relative;
	overflow: hidden;
}

.cat-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.2);
}

.cat-card.active {
	background: var(--brand-blue);
	color: white;
	border-color: var(--brand-blue);
	box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.4);
}

.cat-card-title {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
}

.cat-card-sub {
	font-size: 13px;
	opacity: 0.7;
	margin-top: 6px;
	font-weight: 500;
}

.cat-card-icon {
	align-self: flex-end;
	font-size: 28px;
	opacity: 0.15;
	transition: opacity 0.3s;
}
.cat-card.active .cat-card-icon {
	opacity: 1;
	color: #93c5fd;
}

/* --- Content Grid Section --- */
.content-section {
	padding: 0 24px 120px;
	max-width: var(--max-width);
	margin: 0 auto;
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 40px;
	border-bottom: 1px solid #e2e8f0;
	padding-bottom: 20px;
}

.section-title {
	font-size: 24px;
	font-weight: 600;
	color: #0f172a;
}

.result-count {
	font-size: 14px;
	color: #64748b;
	font-weight: 600;
}

/* Grid Layout */
.media-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
	gap: 32px;
}

.media-card {
	background: white;
	border: 1px solid #e2e8f0;
	border-radius: 24px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: all 0.3s ease;
	box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
	cursor: pointer;
	height: 100%;
	opacity: 0;
	animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.media-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
	border-color: #cbd5e1;
}

.card-thumb {
	aspect-ratio: 16 / 9;
	background: #f1f5f9;
	overflow: hidden;
	position: relative;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.media-card:hover .card-thumb img { transform: scale(1.05); }

.yt-overlay {
	position: absolute; inset: 0; background: rgba(0,0,0,0.2);
	display: flex; align-items: center; justify-content: center;
	opacity: 0; transition: opacity 0.3s;
}
.media-card:hover .yt-overlay { opacity: 1; }
.recommend-card:hover .yt-overlay { opacity: 1; }
.play-icon {
	width: 60px; height: 60px; background: rgba(255,0,0,0.9);
	border-radius: 50%; display: flex; align-items: center; justify-content: center;
	color: white; font-size: 22px; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
	transition: transform 0.2s;
}
.media-card:hover .play-icon { transform: scale(1.1); }

.card-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }

.card-meta { 
	display: flex; 
	align-items: center; 
	gap: 8px; 
	margin-bottom: 12px; 
}

.card-tag { 
	font-size: 11px; 
	font-weight: 600; 
	color: var(--brand-blue); 
	background: #eff6ff; 
	padding: 4px 8px; 
	border-radius: 4px; 
	text-transform: uppercase; 
}

.card-title { 
	font-size: 20px; 
	font-weight: 600; 
	color: #1e293b; 
	margin-bottom: 10px; 
	line-height: 1.4; 
	word-break: keep-all; 
}

.card-excerpt { 
	font-size: 15px; 
	color: #64748b; 
	line-height: 1.6; 
	margin-bottom: 24px; 
	display: -webkit-box; 
	-webkit-line-clamp: 2; 
	-webkit-box-orient: vertical; 
	overflow: hidden; 
}

/* Updated Card Footer for better alignment */
.card-footer { 
	margin-top: auto; 
	padding-top: 16px; 
	border-top: 1px solid #f1f5f9; 
	display: flex; 
	justify-content: space-between; 
	align-items: center; /* Fix vertical alignment */
	font-size: 13px; 
	color: #94a3b8;
}

.footer-date {
	font-weight: 500;
}

.footer-read-time {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
}

/* Modals */
.modal-backdrop {
	position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 9999;
	display: flex; align-items: center; justify-content: center;
	opacity: 0; pointer-events: none; transition: opacity 0.3s ease; backdrop-filter: blur(8px);
}
.modal-backdrop.active { opacity: 1; pointer-events: auto; }

.yt-modal-content { width: 90%; max-width: 1200px; aspect-ratio: 16/9; background: black; border-radius: 16px; transform: scale(0.95); transition: transform 0.3s; }
.modal-backdrop.active .yt-modal-content { transform: scale(1); }

.article-modal-content { width: 100%; max-width: 900px; margin:0 auto; background: white; border-radius: 20px; transform: translateY(20px); transition: transform 0.3s; display: flex; flex-direction: column; overflow: hidden; }
.modal-backdrop.active .article-modal-content { transform: translateY(0); }
.article-header { padding: 40px; border-bottom: 1px solid #f1f5f9; flex-shrink: 0; position: relative; }
.article-body { padding: 40px; overflow-y: auto; line-height: 1.8; color: #334155; font-size: 16px; }
.close-btn { position: absolute; top: 20px; right: 20px; cursor: pointer; font-size: 24px; color: #64748b; }
/* Recommendation Section Styles */
.recommend-section {
	margin-top: 60px;
	padding-top: 40px;
	border-top: 1px solid #e2e8f0;
}
.recommend-title {
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 20px;
	color: #0f172a;
}
.recommend-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}
.recommend-card {
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.2s;
}
.recommend-card:hover {
	transform: translateY(-4px);
	border-color: #cbd5e1;
}
.recommend-thumb {
	position:relative;
	aspect-ratio: 16 / 9;
	background: #f1f5f9;
	overflow: hidden;
}
.recommend-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recommend-info {
	padding: 16px;
}
.recommend-info h4 {
	font-size: 16px;
	font-weight: 600;
	color: #1e293b;
	margin-bottom: 8px;
	line-height: 1.4;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.recommend-info span {
	font-size: 12px;
	color: #94a3b8;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 1024px) {
	.category-row {display:flex; overflow-y:auto;}
	.category-row .cat-card {flex-shrink:0; width:200px;}
	.category-row .cat-card:hover {transform:none;}
}
@media (max-width: 768px) {
	.category-row { grid-template-columns: repeat(2, 1fr); }
	.cat-card { height: 120px; padding: 20px; }
	.header-title { font-size: 32px; }
	.media-grid { grid-template-columns: 1fr; }
	.category-row-container { margin-top: -60px; }
	.recommend-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
	.category-row { grid-template-columns: 1fr; }
}