/* NAWARUCO — phần riêng cho WordPress/DT: widget, khối của DT Admin (tài liệu PDF, thủ tục hai nhóm), biểu mẫu DT Forms.
   Mọi giá trị lấy từ token của bộ giao diện demo (tokens trong nawaruco.css). */

/* Token của theme cha mà plugin DT (DT Forms, DT Admin) còn đọc: chỉ sang bộ màu NAWARUCO. */
:root { --dt-forest: var(--brand); --dt-ink: var(--text-primary); --dt-muted: var(--text-secondary); --dt-line: var(--border-default); --dt-sage: var(--bg-tint); }

/* Khung bọc header/footer/biểu tượng không tạo hộp riêng (như demo): để header dính (sticky) theo cả trang thay vì chỉ trong khung bọc. */
#nwrc-header, #nwrc-footer, #nwrc-icons { display: contents; }

/* ---------- Thanh trên: các widget Văn bản (tên công ty, hotline) và ô tìm kiếm ---------- */
.topbar .widget { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; overflow: visible; }
.topbar .widget:first-child { margin-right: auto; }
.topbar { justify-content: flex-start; gap: var(--sp-4); }
.topbar p { margin: 0; line-height: 1.4; }
.topbar .search-form { display: flex; align-items: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--radius-sm); padding: 2px 4px 2px 10px; }
.topbar .search-form .input { background: transparent; border: 0; color: #fff; box-shadow: none; min-height: 0; padding: 5px 0; width: 150px; border-radius: 0; }
.topbar .search-form .input::placeholder { color: rgba(255, 255, 255, .6); }
.topbar .search-form .btn { background: none; border: 0; box-shadow: none; color: #fff; min-height: 0; padding: 4px 6px; }
.topbar .search-form .btn:hover { background: none; }
.topbar-hotline .icon { width: 20px; height: 20px; }

/* ---------- Chân trang: cột thương hiệu và cột liên hệ do footer.php dựng từ widget ---------- */
.site-footer .contact-list li .icon { margin-top: 2px; color: var(--c-accent-300); }

/* ---------- Cột phải (widget): tiêu đề có vệt sóng như demo ---------- */
aside .widget { margin-bottom: var(--gap-box); }
aside .widget:last-child { margin-bottom: 0; }
aside .widget .textwidget > :first-child { margin-top: 0; }
aside .widget .textwidget > ul { margin: 0; }
aside .widget-list li + li { margin-top: 0; }
/* Widget "DT · Danh sách bài viết" trong cột phải = danh sách tin đọc nhiều của demo */
aside .dt-post-list { display: flex; flex-direction: column; gap: var(--sp-4); }
aside .dt-post-list-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
aside .dt-post-list-item:not(:has(.post-featured-image)) { grid-template-columns: 1fr; }
aside .dt-post-list-item .post-featured-image img { width: 64px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
aside .dt-post-list-item .widget-item-title { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; margin: 0; }
aside .dt-post-list-item .widget-item-title a { color: var(--text-primary); text-decoration: none; }
aside .dt-post-list-item .widget-item-title a:hover { color: var(--brand); }
aside .dt-post-list-item .byline { margin: 0 0 2px; font-size: var(--fs-xs); color: var(--text-secondary); font-family: var(--font-numeric); }
aside .dt-post-list-item .noidung { display: none; }

/* ---------- Trang: bố cục khung, khoảng cách đầu trang ---------- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.alignleft { float: left; margin: .25em 1.5em 1em 0; }
.alignright { float: right; margin: .25em 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.panel > :first-child { margin-top: 0; }
.prose img, .panel img.alignnone { border-radius: var(--radius-md); }

/* ---------- Khối thủ tục hai nhóm của DT Admin = tab của demo ---------- */
.dt-service { border: 1px solid var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; background: var(--bg-surface); }
.dt-service .dt-service-nav { background: var(--bg-sunken); border-bottom: 0; padding: 0; margin: 0; border-radius: 0; }
.dt-service .dt-service-nav button { font-size: var(--fs-lg); padding: var(--sp-4) var(--sp-5); border-radius: var(--radius-md) var(--radius-md) 0 0; margin: 0; background: none; color: var(--text-secondary); border: 0; }
.dt-service .dt-service-nav button[aria-selected="true"] { background: var(--bg-surface); color: var(--brand); top: 0; }
.dt-service .dt-service-nav button:hover { background: var(--bg-surface); color: var(--brand); }
.dt-service-panel { padding: var(--sp-6) var(--sp-5) var(--sp-5); }
.dt-service-panel > h2:first-child { display: none; }

/* ---------- Tài liệu PDF của DT Admin: giống danh sách tệp + accordion của demo ---------- */
.dt-documents { margin: var(--sp-6) 0 0; }
.dt-section-heading { margin-bottom: var(--sp-4); }
.dt-section-heading .dt-eyebrow { display: none; }
.dt-section-heading h2 { font-size: var(--fs-lg); margin: 0 0 var(--sp-2); }
.dt-section-heading p { color: var(--text-secondary); font-size: var(--fs-sm); }
.dt-document-section { margin: var(--sp-5) 0 0; }
.dt-document-section > h3 { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--brand); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 var(--sp-3); }
.dt-document-section > h3::after { content: ''; flex: 1; height: 1px; background: var(--border-default); }
.dt-collapse-head { margin: 0 0 var(--gap-box); }
.dt-collapse-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: var(--sp-4); background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: var(--sp-4) var(--sp-5); font: inherit; font-weight: 600; color: var(--text-primary); cursor: pointer; text-align: left; }
.dt-collapse-toggle:hover { background: var(--bg-tint); color: var(--text-primary); }
.dt-collapse-icon::before, .dt-collapse-icon::after { background: var(--brand); }
.dt-collapse-panel { padding: 0 var(--sp-5); }
.dt-document { border: 0; border-bottom: 1px solid var(--border-default); border-radius: 0; background: none; margin: 0; color: inherit; }
.dt-document-summary { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) 0; }
.dt-file-mark { flex: none; width: auto; height: auto; padding: 6px 10px; font-family: var(--font-numeric); font-size: var(--fs-xs); font-weight: 600; border-radius: var(--radius-sm); background: var(--bg-tint); color: var(--brand-strong); border: 0; text-transform: uppercase; }
.dt-document h3, .dt-document h4, .dt-document h5 { font-family: var(--font-body); font-size: var(--fs-base); font-weight: 600; margin: 0; color: var(--text-primary); }
.dt-document p { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--text-secondary); }
.dt-document-actions { display: flex; gap: var(--sp-3); margin-left: auto; flex: none; }
.dt-document-actions a { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 14px; font-size: var(--fs-xs); font-weight: 600; text-decoration: none; background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-strong); border-radius: var(--radius-md); }
.dt-document-actions a:hover { border-color: var(--brand); color: var(--brand); }
.dt-pdf-viewer summary { padding: var(--sp-3) 0; cursor: pointer; color: var(--brand); font-weight: 600; font-size: var(--fs-sm); }
@media (max-width: 640px) { .dt-document-summary { flex-wrap: wrap; } .dt-document-actions { margin-left: 0; width: 100%; } }

