/* ==========================================================================
   An Gia – nền tảng giao diện trên theme VinaSite
   (token, chữ, header, menu mobile, footer, lưới bài viết, tương thích shim)
   Số đo lấy theo bản Flatsome cũ: container 1240px, header 96px (dính 72px),
   chữ Roboto 17.28px / tiêu đề Montserrat 700.
   ========================================================================== */

:root {
  --ag-900: #062f1c; --ag-800: #073b24; --ag-700: #0b5a33; --ag-500: #1e8a46;
  --ag-100: #e7f2eb; --ag-50: #f4f8f5;
  --ag-gold: #c9a14a; --ag-gold-2: #e3bd66;
  --ag-ink: #1f2d27; --ag-muted: #5b6b63;
  --ag-radius: 14px; --ag-shadow: 0 10px 30px rgba(7, 59, 36, .10);
  --ag-font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --ag-font-head: "Montserrat", "Roboto", Arial, sans-serif;
  --ag-container: 1240px;

  /* Token của theme cha → màu An Gia (dùng cho các trang render bằng template VinaSite). */
  --vs-primary: #0b5a33; --vs-primary-dark: #073b24; --vs-secondary: #1e8a46;
  --vs-accent: #c9a14a; --vs-accent-hover: #b08a36; --vs-gold-text: #8a6a24;
  --vs-text: #1f2d27; --vs-muted: #5b6b63;
  --vs-bg-light: #f4f8f5; --vs-bg-soft: #e7f2eb; --vs-border: #e3ece6;
  --vs-font: var(--ag-font);
  --vs-container: 1240px;
}

/* ---------- Nền & chữ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ag-site {
  margin: 0;
  background: #fff;
  color: var(--ag-ink);
  font-family: var(--ag-font);
  font-size: 17.28px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.ag-no-scroll { overflow: hidden; }
:where(.ag-site) img { max-width: 100%; height: auto; }
:where(.ag-site) a { color: var(--ag-700); text-decoration: none; transition: color .2s; }
:where(.ag-site) a:hover { color: var(--ag-500); }
:where(.ag-site) p { margin: 0 0 1.3em; }
:where(.ag-site) ul, :where(.ag-site) ol { margin: 0 0 1.3em 1.3em; padding: 0; }
:where(.ag-site) li { margin-bottom: .6em; }
:where(.ag-site) :is(h1, h2, h3, h4, h5, h6),
:where(.ag-site) .vs-scope :is(h1, h2, h3, h4) {
  font-family: var(--ag-font-head);
  font-weight: 700;
  color: var(--ag-800);
  line-height: 1.3;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}
:where(.ag-site) h1 { font-size: 1.7em; }
:where(.ag-site) h2 { font-size: 1.6em; }
:where(.ag-site) h3 { font-size: 1.25em; }
:where(.ag-site) h4 { font-size: 1.125em; }
:where(.ag-site) h5 { font-size: 1em; }
:where(.ag-site) h6 { font-size: .85em; }
:where(.ag-site) :is(strong, b) { font-weight: 700; }
:where(.ag-site) iframe { max-width: 100%; }
.ag-site .vs-scope { font-family: var(--ag-font); color: var(--ag-ink); }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.ag-skip-link { position: absolute; left: -9999px; top: 0; z-index: 9999; padding: 10px 16px; background: var(--ag-700); color: #fff !important; }
.ag-skip-link:focus { left: 10px; top: 10px; }

.ag-container { width: 100%; max-width: var(--ag-container); margin: 0 auto; padding: 0 15px; }

/* Icon điện thoại (thay icon font của Flatsome – nội dung trang vẫn dùng <i class="icon-phone">). */
.icon-phone {
  display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; font-style: normal;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ag-btn .icon-phone { width: 16px; height: 16px; }

/* ---------- Header ---------- */
.ag-header { position: relative; z-index: 300; height: 96px; }
.ag-header__main {
  position: relative; height: 96px; background: #fff;
  box-shadow: 0 2px 18px rgba(7, 59, 36, .08);
  transition: height .25s ease;
}
.ag-header.is-stuck .ag-header__main {
  position: fixed; top: 0; left: 0; right: 0; height: 72px;
  animation: agSlideDown .35s ease;
}
.admin-bar .ag-header.is-stuck .ag-header__main { top: 32px; }
@keyframes agSlideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.ag-header__inner { display: flex; align-items: center; height: 100%; }

.ag-logo { flex: none; display: flex; align-items: center; height: 100%; margin-right: 30px; }
.ag-logo img { display: block; width: auto; height: 93px; max-height: 100%; transition: height .25s ease; }
.ag-header.is-stuck .ag-logo img { height: 66px; }

.ag-nav { flex: 1 1 auto; display: flex; justify-content: flex-end; height: 100%; }
.ag-nav__list { display: flex; align-items: center; height: 100%; margin: 0; padding: 0; list-style: none; }
.ag-nav__list > li { position: relative; display: flex; align-items: center; height: 100%; margin: 0 13px; padding: 0; list-style: none; }
.ag-nav__list > li > a {
  position: relative; display: inline-flex; align-items: center; padding: 10px 0; white-space: nowrap;
  font-family: var(--ag-font-head); font-size: 16px; font-weight: 600; line-height: 18px; letter-spacing: .01em;
  color: var(--ag-800);
}
.ag-nav__list > li > a:hover, .ag-nav__list > li.active > a, .ag-nav__list > li:hover > a { color: var(--ag-500); }
.ag-nav__list > li.active > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 2px; background: var(--ag-gold);
}
.ag-caret { width: 16px; height: 16px; margin-left: 3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .6; }

