/**
 * Countries Trust - Frontend Styles
 * Matches the reference image layout with premium scroll animations.
 */

.ct-countries-wrapper {
	width: 100%;
	padding:0px 0;
	box-sizing: border-box;
}

.ct-countries-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 12px;
	list-style: none;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* Center alignment */
.ct-countries-grid.ct-center {
	justify-content: center;
}

/* Fixed columns (default 12) */
.ct-countries-grid.ct-cols-1  > .ct-country-item { width: calc(100% / 1  - 12px); }
.ct-countries-grid.ct-cols-2  > .ct-country-item { width: calc(100% / 2  - 12px); }
.ct-countries-grid.ct-cols-3  > .ct-country-item { width: calc(100% / 3  - 12px); }
.ct-countries-grid.ct-cols-4  > .ct-country-item { width: calc(100% / 4  - 12px); }
.ct-countries-grid.ct-cols-5  > .ct-country-item { width: calc(100% / 5  - 12px); }
.ct-countries-grid.ct-cols-6  > .ct-country-item { width: calc(100% / 6  - 12px); }
.ct-countries-grid.ct-cols-7  > .ct-country-item { width: calc(100% / 7  - 12px); }
.ct-countries-grid.ct-cols-8  > .ct-country-item { width: calc(100% / 8  - 12px); }
.ct-countries-grid.ct-cols-9  > .ct-country-item { width: calc(100% / 9  - 12px); }
.ct-countries-grid.ct-cols-10 > .ct-country-item { width: calc(100% / 10 - 12px); }
.ct-countries-grid.ct-cols-11 > .ct-country-item { width: calc(100% / 11 - 12px); }
.ct-countries-grid.ct-cols-12 > .ct-country-item { width: calc(100% / 12 - 12px); }
.ct-countries-grid.ct-cols-13 > .ct-country-item { width: calc(100% / 13 - 12px); }
.ct-countries-grid.ct-cols-14 > .ct-country-item { width: calc(100% / 14 - 12px); }
.ct-countries-grid.ct-cols-15 > .ct-country-item { width: calc(100% / 15 - 12px); }
.ct-countries-grid.ct-cols-16 > .ct-country-item { width: calc(100% / 16 - 12px); }
.ct-countries-grid.ct-cols-17 > .ct-country-item { width: calc(100% / 17 - 12px); }
.ct-countries-grid.ct-cols-18 > .ct-country-item { width: calc(100% / 18 - 12px); }
.ct-countries-grid.ct-cols-19 > .ct-country-item { width: calc(100% / 19 - 12px); }
.ct-countries-grid.ct-cols-20 > .ct-country-item { width: calc(100% / 20 - 12px); }

/* Auto columns based on screen size */
.ct-countries-grid.ct-auto-cols > .ct-country-item {
	width: calc(100% / 12 - 12px);
}

/* Country item */
.ct-country-item {
	box-sizing: border-box;
	text-align: center;
	/* Animation base state — no transition by default (silent reset) */
	opacity: 1; /*0*/
	/*transform: translateY(24px);
	transition: none;*/
}

/* Enable transition only when animating in on scroll down */
/*.ct-country-item.ct-animate {
	transition: opacity 0.45s ease, transform 0.45s ease;
	transition-delay: var(--ct-delay, 0s);
}
*/
.ct-country-item.ct-visible {
	opacity: 1;
	/*transform: translateY(0);*/
}

.ct-country-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 8px 4px;
}

.ct-flag-wrap {
	width: 60px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 6px;
	overflow: hidden;
	border-radius: 2px;
}

.ct-flag-img {
	max-width: 60px;
	max-height: 40px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 2px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ct-country-code {
	font-weight: 700;
	color: #1d2327;
	letter-spacing: 0.5px;
	margin-bottom: 2px;
	line-height: 1.3;
	text-transform: uppercase;
}

.ct-students-count {
	font-size: 11px;
	color: #646970;
	line-height: 1.3;
	white-space: nowrap;
}

.ct-no-countries {
	text-align: center;
	padding: 30px;
	color: #646970;
}

/* ========== Responsive breakpoints ========== */

/* Large tablets / small desktops */
@media (max-width: 1200px) {
	.ct-countries-grid.ct-cols-12 > .ct-country-item,
	.ct-countries-grid.ct-cols-11 > .ct-country-item,
	.ct-countries-grid.ct-cols-10 > .ct-country-item,
	.ct-countries-grid.ct-auto-cols > .ct-country-item {
		width: calc(100% / 8 - 12px);
	}
}

/* Tablets */
@media (max-width: 992px) {
	.ct-countries-grid.ct-cols-12 > .ct-country-item,
	.ct-countries-grid.ct-cols-11 > .ct-country-item,
	.ct-countries-grid.ct-cols-10 > .ct-country-item,
	.ct-countries-grid.ct-cols-9 > .ct-country-item,
	.ct-countries-grid.ct-cols-8 > .ct-country-item,
	.ct-countries-grid.ct-auto-cols > .ct-country-item {
		width: calc(100% / 6 - 12px);
	}
}

/* Small tablets */
@media (max-width: 768px) {
	.ct-countries-grid > .ct-country-item {
		width: calc(100% / 4 - 12px) !important;
	}

	.ct-flag-wrap {
		width: 56px;
		height: 42px;
	}

	.ct-flag-img {
		max-width: 56px;
		max-height: 42px;
	}
}

/* Mobile */
@media (max-width: 480px) {
	.ct-countries-grid > .ct-country-item {
		width: calc(100% / 3 - 10px) !important;
	}

	.ct-countries-grid {
		gap: 12px 8px;
	}

	.ct-flag-wrap {
		width: 48px;
		height: 36px;
	}

	.ct-flag-img {
		max-width: 48px;
		max-height: 36px;
	}

	.ct-country-code {
		font-size: 12px;
	}

	.ct-students-count {
		font-size: 10px;
	}
}

/* Very small screens */
@media (max-width: 360px) {
	.ct-countries-grid > .ct-country-item {
		width: calc(100% / 2 - 8px) !important;
	}
}
