/* =========================================================
   site.css – giao diện trang chủ (CSS thuần, không cần build)
   Đổi màu/font ở khối :root bên dưới
   ========================================================= */
:root {
    --ink: #1f2a30;
    --ink-soft: #55626a;
    --paper: #f5f6f4;
    --white: #ffffff;
    --moss: #2f5d50;
    --moss-dark: #22463c;
    --brass: #a87c2f;
    --line: #d6dad5;
    --danger: #b42318;
    --radius: 3px;
    --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.container { max-width: 72rem; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 48rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(245, 246, 244, .96); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.brand { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.main-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.main-nav a:not(.btn) { color: var(--ink-soft); transition: color .15s; }
.main-nav a:not(.btn):hover, .main-nav a.active { color: var(--moss); }
.main-nav a.active { font-weight: 500; }

.mobile-nav { display: none; position: relative; }
.mobile-nav summary { cursor: pointer; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px; font-size: 14px; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav .menu { position: absolute; right: 0; margin-top: 8px; width: 220px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 0; box-shadow: 0 10px 30px rgba(31, 42, 48, .12); }
.mobile-nav .menu a { display: block; padding: 9px 16px; }
.mobile-nav .menu a:hover { background: var(--paper); }

/* ---------- Nút ---------- */
.btn { display: inline-block; padding: 12px 24px; border-radius: var(--radius); font-weight: 500; border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 500; transition: background .15s, border-color .15s; }
.btn-sm { padding: 8px 16px; }
.btn-primary { background: var(--moss); color: var(--white); }
.btn-primary:hover { background: var(--moss-dark); }
.btn-outline { border-color: rgba(31, 42, 48, .25); }
.btn-outline:hover { border-color: var(--ink); }
.btn-light { background: var(--white); color: var(--moss-dark); }
.btn-light:hover { background: var(--paper); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .4); color: var(--white); }
.btn-ghost-light:hover { border-color: var(--white); }
.link { color: var(--moss); white-space: nowrap; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.back-link { font-size: 14px; color: var(--ink-soft); }
.back-link:hover { color: var(--moss); }

/* ---------- Tiêu đề ---------- */
.page-title { font-size: clamp(34px, 5vw, 48px); font-weight: 300; line-height: 1.15; letter-spacing: -.02em; }
.section-title { font-size: clamp(24px, 3vw, 30px); font-weight: 600; letter-spacing: -.01em; }
.lead { font-size: 18px; line-height: 1.7; color: var(--ink-soft); }

/* ---------- Section ---------- */
.section { padding: 80px 0; }
.section-white { background: var(--white); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.page-top { padding-top: 64px; }
.mt-section { margin-top: 80px; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 3fr 2fr; gap: 48px; padding-top: 96px; padding-bottom: 80px; }
.hero-title { margin-top: 20px; font-size: clamp(36px, 6vw, 60px); font-weight: 300; line-height: 1.12; letter-spacing: -.025em; }
.hero-text { margin-top: 24px; max-width: 36rem; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

.service-index { align-self: end; border-top: 2px solid var(--ink); }
.service-index .label { padding: 12px 0; font-size: 14px; color: var(--ink-soft); }
.service-index li { border-top: 1px solid var(--line); }
.service-index a { display: block; padding: 14px 0; font-weight: 500; }
.service-index a:hover { color: var(--moss); }

/* ---------- Thẻ dự án / bài viết ---------- */
.thumb { overflow: hidden; border-radius: var(--radius); background: var(--line); aspect-ratio: 3 / 2; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .thumb img { transform: scale(1.02); }
.card { display: block; }
.card-meta { margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.card-title { margin-top: 4px; font-size: 18px; font-weight: 600; }
.card:hover .card-title { color: var(--moss); }
.card-text { margin-top: 8px; color: var(--ink-soft); }

.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.featured-grid .card.is-large { grid-column: span 2; grid-row: span 2; }
.featured-grid .card.is-large .thumb { aspect-ratio: 4 / 3; }
.featured-grid .card.is-large .card-title { font-size: 24px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 32px; margin-top: 40px; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 24px; }

.post-rows { border-top: 1px solid var(--line); }
.post-rows a { display: grid; grid-template-columns: 10rem 1fr; gap: 8px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.post-rows a:hover h3 { color: var(--moss); }
.post-rows time { font-size: 14px; color: var(--ink-soft); }
.post-rows h3 { font-size: 20px; font-weight: 600; }
.post-rows p { margin-top: 4px; color: var(--ink-soft); }

.link-list { margin-top: 16px; border-top: 1px solid var(--line); }
.link-list a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.link-list a:hover { color: var(--moss); }

/* ---------- CTA ---------- */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--moss); color: var(--white); border-radius: var(--radius); padding: 48px; }
.cta h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 600; }
.cta p { margin-top: 8px; color: rgba(255, 255, 255, .8); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

/* ---------- Giới thiệu / chi tiết ---------- */
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; margin-top: 40px; }
.facts { align-self: start; border-top: 2px solid var(--ink); padding-top: 20px; display: grid; gap: 20px; }
.facts dt { font-size: 14px; color: var(--ink-soft); }
.facts dd { margin-top: 2px; font-weight: 500; }
.facts dd.big { font-size: 20px; font-weight: 600; }

.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.areas h3 { font-weight: 600; font-size: 16px; }
.areas p { margin-top: 4px; color: var(--ink-soft); }

.service-list { margin-top: 48px; display: grid; gap: 64px; }
.service-item { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 40px; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.service-item.reverse .service-body { order: 2; }
.service-item h2 { font-size: 24px; font-weight: 600; }
.service-item .lead { margin-top: 12px; }
.service-item img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: var(--radius); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; font-size: 14px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; }
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--white); }

.detail-title { margin-top: 16px; max-width: 56rem; }
.meta-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 32px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta-row dt { font-size: 14px; color: var(--ink-soft); }
.meta-row dd { margin-top: 4px; font-weight: 500; }
.cover { margin-top: 40px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.summary { margin-top: 40px; font-size: 20px; line-height: 1.6; max-width: 48rem; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.gallery img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: var(--radius); }

.post-date { display: block; margin-top: 24px; color: var(--ink-soft); }
.post-cover { margin-top: 32px; width: 100%; border-radius: var(--radius); }

/* Nội dung HTML từ trình soạn thảo admin */
.prose-content { line-height: 1.75; max-width: 68ch; margin-top: 24px; }
.prose-content > * + * { margin-top: 1.1em; }
.prose-content h2 { font-size: 24px; font-weight: 600; margin-top: 1.8em; }
.prose-content h3 { font-size: 19px; font-weight: 600; margin-top: 1.5em; }
.prose-content ul { list-style: disc; padding-left: 1.4em; }
.prose-content ol { padding-left: 1.4em; }
.prose-content a { color: var(--moss); text-decoration: underline; }
.prose-content img { border-radius: var(--radius); }
.prose-content blockquote { margin-left: 0; border-left: 3px solid var(--brass); padding-left: 1em; color: var(--ink-soft); }
.prose-content.large { font-size: 18px; }

/* ---------- Liên hệ ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; }
.contact-grid .facts { margin-top: 40px; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-size: 14px; font-weight: 500; }
.field .req { color: var(--brass); }
.field input, .field textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--moss); }
.field .is-invalid { border-color: var(--danger); }
.field .error { margin-top: 4px; font-size: 14px; color: var(--danger); }
.alert-success { margin-bottom: 24px; padding: 12px 16px; border: 1px solid rgba(47, 93, 80, .3); background: rgba(47, 93, 80, .08); color: var(--moss-dark); border-radius: var(--radius); }
.hp { position: absolute; left: -9999px; }

/* ---------- Phân trang ---------- */
.pager { margin-top: 48px; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.pagination li > a, .pagination li > span { display: block; min-width: 40px; padding: 8px 12px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); }
.pagination li > a:hover { border-color: var(--ink); }
.pagination li.active > span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pagination li.disabled > span { color: var(--line); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 96px; background: var(--ink); color: rgba(255, 255, 255, .8); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 56px; }
.footer-grid .name { font-size: 18px; font-weight: 600; color: var(--white); }
.footer-grid .heading { font-weight: 500; color: var(--white); margin-bottom: 12px; }
.footer-grid li + li, .footer-grid .contact-lines p + p { margin-top: 8px; }
.footer-grid a:hover { color: var(--white); }
.footer-about { margin-top: 12px; max-width: 28rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-bottom p { padding-top: 20px; padding-bottom: 20px; font-size: 14px; color: rgba(255, 255, 255, .5); }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .main-nav { display: none; }
    .mobile-nav { display: block; }
    .hero, .two-col, .contact-grid, .service-item, .footer-grid, .areas, .form-grid { grid-template-columns: 1fr; }
    .hero { padding-top: 56px; }
    .service-item.reverse .service-body { order: 0; }
    .featured-grid, .card-grid, .card-grid-3, .gallery { grid-template-columns: 1fr; }
    .featured-grid .card.is-large { grid-column: auto; grid-row: auto; }
    .meta-row { grid-template-columns: 1fr 1fr; }
    .post-rows a { grid-template-columns: 1fr; }
    .cta { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
    .form-card { padding: 24px; }
    .section { padding: 56px 0; }
}
