/*
Theme Name: Astra Child - PhimFullHD
Template: astra
Version: 3.0
*/

/* ===== Nền tối toàn site (giống phimchieurap.net) ===== */
body {
	background: #14161f !important;
	color: #e4e6eb;
}

#page, .site, .ast-separate-container {
	background: #14161f !important;
}

/* Header tối */
.ast-primary-header-bar,
.main-header-bar,
.ast-above-header,
.ast-below-header {
	background-color: #1b1e2b !important;
	border-color: #2a2d3d !important;
}

.main-header-bar .main-navigation ul li a,
.ast-site-title a,
.site-title a {
	color: #e4e6eb !important;
}

.main-header-bar .main-navigation ul li a:hover {
	color: #e53e3e !important;
}

/* Footer tối */
footer.site-footer,
.ast-small-footer,
.site-below-footer-wrap,
.ast-builder-grid-row-container-inner,
#colophon,
#colophon * {
	background: #0e0f16 !important;
	border-color: #2a2d3d !important;
}

.ast-footer-copyright,
.ast-footer-copyright p {
	color: #8a8d9a !important;
}

#colophon a {
	color: #e53e3e !important;
}

/* ===== Trang chủ ===== */
.pfhd-home {
	max-width: 1400px;
	margin: 0 auto;
	padding: 24px 20px 40px;
}

.pfhd-home-h1 {
	font-size: 1.15rem;
	font-weight: 700;
	color: #c7c9d1;
	margin: 0 0 20px;
	line-height: 1.4;
}

@media (max-width: 560px) {
	.pfhd-home-h1 {
		font-size: 1rem;
	}
}

.pfhd-section {
	margin-bottom: 36px;
}

.pfhd-section-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	border-bottom: 2px solid #e53e3e;
	margin-bottom: 14px;
	padding-bottom: 8px;
}

.pfhd-section-header h2 {
	margin: 0;
	font-size: 1.3rem;
	font-weight: 700;
	color: #f1f2f5;
}

.pfhd-section-header a {
	font-size: 0.85rem;
	white-space: nowrap;
	text-decoration: none;
	color: #e53e3e;
	font-weight: 600;
}

/* ===== Grid ===== */
.pfhd-movie-grid {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 14px;
}

@media (max-width: 1200px) {
	.pfhd-movie-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 900px) {
	.pfhd-movie-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 560px) {
	.pfhd-movie-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* Astra mặc định thêm margin-top/bottom 60px cho #primary ở desktop (≥1200px)
   khi layout no-sidebar (trang chủ) — tạo khoảng trống thừa trên/dưới khung nội dung. */
@media (min-width: 1200px) {
	.ast-plain-container.ast-no-sidebar #primary {
		margin-top: 0 !important;
		margin-bottom: 0 !important;
	}
}

/* ===== Trang chi tiết bài (single post) — nền tối ===== */
#primary,
#main.site-main,
article.ast-article-single,
.ast-separate-container .ast-article-single {
	background: #14161f !important;
	color: #c7c9d1 !important;
}

article.ast-article-single .entry-header .entry-title,
article.ast-article-single h1,
article.ast-article-single h2,
article.ast-article-single h3,
article.ast-article-single h4 {
	color: #f1f2f5 !important;
}

article.ast-article-single .entry-content p,
article.ast-article-single .entry-content li,
article.ast-article-single .entry-content span,
article.ast-article-single .entry-meta,
article.ast-article-single .entry-meta * {
	color: #c7c9d1 !important;
}

article.ast-article-single .entry-content table {
	border-color: #2a2d3d !important;
}

article.ast-article-single .entry-content table th,
article.ast-article-single .entry-content table td {
	background: #1b1e2b !important;
	border-color: #2a2d3d !important;
	color: #c7c9d1 !important;
}

article.ast-article-single .entry-content a:not(.pfhd-movie-card) {
	color: #ff6b6b;
}

