/*
Theme Name: Retrotube Child
Template: retrotube
Version: 1.0.0
*/

/* ==========================================================================
   HanimeStream — Latest Episodes premium grid
   Loaded only when the child theme is active. Markup is scoped to .hs-latest.
   ========================================================================== */

.hs-latest {
	margin: 2px 0 44px;
	padding: clamp(18px, 2.1vw, 28px);
	border: 1px solid rgba(255, 255, 255, .09);
	border-radius: 20px;
	background:
		radial-gradient(560px 190px at 8% -85px, rgba(72, 216, 255, .10), transparent 70%),
		linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.012)),
		rgba(13, 12, 20, .78);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 42px rgba(0,0,0,.22);
}

.hs-latest-head.page-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 22px;
	margin: 0 0 20px;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
}

.hs-latest-heading {
	min-width: 0;
}

.hs-latest-eyebrow {
	display: block;
	margin: 0 0 7px;
	color: #bba7e9;
	font-size: 9px;
	font-weight: 850;
	letter-spacing: .17em;
	line-height: 1;
	text-transform: uppercase;
}

.hs-latest .widget-title {
	margin: 0 !important;
	color: #fbf9ff !important;
	font-size: clamp(24px, 2.5vw, 32px) !important;
	font-weight: 900 !important;
	letter-spacing: -.045em !important;
	line-height: 1.02 !important;
	text-transform: none !important;
}

.hs-latest-copy {
	margin: 7px 0 0 !important;
	color: rgba(221,213,237,.68) !important;
	font-size: 11px;
	font-weight: 650;
	line-height: 1.45;
}

/* Homepage filter chips, with safe links to existing taxonomy pages/search. */
.hs-latest-tabs {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 7px;
	flex-wrap: wrap;
}

.hs-latest-tabs a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 0 11px;
	border: 1px solid rgba(255,255,255,.10);
	border-radius: 999px;
	background: rgba(255,255,255,.026);
	color: rgba(233,226,246,.82);
	font-size: 10px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none !important;
	transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.hs-latest-tabs a:hover {
	border-color: rgba(135,222,255,.48);
	background: rgba(72,216,255,.10);
	color: #fff;
	transform: translateY(-1px);
}

.hs-latest-tabs a.is-active {
	border-color: rgba(255, 103, 167, .52);
	background: linear-gradient(135deg, rgba(255,78,136,.25), rgba(155,92,255,.22));
	box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
	color: #fff;
}

/* Force the parent theme video loop into a stable, equal-card CSS grid. */
.hs-latest-grid.videos-list {
	display: grid !important;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 16px;
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
}

.hs-latest-grid .hs-video-card.loop-video {
	float: none !important;
	width: auto !important;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
}

.hs-latest-grid .hs-video-card > a {
	display: block;
	color: inherit;
	text-decoration: none !important;
}

.hs-latest-grid .hs-video-card .post-thumbnail {
	position: relative;
	display: block;
	overflow: hidden;
	width: 100%;
	height: auto !important;
	aspect-ratio: 16 / 9;
	margin: 0 !important;
	border: 1px solid rgba(255,255,255,.095);
	border-radius: 13px;
	background: linear-gradient(135deg, #342150, #15111f 58%, #281a42);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
	isolation: isolate;
	transition: border-color .20s ease, box-shadow .20s ease, transform .20s ease;
}

.hs-latest-grid .hs-video-card:hover .post-thumbnail {
	border-color: rgba(188, 144, 255, .62);
	box-shadow: 0 16px 28px rgba(0,0,0,.31), inset 0 1px 0 rgba(255,255,255,.07);
	transform: translateY(-2px);
}

.hs-latest-grid .hs-video-card .post-thumbnail-container,
.hs-latest-grid .hs-video-card .post-thumbnail > img,
.hs-latest-grid .hs-video-card .post-thumbnail-container > img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
}

.hs-latest-grid .hs-video-card .post-thumbnail-container.no-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(237,230,248,.65);
	font-size: 11px;
}

.hs-latest-grid .hs-video-card .video-preview,
.hs-latest-grid .hs-video-card video {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hs-latest-grid .hs-video-card .hs-video-thumb-shade {
	position: absolute;
	z-index: 2;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(7,6,14,.03) 25%, rgba(7,6,14,.10) 48%, rgba(7,6,14,.75) 100%);
}

.hs-latest-grid .hs-video-card .hs-video-play {
	position: absolute;
	z-index: 4;
	top: 50%;
	left: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(255,255,255,.20);
	border-radius: 50%;
	background: rgba(8,7,14,.62);
	box-shadow: 0 8px 20px rgba(0,0,0,.28);
	color: #fff;
	opacity: 0;
	transform: translate(-50%, -44%) scale(.88);
	transition: opacity .18s ease, transform .20s ease, background .18s ease;
}

.hs-latest-grid .hs-video-card .hs-video-play svg {
	width: 18px;
	height: 18px;
	margin-left: 2px;
}

