/*
 | Kiểu dáng các mục bên trong trang đơn vị (giới thiệu, tin, dịch vụ, góp ý…).
 | Giữ nguyên bố cục đã dựng, chuyển bảng màu sang bộ nhận diện Làng Văn Hiến.
 */
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 16px; }
.muted { color: var(--stone); }
/* Đầu trang */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 15.5px; background: var(--gold); color: #fff; }
.btn:hover { background: var(--clay); }
.btn-ghost { background: transparent; color: var(--gold); border: 1px solid rgba(var(--gold-rgb),.35); }
.btn-ghost:hover { background: rgba(var(--gold-rgb),.10); }
.btn-light { background: #fff; color: var(--clay); }
.btn-light:hover { background: rgba(var(--gold-rgb),.16); }
.flash { background: #ecfdf5; color: #065f46; border-bottom: 1px solid #a7f3d0; }
.flash .wrap { padding-block: 10px; font-weight: 600; }
.alert-bar { background: var(--vermillion); color: #fff; }
.alert-bar .wrap { padding-block: 10px; display: flex; gap: 10px; align-items: flex-start; }
.alert-bar strong { white-space: nowrap; }
/* Slide đầu trang: kéo/vuốt, mũi tên, chấm, tự chạy */
        .slider { position: relative; overflow: hidden; height: clamp(300px, 46vw, 520px); background: var(--clay); touch-action: pan-y; user-select: none; outline: none; }
.slider .track { display: flex; height: 100%; transition: transform .55s cubic-bezier(.22, .61, .36, 1); will-change: transform; }
.slide { flex: 0 0 100%; height: 100%; position: relative; display: flex; align-items: flex-end; background: center / cover no-repeat; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, .05) 25%, rgba(15, 23, 42, .72) 100%); }
.slide .wrap { position: relative; z-index: 1; width: 100%; padding-block: 36px 70px; color: #fff; }
.slide .kicker { display: inline-block; padding: 3px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); font-size: 13.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.slide h2 { margin: 12px 0 8px; font-size: clamp(26px, 4vw, 46px); line-height: 1.15; max-width: 820px; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.slide p { margin: 0 0 18px; max-width: 640px; font-size: clamp(15.5px, 1.6vw, 18.5px); opacity: .95; }
.slider .nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); color: var(--clay); font-size: 26px; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow); }
.slider .nav.prev { left: 16px; }
.slider .nav.next { right: 16px; }
.slider .dots { position: absolute; left: 0; right: 0; bottom: 20px; z-index: 2; display: flex; justify-content: center; gap: 8px; }
.slider .dots button { width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .2s; }
.slider .dots button.active { width: 28px; background: #fff; }
.slider .nav { display: none; }
/* Khối nội dung */
        section.block { padding-block: 28px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 23.5px; }
.section-head p { margin: 2px 0 0; color: var(--stone); font-size: 15.5px; }
.section-head input { flex: 0 1 300px; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font: inherit; font-size: 15.5px; }
.panel { background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.panel h3 { margin: 0 0 12px; font-size: 18.5px; }
.panel dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; font-size: 16px; }
.panel dt { color: var(--stone); }
.panel dd { margin: 0; overflow-wrap: anywhere; }
.intro { white-space: pre-line; overflow-wrap: anywhere; }
.empty { padding: 28px; color: var(--stone); text-align: center; background: var(--cream); border: 1px dashed #cbd5e1; border-radius: var(--radius); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.two-col { grid-template-columns: minmax(0, 1fr); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.breadcrumb { font-size: 15.5px; color: var(--stone); padding-top: 18px; }
.breadcrumb a { color: var(--stone); }
.breadcrumb a:hover { color: var(--gold); }
/* Thẻ đơn vị (xã/thôn) và thẻ tin */
        .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; height: 100%; }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(15, 23, 42, .14); }
