/* ============================================================
   CoopHVN — Vietnam Halal Cooperative
   Static multilingual site (VI/EN/MS/AR) with light/dark theme
   Design language ported from HVN landing (chungnhan.halalvietnam.vn)
   — same typography/spacing/component style, CoopHVN palette:
   deep field-green + bright sun-gold from the CoopHVN logo.
   ============================================================ */

:root {
  /* Greens — from the logo's fields/crops */
  --green-900: #0B3D22;
  --green-800: #0E5230;
  --green-700: #15703D;
  --green-600: #1B8A4A;
  --green-500: #22A458;
  --green-100: #D7EDDD;
  --green-50:  #EEF7F0;

  /* Sun golds — brighter, warmer than the old ochre (per logo rays) */
  --gold-700: #B7791F;   /* text-safe amber on light bg */
  --gold:     #F0A92C;   /* primary CTA */
  --gold-soft:#F7CE63;   /* highlights on dark green */
  --gold-50:  #FDF4DF;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: var(--green-50);
  --border: #DFEAE1;
  --text: #14231a;
  --text-soft: #47584D;
  --brand: var(--green-700);
  --brand-strong: var(--green-900);
  --accent: var(--gold-700);

  --shadow: 0 10px 30px -12px rgba(11, 61, 34, 0.18);
  --shadow-soft: 0 4px 16px -8px rgba(11, 61, 34, 0.12);
  --radius: 16px;
  --header-h: 72px;
  --maxw: 1152px;

  --font-head: "Merriweather Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-ar: "Amiri", "Noto Sans Arabic", serif;
}