.hs-latest-grid .hs-video-card:hover .hs-video-play,
.hs-latest-grid .hs-video-card:focus-within .hs-video-play {
	background: linear-gradient(135deg, #ff4e88, #9b5cff);
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.hs-latest-grid .hs-video-card .hd-video,
.hs-latest-grid .hs-video-card .hs-uncensored,
.hs-latest-grid .hs-video-card .duration,
.hs-latest-grid .hs-video-card .views {
	position: absolute;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	min-height: 21px;
	padding: 0 7px;
	border: 1px solid rgba(255,255,255,.14);
	border-radius: 999px;
	background: rgba(8,7,14,.64);
	box-shadow: 0 4px 12px rgba(0,0,0,.16);
	color: #f8f4ff;
	font-size: 8px;
	font-weight: 850;
	letter-spacing: .06em;
	line-height: 1;
	text-transform: uppercase;
}

.hs-latest-grid .hs-video-card .hd-video {
	top: 8px;
	right: 8px;
	border-color: rgba(92,224,255,.32);
	color: #c4f5ff;
}

.hs-latest-grid .hs-video-card .hs-uncensored {
	top: 8px;
	left: 8px;
	border-color: rgba(255,107,172,.34);
	color: #ffd3e4;
}

.hs-latest-grid .hs-video-card .duration {
	right: 8px;
	bottom: 8px;
}

.hs-latest-grid .hs-video-card .duration .fa,
.hs-latest-grid .hs-video-card .views .fa {
	margin-right: 4px;
	font-size: 9px;
}

.hs-latest-grid .hs-video-card .views {
	left: 8px;
	bottom: 8px;
	color: rgba(242,237,251,.88);
	letter-spacing: .02em;
	text-transform: none;
}

.hs-latest-grid .hs-video-card .rating-bar {
	display: none !important;
}

.hs-latest-grid .hs-video-card .entry-header {
	display: block;
	min-width: 0;
	margin: 0 !important;
	padding: 10px 2px 2px !important;
	background: transparent !important;
}

.hs-latest-grid .hs-video-card .hs-video-context {
	display: block;
	overflow: hidden;
	margin: 0 0 5px;
	color: rgba(187,170,220,.72);
	font-size: 9px;
	font-weight: 800;
	letter-spacing: .045em;
	line-height: 1.15;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hs-latest-grid .hs-video-card .hs-video-title {
	display: -webkit-box;
	overflow: hidden;
	min-height: 34px;
	color: #fbf9ff !important;
	font-size: 12px;
	font-weight: 850;
	letter-spacing: -.018em;
	line-height: 1.32;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.hs-load-more-wrap {
	display: flex;
	justify-content: center;
	margin: 26px 0 2px;
}

.hs-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 190px;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid rgba(204,177,255,.28);
	border-radius: 11px;
	background: linear-gradient(135deg, rgba(155,92,255,.22), rgba(255,78,136,.17));
	box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 25px rgba(0,0,0,.20);
	color: #f8f4ff !important;
	font-size: 11px;
	font-weight: 850;
	letter-spacing: .035em;
	line-height: 1;
	text-decoration: none !important;
	transition: transform .18s ease, border-color .18s ease, filter .18s ease, opacity .18s ease;
}

.hs-load-more:hover {
	border-color: rgba(217,187,255,.62);
	filter: brightness(1.10);
	transform: translateY(-2px);
}

.hs-load-more.is-loading {
	cursor: wait;
	opacity: .72;
	pointer-events: none;
}

@media (max-width: 1200px) {
	.hs-latest-grid.videos-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
	.hs-latest-head.page-header { align-items: flex-start; flex-direction: column; gap: 14px; }
	.hs-latest-tabs { justify-content: flex-start; }
	.hs-latest-grid.videos-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.hs-latest {
		margin: 0 -3px 28px;
		padding: 17px 0 18px;
		border-right: 0;
		border-left: 0;
		border-radius: 0;
	}
	.hs-latest-head.page-header { gap: 13px; margin: 0 12px 15px; }
	.hs-latest .widget-title { font-size: 23px !important; }
	.hs-latest-copy { font-size: 10px; }
	.hs-latest-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		width: calc(100vw - 24px);
		padding: 1px 0 5px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.hs-latest-tabs::-webkit-scrollbar { display: none; }
	.hs-latest-tabs a { flex: 0 0 auto; min-height: 30px; padding: 0 10px; font-size: 9px; }
	.hs-latest-grid.videos-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px 9px;
		padding: 0 10px !important;
	}
	.hs-latest-grid .hs-video-card .post-thumbnail { border-radius: 10px; }
	.hs-latest-grid .hs-video-card .entry-header { padding: 8px 1px 1px !important; }
	.hs-latest-grid .hs-video-card .hs-video-context { margin-bottom: 4px; font-size: 8px; }
	.hs-latest-grid .hs-video-card .hs-video-title { min-height: 31px; font-size: 11px; line-height: 1.3; }
	.hs-latest-grid .hs-video-card .hs-video-play { display: none; }
	.hs-latest-grid .hs-video-card .hd-video,
	.hs-latest-grid .hs-video-card .hs-uncensored,
	.hs-latest-grid .hs-video-card .duration,
	.hs-latest-grid .hs-video-card .views { min-height: 18px; padding: 0 5px; font-size: 7px; }
	.hs-latest-grid .hs-video-card .hd-video { top: 6px; right: 6px; }
	.hs-latest-grid .hs-video-card .hs-uncensored { top: 6px; left: 6px; }
	.hs-latest-grid .hs-video-card .duration { right: 6px; bottom: 6px; }
	.hs-latest-grid .hs-video-card .views { left: 6px; bottom: 6px; }
	.hs-load-more-wrap { margin-top: 22px; }
	.hs-load-more { min-width: 178px; min-height: 42px; font-size: 10px; }
}
