/*
Theme Name:        ProjifyLab Theme
Theme URI:         https://projifylab.com
Author:            ProjifyLab
Author URI:        https://projifylab.com
Description:       Theme sáng của ProjifyLab. Trang chủ là ảnh nền phủ kín màn hình, tự đổi ảnh ngang/dọc theo thiết bị; ảnh được quản lý tại Projifylab System › Website (plugin ProjifyLab System).
Version:           1.0.0
Requires at least: 5.8
Tested up to:      6.7
Requires PHP:      7.4
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       projifylab-theme
*/

:root {
	--pl-bg: #F3F5FC;
	--pl-card: #FFFFFF;
	--pl-ink: #0F1633;
	--pl-ink-2: #3C4566;
	--pl-muted: #5A6382;
	--pl-line: #E4E8F4;
	--pl-blue: #2B55F5;
	--pl-blue-dark: #1C3FD0;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
	background: var(--pl-bg);
	color: var(--pl-ink);
	font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--pl-blue); }
a:hover { color: var(--pl-blue-dark); }
img { max-width: 100%; height: auto; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* ---------- Trang chủ: ảnh nền phủ kín màn hình ---------- */
body.pl-front { overflow: hidden; background: #FFFFFF; }

.pl-hero {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	margin: 0;
	overflow: hidden;
}

.pl-hero picture,
.pl-hero img {
	display: block;
	width: 100%;
	height: 100%;
}

.pl-hero img {
	object-fit: cover;
	object-position: center center;
	max-width: none;
}

/* Khi đang đăng nhập, chừa chỗ cho thanh quản trị */
body.admin-bar .pl-hero { top: 32px; height: calc(100vh - 32px); height: calc(100dvh - 32px); }
@media screen and (max-width: 782px) {
	body.admin-bar .pl-hero { top: 46px; height: calc(100vh - 46px); height: calc(100dvh - 46px); }
}

/* ---------- Trang thường ---------- */
.pl-site { min-height: 100vh; display: flex; flex-direction: column; }

.pl-header {
	background: var(--pl-card);
	border-bottom: 1px solid var(--pl-line);
}

.pl-header__inner,
.pl-main,
.pl-footer__inner {
	width: 100%;
	max-width: 960px;
	margin: 0 auto;
	padding-left: 20px;
	padding-right: 20px;
}

.pl-header__inner { display: flex; align-items: center; gap: 12px; min-height: 72px; }
.pl-header__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--pl-ink); font-weight: 700; font-size: 18px; min-width: 0; }
.pl-header__logo img { width: 52px; height: 52px; mix-blend-mode: multiply; flex-shrink: 0; }
.pl-header__logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pl-main { flex: 1 0 auto; padding-top: 32px; padding-bottom: 48px; }

.pl-entry {
	background: var(--pl-card);
	border: 1px solid var(--pl-line);
	border-radius: 20px;
	padding: 28px;
	margin-bottom: 20px;
	overflow-wrap: anywhere;
}
.pl-entry__title { margin: 0 0 12px; font-size: 28px; line-height: 1.3; }
.pl-entry__title a { color: var(--pl-ink); text-decoration: none; }
.pl-entry__meta { color: var(--pl-muted); font-size: 14px; margin-bottom: 16px; }
.pl-entry__content > *:first-child { margin-top: 0; }
.pl-entry__content > *:last-child { margin-bottom: 0; }

.pl-pagination { display: flex; gap: 10px; flex-wrap: wrap; }
.pl-pagination a, .pl-pagination span {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
	border-radius: 12px; background: var(--pl-card); border: 1px solid var(--pl-line); text-decoration: none; font-weight: 600;
}

.pl-footer { border-top: 1px solid var(--pl-line); background: var(--pl-card); }
.pl-footer__inner { padding-top: 20px; padding-bottom: 20px; color: var(--pl-muted); font-size: 14px; }

@media (max-width: 600px) {
	.pl-entry { padding: 20px; border-radius: 16px; }
	.pl-entry__title { font-size: 22px; }
}