html[data-theme="dark"] {
  --bg: #0C1510;
  --surface: #122019;
  --surface-2: #17291F;
  --border: #24402F;
  --text: #EAF3EC;
  --text-soft: #A9BCae;
  --brand: var(--green-500);
  --brand-strong: #8CE3AC;
  --accent: var(--gold-soft);
  --shadow: 0 8px 26px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html { font-size: 17px; } /* PC: chữ to hơn mặc định 16px */

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500; /* Be Vietnam Pro Medium — HT chê weight thường mảnh quá */
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

html[dir="rtl"] body { font-family: "Noto Sans Arabic", var(--font-body); }

h1, h2, h3, h4 { font-family: var(--font-head); }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 { font-family: var(--font-ar); }

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Dotted texture for dark-green surfaces (HVN pattern-dots) */
.pattern-dots {
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ---------------- Top bar (bismillah — ecosystem signature) ---------------- */
.top-bar { background: var(--green-900); color: #D7EDDD; font-size: 12.5px; letter-spacing: .02em; }
.top-bar-inner { height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top-bar .bismillah { font-family: var(--font-ar); color: var(--gold-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-bar .top-links { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.top-bar a { color: #D7EDDD; font-weight: 600; }
.top-bar a:hover { color: #fff; }
.top-bar .dot { opacity: .45; }
@media (max-width: 720px) { .top-bar .top-links .hide-sm { display: none; } }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); }
.brand-logo { width: 46px; height: 46px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-head); font-size: 1.08rem; font-weight: 800; color: var(--brand-strong); letter-spacing: .3px; }
.brand-text small { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--text-soft); }

.top-nav { display: flex; gap: 4px; margin-inline-start: auto; flex-wrap: wrap; }
.top-nav a {
  padding: 8px 12px; border-radius: 10px; color: var(--text-soft);
  font-weight: 600; font-size: .9rem; transition: .15s;
}
.top-nav a:hover { background: var(--surface-2); color: var(--brand); }
.top-nav a.active { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }

/* Căn cụm nút sát lề phải — không dính vào logo khi top-nav ẩn (mobile) */
.header-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.top-nav + .header-tools, nav.top-nav ~ .header-tools { margin-inline-start: 0; }
@media (max-width: 720px) { .header-tools { margin-inline-start: auto !important; } }
.lang-switch { display: flex; gap: 2px; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer; color: var(--text-soft);
  font-weight: 700; font-size: .78rem; padding: 5px 8px; border-radius: 8px; transition: .15s;
}
.lang-switch button.active { background: var(--brand); color: #fff; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); cursor: pointer; display: grid; place-items: center;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .ic-sun { display: none; }
html[data-theme="dark"] .icon-btn .ic-moon { display: none; }
html[data-theme="dark"] .icon-btn .ic-sun { display: block; }

/* Lang dropdown (khuôn Lumina) */
.lang-wrap { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-soft); font: inherit; font-weight: 700; font-size: .8rem; cursor: pointer;
}
.lang-btn svg { width: 17px; height: 17px; }
.lang-btn .chev { width: 12px; height: 12px; transition: transform .15s; }
.lang-wrap.open .lang-btn .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 170px; z-index: 80;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; display: none;
}
.lang-wrap.open .lang-menu { display: block; }
.lang-menu a {
  display: block; padding: 9px 12px; border-radius: 8px; color: var(--text);
  font-weight: 600; font-size: .9rem;
}
.lang-menu a:hover { background: var(--surface-2); }
.lang-menu a.active { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }

/* ---------------- Sections (HVN rhythm: generous, alternating) ------------ */
section { padding: 84px 0; scroll-margin-top: var(--header-h); }
section.soft { background: var(--surface-2); }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.sec-kicker {
  display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .25em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.sec-title {
  font-size: clamp(1.6rem, 3.4vw, 2.35rem); margin: 0 0 10px; color: var(--brand-strong);
  line-height: 1.18; font-weight: 800; text-wrap: balance;
}
.sec-sub { color: var(--text-soft); margin: 0; font-size: 1.02rem; }

/* ---------------- Page banner (inner pages) ---------------- */
.page-banner {
  color: #fff; text-align: center; position: relative; overflow: hidden;
  background:
    radial-gradient(900px 360px at 50% -20%, rgba(34,164,88,.5), transparent),
    linear-gradient(160deg, var(--green-900), var(--green-700));
  padding: 60px 0;
}
.page-banner::before { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 22px 22px; opacity: .5; }
.page-banner .wrap { position: relative; }
.page-banner h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 4.2vw, 2.6rem); font-weight: 800; }
.page-banner p { margin: 0 auto; max-width: 640px; opacity: .92; font-size: 1.02rem; }

/* ---------------- Prose block ---------------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h3 { color: var(--brand-strong); margin: 28px 0 8px; font-size: 1.22rem; font-weight: 800; }
.prose h3:first-child { margin-top: 0; }
.prose p { color: var(--text-soft); margin: 0 0 6px; }
.prose .bullets { margin: 0; padding-inline-start: 20px; color: var(--text-soft); }
.prose .bullets li { margin-bottom: 8px; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; color: #fff; text-align: center; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(34,164,88,.6), transparent),
    linear-gradient(160deg, var(--green-900) 0%, var(--green-700) 78%, var(--green-600) 100%);
  padding: 92px 0 84px;
}
.hero::before { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.13) 1px, transparent 1px); background-size: 22px 22px; opacity: .55; }
.hero::after { content: ""; position: absolute; top: -140px; inset-inline-end: -140px; width: 460px; height: 460px;
  border-radius: 50%; background: rgba(247,206,99,.14); filter: blur(70px); }
.hero .wrap { position: relative; z-index: 1; }
.hero-logo { width: 104px; height: 104px; margin: 0 auto 18px; object-fit: contain;
  background: rgba(255,255,255,.94); border-radius: 24px; padding: 10px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 8px; letter-spacing: .5px; font-weight: 800; line-height: 1.12; }
.hero .hero-sub { font-family: var(--font-head); font-size: clamp(1rem, 2.4vw, 1.35rem); font-weight: 700; color: var(--gold-soft); margin: 0 0 18px; }
.hero .hero-lead { max-width: 780px; margin: 0 auto 30px; opacity: .95; font-size: 1.07rem; text-wrap: balance; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; justify-content: center; flex-wrap: wrap; margin-top: 48px; }
.hero-stats .stat strong { display: block; font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; color: #fff; }
.hero-stats .stat strong .plus { color: var(--gold-soft); }
.hero-stats .stat span { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; opacity: .85; }

/* ---------------- Buttons (HVN: rounded-xl, shadowed, lift on hover) ------ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 12px;
  font-weight: 700; font-size: .95rem; cursor: pointer; border: 1px solid transparent; transition: .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #201700; box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 14px 34px -12px rgba(11,61,34,.35); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.45); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.65); }

/* ---------------- Cards / grids ---------------- */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-soft); transition: .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.card .card-ico { font-size: 1.7rem; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 1.08rem; font-weight: 800; color: var(--brand-strong); }
.card p { margin: 0; color: var(--text-soft); font-size: .95rem; }

.lead-block { max-width: 820px; margin: 0 auto; }
.lead-block p { font-size: 1.06rem; color: var(--text-soft); margin: 0 0 16px; }
.quote {
  border-inline-start: 4px solid var(--gold); background: var(--surface); border-radius: 12px;
  padding: 18px 22px; font-family: var(--font-head); font-size: 1.12rem; font-weight: 700;
  color: var(--brand-strong); box-shadow: var(--shadow-soft);
}

/* Vision / Mission split */
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.vm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-soft); }
.vm-card h3 { color: var(--accent); font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; margin: 0 0 12px; }
.vm-card p, .vm-card li { color: var(--text-soft); }
.vm-card ul { margin: 0; padding-inline-start: 18px; }
.vm-card ul li { margin-bottom: 8px; }

