/* ============================================================
   A47 OVERRIDES - load CUỐI CÙNG, sửa các xung đột đã xác minh
   giữa CSS cũ (site-custom/style/responsive/legacy-inline) và theme mới.
   ============================================================ */

/* ═══ Hệ cột desktop-first (khớp site cũ): xl = mặc định, md ≤768, xs ≤640 ═══ */
.column-xl-1 { display: grid; grid-template-columns: repeat(1, 1fr); }
.column-xl-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.column-xl-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.column-xl-4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.column-xl-5 { display: grid; grid-template-columns: repeat(5, 1fr); }
.column-xl-6 { display: grid; grid-template-columns: repeat(6, 1fr); }
@media (max-width: 768px) {
	.column-md-1 { grid-template-columns: repeat(1, 1fr); }
	.column-md-2 { grid-template-columns: repeat(2, 1fr); }
	.column-md-3 { grid-template-columns: repeat(3, 1fr); }
	.column-md-4 { grid-template-columns: repeat(4, 1fr); }
	.column-md-5 { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 640px) {
	.column-xs-1 { grid-template-columns: repeat(1, 1fr); }
	.column-xs-2 { grid-template-columns: repeat(2, 1fr); }
	.column-xs-3 { grid-template-columns: repeat(3, 1fr); }
	.column-xs-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ═══ Menu header-bottom: chữ trắng (đè rule đen rgba(0,0,0,.69) của site cũ) ═══ */
.header:not(.transparent) .header-bottom-nav.nav > li > a,
.header-bottom .nav > li > a { color: #f0f0f0; }
.header:not(.transparent) .header-bottom-nav.nav > li > a:hover,
.header:not(.transparent) .header-bottom-nav.nav > li.current-menu-item > a,
.header:not(.transparent) .header-bottom-nav.nav > li.current-menu-ancestor > a,
.header-bottom .nav > li > a:hover,
.header-bottom .nav > li.current-menu-item > a { color: var(--primary-color); }

/* ═══ Header: bỏ height cứng 100px của site cũ (dải đen 550-849px), gỡ bom #logo ═══ */
.a47-header .header-main { height: auto; }
.a47-header #logo { width: auto; }

/* ═══ Section title: khôi phục hành vi Flatsome (gạch gradient full bề rộng) ═══ */
.section-title {
	position: relative;
	display: flex;
	flex-flow: row wrap;
	align-items: center;
	width: 100%;
	font-size: 26px;
	font-weight: 700;
	text-transform: uppercase;
	color: #e53630;
	padding-bottom: 8px;
	margin: 0 0 20px;
}
.a47-footer .section-title { font-size: 17px; }

/* ═══ Item-4 (sidebar ANIME HOT): chữ trắng trên nền đen ═══ */
.movie-item.item-4 .movie-info .movie-title a { color: #fff; }
.movie-item.item-4 .movie-info .movie-title a:hover { color: #e53630; }
.movie-item.item-4 .movie-info .movie-original-title { color: #aaa; }
.movie-item.item-4 .movie-info .movie-stats,
.movie-item.item-4 .movie-info .movie-stats .rating-wrapper,
.movie-item.item-4 .movie-info .movie-stats .view-count { color: #aaa; font-size: 13px; }
.movie-item.item-4 .movie-info .movie-stats .movie-episode-last a { color: #e53630; font-weight: 700; }

/* ═══ Pagination: pill tối (đè light-theme của style.css) ═══ */
.nav-links { background: transparent; box-shadow: none; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 14px; margin: 0;
	color: #e9edf1; background: #141516; border: 1px solid #2a2d34; border-radius: 10px;
	font-weight: 700; text-decoration: none; line-height: 1;
}
.pagination .page-numbers:hover,
.pagination .page-numbers:focus { background: #e53630; color: #fff; border-color: #e53630; }
.pagination .page-numbers.current { background: #e53630; color: #fff; border-color: #e53630; }
.pagination .page-numbers.dots { background: #1a1b1e; border-color: #2a2d34; color: #9aa1a9; }
@media (max-width: 640px) {
	.pagination .page-numbers {
		min-width: 35px; height: 35px; padding: 0 10px; font-size: 14px;
		display: inline-flex; align-items: center; justify-content: center;
	}
}

/* ═══ Danh sách tập: nền xám, tập active đỏ (như site cũ) ═══ */
.episode-item { background: #3b3b3b; }
.episode-item.active { background: #e53630; }

/* ═══ Nội dung mô tả căn đều ═══ */
.justify-text { text-align: justify; }

/* ═══ Breadcrumb (Rank Math) trên nền tối ═══ */
.rank-math-breadcrumb { font-size: 14px; }
.rank-math-breadcrumb p { color: #cfd3da; margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; }
.rank-math-breadcrumb a { color: #e53630; }
.rank-math-breadcrumb a:hover { color: #ff6a3d; }
.rank-math-breadcrumb .separator { color: #888; margin: 0 6px; }
.rank-math-breadcrumb .last { color: #fff; }

/* ═══ Sao rating (box-detail): trạng thái is-on / is-half ═══ */
.rating .star { color: #555; font-size: 18px; cursor: pointer; transition: color .15s; }
.rating .star.is-on { color: #FFC107; }
.rating .star.is-half {
	background: linear-gradient(90deg, #FFC107 50%, #555 50%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Ẩn ký tự «» trong prev/next (mũi tên ← → đã có từ pseudo của site-custom) */
.pagination .page-numbers.prev span, .pagination .page-numbers.next span { display: none; }
