/* ============================================================
   NỀN CHUNG CHO MỌI TRANG
   Chữ, nền, header, chân trang, dải trang trí, khung nội dung.
   Trang nào cũng nạp file này. Không chứa thứ gì riêng của Bản tin.
   ============================================================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--nen-kem);
  color: var(--chu);
  font-family: var(--font-than);
}

a { color: var(--la); }
a:hover { color: var(--chu); }

/* chỉ đọc được bằng trình đọc màn hình */
.sr {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
}

.muted { color: var(--chu-mo); }

/* phần của lớp áo lễ hội: ẩn trừ khi trang nạp css/theme-chung-song.css và bật class */
.cs-only { display: none; }

/* --- Khung trang --------------------------------------------------- */
.page { min-height: 100vh; overflow-x: clip; }

.wrap {
  max-width: var(--rong-trang);
  margin: 0 auto;
  padding-left: var(--le-trang);
  padding-right: var(--le-trang);
}

/* dải nền xanh ôm trọn chiều ngang màn hình */
.band { position: relative; background: var(--nen-xanh); margin-top: 56px; }
.band > .wrap { padding-top: 36px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 22px; }
.band-wave { position: absolute; left: 0; top: -47px; width: 100%; height: 48px; display: block; }

/* --- Header -------------------------------------------------------- */
.site-head { position: relative; }
.site-head .wrap {
  padding-top: 16px; padding-bottom: 16px;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px;
}
.brand { text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-family: var(--font-tieu-de); font-weight: 600; font-size: 22px; color: var(--chu); }
.brand-sub { font-size: 11px; letter-spacing: .16em; color: var(--chu-mo); }

