/* =====  Engine pages + hub additions  ===== */

/* Header sits over the page hero, same as the home banner */
.engine-page #header { position: fixed; top: 0; left: 0; right: 0; z-index: 99; transition: all .25s ease; }

/* Page hero: shorter than the home banner */
.page-hero {
	position: relative;
	padding: 170px 0 90px;
	background: #0b0b0b;
	border-bottom: 1px solid #222;
}
.page-hero::before {
	content: ""; position: absolute; inset: 0; opacity: .55; pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero-unreal::before { background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); }
.page-hero-unity::before  { background: linear-gradient(135deg, #232526, #414345); }
.page-hero-godot::before  { background: linear-gradient(135deg, #1d4350, #478ba2); }
.page-hero-engine::before { background: linear-gradient(135deg, #3a1c71, #1e1b4b); }
.page-hero .hero-title { margin-top: 22px; }

/* Showcase rows: video left, problem / solution / result right */
.showcase {
	display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; align-items: start;
	background: #111; border: 1px solid #222; border-radius: 8px;
	padding: 28px; margin: 40px 0 0;
}
.showcase:hover { border-color: #ffc107; }
.sc-media-col { display: flex; flex-direction: column; gap: 16px; }
.sc-media {
	position: relative; width: 100%; padding-top: 56.25%;
	background: #000; border-radius: 6px; overflow: hidden;
}
.sc-media iframe, .sc-media img, .sc-media video {
	position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover;
}
.sc-media-img img { object-fit: contain; background: #000; }
.sc-placeholder {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	border: 2px dashed #444; background: #0b0b0b; text-shadow: none;
}
.sc-placeholder i, .sc-placeholder span, .sc-placeholder small { position: absolute; left: 0; right: 0; text-align: center; }
.sc-placeholder i { top: 32%; font-size: 40px; color: #ffc107; }
.sc-placeholder span { top: 50%; color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.sc-placeholder small { top: 62%; color: #888; font-size: 12px; letter-spacing: 0; padding: 0 20px; line-height: 1.5; }

.sc-tags { margin: 0 0 10px; text-align: left; }
.sc-title { color: #fff; font-size: 26px; margin: 4px 0 6px; }
.sc-sub { color: #aaa; font-size: 14px; line-height: 1.6; margin: 0 0 18px; }
.psr { list-style: none; padding: 0; margin: 0; }
.psr li {
	color: #ccc; font-size: 15px; line-height: 1.7; text-shadow: none;
	padding: 0 0 14px 16px; border-left: 3px solid #333; margin-bottom: 12px;
}
.psr li strong {
	display: block; color: #ffc107; font-size: 12px; letter-spacing: 2px;
	text-transform: uppercase; margin-bottom: 4px;
}
.sc-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.sc-btn { padding: 10px 20px; font-size: 12px; }

.next-up { margin: 36px 0 0; color: #ccc; font-size: 15px; text-align: center; text-shadow: none; }
.next-up i, .next-up strong { color: #ffc107; }

.engine-skills { margin: 40px 0 0; text-align: center; }
.engine-skills h4 { color: #ffc107; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; }

.available-for {
	display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap;
	margin: 40px auto 0; max-width: 900px; padding: 22px 28px;
	background: #111; border: 1px solid #ffc107; border-radius: 8px;
	font-size: 16px; line-height: 1.6; color: #ddd; text-shadow: none; text-align: center;
}
.available-for strong { color: #ffc107; }

.other-engines { margin: 36px 0 0; text-align: center; font-size: 14px; color: #888; text-shadow: none; }
.other-link { margin: 0 10px; color: #fff !important; white-space: nowrap; }
.other-link:hover { color: #ffc107 !important; }

/* Hub: explore-by-engine cards */
#engines { background: #121212; }
.engine-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 30px; }
.engine-card {
	display: block; text-align: left; background: #0b0b0b; border: 1px solid #222; border-radius: 8px;
	padding: 26px 22px; text-decoration: none !important; transition: transform .25s ease, border-color .25s ease;
}
.engine-card:hover { transform: translateY(-4px); border-color: #ffc107; }
.engine-card i { color: #ffc107; font-size: 30px; margin-bottom: 14px; display: block; }
.engine-card h4 { color: #fff; margin: 0 0 10px; }
.engine-card p { color: #aaa; font-size: 14px; line-height: 1.6; margin: 0 0 14px; text-shadow: none; }
.engine-card span { color: #ffc107; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

@media (max-width: 991px) {
	.showcase { grid-template-columns: 1fr; gap: 24px; }
	.engine-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.page-hero { padding: 130px 0 60px; }
	.showcase { padding: 18px; }
	.engine-grid { grid-template-columns: 1fr; }
	.available-for { flex-direction: column; }
}

/* Alignment fixes */
.engine-page #work .main_title { display: block; text-align: center; }
.sc-tags { justify-content: flex-start; margin-top: 0; }
.sc-note { color: #888; font-size: 13px; line-height: 1.6; margin: 12px 0 0; text-shadow: none; }

/* Hub project cards: looping clip previews */
.three-col-work .grid-item .card-video { width: 100%; height: 210px; object-fit: cover; display: block; background: #0d0d0d; transition: all .4s ease-in-out; }
.grid-item a:hover .card-video { opacity: .2; transform: scale(1.1); }
.three-col-work .grid-item > a { overflow: hidden; display: block; }
.modal-video video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; }
.modal-btn-page { background: #b8860b; }

/* "More work" strip under the main showcases */
.extra-work { margin: 50px auto 10px; max-width: 1100px; text-align: left; }
.extra-title { color: #fff; font-size: 22px; letter-spacing: 1px; margin-bottom: 4px; text-align: center; }
.extra-hint { color: #999; font-size: 13px; text-align: center; margin-bottom: 22px; }
.extra-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); gap: 24px; justify-content: center; }
.extra-card { background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08); border-radius: 6px; padding: 12px 12px 16px; }
.extra-card h4 { color: #fff; font-size: 17px; margin: 10px 0 2px; }
.extra-card p { color: #bbb; font-size: 14px; line-height: 1.6; margin: 0; }
.extra-card p.extra-sub { color: #ffc107; font-size: 12px; letter-spacing: .5px; margin-bottom: 6px; }
.extra-thumb, .extra-video { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; cursor: pointer; }
.extra-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.extra-thumb:hover img { opacity: .6; }
.extra-thumb i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 54px; color: #fff; opacity: .85; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.extra-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Skills + "Available for" sit above the projects */
.engine-page .available-for.top-block { margin: 10px auto 18px; }
.engine-page .engine-skills.top-block { margin: 0 auto 46px; }
