/* EArk Subpages Hub (Directory) Template
   Modern grid for child pages matching EArk2027 design system.
*/

.eark-hub-page,
.eark-hub-page *,
.eark-hub-page *::before,
.eark-hub-page *::after {
	box-sizing: border-box;
}

.eark-hub-hero {
	position: relative;
	width: 100%;
	padding: 56px 0 64px;
	margin-bottom: 40px;
	background: linear-gradient(135deg, #0a1628 0%, #0f274a 100%);
	color: #ffffff;
	overflow: hidden;
}

.eark-hub-hero-bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

.eark-hub-hero-grid {
	position: absolute;
	inset: -20px;
	background-image:
		linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
	background-size: 32px 32px;
	mask-image: radial-gradient(ellipse 70% 80% at 30% 30%, #000 15%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 30%, #000 15%, transparent 75%);
}

.eark-hub-hero-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: calc(var(--eark-max-width, 1200px) + 48px);
	margin: 0 auto;
	padding: 0 24px;
}

.eark-hub-bc {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.72);
	margin-bottom: 20px;
}

.eark-hub-bc a {
	color: #ffffff;
	text-decoration: none;
}

.eark-hub-bc a:hover {
	text-decoration: underline;
}

.eark-hub-bc .eark-bc-sep {
	color: rgba(255, 255, 255, 0.38);
}

.eark-hub-title {
	margin: 0 0 12px;
	font-size: clamp(32px, 4vw, 46px);
	font-weight: 750;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: #ffffff;
}

.eark-hub-sub {
	margin: 0;
	max-width: 720px;
	font-size: 16.5px;
	line-height: 1.68;
	color: rgba(255, 255, 255, 0.86);
}

.eark-hub-intro {
	margin-bottom: 48px;
}

.eark-hub-grid-wrap {
	margin-bottom: 64px;
}

.eark-hub-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

/* Card Design */
.eark-hub-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #e7ebf3;
	border-top: 3px solid var(--eark-primary, #1677ff);
	border-radius: 0;
	text-decoration: none !important;
	color: #1d2129;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03), 0 8px 24px rgba(16, 24, 40, 0.03);
	transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.eark-hub-card:hover {
	border-color: #91caff;
	box-shadow: 0 12px 32px rgba(22, 119, 255, 0.08);
	transform: translateY(-3px);
}

.eark-hub-media {
	position: relative;
	height: 156px;
	background: #f4f7fb;
	overflow: hidden;
	flex-shrink: 0;
	border-bottom: 1px solid #f0f3f8;
}

.eark-hub-media.is-placeholder {
	background: linear-gradient(135deg, #f4f8ff 0%, #e8f2ff 100%);
}

.eark-hub-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.eark-hub-card:hover .eark-hub-media img {
	transform: scale(1.04);
}

.eark-hub-ph-pattern {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.eark-hub-ph-pattern svg {
	width: 100%;
	height: 100%;
}

.eark-hub-content {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 24px 28px;
}

.eark-hub-card-title {
	margin: 0 0 10px;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: #1d2129;
	transition: color 0.2s ease;
}

.eark-hub-card:hover .eark-hub-card-title {
	color: var(--eark-primary, #1677ff);
}

.eark-hub-card-desc {
	margin: 0 0 20px;
	font-size: 14.5px;
	line-height: 1.65;
	color: #4e5969;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.eark-hub-card-action {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	font-size: 13.5px;
	font-weight: 650;
	color: var(--eark-primary, #1677ff);
	transition: transform 0.2s ease;
}

.eark-hub-card:hover .eark-hub-card-action {
	transform: translateX(4px);
}

@media (max-width: 960px) {
	.eark-hub-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.eark-hub-hero {
		padding: 40px 0 48px;
	}
	.eark-hub-hero-inner {
		padding: 0 16px;
	}
	.eark-hub-grid {
		grid-template-columns: 1fr;
	}
	.eark-hub-content {
		padding: 20px 24px;
	}
}