.ast-single-post-navigation,
.ast-single-post-navigation *,
nav.navigation.post-navigation {
	background: #14161f !important;
	color: #c7c9d1 !important;
	border-color: #2a2d3d !important;
}

/* ===== Trang danh mục / archive / tìm kiếm — nền tối + fix ảnh bị dẹp ===== */

/* Astra mặc định ép ảnh đại diện theo tỉ lệ 16:9 (ngang) — poster phim là 2:3 (dọc) nên bị dẹp/crop sai. */
.ast-article-post .post-thumb-img-content img {
	aspect-ratio: 2 / 3 !important;
	object-fit: cover !important;
}

.ast-archive-description,
.page-title.ast-archive-title,
.archive-description {
	background: #14161f !important;
	color: #f1f2f5 !important;
}

.ast-article-post .ast-article-inner,
.ast-separate-container .ast-article-post .ast-article-inner {
	background: #1b1e2b !important;
}

.ast-article-post .entry-title,
.ast-article-post .entry-title a {
	color: #f1f2f5 !important;
}

.ast-article-post .entry-content,
.ast-article-post .entry-content p {
	color: #a9acb8 !important;
}

.ast-article-post .ast-blog-meta-container,
.ast-article-post .ast-blog-meta-container * {
	color: #8a8d9a !important;
}

.ast-article-post .cat-links a,
.ast-article-post .tags-links a {
	color: #ff6b6b !important;
}

.pagination,
.navigation.pagination,
.page-numbers {
	color: #c7c9d1 !important;
}

.page-numbers li a.page-numbers,
a.page-numbers,
span.page-numbers {
	background: #1b1e2b !important;
	color: #c7c9d1 !important;
	border-color: #2a2d3d !important;
}

span.page-numbers.current {
	background: #e53e3e !important;
	color: #fff !important;
}

/* ===== Phim liên quan — 6 phim, khớp bề rộng 1400px của trang ===== */
.pfhd-related {
	max-width: 1400px;
	margin: 32px auto 0;
	padding: 0 20px 10px;
}

.pfhd-related .pfhd-movie-grid {
	grid-template-columns: repeat(6, 1fr);
	max-width: 1400px;
	gap: 20px;
}

.pfhd-related .pfhd-title {
	font-size: 15px;
}

@media (max-width: 560px) {
	.pfhd-related .pfhd-movie-grid {
		grid-template-columns: repeat(2, 1fr);
		max-width: 100%;
		gap: 14px;
	}
}

/* ===== Card: poster full-bleed, tiêu đề đè lên ảnh =====
   .pfhd-movie-card (<a>) tự làm luôn vai trò khung poster (2:3), không cần div bọc riêng. */
.pfhd-movie-card {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 2 / 3;
	text-decoration: none;
	color: inherit;
	border-radius: 6px;
	overflow: hidden;
	background: #1e2130;
	transition: transform .18s;
}

.pfhd-movie-card:hover {
	transform: translateY(-4px);
	text-decoration: none;
	color: inherit;
}

.pfhd-movie-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pfhd-movie-card .pfhd-no-thumb {
	position: absolute;
	inset: 0;
	display: block;
	background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.pfhd-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: block;
	padding: 24px 8px 8px;
	background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.35) 65%, transparent 100%);
}