/* Value chain steps */
.chain { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; counter-reset: step; }
.chain .step {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 14px;
  text-align: center; box-shadow: var(--shadow-soft); position: relative; transition: .18s;
}
.chain .step:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.chain .step .num {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-600), var(--green-800)); color: #fff;
  display: grid; place-items: center; font-weight: 800; margin: 0 auto 10px;
}
/* Certification is the ecosystem's pivot step — gold ring like HVN's step 04–05 highlight */
.chain .step:nth-child(4) { border: 2px solid var(--gold); }
.chain .step:nth-child(4) .num { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #201700; }
.chain .step h4 { margin: 0; font-size: .92rem; font-weight: 800; color: var(--brand-strong); }

/* News cards */
.news-grid { max-width: 980px; margin: 0 auto; }
.news-card h3 { font-size: 1.05rem; line-height: 1.45; }
.news-card h3 a { color: var(--brand-strong); }
.news-card h3 a:hover { color: var(--brand); }
.news-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; font-size: .74rem; }
.news-source { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.news-date { color: var(--text-soft); }
.news-more { display: inline-block; margin-top: 12px; font-weight: 700; font-size: .88rem; }

/* Partners */
.partner-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.partner-tags .tag {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 9px 18px; font-weight: 700; color: var(--brand-strong); font-size: .9rem; box-shadow: var(--shadow-soft);
}
.partner-tags .tag small { display: block; font-weight: 500; color: var(--text-soft); font-size: .72rem; }

/* ---------------- Responsive table -> cards ---------------- */
.rtable-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-soft); border: 1px solid var(--border); }
table.rtable { width: 100%; border-collapse: collapse; background: var(--surface); min-width: 560px; }
table.rtable thead { background: linear-gradient(135deg, var(--green-700), var(--green-900)); color: #fff; }
table.rtable th, table.rtable td { padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--border); }
table.rtable th { font-size: .9rem; letter-spacing: .3px; }
table.rtable td { color: var(--text-soft); font-size: .95rem; }
table.rtable tbody tr:last-child td { border-bottom: 0; }
table.rtable td[data-col="0"] { font-weight: 700; color: var(--brand-strong); }

