/*!
Theme Name: ACE-GFA
Theme URI: https://www.ardb.com.kh/
Author: ARDB
Author URI: https://www.ardb.com.kh/
Description: ACE-GFA is dedicated to enhancing rural and agricultural finance in the Asia-Pacific region. Through knowledge sharing, capacity building, and best practices promotion, we empower member institutions to achieve sustainable growth and success.
License URI: LICENSE
Text Domain: ace-gfa
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/
@font-face {
	font-family: 'Siemreap';
	src: url('assets/fonts/Siemreap-Regular.woff2') format('woff2'),
		url('assets/fonts/Siemreap-Regular.woff') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Hanuman';
	src: url('assets/fonts/Hanuman-Regular.woff2') format('woff2'),
		url('assets/fonts/Hanuman-Regular.woff') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Inter';
	src: url('assets/fonts/Inter.woff2') format('woff2'),
		url('assets/fonts/Inter.woff') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Fraunces';
	src: url('assets/fonts/Fraunces.woff2') format('woff2'),
		url('assets/fonts/Fraunces.woff') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

:root {
	--primary: #0F9147;
	--secondary: #871C42;
	--light: #F1F2F2;
	--border: #D59B2F;
	--fontBi: "bootstrap-icons";
}

html:lang(en) {
	--primaryfont: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif, 'Hanuman';
	--headingfont: 'Fraunces', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif, 'Siemreap';
}

html:lang(km) {
	--primaryfont: 'Hanuman', 'Inter';
	--headingfont: 'Siemreap', 'Fraunces';
}

body {
	background: #fff;
	font-family: var(--primaryfont);
}
.tooltip-inner {
    font-family: var(--primaryfont);
}

main,
section {
	max-width: 100%;
	width: 100%;
	overflow-x: hidden;
}

.active>.page-link,
.page-link.active {
	background-color: var(--primary);
	border: none;
}

.page-link {
	color: var(--primary);

	&:hover {
		background-color: var(--secondary);
		color: #fff;
	}

	&:focus {
		outline: none;
		box-shadow: none;
	}
}

footer {
	background-color: var(--secondary);
	color: #fff;
	padding-top: 1em;
	padding-bottom: 1em;
	border-top: 10px solid var(--border);

	a {
		color: #fff;
	}

	a:hover {
		color: #fff;
		transition: color 0.3s ease-in-out;
		font-weight: 500;
	}
}

.page-header {
	text-align: center;
	margin-bottom: 2.5em;
}

.text-center .line:before {
	margin-left: -40px;
	left: 50%;
	width: 80px
}

.line {
	position: relative;
	padding: 10px 0;
	color: var(--primary);
}

.line:before {
	content: '';
	position: absolute;
	left: 0;
	width: 60px;
	bottom: 0;
	height: 1px;
	background: var(--primary)
}

.no-hover:hover {
	background-color: inherit !important;
	color: var(--primary) !important;
	border: 1px solid var(--primary);
}

.custom-tooltip {
	--bs-tooltip-bg: var(--primary);
	--bs-tooltip-color: var(--bs-white);
}

.social-links,
.contact-info {
	margin-bottom: 1rem;
	margin-top: 1rem;
	margin-left: 0;
	padding-left: 0;
	list-style: none;
}

.social-links li {
	display: inline-block;
	margin-right: 10px;
	margin-bottom: 0.5rem;
}

.social-links button,
.social-links a {
	background: #fff;
	border-radius: 10px;
	width: 40px;
	height: 40px;
	line-height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s ease;
	color: var(--secondary);
	border-style: solid;
	border-width: 1px;
	border-color: var(--secondary);
}

#contact-page .social-links a {
	background: #939598;
	border-color: #939598;
	color: #fff;
}

.social-links a:hover.social-icon {
	border-color: var(--border);
	color: var(--secondary);
}

.social-links a:hover.social-icon.facebook {
	color: #0866FF
}

.social-links a:hover.social-icon.telegram {
	color: #2496D1
}

.social-links a:hover.social-icon.instagram {
	color: #DC0036
}

.social-links a:hover.social-icon.linkedin {
	color: #0A63BC
}

.social-links a:hover.social-icon.twitter {
	color: #000000
}

.post-thumbnail {
	max-height: 400px;
	object-fit: contain;
	width: 100%;
}

.related-post img,
img.img-cover,
img.wh200 {
	height: 200px;
}

img.wh200 {
	width: 200px;
	max-width: 200px;
}

.wh60 {
	width: 60px;
	height: 60px;
}

img {
	height: auto;
	max-width: 100%;
	border-style: none;
	object-fit: cover;
	object-position: center;
	display: block;
	margin: auto 0;
}

.text-truncate-2 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
	line-clamp: 2;
	display: box;
}

.text-truncate-3 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	text-overflow: ellipsis;
	line-clamp: 3;
	display: box;
}

.not-found img {
	max-height: 280px;
}

article,
section {
	margin-bottom: 1rem;
}

section {
	padding: 1rem 0;
}

/* Remove inner focus ring (only if you have your own focus styles!) */
button,
[type="button"],
[type="reset"],
[type="submit"] {
	outline: none;
	box-shadow: none;
}