.pfhd-title {
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.35;
	color: #fff;
	text-shadow: 0 1px 3px rgba(0,0,0,.6);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pfhd-rank {
	position: absolute;
	top: 6px;
	left: 6px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(0,0,0,.65);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	z-index: 2;
}

.pfhd-rank.pfhd-rank-top {
	background: #e53e3e;
}

/* ===== Mở rộng bề ngang trang chi tiết phim — Astra mặc định dùng Narrow Container (750px) cho single post, khớp với khổ rộng 1400px dùng chung toàn site ===== */
.ast-narrow-container {
	--wp--custom--ast-content-width-size: 1400px;
	--wp--custom--ast-wide-width-size: 1400px;
}

@media (min-width: 922px) {
	.ast-narrow-container .site-content > .ast-container {
		max-width: 1400px;
	}
}

/* ===== Nút chọn tập phim — thu nhỏ padding so với mặc định Astra (15px/30px) ===== */
.video-btn {
	padding: 5px 10px !important;
}

/* ===== FAQ trang chủ — accordion thu gọn, gần footer ===== */
.pfhd-faq {
	margin-top: 8px;
}

.pfhd-faq-item {
	background: #1b1e2b;
	border: 1px solid #2a2d3d;
	border-radius: 6px;
	margin-bottom: 10px;
	overflow: hidden;
}

.pfhd-faq-item summary {
	list-style: none;
	cursor: pointer;
	padding: 14px 18px;
	font-weight: 600;
	color: #f1f2f5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.pfhd-faq-item summary::-webkit-details-marker {
	display: none;
}

.pfhd-faq-item summary h3 {
	margin: 0;
	font-size: 1em;
	font-weight: 600;
	color: inherit;
}

.pfhd-faq-item summary::after {
	content: '+';
	color: #e53e3e;
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1;
	flex-shrink: 0;
}

.pfhd-faq-item[open] summary::after {
	content: '\2212';
}

.pfhd-faq-item .pfhd-faq-answer {
	padding: 0 18px 16px;
	color: #c7c9d1;
	line-height: 1.6;
}

.pfhd-faq-item .pfhd-faq-answer p {
	margin: 0;
}

/* ===== Bảng "Các nền tảng xem phim phổ biến" — dưới FAQ, ẩn trong toggle ===== */
.pfhd-platforms {
	margin-top: 32px;
}

.pfhd-platforms-toggle summary {
	list-style: none;
	cursor: pointer;
	padding: 12px 18px;
	font-weight: 600;
	color: #f1f2f5;
	background: #1b1e2b;
	border: 1px solid #2a2d3d;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.pfhd-platforms-toggle summary::-webkit-details-marker {
	display: none;
}

.pfhd-platforms-toggle summary::after {
	content: '+';
	color: #e53e3e;
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1;
	flex-shrink: 0;
}

.pfhd-platforms-toggle[open] summary {
	border-radius: 6px 6px 0 0;
	margin-bottom: 0;
}

.pfhd-platforms-toggle[open] summary::after {
	content: '\2212';
}

.pfhd-platforms-toggle .pfhd-platforms-scroll {
	margin-top: 10px;
}

.pfhd-platforms-scroll {
	overflow-x: auto;
	border: 1px solid #2a2d3d;
	border-radius: 6px;
}

.pfhd-platforms-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 640px;
}

.pfhd-platforms-table th,
.pfhd-platforms-table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid #2a2d3d;
	color: #c7c9d1;
}

.pfhd-platforms-table th {
	background: #1b1e2b;
	color: #f1f2f5;
	font-weight: 700;
	white-space: nowrap;
}

.pfhd-platforms-table tbody tr:nth-child(even) {
	background: #191c28;
}

.pfhd-platforms-table tbody tr:last-child td {
	border-bottom: none;
}

.pfhd-platforms-table td strong {
	color: #f1f2f5;
}

/* ===== Miễn trừ trách nhiệm — footer toàn site ===== */
.pfhd-disclaimer {
	max-width: 1400px;
	margin: 0 auto;
	padding: 18px 20px 24px;
	font-size: 12.5px;
	line-height: 1.6;
	color: #6b6e7a;
	background: #0e0f16;
}

.pfhd-disclaimer strong {
	color: #8a8d9a;
}

.pfhd-disclaimer a {
	color: #8a8d9a;
	text-decoration: underline;
}

.pfhd-platforms-table tbody tr:first-child td strong {
	color: #e53e3e;
}