/* ---------------- Contact ---------------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-soft); }
.contact-card h3 { margin: 0 0 14px; font-weight: 800; color: var(--brand-strong); }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); align-items: flex-start; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .ico { font-size: 1.15rem; }
.contact-list a { color: var(--text); }
.legal-note { font-size: .86rem; color: var(--text-soft); margin-top: 14px; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--green-900); color: #D7EDDD; padding: 48px 0 96px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 56px; height: 56px; object-fit: contain; background: rgba(255,255,255,.95); border-radius: 14px; padding: 6px; }
.footer-brand p { margin: 0; font-family: var(--font-head); font-weight: 700; color: var(--gold-soft); }
.footer-partners { display: flex; gap: 16px; justify-content: flex-end; align-items: center; }
.footer-partners img { height: 48px; width: auto; object-fit: contain; background: #fff; border-radius: 12px; padding: 6px; }
.footer-copy { grid-column: 1 / -1; text-align: center; font-size: .82rem; opacity: .8; margin: 14px 0 0; border-top: 1px solid rgba(255,255,255,.14); padding-top: 16px; }

/* ---------------- Floating actions (call / Zalo / WhatsApp) ---------------- */
.fab-stack {
  position: fixed; inset-inline-end: 14px; bottom: 22px; z-index: 70;
  display: flex; flex-direction: column; gap: 10px;
}
.fab {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: .7rem; letter-spacing: .02em;
  box-shadow: 0 10px 24px -8px rgba(11, 61, 34, .45); transition: .18s;
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(11, 61, 34, .5); }
.fab svg { width: 22px; height: 22px; }
.fab-call { background: linear-gradient(135deg, var(--green-600), var(--green-800)); }
.fab-zalo { background: #0068FF; }
.fab-wa   { background: #25D366; }
@media (prefers-reduced-motion: reduce) { .fab { transition: none; } }

/* ---------------- Mobile bottom nav ---------------- */
.bottom-nav { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .chain { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-partners { justify-content: flex-start; }
}

@media (max-width: 720px) {
  /* Chữ to hơn trên mobile cho người lớn tuổi dễ đọc (mọi cỡ rem scale theo) */
  html { font-size: 18.5px; }
  body { line-height: 1.7; }

  /* Hide desktop top nav, show bottom app-nav */
  .top-nav { display: none; }
  .brand-text small { display: none; }

  section { padding: 52px 0; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .vm-grid { grid-template-columns: 1fr; }
  .chain { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  body { padding-bottom: 72px; }

  /* --- Turn tables into stacked cards --- */
  .rtable-wrap { overflow: visible; box-shadow: none; border: 0; }
  table.rtable { min-width: 0; background: transparent; }
  table.rtable thead { display: none; }
  table.rtable tr {
    display: block; background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 8px 16px; margin-bottom: 14px; box-shadow: var(--shadow-soft);
  }
  table.rtable td {
    display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dashed var(--border);
    padding: 10px 0; text-align: end;
  }
  table.rtable tr td:last-child { border-bottom: 0; }
  table.rtable td::before {
    content: attr(data-label); font-weight: 700; color: var(--brand-strong);
    text-align: start; flex: 0 0 42%;
  }
  table.rtable td[data-col="0"] { font-size: 1.02rem; }

  /* Mobile app-style bottom navigation */
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(12px); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
    box-shadow: 0 -8px 24px -12px rgba(11, 61, 34, .18);
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--text-soft); font-size: .58rem; font-weight: 700; padding: 4px 2px; border-radius: 10px;
    white-space: nowrap;
  }
  .bottom-nav a .bn-ico { line-height: 1; display: grid; place-items: center; }
  .bottom-nav a .bn-ico svg { width: 21px; height: 21px; }
  .bottom-nav a.active { color: var(--brand); }
  .bottom-nav a.active .bn-ico { transform: translateY(-1px); }

  /* FAB nổi lên trên bottom nav, không che nội dung góc phải */
  .fab-stack { bottom: calc(86px + env(safe-area-inset-bottom)); inset-inline-end: 12px; }
  .fab { width: 44px; height: 44px; }
}

@media (max-width: 380px) {
  .chain { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .chain .step { transition: none; }
}

/* RTL tweaks */
html[dir="rtl"] .top-nav { margin-inline-start: 0; margin-inline-end: auto; }
html[dir="rtl"] .hero-stats .stat, html[dir="rtl"] .sec-head { direction: rtl; }

/* ============================================================
   STATIC REBUILD 2026-07-20 — section màu kể chuyện + form + eco
   ============================================================ */

/* Lang switch giờ là link tĩnh */
.lang-switch a {
  display: inline-block; color: var(--text-soft); font-weight: 700; font-size: .78rem;
  padding: 5px 8px; border-radius: 8px; transition: .15s;
}
.lang-switch a.active { background: var(--brand); color: #fff; }
.lang-switch a:hover:not(.active) { background: color-mix(in srgb, var(--brand) 12%, transparent); }

/* Section nền đậm (quy trình / chuỗi giá trị) */
.sec-dark {
  position: relative; overflow: hidden; color: #D7EDDD;
  background: linear-gradient(155deg, var(--green-900) 0%, var(--green-800) 100%);
}
.sec-dark::before { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.1) 1px, transparent 1px); background-size: 22px 22px; }
.sec-dark .wrap { position: relative; }
.sec-dark .sec-title, .sec-dark h3, .sec-dark h4 { color: #fff; }
.sec-dark .sec-kicker { color: var(--gold-soft); }
.sec-dark .sec-sub, .sec-dark p { color: #C6E2CE; }
.sec-dark .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); box-shadow: none; }
.sec-dark .card p { color: #C6E2CE; }
.sec-dark .card:hover { background: rgba(255,255,255,.1); }
.sec-dark .chain .step { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); }
.sec-dark .chain .step h4 { color: #fff; }
.sec-dark .chain .step:nth-child(4) { border-color: var(--gold); }

/* Section nền vàng nắng (cam kết / CTA) */
.sec-gold {
  background: linear-gradient(155deg, var(--gold-soft) 0%, var(--gold) 100%);
  color: #3D2F00;
}
.sec-gold h2 { color: #2E2300; font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 800; margin: 0 0 12px; text-wrap: balance; }
.sec-gold p { color: #503E00; max-width: 640px; }
.cta-final { text-align: center; }
.cta-final p { margin: 0 auto 24px; }

/* Nút bổ sung */
.btn-solid { background: linear-gradient(135deg, var(--green-600), var(--green-800)); color: #fff; box-shadow: var(--shadow-soft); }
.btn-solid:hover { filter: brightness(1.06); }
.btn-dark { background: var(--green-900); color: #fff; box-shadow: 0 10px 24px -10px rgba(11,61,34,.5); }
.btn-dark:hover { filter: brightness(1.1); }
.btn-ghost-dark { background: transparent; color: #3D2F00; border-color: rgba(61,47,0,.45); }
.btn-ghost-dark:hover { background: rgba(61,47,0,.08); }

/* Số bước quy trình */
.num-badge {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #201700;
  font-weight: 800; font-size: 1.05rem; margin-bottom: 12px;
}

/* Chính sách A/B/C */
.abc { margin-top: 30px; }
.abc-head {
  text-align: center; font-weight: 800; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 16px;
}
section:not(.sec-dark) .abc-head { color: var(--accent); }
.abc-item {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 6px;
}
section:not(.sec-dark) .abc-item { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-soft); }
.abc-item strong { color: var(--gold-soft); font-size: .95rem; }
section:not(.sec-dark) .abc-item strong { color: var(--accent); }
.abc-item span { font-size: .88rem; line-height: 1.55; }

/* Hệ sinh thái 3 card */
.eco-card { display: flex; flex-direction: column; }
.eco-step { font-size: .7rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.eco-link { margin-top: auto; padding-top: 12px; font-weight: 700; font-size: .88rem; }
.eco-card-self { border: 2px solid var(--gold); }
.eco-note { text-align: center; max-width: 760px; margin: 26px auto 0; font-size: .92rem; color: var(--text-soft); }
.net-tag { font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }

/* Thư ngỏ */
.letter p { margin-bottom: 14px; }
.letter-sign { text-align: end; color: var(--brand-strong); margin-top: 20px; }

/* Footer links */
.footer-links { grid-column: 1 / -1; text-align: center; font-size: .88rem; }
.footer-links a { color: #D7EDDD; font-weight: 600; }
.footer-links a:hover { color: var(--gold-soft); }
.footer-links .dot { opacity: .5; margin: 0 4px; }

/* Form liên hệ */
#coop-form { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
#coop-form .f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#coop-form input, #coop-form select, #coop-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: .93rem; outline: none; transition: .15s;
}
#coop-form input:focus, #coop-form select:focus, #coop-form textarea:focus {
  border-color: var(--green-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-600) 15%, transparent);
}
#coop-form .f-submit { width: 100%; justify-content: center; }
.form-status { min-height: 20px; font-size: .85rem; font-weight: 600; }
.form-status.is-ok { color: var(--green-600); }
.form-status.is-error { color: #C0392B; }
@media (max-width: 560px) { #coop-form .f-row { grid-template-columns: 1fr; } }

/* Trang chủ: news teaser 3 cột */
.news-grid-home .news-card h3 { font-size: .98rem; }

/* Landing ngôn ngữ: không bottom-nav */
.lang-page { padding-bottom: 0 !important; }

/* ============================================================
   AVA TƯ VẤN GÓC TRÁI + POPUP FORM (khuôn .fab-story của Lumina:
   nhún RẤT NHẸ, không vòng sóng — nảy mạnh trông như widget quảng cáo)
   ============================================================ */
.ava-fab {
  position: fixed; inset-inline-start: 14px; bottom: 22px; z-index: 68;
  width: 58px; height: 58px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2.5px solid var(--gold-soft); background: #fff;
  box-shadow: 0 6px 20px rgba(11, 61, 34, .32);
  animation: avaBob 3.4s ease-in-out infinite; transition: transform .25s;
}
.ava-fab img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.ava-fab:hover { transform: scale(1.07); animation-play-state: paused; }
@keyframes avaBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .ava-fab { animation: none; } }
@media (max-width: 720px) {
  .ava-fab { bottom: calc(86px + env(safe-area-inset-bottom)); inset-inline-start: 12px; width: 52px; height: 52px; }
}

/* Popup */
.modal { position: fixed; inset: 0; z-index: 90; opacity: 0; transition: opacity .25s ease; }
.modal[hidden] { display: none !important; }
.modal.show { opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 20, 12, .58); }
.modal-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 32px)); max-height: min(86vh, 640px); overflow-y: auto;
  background: var(--surface); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.35);
  padding: 22px;
}
.modal-close {
  position: absolute; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-soft); cursor: pointer; display: grid; place-items: center;
}
.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { background: var(--surface-2); }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-inline-end: 40px; }
.modal-head img { border-radius: 50%; border: 2px solid var(--gold-soft); }
.modal-head strong { display: block; font-family: var(--font-head); font-weight: 800; color: var(--brand-strong); }
.modal-head span { font-size: .85rem; color: var(--text-soft); line-height: 1.5; }
.modal-card form { display: flex; flex-direction: column; gap: 11px; }
.modal-card form .f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.modal-card form input, .modal-card form textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: .92rem; outline: none;
}
.modal-card form input:focus, .modal-card form textarea:focus {
  border-color: var(--green-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-600) 15%, transparent);
}
@media (max-width: 480px) { .modal-card form .f-row { grid-template-columns: 1fr; } }