/* Remove number input spinners */
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

[type="number"] {
	-moz-appearance: textfield;
	-webkit-appearance: none;
	appearance: textfield;
}

ul {
	list-style: square;
}

ol {
	list-style: decimal;
}

li>ul,
li>ol {
	margin-bottom: 0;
	margin-left: 0;
}

/* Make sure embeds and iframes fit their containers. */
embed,
iframe,
object {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 350px;
	margin: 1rem auto;
	border-radius: 1.5rem;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1)
}

figure {
	margin: auto 0;
}

table {
	margin: 0 0 1em;
	width: 100%;
}

/* Links
--------------------------------------------- */
a {
	color: var(--primary);
	text-decoration: none;
	background-color: transparent;
	transition: color 0.3s ease;
}

a:hover,
a:focus,
a:active {
	outline: none;
	color: var(--border);
}

.text-justify {
	text-align: justify;
	text-align-last: left;
	word-spacing: normal;
	letter-spacing: 0;
	hyphens: none;
	overflow-wrap: anywhere;
}

/* Forms
--------------------------------------------- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
	-webkit-box-shadow: 0 0 0 1000px var(--light, #fff) inset !important;
	-webkit-text-fill-color: #000;
}

input:-moz-autofill {
	box-shadow: 0 0 0 1000px var(--light, #fff) inset !important;
	-moz-text-fill-color: #000;
}

select,
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	background: linear-gradient(to bottom right, #29A649, #0C6939);
	color: #fff;
	letter-spacing: 2.5px;
	cursor: pointer;
}

textarea {
	height: 150px;
}

textarea,
select,
input,
button {
	padding: .5em 1.5em;
	border-radius: 1.5rem;
	border-style: solid;
	border-width: 1px;
	border-color: #ccc;
}

select {
	appearance: none;
	border: 0;
	outline: 0;

	&:hover {
		background-color: var(--secondary);
	}

	option {
		background-color: var(--primary);
		color: #fff;
	}
}

button[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
button:active,
button:focus,
input[type="button"]:active,
input[type="button"]:focus,
input[type="reset"]:active,
input[type="reset"]:focus,
input[type="submit"]:active,
input[type="submit"]:focus {
	border-color: var(--border);
}

#topcontrol {
	width: 40px;
	height: 40px;
	right: 1em;
	bottom: 2em;
	position: fixed;
}

.icon-up {
	animation: ToTopButton .6s ease infinite alternate;
}

#topcontrol::after {
	color: var(--border);
	font-weight: bold;
	content: "\F286";
	font-family: var(--fontBi);
	position: absolute;
	top: -1.5rem;
	animation: ToTopButton .8s ease infinite;
}

@keyframes ToTopButton {
	0% {
		opacity: 0
	}

	to {
		opacity: 1
	}
}

i {
	font-size: 20px;
}

.post-navigation {
	margin: 1.5em 0;
}

.footer-nav,
.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-nav li {
	display: inline-block;
	margin-right: 10px;
	position: relative;
}

.comment-navigation .nav-links,
.post-navigation .nav-links {
	display: flex;
}

.comment-navigation .nav-previous,
.post-navigation .nav-previous {
	flex: 1 0 50%;
}

.comment-navigation .nav-next,
.post-navigation .nav-next {
	text-align: end;
	flex: 1 0 50%;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.entry-title {
	margin-bottom: .5em;
	line-height: 1.8;
	font-family: var(--headingfont);
}

.page-content,
.entry-content,
.entry-summary {
	padding: 1.5em auto;
}

.entry-content img {
	margin-bottom: 1rem;
}

.page-links {
	clear: both;
	margin: 0 0 1.5em;
}

.card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

@media print {

	*,
	.shadow {
		background: #fff;
		color: #000;
		box-shadow: none !important;
		text-shadow: none !important;
	}

	.container {
		max-width: 100%;
	}

	.container,
	.card,
	.card-body {
		margin: 0;
		padding: 0;
		border: none;
	}

	table,
	img {
		break-inside: avoid
	}

	@page {
		size: A4;
		margin: .5in
	}

	.sticky-top {
		position: static !important
	}

	.search-form,
	.post-share,
	.tooltip,
	.related-post,
	.navbar-nav,
	.nav-right,
	.post-navigation,
	footer,
	.navbar-toggler,
	#topcontrol {
		display: none !important
	}
}

.bglight {
	background-color: var(--light);
}

.bgprimary {
	background-color: var(--primary);
}

.bgprimary-light {
	background-color: rgba(21, 146, 70, 0.1);
}

.bgsecondary-light {
	background-color: rgba(135, 28, 66, 0.1);
}

.textprimary {
	color: var(--primary);
	font-weight: bold;
}

.textsecondary {
	color: var(--secondary);
	font-weight: bold;
}

#custom-search-desktop-results,
#custom-search-mobile-results {
	background: #fff;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
	position: absolute;
	width: 100%;
	top: 100%;
	left: 0;
	z-index: 1001;
	max-height: 300px;
	overflow-y: auto;
}

.search-form {
	display: flex;
	gap: 0;
	border-style: solid;
	border-width: 1px;
	border-color: transparent;
	background: var(--light);
	border-radius: 1.5rem;
}

.search-form .search-field {
	width: 100%;
	background: none;
	border: none;
	padding: 8px 0 8px 16px;

	&:focus {
		outline: 0;
	}
}

.search-submit {
	padding: 0 12px;
	border-bottom-left-radius: 0;
	border-top-left-radius: 0;
}

/* Comments
--------------------------------------------- */
.comment-content a {
	word-wrap: break-word;
}

