/*
Theme Name: Hóa Thầy Đạt
Theme URI: https://hoathaydat.com
Author: Hóa Thầy Đạt
Description: Theme cho site giới thiệu lớp học và ứng dụng Hóa Thầy Đạt.
Version: 0.2.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hoa-thay-dat
Tags: education, blog, one-column
*/

/*
 * File này chỉ giữ metadata để WordPress nhận diện theme.
 * CSS thật nằm ở assets/css/ và được nạp theo thứ tự trong functions.php:
 *
 *   1. tokens.css      — biến màu/chữ/khoảng cách. KHÔNG sửa khi làm trang lẻ.
 *   2. base.css        — reset, typography, container, grid. KHÔNG sửa khi làm trang lẻ.
 *   3. components.css  — nút, card, form, FAQ, header, footer. KHÔNG sửa khi làm trang lẻ.
 *   4. page-{slug}.css — CSS riêng của từng trang. Mỗi trang một file, một chủ sở hữu.
 *
 * Xem STYLEGUIDE.md để biết quy ước đặt tên và danh sách class dùng chung.
 *
 * NGOẠI LỆ: ba khối dưới đây là thành phần dùng chung THÊM SAU khi 5 trang đã
 * xong (hotline ở header, thông báo form liên hệ, lightbox video). Đặt ở đây
 * thay vì components.css để không đụng vào file nền mà STYLEGUIDE yêu cầu giữ nguyên.
 */

/* ═════════════════════════════════════════════════════════
 * HOTLINE Ở HEADER
 * ═════════════════════════════════════════════════════════ */
.htd-header-hotline {
	display: inline-flex;
	align-items: center;
	gap: var(--htd-space-2);
	flex: none;
	padding: var(--htd-space-2) var(--htd-space-3);
	border-radius: var(--htd-radius-pill);
	color: var(--htd-primary);
	transition: background-color var(--htd-duration-fast) var(--htd-ease);
}

.htd-header-hotline:hover {
	background: var(--htd-primary-tint);
}

.htd-header-hotline__icon {
	width: 1.25rem;
	height: 1.25rem;
	flex: none;
}

.htd-header-hotline__text {
	display: grid;
	line-height: var(--htd-leading-tight);
}

.htd-header-hotline__text small {
	font-size: var(--htd-text-xs);
	color: var(--htd-ink-500);
}

.htd-header-hotline__text strong {
	font-size: var(--htd-text-base);
	font-weight: var(--htd-weight-bold);
	letter-spacing: var(--htd-tracking-tight);
}

/* Dưới 1240px thu về nút icon vuông, chỉ còn biểu tượng bấm gọi */
@media (max-width: 1240px) {
	.htd-header-hotline__text { display: none; }

	.htd-header-hotline {
		width: 2.75rem;
		height: 2.75rem;
		justify-content: center;
		padding: 0;
		border-radius: var(--htd-radius-md);
		background: var(--htd-primary-tint);
	}
}

/*
 * 961–1240px: menu ngang 6 mục + nút CTA đã kín chỗ, thêm hotline là chữ menu
 * bị ngắt dòng. Dải này ẩn hẳn hotline — số vẫn còn ở chân trang và trang Liên hệ.
 */
@media (min-width: 961px) and (max-width: 1240px) {
	.htd-header-hotline { display: none; }
}

@media (max-width: 960px) {
	/* Menu đã gom vào nút hamburger nên hotline hiện lại, dạng icon bấm gọi.
	   DOM là brand → toggle → nav → hotline; đảo thứ tự để hamburger nằm ngoài cùng. */
	.htd-header-hotline { order: 2; margin-left: auto; }
	.htd-nav-toggle { order: 3; }
}

/* ═════════════════════════════════════════════════════════
 * CỘT LIÊN HỆ Ở CHÂN TRANG
 * ═════════════════════════════════════════════════════════ */

/*
 * .htd-cluster mặc định cho wrap, nên email dài bị đẩy xuống dòng dưới icon.
 * Ở cột này giữ icon và chữ luôn cùng hàng, cho chính chữ xuống dòng thay vì cả cụm.
 */
.htd-site-footer__links .htd-cluster {
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: var(--htd-space-2);
}

.htd-site-footer__links .htd-cluster > svg {
	flex: none;
	width: 1rem;
	height: 1rem;
	margin-top: 0.2em;
}

.htd-site-footer__links .htd-cluster > a,
.htd-site-footer__links .htd-cluster > span {
	min-width: 0;
	overflow-wrap: anywhere;
}

/* ═════════════════════════════════════════════════════════
 * THÔNG BÁO KẾT QUẢ GỬI FORM LIÊN HỆ
 * ═════════════════════════════════════════════════════════ */
.htd-form-notice {
	display: flex;
	align-items: flex-start;
	gap: var(--htd-space-3);
	margin-bottom: var(--htd-space-5);
	padding: var(--htd-space-4);
	border-radius: var(--htd-radius-lg);
	border-left: 4px solid currentColor;
	font-size: var(--htd-text-sm);
	font-weight: var(--htd-weight-medium);
	line-height: var(--htd-leading-normal);
}

.htd-form-notice svg {
	width: 1.25rem;
	height: 1.25rem;
	flex: none;
}

.htd-form-notice--ok {
	color: var(--htd-green);
	background: #eaf9ef;
}

.htd-form-notice--err {
	color: var(--htd-rose);
	background: #fdeced;
}

/* Bẫy bot — người thật không nhìn thấy, không tab tới được */
.htd-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ═════════════════════════════════════════════════════════
 * LIGHTBOX VIDEO
 * ═════════════════════════════════════════════════════════ */
.htd-lightbox {
	position: fixed;
	inset: 0;
	z-index: var(--htd-z-modal);
	display: none;
	align-items: center;
	justify-content: center;
	padding: var(--htd-space-4);
	background: rgba(12, 46, 107, 0.82);
	backdrop-filter: blur(4px);
}

.htd-lightbox.is-open { display: flex; }

.htd-lightbox__frame {
	position: relative;
	width: min(960px, 100%);
	aspect-ratio: 16 / 9;
	border-radius: var(--htd-radius-xl);
	overflow: hidden;
	background: #000;
	box-shadow: var(--htd-shadow-xl);
}

.htd-lightbox__frame iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.htd-lightbox__close {
	position: absolute;
	top: calc(-1 * var(--htd-space-10));
	right: 0;
	width: 2.5rem;
	height: 2.5rem;
	display: grid;
	place-items: center;
	border-radius: var(--htd-radius-pill);
	background: rgba(255, 255, 255, 0.16);
	color: var(--htd-ink-on-dark);
	font-size: var(--htd-text-xl);
	line-height: 1;
}

.htd-lightbox__close:hover { background: rgba(255, 255, 255, 0.3); }
