/* ==========================================================================
   An Gia – trang con (trang/bài viết/chuyên mục render bằng template VinaSite)
   ========================================================================== */

/* Trang mặc định (giống Flatsome: khung 1240px, cách trên/dưới 30px) */
.ag-page { padding: 30px 0 40px; }
.ag-page .vs-ux-row { gap: 30px; margin-bottom: 0; }
.ag-page .vs-ux-col { flex: 1 1 calc((var(--vs-span, 12) / 12 * 100%) - 30px); }
.ag-page h1 { font-size: 1.7em; }
.ag-ux-html iframe, .ag-page iframe { display: block; width: 100%; max-width: 100%; border: 0; border-radius: 12px; }

/* Form liên hệ (Contact Form 7) – kiểu "form-flat" như bản Flatsome */
.wpcf7 p { margin: 0; }
.wpcf7 form br { display: none; }
.wpcf7 .wpcf7-form-control-wrap { display: block; margin-bottom: 14px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 input[type="number"], .wpcf7 textarea, .wpcf7 select {
  width: 100%; height: 2.7em; padding: 0 18px; border: 1px solid rgba(0, 0, 0, .09); border-radius: 99px;
  background: rgba(0, 0, 0, .03); box-shadow: none; color: var(--ag-ink); font: inherit; font-size: 16px; transition: border-color .2s, background .2s;
}
.wpcf7 textarea { height: 160px; min-height: 120px; padding: 12px 18px; border-radius: 15px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 0; border-color: var(--ag-gold); background: #fff; }
.wpcf7 input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; min-width: 140px; height: 2.7em; padding: 0 28px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, var(--ag-gold), var(--ag-gold-2)); color: var(--ag-800); font-family: var(--ag-font-head); font-weight: 700; font-size: 16px;
  box-shadow: 0 8px 22px rgba(201, 161, 74, .35); transition: transform .2s;
}
.wpcf7 input[type="submit"]:hover { transform: translateY(-2px); }
.wpcf7 .wpcf7-spinner { vertical-align: middle; }
.wpcf7 .wpcf7-not-valid-tip { margin: 4px 0 0 18px; font-size: 13px; }
.wpcf7 form .wpcf7-response-output { margin: 14px 0 0; padding: 10px 16px; border-radius: 12px; font-size: 15px; }

/* Bài viết: không hiện ảnh đại diện ở đầu bài (giống bản Flatsome cũ). Ảnh nhỏ ở sidebar vẫn giữ. */
.single .vs-single__thumb { display: none; }

/* Bài viết: chữ nội dung to hơn cho dễ đọc */
.single .entry-content { font-size: 18px; line-height: 1.8; }
.single .entry-content h2 { font-size: 26px; }
.single .entry-content h3 { font-size: 21px; }
.single .entry-content h4 { font-size: 19px; }
@media (max-width: 549px) {
  .single .entry-content { font-size: 17px; }
  .single .entry-content h2 { font-size: 23px; }
  .single .entry-content h3 { font-size: 19.5px; }
}

/* Sidebar bài viết: cột rộng hơn, chữ và ảnh to hơn */
@media (min-width: 901px) { .vs-single__wrap { grid-template-columns: minmax(0, 1fr) 360px; } }
.vs-single__side .vs-widget { padding: 1.4rem 1.5rem; }
.vs-single__side .vs-widget__title { font-size: 22px; }
.vs-side-posts { gap: 1.1rem; }
.vs-side-post { gap: .85rem; }
.vs-side-post__thumb { width: 92px; height: 70px; }
.vs-side-post__title { font-size: 16px; line-height: 1.45; }
.vs-side-post__date { font-size: 13.5px; }
.vs-side-post__date .vs-ico { width: 15px; height: 15px; }
.vs-side-cta p { font-size: 16px; }
.vs-single__side input[type="search"], .vs-single__side input[type="text"] { font-size: 15.5px; }

