/**
 * AgriBio brand — logo & palette (#4B6F1C, #A2B02A).
 */

:root {
	--brand-dark: #4b6f1c;
	--brand-olive: #a2b02a;
	--brand-dark-hover: #3d5c17;
	--brand-olive-soft: #eef2dc;

	--color-primary: #4b6f1c;
	--color-primary-2: #5f7d22;
	--color-accent: #a2b02a;
	--color-soft: #f3f6eb;
	--color-bg: #fafbf8;
	--color-border: #dde5cd;

	--bg: #fafbf8;
	--green: #4b6f1c;
	--green-2: #5f7d22;
	--green-pale: #f3f6eb;
	--line: #dde5cd;

	--academic-accent: #4b6f1c;
	--academic-accent-soft: #f3f6eb;
	--academic-bg: #fafbf8;
	--academic-line: #dde5cd;

	--plant: #4b6f1c;
	--plant-soft: #f3f6eb;
}

/* Logo header & footer */
.site-branding--image {
	line-height: 1;
}

.site-branding--image .site-tagline {
	display: none;
}

.custom-logo-link {
	display: block;
	max-width: 240px;
}

.custom-logo,
.site-logo,
.footer-logo {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	object-fit: contain;
}

.site-header .custom-logo,
.site-header .site-logo {
	max-height: 52px;
}

.footer-brand-link {
	display: inline-block;
	max-width: 200px;
}

.footer-brand .custom-logo-link {
	padding: 6px 10px;
	border-radius: 8px;
	background: #fff;
}

.footer-brand .custom-logo,
.footer-brand .footer-logo {
	max-height: 46px;
}

.footer-brand-name {
	display: none;
}

.footer-brand-icon {
	display: none;
}

/* Liên kết & nút theo màu logo */
a {
	color: var(--brand-dark);
}

a:hover {
	color: var(--brand-dark-hover);
}

.button,
button[type="submit"],
input[type="submit"] {
	background: var(--brand-dark) !important;
}

.button.button-secondary {
	background: #fff !important;
	color: var(--brand-dark) !important;
	border: 1px solid #cfdabd !important;
}

.button.button-secondary:hover {
	background: var(--brand-olive-soft) !important;
	color: var(--brand-dark) !important;
	border-color: #b8c9a8 !important;
}

.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
	background: var(--brand-dark-hover) !important;
}

.main-navigation a::after,
.section-heading h2::after,
.reading-progress {
	background: linear-gradient(90deg, var(--brand-dark), var(--brand-olive)) !important;
}

.section-kicker,
.eyebrow,
.academic-badge {
	color: var(--brand-dark) !important;
	border-color: rgba(75, 111, 28, 0.2) !important;
}

.hero h1 em,
.wordmark {
	color: var(--brand-dark) !important;
}

.wordmark span {
	color: var(--brand-olive) !important;
}

.search-form-large {
	border-color: #c5d4a8 !important;
	box-shadow: 0 6px 16px rgba(75, 111, 28, 0.07) !important;
}

.search-form-large button {
	background: var(--brand-dark) !important;
}

/* TOC & gradient accents */
.toc-box-header::before,
.toc-count {
	background: linear-gradient(135deg, var(--brand-dark), var(--brand-olive)) !important;
}

.toc-list a:hover,
.toc-list li.active > a {
	color: var(--brand-dark) !important;
}

.toc-list li.active > a {
	box-shadow: inset 3px 0 0 var(--brand-olive) !important;
}