.card .thumb { position: relative; aspect-ratio: 16 / 9; background: var(--clay) center / cover no-repeat; }
.card .thumb .badge { position: absolute; top: 12px; left: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--gold); font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 18px; line-height: 1.35; }
.card p { margin: 0; color: var(--stone); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--stone); }
.card .more { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 15px; font-weight: 700; color: var(--gold); }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(var(--gold-rgb),.10); color: var(--gold); font-size: 13.5px; font-weight: 700; }
.chip.thong_bao { background: #fef2f2; color: #b91c1c; }
.chip.su_kien { background: #fffbeb; color: #b45309; }
[data-card][hidden] { display: none !important; }
.pinned { padding: 0; overflow: hidden; }
.pinned h3 { margin: 0; padding: 14px 18px; background: var(--gold); color: #fff; font-size: 16.5px; text-transform: uppercase; letter-spacing: .03em; }
.pinned ul { list-style: none; margin: 0; padding: 0; }
.pinned li { border-top: 1px solid var(--border); }
.pinned li:first-child { border-top: 0; }
.pinned li a { display: block; padding: 12px 18px; color: var(--ink); font-weight: 600; font-size: 16px; }
.pinned li a:hover { background: rgba(var(--gold-rgb),.10); color: var(--gold); }
.pinned li small { display: block; color: var(--stone); font-weight: 400; margin-top: 2px; }
.pinned .none { padding: 16px 18px; color: var(--stone); font-size: 15.5px; }
a.user-chip { color: var(--ink); }
/* Trang xã/thôn: dải tiêu đề và menu chuyên mục (dính dưới đầu trang, vuốt ngang trên màn hẹp) */
        .kicker { display: inline-block; padding: 3px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); font-size: 13.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.unit-hero { position: relative; background: var(--clay) center / cover no-repeat; }
.unit-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 23, 42, .82), rgba(15, 23, 42, .35)); }
.unit-hero .wrap { position: relative; z-index: 1; color: #fff; padding-block: 34px; }
.unit-hero h1 { margin: 8px 0 4px; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.2; }
.unit-hero p { margin: 0; opacity: .9; }
.unit-nav { position: sticky; top: 64px; z-index: 20; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.unit-nav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.unit-nav .wrap::-webkit-scrollbar { display: none; }
.unit-nav a { flex: none; padding: 13px 14px 10px; font-weight: 700; font-size: 15.5px; color: var(--stone); border-bottom: 3px solid transparent; white-space: nowrap; }
.unit-nav a:hover { color: var(--gold); }
.unit-nav a.active { color: var(--gold); border-bottom-color: var(--gold); }
/* Phân trang và "Xem thêm" */
        .pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 20px; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-weight: 700; font-size: 15.5px; color: var(--ink); }
.pager a:hover { border-color: var(--gold); color: var(--gold); }
.pager .current { background: var(--gold); border-color: var(--gold); color: #fff; }
.pager .disabled { color: #94a3b8; }
.pager .gap { border: 0; background: transparent; min-width: 18px; padding: 0; }
.pager .info { margin-left: auto; border: 0; background: transparent; color: var(--stone); font-weight: 500; }
.more-wrap { text-align: center; margin-top: 18px; }
.grid:not(.filtering) [data-card].is-over { display: none; }
/* Form, tab lọc, số liệu, bảng, lịch, danh sách */
        .form { display: grid; gap: 14px; }
.form .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form label { display: block; font-weight: 600; font-size: 15.5px; margin-bottom: 6px; }
.form input, .form select, .form textarea { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--border); font: inherit; font-size: 16.5px; background: #fff; }
.form input[type=checkbox], .form input[type=radio] { width: auto; }
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--gold); }
.form .hint { font-size: 14px; color: var(--stone); margin-top: 4px; }
.req { color: var(--vermillion); }
.alert-error { padding: 10px 12px; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 15.5px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 14px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--ink); font-weight: 700; font-size: 15px; white-space: nowrap; }
.tabs a.active { background: var(--gold); border-color: var(--gold); color: #fff; }
.search-inline { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.search-inline input { flex: 1 1 220px; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border); font: inherit; font-size: 15.5px; background: #fff; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat-cards div { background: var(--cream); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.stat-cards b { display: block; font-size: 28px; color: var(--gold); line-height: 1.2; }
.stat-cards span { font-size: 14px; color: var(--stone); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.map { display: block; width: 100%; height: 320px; border: 0; border-radius: var(--radius); background: var(--border); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 520px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.tbl th { background: #f8fafc; font-size: 14px; text-transform: uppercase; letter-spacing: .03em; color: var(--stone); }
.tbl tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 700; background: #f1f5f9; color: var(--stone); white-space: nowrap; }
.status.ok { background: #ecfdf5; color: #047857; }
.status.wait { background: #fffbeb; color: #b45309; }
.status.no { background: #fef2f2; color: #b91c1c; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head a { font-weight: 800; padding: 4px 10px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: 15px; }
.cal .dow { font-weight: 700; color: var(--stone); padding: 4px 0; }
.cal .d { padding: 8px 0; border-radius: 10px; background: #f8fafc; }
.cal .d.today { outline: 2px solid var(--gold); }
.cal .d.busy { background: #fee2e2; color: #b91c1c; font-weight: 800; }
.cal .d.pad { background: transparent; }
.legend { display: flex; gap: 14px; font-size: 14px; color: var(--stone); margin-top: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 4px; vertical-align: -2px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list li { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.list li b { display: block; }
.list li small { color: var(--stone); }
.reply { margin-top: 8px; padding: 8px 10px; background: rgba(var(--gold-rgb),.10); border-radius: 10px; font-size: 15.5px; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.links a { display: block; padding: 10px 12px; border-radius: 10px; background: rgba(var(--gold-rgb),.10); font-weight: 700; font-size: 15.5px; }
.links a:hover { background: #dbeafe; }
.doc-card { display: flex; gap: 12px; align-items: center; padding: 14px; }
.doc-card .ico { width: 44px; height: 44px; border-radius: 12px; background: #fef2f2; color: #b91c1c; display: grid; place-items: center; font-weight: 800; font-size: 13.5px; flex: none; }
.to-top { position: fixed; right: 16px; bottom: 18px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold); color: #fff; font-size: 21.5px; box-shadow: var(--shadow); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }
section.block { padding-block: 20px; }
.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card .body { padding: 10px 12px 12px; }
.card h3 { font-size: 15.5px; }
.card p { display: none; }
.card .more { font-size: 14px; padding-top: 8px; }
.grid.hscroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.grid.hscroll > .card { flex: 0 0 78%; scroll-snap-align: start; }
.grid.hscroll > .card p { display: -webkit-box; }
.panel { padding: 16px; }
.form .row2 { grid-template-columns: 1fr; }
.pager .info { width: 100%; margin-left: 0; }
.stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-cards div { padding: 12px; }
.stat-cards b { font-size: 22.5px; }

/* Liên kết trong phần nội dung của mục: theo bảng màu chung, không gạch chân */
.block a, .wrap a, .panel a, .stack a { color: var(--clay); text-decoration: none; }
.block a:hover, .wrap a:hover, .panel a:hover, .stack a:hover { color: var(--gold); }
.breadcrumb { color: var(--stone); font-size: 14px; padding-block: 14px; }
.breadcrumb a { color: var(--clay); }

/* Phần giới thiệu dài lấy từ nguồn mở: đọc như một bài viết */
.gioi-thieu-dai h4 {
    font-family: 'Noto Serif', serif; font-size: 17px; font-weight: 700;
    color: var(--clay); margin: 22px 0 8px; padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.gioi-thieu-dai h4:first-child { margin-top: 4px; }
.gioi-thieu-dai p { margin: 0 0 11px; line-height: 1.85; }
.gioi-thieu-dai p:last-child { margin-bottom: 0; }