/* Mục lục (plugin Vinasite Mục Lục) – kiểu hộp có ô số cho H2, dấu › cho H3 */
.entry-content .vstoc { margin: 0 0 28px; padding: 22px 26px 18px; border: 1px solid #d5e6db; border-radius: 14px; background: #f1f7f3; font-size: 16px; line-height: 1.45; }
.entry-content .vstoc__head { display: flex; align-items: center; margin: 0 0 10px; }
.entry-content .vstoc__title { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ag-font-head); font-size: 17px; font-weight: 700; color: var(--ag-800); }
.entry-content .vstoc__title::before {
  content: ""; width: 20px; height: 20px; flex: none; background: var(--ag-700);
  -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.2' stroke-linecap='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11'/%3E%3Ccircle cx='4.5' cy='6' r='1.2' fill='%23000'/%3E%3Ccircle cx='4.5' cy='12' r='1.2' fill='%23000'/%3E%3Ccircle cx='4.5' cy='18' r='1.2' fill='%23000'/%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.2' stroke-linecap='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11'/%3E%3Ccircle cx='4.5' cy='6' r='1.2' fill='%23000'/%3E%3Ccircle cx='4.5' cy='12' r='1.2' fill='%23000'/%3E%3Ccircle cx='4.5' cy='18' r='1.2' fill='%23000'/%3E%3C/svg%3E") center/contain no-repeat;
}
.entry-content .vstoc__toggle { display: none; }
.entry-content .vstoc.is-collapsed .vstoc__list { display: block; }
.entry-content .vstoc__list { margin: 0; padding: 0; list-style: none; counter-reset: vstoc; }
.entry-content .vstoc__item { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid #dde9e1; counter-increment: none; }
.entry-content .vstoc__item:last-child { border-bottom: 0; }
.entry-content .vstoc__list a { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; color: var(--ag-ink); text-decoration: none; transition: color .2s; }
.entry-content .vstoc__list a:hover { color: var(--ag-700); text-decoration: none; }
.entry-content .vstoc .vstoc__item > a::before { content: none; }
/* H2: ô số vuông bo góc */
.entry-content .vstoc__item--l0 { counter-increment: vstoc; }
.entry-content .vstoc__item--l0 > a { font-weight: 600; font-size: 16.5px; }
.entry-content .vstoc .vstoc__item--l0 > a::before {
  content: counter(vstoc); display: grid; place-items: center; flex: none; width: 21px; height: 21px; margin-top: 1px;
  border-radius: 5px; background: var(--ag-500); color: #fff; font-family: var(--ag-font-head); font-size: 12px; font-weight: 700; line-height: 1;
}
/* H3 (và sâu hơn): thụt vào, dấu › */
.entry-content .vstoc__item--l1, .entry-content .vstoc__item--l2, .entry-content .vstoc__item--l3 { padding-left: 31px; }
.entry-content .vstoc__item--l1 > a, .entry-content .vstoc__item--l2 > a, .entry-content .vstoc__item--l3 > a { font-size: 15px; font-weight: 500; padding: 7px 0; }
.entry-content .vstoc .vstoc__item--l1 > a::before, .entry-content .vstoc .vstoc__item--l2 > a::before, .entry-content .vstoc .vstoc__item--l3 > a::before {
  content: "›"; flex: none; width: 10px; color: var(--ag-500); font-weight: 700; font-size: 17px; line-height: 1.15;
}
/* Bấm mục lục: chừa chỗ cho header dính để tiêu đề không bị che */
.entry-content :is(h2, h3, h4)[id] { scroll-margin-top: 96px; }
@media (max-width: 549px) {
  .entry-content .vstoc { padding: 18px 16px 14px; }
  .entry-content .vstoc__item--l0 > a { font-size: 15.5px; }
  .entry-content .vstoc__item--l1, .entry-content .vstoc__item--l2, .entry-content .vstoc__item--l3 { padding-left: 24px; }
}

/* Câu hỏi thường gặp: thẻ có icon dấu hỏi (dùng <div class="ag-faq"><div class="ag-faq__item"><h3>…</h3><p>…</p></div></div>) */
.entry-content .ag-faq { display: grid; gap: 14px; margin: 0 0 32px; }
.entry-content .ag-faq > br, .entry-content .ag-faq p:empty { display: none; }
.entry-content .ag-faq__item {
  position: relative; margin: 0; padding: 18px 22px 18px 72px;
  border: 1px solid #e3ece6; border-left: 3px solid var(--ag-500); border-radius: 14px; background: #fff;
  box-shadow: 0 4px 14px rgba(7, 59, 36, .05); transition: border-color .25s, box-shadow .25s, transform .25s;
}
.entry-content .ag-faq__item:hover { border-color: #d7e6dc; border-left-color: var(--ag-gold); box-shadow: 0 12px 28px rgba(7, 59, 36, .10); transform: translateY(-2px); }
.entry-content .ag-faq__item::before {
  content: ""; position: absolute; left: 20px; top: 17px; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ag-700), var(--ag-500)); box-shadow: 0 6px 14px rgba(11, 90, 51, .25); transition: background .25s;
}
.entry-content .ag-faq__item::after {
  content: ""; position: absolute; left: 24px; top: 21px; width: 28px; height: 28px; background: #fff;
  -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.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3'/%3E%3Cpath d='M12 17h.01'/%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.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E") center/contain no-repeat;
}
.entry-content .ag-faq__item:hover::before { background: linear-gradient(135deg, var(--ag-gold), var(--ag-gold-2)); }
.single .entry-content .ag-faq__item h3 { margin: 6px 0 8px; font-size: 18px; line-height: 1.4; color: var(--ag-800); }
.entry-content .ag-faq__item p { margin: 0; font-size: 16.5px; line-height: 1.7; color: #3b4a43; }
@media (max-width: 549px) {
  .entry-content .ag-faq__item { padding: 16px 16px 16px 60px; }
  .entry-content .ag-faq__item::before { left: 14px; top: 15px; width: 32px; height: 32px; }
  .entry-content .ag-faq__item::after { left: 18px; top: 19px; width: 24px; height: 24px; }
  .single .entry-content .ag-faq__item h3 { font-size: 17px; }
  .entry-content .ag-faq__item p { font-size: 16px; }
}