/* Footer — nền đậm, chữ sáng rõ */
.site-footer {
	background: linear-gradient(180deg, #3d5a18 0%, #2a3d10 100%) !important;
	color: #eef4e4 !important;
	border-top: none !important;
	padding-top: 52px !important;
}

.site-footer::before {
	background: linear-gradient(90deg, #4b6f1c, #a2b02a, #6b8f28) !important;
	opacity: 1 !important;
}

.site-footer .footer-col-title,
.site-footer h2.footer-col-title,
.site-footer h2 {
	color: #f2f8e6 !important;
	border-left-color: #a2b02a !important;
	border-bottom: none !important;
}

.site-footer .footer-brand-desc,
.site-footer p.footer-brand-desc,
.site-footer p {
	color: #dce8cc !important;
}

.site-footer .footer-links a,
.site-footer .footer-contact-list a,
.site-footer .footer-contact-list span,
.site-footer .footer-contact-list li {
	color: #e8f2d8 !important;
}

.site-footer .footer-links a:hover,
.site-footer .footer-contact-list a:hover,
.site-footer a:hover {
	color: #f4fadc !important;
}

.site-footer .footer-bottom {
	border-top-color: rgba(255, 255, 255, 0.15) !important;
}

.site-footer .footer-copy {
	color: #c8d8b4 !important;
}

.site-footer .footer-legal a {
	color: #dce8cc !important;
	font-weight: 600;
}

.site-footer .footer-legal a:hover {
	color: #f4fadc !important;
}

.site-footer .footer-contact-icon {
	background: rgba(255, 255, 255, 0.12) !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
	color: #f0f7c8 !important;
}

.site-footer .footer-socials a {
	background: rgba(255, 255, 255, 0.1) !important;
	border-color: rgba(255, 255, 255, 0.25) !important;
	color: #f0f7c8 !important;
}

.site-footer .footer-socials a:hover {
	background: #a2b02a !important;
	border-color: #a2b02a !important;
	color: #2a3d10 !important;
}

.site-footer .footer-brand .custom-logo-link {
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Nền & selection */
body {
	background-color: var(--color-bg) !important;
}

::selection {
	background: rgba(75, 111, 28, 0.16);
}

.academic-context-bar {
	background: linear-gradient(180deg, #fff 0%, var(--brand-olive-soft) 100%);
}

.quick-summary-box {
	background: var(--brand-olive-soft) !important;
	border-color: rgba(75, 111, 28, 0.14) !important;
}

@media (max-width: 600px) {
	.site-header .custom-logo,
	.site-header .site-logo {
		max-height: 44px;
	}

	.custom-logo-link {
		max-width: 190px;
	}
}

/* Ảnh nội dung — căn giữa (ghi đè rule cũ) */
.entry-content figure,
.post-entry-content figure,
.hub-entry-content figure,
.microbe-article-body figure,
.article-content figure {
	margin-inline: auto !important;
	text-align: center;
}

.entry-content img,
.post-entry-content img,
.hub-entry-content img,
.microbe-article-body img,
.article-content img,
.entry-content figure img,
.post-entry-content figure img {
	display: block !important;
	margin-inline: auto !important;
	width: auto !important;
	max-width: min(100%, 720px) !important;
	height: auto !important;
}

.entry-content p > img,
.post-entry-content p > img {
	margin-block: 1.5em !important;
}

/* Dictionary archive final layout */
.dictionary.section-space {
	padding-block: 28px 32px !important;
}

.dictionary .dictionary-search {
	display: grid !important;
	grid-template-columns: minmax(260px, 1fr) 220px auto !important;
	align-items: end !important;
	gap: 16px !important;
	max-width: none !important;
	margin-bottom: 32px !important;
}

.dictionary .dictionary-search .filter-field {
	display: flex !important;
	flex-direction: column !important;
	gap: 6px !important;
	min-width: 0 !important;
}

.dictionary .dictionary-search label {
	font-size: 13px !important;
	font-weight: 600 !important;
	color: var(--editorial-ink, #16211a) !important;
}

.dictionary .dictionary-search input[type="search"],
.dictionary .dictionary-search select {
	box-sizing: border-box !important;
	display: block !important;
	width: 100% !important;
	height: 46px !important;
	min-height: 46px !important;
	padding: 0 14px !important;
	font-size: 14px !important;
	line-height: 46px !important;
}

.dictionary .filter-actions {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
}

.dictionary .filter-actions .button {
	min-height: 46px !important;
	margin: 0 !important;
	padding: 0 16px !important;
	white-space: nowrap !important;
}

.dictionary .filter-actions .button.button-secondary,
.dictionary .filter-actions .button.button-secondary:hover,
.dictionary .filter-actions .button.button-secondary:focus,
.dictionary .filter-actions .button.button-secondary:active,
.dictionary .filter-actions .button.button-secondary:visited {
	color: #fff !important;
	opacity: 1 !important;
}

.dictionary .alphabet {
	gap: 8px !important;
	margin-top: 4px !important;
	margin-bottom: 32px !important;
	padding-bottom: 4px !important;
}

.dictionary .alphabet a {
	width: auto !important;
	min-width: 32px !important;
	height: 32px !important;
	padding: 0 10px !important;
	font-size: 13px !important;
	white-space: nowrap !important;
}

.dictionary .term-list {
	display: flex !important;
	flex-direction: column !important;
	gap: 14px !important;
	margin-top: 8px !important;
	margin-bottom: 0 !important;
	border-top: none !important;
}

.dictionary .term-list article {
	display: grid !important;
	grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr) !important;
	gap: 28px !important;
	padding: 20px 22px !important;
	align-items: start !important;
	border: 1px solid #dfe7d1 !important;
	border-radius: 10px !important;
	background: #fff !important;
	box-shadow: 0 4px 14px rgba(75, 111, 28, 0.04) !important;
}

.dictionary .term-list h2 {
	width: auto !important;
	min-width: 0 !important;
	line-height: 1.35 !important;
}

.dictionary .term-list p {
	min-width: 0 !important;
	font-size: 14.5px !important;
	line-height: 1.55 !important;
}

@media (max-width: 860px) {
	.dictionary .dictionary-search {
		grid-template-columns: 1fr 220px !important;
	}

	.dictionary .filter-actions {
		grid-column: 1 / -1 !important;
	}
}

@media (max-width: 640px) {
	.dictionary.section-space {
		padding-block: 36px 24px !important;
	}

	.dictionary .dictionary-search,
	.dictionary .term-list article {
		grid-template-columns: 1fr !important;
	}

	.dictionary .term-list article {
		gap: 10px !important;
		padding: 18px !important;
	}

	.dictionary .filter-actions {
		align-items: stretch !important;
		flex-direction: column !important;
	}
}

/* Directory card/list controls: Quy trình + Thuật ngữ */
.hub-vi-sinh .microbe-summary-bar .right-controls {
	gap: 12px !important;
}

.hub-vi-sinh .view-switch-btns button.active,
.dictionary .view-switch-btns button.active {
	border-color: var(--editorial-green, #2f6f3e) !important;
	background: var(--editorial-green, #2f6f3e) !important;
	color: #fff !important;
}

.hub-vi-sinh .microbe-card-grid.is-list-view {
	display: flex !important;
	flex-direction: column !important;
	gap: 14px !important;
}

.hub-vi-sinh .microbe-card-grid.is-list-view .microbe-card {
	display: grid !important;
	grid-template-columns: 220px minmax(0, 1fr) !important;
	min-height: 168px;
}

.hub-vi-sinh .microbe-card-grid.is-list-view .microbe-card-image-wrap {
	height: 100%;
	min-height: 168px;
	border-radius: 0;
}

.hub-vi-sinh .microbe-card-grid.is-list-view .microbe-card-body {
	padding: 16px 20px;
}

.hub-vi-sinh .microbe-card-grid.is-list-view .microbe-card:hover {
	transform: translateY(-2px);
}

.dictionary-filter-card {
	margin-top: 0;
	margin-bottom: 24px;
}

.dictionary-filter-card .dictionary-filter-grid {
	display: grid;
	grid-template-columns: minmax(280px, 1fr) 240px;
	gap: 12px;
	align-items: center;
}

.dictionary-filter-card .dictionary-filter-grid > .filter-field {
	min-width: 0;
}

.dictionary-filter-card .dictionary-filter-grid > .filter-field label {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.dictionary-filter-card .dictionary-filter-grid select {
	width: 100%;
	height: 48px;
	padding-inline: 14px 38px;
}

.dictionary-filter-card .filter-search-box {
	width: 100%;
}

.dictionary-summary-bar {
	margin-top: 18px !important;
	padding-top: 18px;
	border-top: 1px dashed var(--editorial-line, #dfe7d1);
}

.dictionary-clear-btn {
	min-height: 36px !important;
	padding: 7px 13px !important;
	white-space: nowrap;
	background: #fff !important;
	border-color: var(--editorial-line, #dfe7d1) !important;
	color: var(--editorial-green, #2f6f3e) !important;
}

.dictionary-clear-btn:hover,
.dictionary-clear-btn:focus {
	background: var(--editorial-green-soft, #eef5e9) !important;
	color: var(--editorial-green, #2f6f3e) !important;
}

.dictionary .alphabet {
	margin-top: 0 !important;
}

.dictionary .term-list.directory-view-grid {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 16px !important;
}

.dictionary .term-list.directory-view-grid article {
	display: flex !important;
	flex-direction: column !important;
	gap: 0 !important;
	min-width: 0;
	min-height: 176px;
	padding: 20px 22px !important;
}

.dictionary .term-list.directory-view-grid article > a {
	display: inline-flex !important;
	align-items: center;
	margin-top: auto;
	padding-top: 10px;
	font-weight: 700;
}

.dictionary .term-list.directory-view-grid.is-list-view {
	display: flex !important;
	flex-direction: column !important;
	gap: 12px !important;
}

.dictionary .term-list.directory-view-grid.is-list-view article {
	display: grid !important;
	grid-template-columns: minmax(190px, 0.32fr) minmax(0, 1fr) auto !important;
	align-items: center !important;
	gap: 24px !important;
	min-height: 0;
	padding: 16px 20px !important;
}

.dictionary .term-list.directory-view-grid.is-list-view h2,
.dictionary .term-list.directory-view-grid.is-list-view p,
.dictionary .term-list.directory-view-grid.is-list-view article > a {
	margin: 0 !important;
	padding: 0 !important;
}

.dictionary .term-list .dictionary-pagination {
	grid-column: 1 / -1;
	width: 100%;
	margin-top: 18px;
}

@media (max-width: 800px) {
	.dictionary-filter-card .dictionary-filter-grid,
	.dictionary .term-list.directory-view-grid {
		grid-template-columns: 1fr !important;
	}

	.dictionary .term-list.directory-view-grid.is-list-view article {
		grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr) !important;
		gap: 10px 18px !important;
	}

	.dictionary .term-list.directory-view-grid.is-list-view article > a {
		grid-column: 2;
	}
}

@media (max-width: 640px) {
	.hub-vi-sinh .microbe-summary-bar .right-controls,
	.dictionary .dictionary-summary-bar .right-controls {
		width: 100%;
		justify-content: flex-start !important;
		flex-wrap: wrap !important;
	}

	.hub-vi-sinh .microbe-clear-btn,
	.dictionary-clear-btn {
		margin-left: auto;
	}

	.hub-vi-sinh .microbe-card-grid.is-list-view .microbe-card {
		grid-template-columns: 112px minmax(0, 1fr) !important;
		min-height: 150px;
	}

	.hub-vi-sinh .microbe-card-grid.is-list-view .microbe-card-image-wrap {
		min-height: 150px;
	}

	.hub-vi-sinh .microbe-card-grid.is-list-view .microbe-card-body {
		padding: 13px 14px;
	}

	.hub-vi-sinh .microbe-card-grid.is-list-view .microbe-card-excerpt,
	.hub-vi-sinh .microbe-card-grid.is-list-view .microbe-card-date {
		display: none;
	}

	.dictionary .term-list.directory-view-grid.is-list-view article {
		grid-template-columns: 1fr !important;
		gap: 8px !important;
	}

	.dictionary .term-list.directory-view-grid.is-list-view article > a {
		grid-column: auto;
	}
}

/* Editorial feedback page */
.feedback-hero.page-hero {
	background: linear-gradient(135deg, #ffffff 0%, #f4f7ec 100%) !important;
	border-bottom-color: #dfe7d1 !important;
}

.feedback-hero .section-kicker {
	margin: 0 0 8px !important;
}

.feedback-hero h1 {
	max-width: 760px;
	margin-bottom: 12px !important;
}

.feedback-hero p:last-child {
	max-width: 780px;
	font-size: 17px !important;
	line-height: 1.65 !important;
}

.feedback-page {
	display: grid;
	grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
	gap: 48px;
	align-items: start;
	width: min(100%, 1120px);
	margin-inline: auto;
	padding-bottom: 80px;
}

.feedback-page.section-space {
	padding-block: 80px;
}

.feedback-sidebar {
	display: grid;
	gap: 28px;
	position: sticky;
	top: 96px;
}

.feedback-panel,
.feedback-form-card,
.feedback-contact-note {
	border: 1px solid #dfe7d1 !important;
	border-radius: 10px !important;
	background: #fff !important;
	box-shadow: 0 10px 26px rgba(75, 111, 28, 0.05) !important;
}

.feedback-panel {
	padding: 28px;
}

.feedback-panel-primary {
	background: linear-gradient(135deg, #f7faef 0%, #ffffff 100%) !important;
	border-left: 4px solid var(--brand-dark) !important;
}

.feedback-panel-kicker {
	display: inline-flex;
	margin-bottom: 10px;
	color: var(--brand-dark);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.feedback-panel h2 {
	margin: 0 0 10px !important;
	font-size: 23px !important;
	line-height: 1.25 !important;
}

.feedback-panel h3 {
	margin: 0 0 14px !important;
	color: #26341d !important;
	font-size: 17px !important;
}

.feedback-panel p {
	margin: 0;
	color: #5c6755;
	font-size: 14.5px;
	line-height: 1.65;
}

.feedback-checklist {
	display: grid;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.feedback-checklist li {
	position: relative;
	padding-left: 26px;
	color: #334155;
	font-size: 14.5px;
	line-height: 1.55;
}

.feedback-checklist li::before {
	content: "";
	position: absolute;
	top: 0.55em;
	left: 0;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--brand-olive-soft);
	box-shadow: inset 0 0 0 4px var(--brand-dark);
}

.feedback-steps {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.feedback-steps li {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr);
	gap: 10px;
	align-items: start;
}

.feedback-steps span {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--brand-dark);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
}

.feedback-steps p {
	padding-top: 2px;
}

.feedback-contact-note {
	padding: 22px 24px;
}

.feedback-contact-note strong {
	display: block;
	margin-bottom: 4px;
	color: #5c6755;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.feedback-contact-note a {
	font-size: 15px;
	font-weight: 800;
}

.feedback-form-card {
	padding: 40px !important;
}

.feedback-form-heading {
	margin-bottom: 32px;
	padding-bottom: 26px;
	border-bottom: 1px solid #e5ecd9;
}

.feedback-form-heading h2 {
	margin: 0 0 8px !important;
	font-size: 28px !important;
}

.feedback-form-heading p:last-child {
	margin: 0;
	color: #66715f;
	font-size: 14.5px;
	line-height: 1.6;
}

.feedback-form .feedback-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	margin-bottom: 8px;
}

.feedback-form p {
	margin-bottom: 22px !important;
}

.feedback-form label {
	margin-bottom: 7px !important;
	color: #26341d !important;
	font-size: 13.5px !important;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
	width: 100% !important;
	border: 1px solid #cfdabd !important;
	border-radius: 8px !important;
	background: #fff !important;
	color: #1f2937 !important;
	font-size: 15px !important;
	box-shadow: none !important;
}

.feedback-form input,
.feedback-form select {
	height: 48px !important;
	padding: 0 14px !important;
}

.feedback-form textarea {
	min-height: 188px;
	padding: 13px 14px !important;
	line-height: 1.6 !important;
	resize: vertical;
}

.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus {
	border-color: var(--brand-dark) !important;
	box-shadow: 0 0 0 3px rgba(75, 111, 28, 0.12) !important;
	outline: none !important;
}

.feedback-submit-row {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-top: 16px;
}

.feedback-submit-row .button {
	min-height: 48px !important;
	padding: 0 22px !important;
	white-space: nowrap !important;
}

.feedback-submit-row span {
	color: #66715f;
	font-size: 13.5px;
	line-height: 1.45;
}

.feedback-page .form-message {
	margin-bottom: 20px;
	border: 1px solid transparent;
}

.feedback-page .form-message.success {
	border-color: #cce3c2;
}

.feedback-page .form-message.error {
	border-color: #f3d0b5;
}

/* Homepage quick lookup spacing */
.quick-lookup-section {
	padding-bottom: 56px !important;
}

.quick-lookup-section .section-heading {
	margin-bottom: 24px !important;
}

.quick-lookup-section .section-heading > p {
	max-width: 520px;
	line-height: 1.65;
}

.quick-lookup-grid {
	gap: 20px !important;
}

@media (max-width: 960px) {
	.feedback-page {
		grid-template-columns: 1fr;
		width: min(100%, 1120px);
		padding-bottom: 60px;
	}

	.feedback-sidebar {
		position: static;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.feedback-panel-primary,
	.feedback-contact-note {
		grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {
	.feedback-page {
		gap: 28px;
		padding-bottom: 48px;
	}

	.feedback-page.section-space {
		padding-block: 40px 48px;
	}

	.feedback-sidebar {
		gap: 24px;
	}

	.feedback-sidebar,
	.feedback-form .feedback-form-grid {
		grid-template-columns: 1fr;
	}

	.feedback-panel,
	.feedback-form-card {
		padding: 20px !important;
	}

	.quick-lookup-section {
		padding-bottom: 44px !important;
	}

	.feedback-submit-row {
		align-items: stretch;
		flex-direction: column;
	}
}