/* Mục "Trang chủ" hiển thị icon ngôi nhà (menu desktop). */
.ag-nav__list > li.menu-item-home > a { font-size: 0; letter-spacing: 0; min-width: 24px; justify-content: center; }
.ag-nav__list > li.menu-item-home > a::before {
  content: ""; display: block; width: 22px; height: 22px; background: currentColor; transition: transform .2s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V20a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1V9.5'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V20a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1V9.5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ag-nav__list > li.menu-item-home > a:hover::before { transform: translateY(-2px); }

/* Menu con: mega menu 2 cột (Vệ sinh | Cây xanh) */
.ag-nav__list .sub-menu {
  position: absolute; top: 100%; left: 50%; z-index: 20; min-width: 280px; margin: 0; padding: 10px; list-style: none;
  background: #fff; border: 1px solid rgba(7, 59, 36, .08); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(6, 47, 28, .18), 0 4px 12px rgba(6, 47, 28, .06);
  opacity: 0; visibility: hidden; transform: translate(-50%, 10px); transition: opacity .22s, transform .22s, visibility .22s;
}
.ag-nav__list .sub-menu::before { /* mũi nhọn + vùng đệm hover */
  content: ""; position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px;
  background: #fff; border-left: 1px solid rgba(7, 59, 36, .08); border-top: 1px solid rgba(7, 59, 36, .08); transform: rotate(45deg); border-radius: 3px 0 0 0;
}
.ag-header.is-stuck .ag-nav__list .sub-menu { top: calc(100% - 12px); }
.ag-nav__list > li:hover > .sub-menu, .ag-nav__list > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.ag-nav__list .sub-menu li { margin: 0; padding: 0; list-style: none; }
.ag-nav__list .sub-menu.ag-mega {
  display: grid; grid-template-columns: repeat(2, 300px); grid-auto-flow: dense; column-gap: 8px; width: max-content; padding: 16px 14px 14px;
}
.ag-mega > .ag-sub--clean { grid-column: 1; }
.ag-mega > .ag-sub--green { grid-column: 2; }
.ag-mega__head {
  display: flex; align-items: center; gap: 8px; margin: 0 0 4px !important; padding: 4px 12px 8px !important;
  font-family: var(--ag-font-head); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ag-500);
}
.ag-mega__head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--ag-100), transparent); }
.ag-mega__head.ag-sub--green { color: #4f8a2a; }
.ag-nav__list .sub-menu li a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px;
  font-family: var(--ag-font); font-size: 16px; font-weight: 500; line-height: 1.3; color: var(--ag-ink);
  transition: background .18s, color .18s;
}
.ag-sub-ico {
  flex: 0 0 40px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  background: var(--ag-50); color: var(--ag-700); box-shadow: inset 0 0 0 1px rgba(30, 138, 70, .12);
  transition: background .18s, color .18s, transform .18s;
}
.ag-sub-ico svg { width: 21px; height: 21px; }
.ag-sub--green .ag-sub-ico { background: #f2f8ec; color: #4f8a2a; box-shadow: inset 0 0 0 1px rgba(79, 138, 42, .14); }
.ag-sub-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-sub-txt strong { font-weight: 600; }
.ag-sub-txt small { font-size: 13px; font-weight: 400; line-height: 1.35; color: var(--ag-muted); }
.ag-nav__list .sub-menu li a:hover, .ag-nav__list .sub-menu li.current-menu-item > a { background: var(--ag-50); color: var(--ag-700); }
.ag-nav__list .sub-menu li a:hover .ag-sub-ico, .ag-nav__list .sub-menu li.current-menu-item > a .ag-sub-ico { background: var(--ag-700); color: #fff; transform: scale(1.04); }
.ag-nav__list .sub-menu li.ag-sub--green a:hover .ag-sub-ico, .ag-nav__list .sub-menu li.ag-sub--green.current-menu-item > a .ag-sub-ico { background: #4f8a2a; }
.ag-mega__cta {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin: 10px 0 0 !important; padding: 12px 12px 12px 16px !important;
  border-radius: 12px; background: linear-gradient(100deg, var(--ag-800), var(--ag-500)); color: #fff;
}
.ag-mega__cta span { flex: 1; font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, .9); }
.ag-nav__list .sub-menu .ag-mega__cta a { flex: none; display: inline-flex; gap: 6px; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.ag-nav__list .sub-menu .ag-mega__cta .ag-mega__call { background: var(--ag-gold); color: #fff; }
.ag-nav__list .sub-menu .ag-mega__cta .ag-mega__call:hover { background: var(--ag-gold-2); color: #fff; }
.ag-nav__list .sub-menu .ag-mega__cta .ag-mega__quote { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.ag-nav__list .sub-menu .ag-mega__cta .ag-mega__quote:hover { background: #fff; color: var(--ag-700); }
.ag-mega__cta .ag-ico { width: 16px; height: 16px; }

.ag-header__divider { flex: none; width: 1px; height: 30px; margin: 0 7.5px; background: rgba(0, 0, 0, .1); }

/* Nút hotline (pill) */
.ag-site .ag-hotline {
  flex: none; display: inline-flex; align-items: center; gap: 10px; margin-left: 13px;
  padding: 7px 16px 7px 8px; border-radius: 999px; background: var(--ag-700); color: #fff;
  font-family: var(--ag-font-head); line-height: 1.1; box-shadow: 0 6px 16px rgba(11, 90, 51, .25);
  transition: background .2s, transform .2s;
}
.ag-site .ag-hotline:hover { background: var(--ag-800); color: #fff; transform: translateY(-1px); }
.ag-hotline .icon-phone {
  flex: none; width: 34px; height: 34px; border-radius: 50%; color: var(--ag-800);
  background: var(--ag-gold);
  -webkit-mask: none; mask: none; position: relative;
}
.ag-hotline .icon-phone::before {
  content: ""; position: absolute; inset: 9px; background: var(--ag-800);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ag-hotline > span { display: flex; flex-direction: column; }
.ag-hotline small { font-size: 11px; line-height: 1.15; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.ag-hotline strong { font-size: 16px; line-height: 1.15; letter-spacing: .02em; }
.ag-header.is-stuck .ag-hotline small { display: none; }
.ag-header.is-stuck .ag-hotline .icon-phone { width: 30px; height: 30px; }
.ag-header.is-stuck .ag-hotline .icon-phone::before { inset: 8px; }

/* Nút icon (menu, tìm kiếm) – chỉ hiện ở mobile */
.ag-icon-btn {
  display: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
  border: 0; background: none; color: rgba(102, 102, 102, .85); cursor: pointer;
}
.ag-icon-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ag-search__toggle svg { width: 19px; height: 19px; stroke-width: 2.4; }
.ag-search { position: relative; display: none; }
.ag-search__form {
  position: absolute; top: calc(100% + 14px); right: -8px; z-index: 30; display: none; width: 280px; padding: 12px;
  background: #fff; box-shadow: 1px 1px 15px rgba(0, 0, 0, .15); border-radius: 6px;
}
.ag-search.is-open .ag-search__form { display: flex; }
.ag-search__form input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #ddd; border-right: 0; border-radius: 4px 0 0 4px; font: inherit; font-size: 15px; }
.ag-search__form button { width: 44px; border: 0; border-radius: 0 4px 4px 0; background: var(--ag-gold); color: var(--ag-800); cursor: pointer; }
.ag-search__form button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* ---------- Menu mobile (off-canvas) ---------- */
.ag-offcanvas { position: fixed; inset: 0; z-index: 1000; visibility: hidden; }
.ag-offcanvas.is-open { visibility: visible; }
.ag-offcanvas__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .3s; }
.ag-offcanvas.is-open .ag-offcanvas__overlay { opacity: 1; }
.ag-offcanvas__panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: 260px; max-width: 85vw; overflow-y: auto; padding: 20px 0 30px;
  background: rgba(255, 255, 255, .97); box-shadow: 0 0 10px rgba(0, 0, 0, .3);
  transform: translateX(-100%); transition: transform .3s ease;
}
.ag-offcanvas.is-open .ag-offcanvas__panel { transform: none; }
.ag-offcanvas__close {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; padding: 8px; border: 0; background: none; color: #fff; cursor: pointer;
}
.ag-offcanvas__close svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ag-mnav { margin: 0; padding: 0; list-style: none; }
.ag-mnav li { position: relative; margin: 0; padding: 0; list-style: none; border-top: 1px solid #ececec; }
.ag-mnav > li:first-child { border-top: 0; }
.ag-mnav li a { display: block; padding: 15px 50px 15px 20px; font-family: var(--ag-font); font-size: 17px; font-weight: 500; line-height: 1.3; color: rgba(17, 17, 17, .85); }
.ag-mnav li.active > a, .ag-mnav li a:hover { color: var(--ag-700); }
.ag-mnav .ag-caret { display: none; }
.ag-sub-toggle {
  position: absolute; top: 4px; right: 6px; width: 40px; height: 40px; padding: 10px; border: 0; background: none; color: rgba(17, 17, 17, .7); cursor: pointer;
}
.ag-sub-toggle svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.ag-mnav li.is-open > .ag-sub-toggle svg { transform: rotate(180deg); }
.ag-mnav .sub-menu { display: none; margin: 0; padding: 0 0 8px; list-style: none; }
.ag-mnav li.is-open > .sub-menu { display: block; }
.ag-mnav .sub-menu li { border-top: 0; }
.ag-mnav .sub-menu li a { padding: 9px 20px 9px 34px; font-size: 16px; font-weight: 400; color: rgba(17, 17, 17, .7); }
.ag-site .ag-hotline--block { display: flex; margin: 20px 20px 0; justify-content: flex-start; }

/* ---------- Footer ---------- */
.ag-site-footer { position: relative; }
.ag-footer { padding: 56px 0; background: var(--ag-800); color: rgba(255, 255, 255, .82); border-top: 3px solid var(--ag-gold); }
.ag-footer__grid { display: grid; grid-template-columns: 4fr 3fr 2fr 3fr; gap: 0; max-width: 1270px; padding: 0; }
.ag-footer__col { padding: 0 15px 30px; min-width: 0; }
.ag-footer .ag-foot-brand { display: inline-block; margin-bottom: 16px; padding: 10px 14px; border-radius: 14px; background: #fff; }
.ag-footer .ag-foot-brand img { display: block; width: 120px; }
.ag-footer .ag-foot-name { margin: 0 0 10px; font-family: var(--ag-font); font-size: 15px; font-weight: 700; line-height: 1.5; color: #f1f1f1; }
.ag-footer .ag-foot-contact, .ag-footer .ag-foot-links { margin: 0 0 0 1.3em; padding: 0; list-style: none; }
.ag-footer .ag-foot-links { margin-left: 0; }
.ag-footer .ag-foot-contact li, .ag-footer .ag-foot-links li { margin: 0 0 9px; padding: 0; list-style: none; font-size: 15px; line-height: 24px; color: rgba(255, 255, 255, .82); }
.ag-footer .ag-foot-contact strong { color: var(--ag-gold-2); font-weight: 600; }
.ag-footer a { color: rgba(255, 255, 255, .85); }
.ag-footer a:hover { color: var(--ag-gold-2); }
.ag-footer .ag-foot-links li a::before { content: "›"; margin-right: 8px; color: var(--ag-gold); font-weight: 700; }
.ag-foot-title {
  display: flex; margin: 0 0 24px; border-bottom: 2px solid rgba(255, 255, 255, .2);
  font-family: var(--ag-font-head); font-size: 21.6px; font-weight: 700; line-height: 1.3; color: var(--ag-gold-2);
}
.ag-site .ag-foot-title { color: var(--ag-gold-2); margin-bottom: 24px; font-size: 21.6px; }
.ag-foot-title span { display: inline-block; margin-bottom: -2px; padding-bottom: 7.5px; border-bottom: 2px solid rgba(255, 255, 255, .2); }
.ag-foot-map iframe { display: block; width: 100%; height: 220px; border-radius: 12px; }

.absolute-footer { padding: 10px 0 15px; background: var(--ag-900); color: rgba(255, 255, 255, .5); font-size: 15.552px; line-height: 1.6; text-align: center; }
.absolute-footer a { color: var(--ag-gold-2); }
.absolute-footer a:hover { color: #fff; }

.ag-totop {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; place-items: center; width: 42px; height: 42px;
  border: 2px solid var(--ag-ink); border-radius: 999px; background: transparent; color: var(--ag-ink);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .3s, transform .3s, visibility .3s, background .2s;
}
.ag-site .ag-totop { color: var(--ag-ink); }
.ag-totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.ag-site .ag-totop:hover { background: var(--ag-ink); color: #fff; }
.ag-totop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Tương thích shim [section] của VinaSite ---------- */
.ag-site .vs-ux-section { font-family: inherit; color: inherit; position: relative; }
:where(.vs-ux-section[class*="ag-"]) > .vs-container { max-width: none; padding-inline: 0; }
/* wpautop chèn <br>/<p> rỗng giữa các [section] → tạo khe trắng giữa các khối. */
.ag-home > br, .ag-home > p:empty, .vs-ux-section + br, .vs-ux-section p:empty { display: none; }
.ag-ux-html iframe { display: block; width: 100%; border: 0; }

/* ---------- Lưới / slider bài viết ([blog_posts]) ---------- */
.ag-postgrid { --cols: 3; position: relative; }
.ag-postgrid--grid { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.ag-postgrid .post-item { width: calc(100% / var(--cols)); padding: 0 15px 30px; margin: 0; }
.ag-cols-1 { --cols: 1; } .ag-cols-2 { --cols: 2; } .ag-cols-3 { --cols: 3; } .ag-cols-4 { --cols: 4; }
@media (max-width: 849px) { .ag-cols-md-1 { --cols: 1; } .ag-cols-md-2 { --cols: 2; } .ag-cols-md-3 { --cols: 3; } }
@media (max-width: 549px) { .ag-cols-sm-1 { --cols: 1; } .ag-cols-sm-2 { --cols: 2; } }
.ag-postgrid--slider:not(.flickity-enabled) { display: flex; overflow: hidden; }
.ag-postgrid--slider:not(.flickity-enabled) .post-item { flex: none; }
.ag-postgrid .col-inner { display: flex; width: 100%; height: 100%; }
.ag-postgrid a.plain { display: flex; width: 100%; color: inherit; }
.ag-postgrid .box-blog-post { display: flex; flex-direction: column; width: 100%; overflow: hidden; background: #fff; border-radius: 18px; border: 1px solid #e3ece6; box-shadow: 0 6px 18px rgba(7, 59, 36, .06); transition: transform .3s, box-shadow .3s; }
.ag-postgrid .box-blog-post:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(7, 59, 36, .14); }
.ag-postgrid .box-image { position: relative; flex: none; width: 100%; }
.ag-postgrid .box-image::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(6, 47, 28, 0) 55%, rgba(6, 47, 28, .35) 100%); }
.ag-postgrid .image-cover { position: relative; height: 0; overflow: hidden; background: var(--ag-100); }
.ag-postgrid .image-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.ag-postgrid .box-blog-post:hover .image-cover img { transform: scale(1.06); }
.ag-postgrid .box-text { flex: 1; display: flex; flex-direction: column; padding: 20px 22px 22px; }
.ag-postgrid .blog-post-inner { flex: 1; display: flex; flex-direction: column; }
.ag-site .ag-postgrid .post-title { margin: 0; min-height: 4.35em; font-family: var(--ag-font-head); font-size: 17px; font-weight: 700; line-height: 1.45; color: var(--ag-800); transition: color .2s; }
.ag-postgrid .box-blog-post:hover .post-title { color: var(--ag-500); }
.ag-postgrid .is-divider { width: 100%; max-width: 40px; height: 2px; margin: 12px 0; background: var(--ag-gold); }
.ag-site .ag-postgrid .from_the_blog_excerpt { flex: 1; min-height: 4.8em; margin: 0; font-size: 15.552px; line-height: 1.6; color: #555; }
.ag-postgrid .blog-post-inner::after {
  content: "Đọc tiếp  →"; display: inline-block; width: 100%; margin-top: 16px; padding-top: 12px; border-top: 1px dashed #d7e6dc;
  font-size: 14px; font-weight: 700; color: var(--ag-700); transition: color .2s, letter-spacing .2s;
}
.ag-postgrid .box-blog-post:hover .blog-post-inner::after { color: var(--ag-gold); letter-spacing: .02em; }
/* Slider: mỗi ô có lề dưới cho bóng đổ; KHÔNG đặt height:100% (Flickity sẽ đo ra 0). */
.ag-postgrid--slider .post-item { padding-bottom: 34px; }
.ag-postgrid--slider .flickity-slider > .post-item { display: flex; }
.ag-postgrid .flickity-prev-next-button {
  top: calc(50% - 17px); width: 46px; height: 46px; margin-top: -23px; padding: 0; transform: none; z-index: 3;
  border-radius: 50%; background: #fff; color: var(--ag-700); box-shadow: 0 8px 20px rgba(7, 59, 36, .18); transition: background .2s, color .2s;
}
.ag-postgrid .flickity-prev-next-button:hover { background: var(--ag-700); color: #fff; }
.ag-postgrid .flickity-prev-next-button .flickity-button-icon { left: 31%; top: 31%; width: 38%; height: 38%; fill: currentColor; }
.ag-postgrid .flickity-prev-next-button.previous { left: -22px; }
.ag-postgrid .flickity-prev-next-button.next { right: -22px; }
.ag-postgrid .flickity-page-dots { position: static; display: flex; justify-content: center; gap: 8px; margin: 4px 0 0; }
.ag-postgrid .flickity-page-dots .dot { width: 10px; height: 10px; margin: 0; border-radius: 99px; background: #cfdcd4; opacity: 1; transition: width .3s, background .3s; }
.ag-postgrid .flickity-page-dots .dot.is-selected { width: 28px; background: var(--ag-gold); }
.ag-more { margin-top: 24px; text-align: center; }


/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ag-nav__list > li { margin: 0 9px; }
  .ag-nav__list > li > a { font-size: 15px; }
}
@media (max-width: 1023px) {
  .ag-header, .ag-header__main { height: 70px; }
  .ag-header.is-stuck .ag-header__main { height: 70px; }
  .ag-header__inner { position: relative; justify-content: space-between; }
  .ag-icon-btn { display: inline-flex; }
  .ag-search { display: block; }
  .ag-nav, .ag-header__divider, .ag-header__inner > .ag-hotline { display: none; }
  .ag-logo { position: absolute; left: 50%; top: 0; margin: 0; transform: translateX(-50%); }
  .ag-logo img, .ag-header.is-stuck .ag-logo img { height: 70px; }
}
@media (max-width: 849px) {
  .ag-footer__grid { grid-template-columns: 1fr 1fr; }
  .ag-footer__col--brand, .ag-footer__col:last-child { grid-column: 1 / -1; }
  .ag-totop { display: none; }
  .ag-postgrid .flickity-prev-next-button.previous { left: -6px; }
  .ag-postgrid .flickity-prev-next-button.next { right: -6px; }
}
@media (max-width: 549px) {
  .ag-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-header.is-stuck .ag-header__main { animation: none; }
}

/* Menu mobile: tiêu đề nhóm trong menu con */
.ag-mnav .sub-menu .ag-mega__head { margin: 0 !important; padding: 12px 20px 4px 34px !important; font-family: var(--ag-font-head); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ag-500); }