/* ---------- Biểu mẫu DT Forms: ô nhập như .input của demo ---------- */
.dtf-form { --dtf-accent: var(--brand); --dtf-line: var(--border-input); max-width: none; margin: var(--sp-4) 0 0; }
.dtf-form-grid { gap: var(--gap-box); }
.dtf-field { display: flex; flex-direction: column; gap: 6px; }
.dtf-field input[type=text], .dtf-field input[type=email], .dtf-field input[type=tel], .dtf-field input[type=date], .dtf-field select, .dtf-field textarea { width: 100%; min-height: 40px; padding: 10px 12px; border: 1px solid var(--border-input); border-radius: var(--radius-sm); background: var(--bg-surface); font: inherit; font-size: var(--fs-base); color: var(--text-primary); }
.dtf-field textarea { min-height: 120px; }
.dtf-field input:focus, .dtf-field select:focus, .dtf-field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--c-primary-100); outline: none; }
.dtf-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2351697A' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.dtf-field label, .dtf-field legend { display: block; margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text-primary); order: 1; }
.dtf-field input, .dtf-field select, .dtf-field textarea { order: 2; }
.dtf-field-help { order: 3; }
.dtf-required { color: inherit; text-decoration: none; }
.dtf-field-help { margin: 0; color: var(--text-secondary); font-size: var(--fs-xs); }
.dtf-form-actions { margin-top: var(--sp-5); }
.dtf-form-actions button { background: var(--brand); color: #fff; border: 1px solid transparent; border-radius: var(--radius-md); min-height: 40px; padding: 8px 24px; font-weight: 600; box-shadow: var(--shadow-sm); cursor: pointer; }
.dtf-form-actions button:hover { background: var(--c-primary-700); box-shadow: var(--shadow-md); }
.dtf-form-done { border-left-color: var(--c-accent-600); background: var(--c-accent-100); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.contact-form .dtf-form-actions button { background: var(--c-accent-700); }
.contact-form .dtf-form-actions button:hover { background: var(--c-accent-800); }

/* ---------- Thành phần nội dung còn thiếu so với bản HTML ---------- */
.check-list li > a, .check-list li > span:not(.icon) { min-width: 0; }
.panel .prose h2:first-child { margin-top: 0; }

/* Khung trắng chỉ chứa khối thủ tục hai nhóm: bỏ khung ngoài để chỉ còn một thẻ như demo. */
.panel:has(> .dt-service:only-child) { padding: 0; border: 0; background: none; box-shadow: none; }
.widget--tint, aside .widget:has(.widget-list--tint) { background: var(--bg-tint); }

/* Trang Liên hệ: hai cột như demo (họ tên + email bên trái, nội dung bên phải). */
@media (min-width: 761px) {
	.contact-form .dtf-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.contact-form .dtf-field:nth-child(1), .contact-form .dtf-field:nth-child(2) { grid-column: 1; }
	.contact-form .dtf-field:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
	.contact-form .dtf-field:nth-child(3) textarea { flex: 1; min-height: 150px; }
}

/* Băng ảnh trang chủ rộng hết màn hình (bản demo chặn ở 1920px): giữ tỉ lệ 3:1, tối đa cao 900px; điện thoại giữ khung dọc của demo. */
@media (min-width: 761px) { .hero-slider { max-width: none; max-height: 900px; } }