/* ============================================================
   REVEAL KHI CUỘN — chỉ kích hoạt khi html có class "js"
   (site.js gắn class; JS chết thì mọi thứ hiện bình thường)
   ============================================================ */
html.js .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
html.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}


/* ============================================================
   ENRICH 2026-07-20 — breakdown CSDL, khung ảnh chờ thay, hoạt động
   ============================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; max-width: 1000px; margin: 0 auto; }
.stat-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 12px; text-align: center; box-shadow: var(--shadow-soft);
}
.stat-box strong { display: block; font-family: var(--font-head); font-size: 1.55rem; font-weight: 800; color: var(--brand-strong); }
.stat-box span { display: block; margin-top: 4px; font-size: .78rem; color: var(--text-soft); line-height: 1.4; }
.src-note { text-align: center; max-width: 820px; margin: 22px auto 0; font-size: .82rem; color: var(--text-soft); }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* Khung ảnh chờ HT thay — có ghi size ngay trong khung */
.img-ph {
  display: grid; place-items: center; width: 100%;
  border: 2px dashed color-mix(in srgb, var(--green-600) 45%, var(--border));
  border-radius: var(--radius); background: color-mix(in srgb, var(--green-50) 60%, var(--surface));
  color: var(--text-soft); font-size: .85rem; font-weight: 600; text-align: center; padding: 12px;
}
html[data-theme="dark"] .img-ph { background: var(--surface-2); }