.nav { display: flex; align-items: center; gap: 8px; font-size: 15px; white-space: nowrap; }
.nav a {
  padding: 11px 14px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
  background: var(--la-nhat); color: var(--chu);
}
.nav a.is-primary { padding: 11px 18px; background: var(--la); color: #fff; }

.notice {
  max-width: 1136px; margin: 0 auto 8px; padding: 12px 16px;
  border-radius: var(--bo-nut);
  background: var(--nen-vang-nhat); color: var(--nau-nhac); font-size: 14px;
}

/* header + dải dây lá đứng yên khi cuộn trang */
.sticky-top { position: sticky; top: 0; z-index: 50; background: var(--nen-kem); }
[id] { scroll-margin-top: 120px; }

/* dải dây lá dưới header */
.vine { display: block; }

/* --- Phần mở đầu của trang ----------------------------------------- */
.intro {
  scroll-margin-top: 120px;
  padding-top: 48px; padding-bottom: 40px;
  display: flex; flex-direction: column; gap: 36px;
}
.intro-title {
  margin: 0; font-family: var(--font-tieu-de); font-weight: 400;
  font-size: clamp(34px, 4.2vw, 54px); line-height: 1.1; text-wrap: balance;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
}
.intro-title > span { position: relative; }
.intro-title .d1 { color: var(--cam-tieu-de); }
.intro-title .d2 { color: var(--la); }
.sprig-l { position: absolute; right: 100%; top: 50%; margin-right: 14px; transform: translateY(-60%) scaleX(-1) rotate(8deg); width: 60px; height: 27px; }
.sprig-r { position: absolute; left: 100%; top: 50%; margin-left: 14px; transform: translateY(-40%); width: 72px; height: 32px; }

.lede {
  margin: 0 auto; max-width: 820px; text-align: center;
  font-size: 16px; line-height: 1.7; color: var(--chu-nhat);   /* 26/11: bằng cỡ chữ các đoạn khác (trước 14.5px) */
  letter-spacing: .01em;                                        /* thoáng hơn chút, chữ không dính nhau */
}
.lede p { margin: 0 0 10px; }
/* các dòng dài gần bằng nhau (thay cho việc ép khít chữ). Theme đặt `.theme-chung-song p { text-wrap: wrap !important }`
   nên ngoại lệ này cũng cần !important và cụ thể hơn. */
.lede p, .theme-chung-song .intro .lede p { text-wrap: balance !important; }
.lede p:last-child { margin-bottom: 0; }

/* ảnh polaroid chồng nhau */
.photos { position: relative; width: 100%; aspect-ratio: 3.4 / 1; }
.photos figure {
  margin: 0; position: absolute; background: #fff;
  padding: 1.1% 1.1% 3%; box-shadow: var(--bong-anh);
}
.photos img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.photo-1 { left: 1%;    top: 10%; width: 33%; transform: rotate(-4deg);  z-index: 1; }
.photo-2 { left: 31.5%; top: 2%;  width: 37%; transform: rotate(1deg);   z-index: 3; }
.photo-3 { right: 1%;   top: 14%; width: 33%; transform: rotate(3.5deg); z-index: 2; }
.deco-vine  { position: absolute; right: -30px; top: -50px; width: 96px; height: 120px; z-index: 5; }
.deco-sun   { position: absolute; left: -34px;  top: -30px; width: 80px; height: 80px;  z-index: 5; opacity: .9; }

/* ba bước: Tìm · Chia sẻ · Cùng nhau */
.steps {
  position: relative; width: 100%; max-width: 780px; margin: 4px auto 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.steps-line { position: absolute; left: 16.6%; right: 16.6%; top: 6px; width: 66.8%; height: 40px; }
.step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.step-dot { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.step-dot > span { width: 16px; height: 16px; border-radius: 50%; }
.step-name { font-family: var(--font-tieu-de); font-size: 18px; padding-top: 4px; }
.step-note { font-size: 15px; color: var(--chu-nhat); }

/* --- Chân trang ---------------------------------------------------- */
.site-foot { background: var(--la-dam); color: #F1ECDC; }
.site-foot .wrap {
  padding-top: 36px; padding-bottom: 36px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.foot-line { margin: 0; font-family: var(--font-tieu-de); font-size: 20px; }
.foot-sub  { margin: 0; font-size: 13px; color: #CFC9B5; }

/* --- Điện thoại ---------------------------------------------------- */
@media (max-width: 760px) {
  .wrap { padding-left: var(--le-trang-nho); padding-right: var(--le-trang-nho); }
  .band > .wrap { padding-top: 28px; padding-bottom: 48px; }
  .intro { padding-top: 28px; }
}

/* hàng link ở chân trang */
.foot-links { margin: 2px 0 0; font-size: 14px; }
.foot-links a { color: #CFE6A8; text-decoration: none; border-bottom: 1px solid rgba(207,230,168,.45); }
.foot-links a:hover { color: #fff; }

/* --- Trang nội dung thường (không có danh sách sự kiện) ------------- */
.doc { padding-top: 40px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 14px; }
.doc-title { margin: 0; font-family: var(--font-tieu-de); font-weight: 400; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.15; color: var(--cam-tieu-de); }
.doc-lede { margin: 0; max-width: 760px; font-size: 16px; line-height: 1.7; color: var(--chu-nhat); }
.panel { background: var(--nen-trang); border: 1px solid var(--vien); border-radius: var(--bo-khoi); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.panel h2 { margin: 0; font-family: var(--font-tieu-de); font-weight: 400; font-size: 24px; }
.panel p  { margin: 0; font-size: 15px; line-height: 1.7; color: var(--chu-nhat); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.note-card { background: #FFFDF4; border: 1px solid var(--vien-nhat); border-radius: var(--bo-the); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.note-card b { font-family: var(--font-tieu-de); font-weight: 600; font-size: 16px; }
.note-card span { font-size: 14px; line-height: 1.6; color: var(--chu-nhat); }
@media (max-width: 760px) { .panel { padding: 20px 16px; } .doc { padding-top: 24px; } }

/* điện thoại: header gọn lại vì luôn đứng yên trên đầu màn hình */
@media (max-width: 575px) {
  .site-head .wrap { padding-top: 10px; padding-bottom: 8px; gap: 8px; }
  .brand-name { font-size: 19px; }
  .brand-sub { display: none; }
  .nav { width: 100%; gap: 6px; font-size: 13.5px; }
  .nav a, .nav a.is-primary { flex: 1; text-align: center; padding: 9px 8px; }
  /* "Tìm kiếm" + "Đăng sự kiện" chung một hàng, nút "Tuần lễ chung sống" (chữ dài) xuống hàng dưới */
  .nav { flex-wrap: wrap; }
  .nav a.nav-cs { order: 3; flex-basis: 100%; }
  [id], .intro { scroll-margin-top: 120px; }
}
