/* ==========================================================================
   giang-sinh.css — Trang trí GIÁNG SINH + NĂM MỚI (dương lịch) toàn site (05/12/2026)
   Chỉ nạp 01/12 → 01/01 (inc/winter-giang-sinh.php). Phần tử do giang-sinh.js chèn vào,
   tiền tố .wx- để không đụng gì khác. <html> mang lớp .wx-mua-gs / .wx-mua-nm.
   Tết (âm lịch) là file riêng: assets/tet/tet.css.

   QUY CHUẨN: rem = px ÷ 13.6 như mọi file của child theme.
   Màu Giáng sinh: đỏ thương hiệu #ED1C24, vàng ánh kim, xanh thông, trắng tuyết.
   Màu Năm mới   : vàng kim #F6C453, bạc, tím thương hiệu, đỏ — trên nền đêm.
   ========================================================================== */

:root {
	--wx-do:     #ED1C24;
	--wx-vang:   #F6C453;
	--wx-xanh:   #2E9E5B;
	--wx-bang:   #7CC4F2;
	--wx-tuyet:  #FFFFFF;
}

/* ---------- 1. Mũ Noel trên logo ---------- */
#logo > a {
	position: relative;
	display: inline-block;
}

.wx-mu {                /* đội trên chữ "IP" (cuối logo), neo theo mép phải */
	position: absolute;
	right: -0.441177rem;   /* -6px  */
	top: -1.323530rem;     /* -18px: vành mũ nằm ngay trên đầu chữ, không che */
	width: 2.205883rem;    /* 30px  */
	height: auto;
	transform: rotate(16deg);
	transform-origin: 30% 85%;
	pointer-events: none;
	z-index: 2;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18));
}


/* ---------- 2. Dây đèn dưới header ---------- */
#masthead.header-main,
#masthead .header-main {
	position: relative;
}

.wx-den {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1.323530rem;  /* thòng xuống dưới mép header 18px */
	height: 1.764706rem;   /* 24px */
	pointer-events: none;
	z-index: 31;
}

.wx-den svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.wx-den i {
	position: absolute;
	top: calc(58.33% + 2px);   /* treo đúng điểm thấp nhất của dây (14/24) */
	width: 0.588236rem;    /* 8px  */
	height: 0.882353rem;   /* 12px */
	margin-left: -0.294118rem;
	border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
	background: var(--c);
	box-shadow: 0 0 0.588236rem 0.147059rem var(--c);
	animation: wx-nhay 1.8s ease-in-out infinite;
}

.wx-den i::before {          /* đui đèn */
	content: "";
	position: absolute;
	left: 50%;
	top: -0.220589rem;
	width: 0.367648rem;
	height: 0.294118rem;
	margin-left: -0.183824rem;
	border-radius: 1px;
	background: #3a3a3a;
}

@keyframes wx-nhay {
	0%, 100% { opacity: 1; }
	50%      { opacity: .35; box-shadow: 0 0 0.147059rem 0 var(--c); }
}

/* ---------- 3. Ảnh lớn đầu trang: dải tuyết + lời chúc; tuyết khắp trang ---------- */
.wx-hero > .section-content {
	position: relative;
	z-index: 2;
}

/* Tuyết rơi khắp trang: canvas cố định phủ màn hình, không chặn bấm.
   z-index nằm trên nội dung + header dính, dưới hộp thoại/lightbox của Flatsome (1040+). */
.wx-tuyet {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	pointer-events: none;
	z-index: 1000;
}

.wx-dat {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	width: 100%;
	height: 3.235295rem;   /* 44px */
	pointer-events: none;
	z-index: 1;
}

.wx-chuc {
	position: absolute;
	top: 2.941177rem;      /* 40px — chừa chỗ cho dây đèn */
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 0.735295rem;      /* 10px */
	width: max-content;    /* left:50% chỉ chừa nửa bề ngang → ép bề rộng theo chữ, */
	max-width: calc(100% - 2.941177rem);   /* tối đa gần hết ảnh, nên điện thoại không bị bẻ 3 dòng */
	padding: 0.588236rem 1.470589rem;   /* 8px 20px */
	border: 1px solid rgba(255, 255, 255, .38);
	border-radius: 999px;
	background: rgba(20, 8, 40, .28);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: var(--wx-tuyet);
	font-size: 1.029412rem;              /* 14px */
	font-weight: 600;
	letter-spacing: .06em;
	line-height: 1.35;
	text-align: center;
	white-space: nowrap;
	pointer-events: none;
	animation: wx-hien .9s ease-out both .3s;
}

.wx-chuc svg {
	flex: none;
	width: 1.029412rem;    /* 14px */
	height: 1.029412rem;
	fill: var(--wx-vang);
}

.wx-chuc b {
	color: var(--wx-vang);
	font-weight: 700;
}

@keyframes wx-hien {
	from { opacity: 0; transform: translate(-50%, -0.588236rem); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Pháo hoa (Năm mới, trang chủ): nằm dưới chữ của ảnh lớn */
.wx-phaohoa {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 1;
}

/* ---------- NĂM MỚI (31/12 → 01/01) ---------- */
/* Ánh sao vàng lấp lánh trên "IP" */
.wx-sao.wx-mu {
	right: -0.882353rem;   /* -12px */
	top: -1.470589rem;     /* -20px */
	width: 2.352942rem;    /* 32px  */
	transform: none;
	filter: drop-shadow(0 0 0.220589rem rgba(246, 196, 83, .8));
}

.wx-sao path {
	transform-box: fill-box;
	transform-origin: center;
	animation: wx-lap-lanh 1.6s ease-in-out infinite;
}

.wx-sao .wx-sao2 { animation-delay: -.55s; }
.wx-sao .wx-sao3 { animation-delay: -1.1s; }

@keyframes wx-lap-lanh {
	0%, 100% { transform: scale(1);   opacity: 1; }
	50%      { transform: scale(.55); opacity: .55; }
}

.wx-chuc--nm {
	border-color: rgba(246, 196, 83, .7);
	background: rgba(18, 10, 40, .55);
}

.wx-chuc--nm svg path {
	fill: #F6C453;
}

.wx-dem {
	font-variant-numeric: tabular-nums;   /* số không nhảy bề ngang khi đếm */
	color: #F6C453;
	font-weight: 700;
}

@media (max-width: 549px) {
	.wx-chuc {
		top: 2.205883rem;
		gap: 0.441177rem;
		padding: 0.441177rem 1.029412rem;
		font-size: 0.882353rem;          /* 12px */
		letter-spacing: .03em;
		white-space: normal;
	}
	.wx-dat { height: 2.205883rem; }
	.wx-mu  { width: 1.911765rem; right: -0.367648rem; top: -1.176471rem; }
	.wx-sao.wx-mu { width: 1.911765rem; right: -0.735295rem; top: -1.176471rem; }
}


/* Máy bật "giảm chuyển động": đèn sáng đứng, lời chúc hiện ngay */
@media (prefers-reduced-motion: reduce) {
	.wx-den i, .wx-chuc, .wx-sao path { animation: none; }
}

/* In trang: bỏ hết trang trí */
@media print {
	.wx-mu, .wx-den, .wx-tuyet, .wx-dat, .wx-chuc, .wx-phaohoa { display: none !important; }
}