.bypostauthor {
	display: block;
}

/* Widgets
--------------------------------------------- */
.widget {
	margin: 0 0 1.5em;
}

.widget select {
	max-width: 100%;
}

.custom-logo-link {
	display: inline-block;
}

.site-name,
.site-title {
	font-size: 1.25rem;
	font-weight: 500;
	font-weight: bold;
}

.custom-logo {
	height: 60px;
	width: auto;
}

.wp-caption {
	margin-bottom: 1.5em;
	max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.gallery {
	display: grid;
	grid-gap: 1.5em;
	margin-bottom: 1.5em;
	--columns: 3;
	/* default */
	grid-template-columns: repeat(var(--columns), 1fr);
}

.gallery-item {
	text-align: center;
	width: 100%;
}

.gallery-item img {
	object-fit: contain;
	width: 100%;
	height: auto;
}

.gallery-caption {
	display: block;
	margin-top: 0.5em;
	font-size: 0.875em;
	color: #666;
}

/* Columns */
.gallery-columns-1 {
	--columns: 1;
}

.gallery-columns-2 {
	--columns: 2;
}

.gallery-columns-3 {
	--columns: 3;
}

.gallery-columns-4 {
	--columns: 4;
}

.gallery-columns-5 {
	--columns: 5;
}

.gallery-columns-6 {
	--columns: 6;
}

.gallery-columns-7 {
	--columns: 7;
}

.gallery-columns-8 {
	--columns: 8;
}

.gallery-columns-9 {
	--columns: 9;
}

/* Responsive tweaks */
@media (max-width: 1024px) {
	.gallery {
		--columns: 3;
	}
}

@media (max-width: 768px) {
	.gallery {
		--columns: 2;
	}
}

@media (max-width: 480px) {
	.gallery {
		--columns: 1;
	}
}


@media (max-width: 768px) {
	.custom-logo {
		height: 45px;
	}
}

@media (max-width: 376px) {
	.custom-logo {
		height: 40px;
	}
}

.alignleft {
	float: left;
	margin-right: 1.5em;
	margin-bottom: 1.5em;
}

.alignright {
	float: right;
	margin-left: 1.5em;
	margin-bottom: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1.5em;
}

/* animation */
.zoom-in-out-element {
	animation: zoom-in-zoom-out 3s ease infinite;
}

@keyframes zoom-in-zoom-out {
	0% {
		scale: 75%;
	}

	50% {
		scale: 100%;
	}

	100% {
		scale: 75%;
	}
}

.fade-in {
	opacity: 1;
	animation-name: fadeIn;
	animation-iteration-count: 1;
	animation-timing-function: ease-in;
	animation-duration: 3s;
}

@keyframes fadeIn {
	0% {
		opacity: 0;
	}

	100% {
		opacity: 1;
	}
}