/* Blog kiểu store.dji.com: danh sách ("DJI Guides": nền xám, tiêu đề lớn căn giữa, lưới thẻ) và bài viết (/content/…: nền
   trắng, cột nội dung hẹp, chữ xám 16px, tiêu đề mục đậm, link xanh). Biến màu --dj-* lấy từ assets/site/site.css. */
.ag-blog { --fs-experimental-link-color: currentColor; --fs-experimental-link-color-hover: currentColor; color: var(--dj-text); font-size: 16px; line-height: 24px; }
.ag-blog__wrap { max-width: calc(var(--dj-wrap) + 2 * var(--dj-gutter)); margin: 0 auto; padding: 0 var(--dj-gutter); }

/* ---------- Danh sách ---------- */
.ag-blog--list { background: #f0f1f2; padding-bottom: 72px; }
.ag-blog__head { padding: 56px 0 40px; text-align: center; }
.ag-blog .ag-blog__title { margin: 0; font-size: 48px; line-height: 56px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--dj-head); }
.ag-blog__title small { font-size: 18px; line-height: 24px; font-weight: 400; color: var(--dj-sub); white-space: nowrap; }
.ag-blog__desc { max-width: 800px; margin: 16px auto 0; font-size: 18px; line-height: 28px; color: var(--dj-text); }
.ag-blog__desc p { margin: 0; }
.ag-blog__cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; }
.ag-blog__cats a { display: inline-flex; align-items: center; height: 36px; padding: 0 18px; border-radius: 18px; background: #fff; font-size: 14px; line-height: 20px; color: var(--dj-head); transition: background-color .2s ease, color .2s ease; }
.ag-blog .ag-blog__cats a:hover { background: #e4e6e8; color: var(--dj-head); }
.ag-blog .ag-blog__cats a.is-active { background: #262626; color: #fff; }
.ag-blog__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ag-blog__empty { padding: 48px 0; text-align: center; color: var(--dj-sub); }

.ag-bcard { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 6px; overflow: hidden; transition: box-shadow .3s ease; }
.ag-bcard__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--dj-card); }
.ag-blog .ag-bcard__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.ag-bcard__body { display: flex; flex-direction: column; flex: 1; padding: 24px 24px 28px; }
.ag-bcard__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 8px; font-size: 13px; line-height: 20px; color: var(--dj-sub); }
.ag-bcard__meta span { color: var(--dj-blue); }
.ag-blog .ag-bcard__title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.ag-blog .ag-bcard__title a { color: var(--dj-head); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ag-blog .ag-bcard__title a:hover { color: var(--dj-head); }
.ag-bcard__title a::after { content: ""; position: absolute; inset: 0; } /* cả thẻ bấm được */
.ag-bcard__excerpt { margin: 10px 0 0; font-size: 14px; line-height: 22px; color: var(--dj-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) and (min-width: 1200px) {
	.ag-bcard:hover { box-shadow: 0 8px 16px rgba(0, 0, 0, .1); }
	.ag-bcard:hover .ag-bcard__media img { transform: scale(1.05); }
}

.ag-blog .navigation.pagination { margin: 40px 0 0; }
.ag-blog .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ag-blog .nav-links .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 20px; background: #fff; font-size: 14px; color: var(--dj-head); }
.ag-blog .nav-links a.page-numbers:hover { background: #e4e6e8; color: var(--dj-head); }
.ag-blog .nav-links .page-numbers.current { background: #262626; color: #fff; }
.ag-blog .nav-links .page-numbers.dots { background: transparent; }

/* ---------- Bài viết ---------- */
.ag-blog--single { background: #fff; }
.ag-article { padding: 40px var(--dj-gutter) 0; }
.ag-article__head { max-width: 960px; margin: 0 auto 32px; text-align: center; }
.ag-article__crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; font-size: 14px; line-height: 20px; color: var(--dj-sub); }
.ag-article__crumbs a { color: var(--dj-sub); }
.ag-blog .ag-article__crumbs a:hover { color: var(--dj-head); }
.ag-blog .ag-article__title { margin: 0; font-size: 40px; line-height: 52px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--dj-head); text-wrap: balance; }
.ag-article__meta { display: flex; justify-content: center; gap: 8px; margin: 16px 0 0; font-size: 14px; line-height: 20px; color: var(--dj-sub); }
.ag-article__meta a { color: var(--dj-sub); }
.ag-blog .ag-article__meta a:hover { color: var(--dj-head); }
.ag-article__hero { max-width: 960px; margin: 0 auto 40px; border-radius: 8px; overflow: hidden; background: var(--dj-card); }
.ag-blog .ag-article__hero img { display: block; width: 100%; height: auto; }

.ag-article__content { max-width: 800px; margin: 0 auto; font-size: 16px; line-height: 28px; color: rgba(0, 0, 0, .65); overflow-wrap: break-word; }
.ag-article__content > *:first-child { margin-top: 0; }
.ag-article__content p { margin: 0 0 16px; }
.ag-blog .ag-article__content h2, .ag-blog .ag-article__content h3, .ag-blog .ag-article__content h4 { margin: 40px 0 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--dj-head); scroll-margin-top: 88px; }
.ag-blog .ag-article__content h2 { font-size: 28px; line-height: 36px; }
.ag-blog .ag-article__content h3 { font-size: 22px; line-height: 30px; margin-top: 32px; }
.ag-blog .ag-article__content h4 { font-size: 18px; line-height: 26px; margin-top: 24px; }
.ag-article__content strong, .ag-article__content b { font-weight: 600; color: var(--dj-head); }
.ag-blog .ag-article__content a { color: var(--dj-blue); }
.ag-blog .ag-article__content a:hover { color: var(--dj-blue); text-decoration: underline; }
.ag-article__content ul, .ag-article__content ol { margin: 0 0 16px; padding-left: 24px; }
.ag-article__content li { margin: 0 0 8px; }
.ag-article__content li > ul, .ag-article__content li > ol { margin: 8px 0 0; }
.ag-blog .ag-article__content img { max-width: 100%; height: auto; border-radius: 6px; }
.ag-article__content figure, .ag-article__content .wp-caption { max-width: 100%; margin: 24px 0; }
.ag-article__content figcaption, .ag-article__content .wp-caption-text { margin-top: 8px; font-size: 13px; line-height: 20px; color: var(--dj-sub); text-align: center; }
.ag-article__content blockquote { margin: 24px 0; padding: 16px 24px; border-left: 3px solid var(--dj-blue); background: var(--dj-soft); border-radius: 0 6px 6px 0; font-style: normal; color: var(--dj-text); }
.ag-article__content blockquote p:last-child { margin-bottom: 0; }
.ag-article__content table { width: 100%; margin: 24px 0; border-collapse: collapse; font-size: 14px; line-height: 22px; }
.ag-article__content th, .ag-article__content td { padding: 10px 12px; border: 1px solid var(--dj-line-2); text-align: left; vertical-align: top; text-transform: none; letter-spacing: 0; color: inherit; }
.ag-article__content th { background: var(--dj-soft); font-weight: 600; color: var(--dj-head); }
.ag-article__content iframe, .ag-article__content video { max-width: 100%; border-radius: 6px; }
.ag-article__content hr { margin: 32px 0; border: 0; border-top: 1px solid var(--dj-line-2); }
/* Mục lục (plugin Fixed TOC) trong bài: khung nhẹ, bo góc, chữ theo bài. */
.ag-article__content #ftwp-container-outer { margin: 24px 0 32px; }
.ag-article__content #ftwp-container-outer #ftwp-contents { border: 1px solid var(--dj-line-2) !important; border-radius: 8px !important; background: var(--dj-soft) !important; box-shadow: none !important; overflow: hidden; }
.ag-article__content #ftwp-container .ftwp-header { background: transparent !important; color: var(--dj-head) !important; }
.ag-article__content #ftwp-container .ftwp-header-title { font-size: 18px !important; font-weight: 600; }
.ag-article__content #ftwp-container .ftwp-anchor { color: var(--dj-text); }
.ag-article__content #ftwp-container .ftwp-anchor:hover { color: var(--dj-blue); }

.ag-article__foot { max-width: 800px; margin: 40px auto 0; padding: 24px 0 48px; border-top: 1px solid var(--dj-line-2); }
.ag-article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.ag-article__tags a { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 16px; background: var(--dj-soft); font-size: 14px; color: var(--dj-text); }
.ag-blog .ag-article__tags a:hover { background: #e4e6e8; color: var(--dj-head); }
.ag-article__share { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 14px; color: var(--dj-sub); }
.ag-article__share .social-icons { margin: 0; }
.ag-article__share .social-icons a { margin: 0 4px 0 0; }

.ag-blog__related { padding: 48px 0 64px; background: #f0f1f2; }
.ag-blog .ag-blog__related-title { margin: 0 0 24px; font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--dj-head); }
.ag-article__comments { max-width: 800px; margin: 0 auto; padding: 40px var(--dj-gutter) 64px; }
.ag-article__comments .comments-area { margin: 0; padding: 0; background: none; box-shadow: none; }

@media (max-width: 1023px) {
	.ag-blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ag-blog .ag-blog__title { font-size: 36px; line-height: 44px; }
	.ag-blog .ag-article__title { font-size: 32px; line-height: 42px; }
}
@media (max-width: 767px) {
	.ag-blog--list { padding-bottom: 48px; }
	.ag-blog__head { padding: 32px 0 24px; }
	.ag-blog .ag-blog__title { font-size: 28px; line-height: 36px; }
	.ag-blog__desc { font-size: 16px; line-height: 24px; }
	.ag-blog__cats { margin-top: 20px; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-left: calc(-1 * var(--dj-gutter)); margin-right: calc(-1 * var(--dj-gutter)); padding: 0 var(--dj-gutter); }
	.ag-blog__cats::-webkit-scrollbar { display: none; }
	.ag-blog__cats a { flex: 0 0 auto; }
	.ag-blog__grid { grid-template-columns: 1fr; gap: 8px; }
	.ag-bcard__body { padding: 16px 16px 20px; }
	.ag-blog .ag-bcard__title { font-size: 17px; line-height: 24px; }
	.ag-article { padding-top: 24px; }
	.ag-article__head { margin-bottom: 20px; text-align: left; }
	.ag-article__crumbs, .ag-article__meta { justify-content: flex-start; }
	.ag-blog .ag-article__title { font-size: 26px; line-height: 34px; }
	.ag-article__hero { margin: 0 calc(-1 * var(--dj-gutter)) 24px; border-radius: 0; }
	.ag-blog .ag-article__content h2 { font-size: 22px; line-height: 30px; margin-top: 32px; }
	.ag-blog .ag-article__content h3 { font-size: 19px; line-height: 27px; }
	.ag-article__content table { display: block; overflow-x: auto; }
	.ag-article__foot { padding-bottom: 32px; }
	.ag-blog__related { padding: 32px 0 40px; }
	.ag-blog .ag-blog__related-title { font-size: 22px; line-height: 30px; margin-bottom: 16px; }
}