.act figcaption { margin-top: 10px; font-size: .88rem; color: var(--text-soft); line-height: 1.55; }
.act figcaption strong { color: var(--brand-strong); }
figure.act { margin: 0; }

/* Real photos in former placeholder frames (KXQ9Z-010) */
.ph-img { width: 100%; object-fit: cover; border-radius: var(--radius); display: block; }

/* Masonry — ảnh giữ nguyên tỷ lệ, không crop (KXQ9Z-011) */
.masonry { columns: 3; column-gap: 16px; }
@media (max-width: 900px) { .masonry { columns: 2; } }
@media (max-width: 560px) { .masonry { columns: 1; } }
.mas-item { break-inside: avoid; margin: 0 0 16px; }
.mas-img { width: 100%; height: auto; display: block; border-radius: var(--radius); }

/* Nút tròn ICA-AP — ngay trên ava chibi, cột trái (KXQ9Z ICAAP) */
.icaap-fab {
  position: fixed; inset-inline-start: 14px; bottom: 92px; z-index: 68;
  width: 58px; height: 58px; border-radius: 50%;
  border: 2.5px solid var(--gold-soft);
  background: linear-gradient(135deg, var(--green-700, #14532D), var(--green-900, #0B3D22));
  display: grid; place-items: center; text-decoration: none;
  box-shadow: 0 6px 20px rgba(11, 61, 34, .32);
  transition: transform .25s;
}
.icaap-fab span { color: #fff; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; }
.icaap-fab:hover { transform: scale(1.07); }
@media (max-width: 720px) {
  .icaap-fab { bottom: calc(148px + env(safe-area-inset-bottom)); inset-inline-start: 12px; width: 52px; height: 52px; }
  .icaap-fab span { font-size: 11px; }
}
