/*
 * Monks Global – Country Markets
 * LAYOUT ONLY. No brand palette or font stack is introduced here — colours and
 * typography are inherited from the active WPResidence theme. The few colour
 * touches below use neutral, self-referential values (currentColor / rgba) and
 * theme-overridable custom properties, never hardcoded brand hex.
 *
 * To map these onto WPResidence's own tokens, override in the theme, e.g.:
 *   .mg-country-page { --mg-accent: var(--your-theme-primary, #...); }
 */

.mg-country-page {
	/* Overridable hooks — default to values that lean on the theme. */
	--mg-accent: currentColor;
	--mg-max-width: 1200px;
	--mg-gap: clamp(1rem, 3vw, 2.5rem);
	--mg-radius: 8px;
	--mg-muted: rgba(0, 0, 0, 0.06);
}

/* ---- Layout primitives ------------------------------------------------- */
.mg-country-page .mg-container {
	width: 100%;
	max-width: var(--mg-max-width);
	margin-inline: auto;
	padding-inline: clamp(1rem, 5vw, 2rem);
	box-sizing: border-box;
}
.mg-country-page .mg-container--narrow {
	max-width: 760px;
}
.mg-country-page .mg-section {
	padding-block: clamp(2.5rem, 6vw, 5rem);
}
.mg-country-page .mg-section__title {
	margin: 0 0 0.5em;
}
.mg-country-page .mg-section__intro {
	max-width: 720px;
	margin: 0 0 2rem;
}

/* ---- Buttons (inherit theme colours; layout + shape only) -------------- */
.mg-country-page .mg-btn {
	display: inline-block;
	padding: 0.75em 1.5em;
	margin: 0.35rem 0.5rem 0.35rem 0;
	border: 1px solid currentColor;
	border-radius: var(--mg-radius);
	text-decoration: none;
	line-height: 1.2;
	cursor: pointer;
}
.mg-country-page .mg-btn--primary {
	/* Filled look without a brand colour: invert text/background via theme. */
	background: var(--mg-accent);
	color: #fff;
	border-color: var(--mg-accent);
}
.mg-country-page .mg-btn--secondary {
	background: transparent;
}

/* ---- Hero -------------------------------------------------------------- */
.mg-country-page .mg-hero {
	position: relative;
	background-size: cover;
	background-position: center;
}
.mg-country-page .mg-hero--has-bg {
	color: #fff;
}
.mg-country-page .mg-hero--has-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}
.mg-country-page .mg-hero__inner {
	position: relative;
	padding-block: clamp(3rem, 10vw, 7rem);
	max-width: 800px;
}
.mg-country-page .mg-hero__heading {
	margin: 0 0 0.3em;
	font-size: clamp(2rem, 5vw, 3.25rem);
	line-height: 1.1;
}
.mg-country-page .mg-hero__subheading {
	font-size: clamp(1.1rem, 2.5vw, 1.5rem);
	opacity: 0.92;
	margin: 0 0 1rem;
}
.mg-country-page .mg-hero--has-bg .mg-btn--secondary {
	color: #fff;
	border-color: #fff;
}

/* ---- Stats grid -------------------------------------------------------- */
.mg-country-page .mg-stats__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--mg-gap);
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	text-align: center;
}
.mg-country-page .mg-stats__value {
	display: block;
	font-size: clamp(1.8rem, 4vw, 2.75rem);
	font-weight: 700;
	line-height: 1.1;
	color: var(--mg-accent);
}
.mg-country-page .mg-stats__label {
	display: block;
	margin-top: 0.35rem;
	opacity: 0.8;
}

/* ---- Why-invest / card grids ------------------------------------------ */
.mg-country-page .mg-why__grid,
.mg-country-page .mg-developers__grid,
.mg-country-page .mg-projects__grid,
.mg-country-page .mg-gallery__grid {
	display: grid;
	gap: var(--mg-gap);
}
.mg-country-page .mg-why__grid {
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.mg-country-page .mg-developers__grid,
.mg-country-page .mg-projects__grid {
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.mg-country-page .mg-gallery__grid {
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.mg-country-page .mg-why__icon {
	font-size: 2rem;
	line-height: 1;
	display: inline-block;
	margin-bottom: 0.5rem;
}

/* ---- Cards (developers / projects / archive) -------------------------- */
.mg-country-page .mg-card {
	border: 1px solid var(--mg-muted);
	border-radius: var(--mg-radius);
	overflow: hidden;
	background: transparent;
}
.mg-country-page .mg-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
	height: 100%;
}
.mg-country-page .mg-card__media img {
	display: block;
	width: 100%;
	height: 200px;
	object-fit: cover;
}
.mg-country-page .mg-card__body,
.mg-country-page .mg-developers__item .mg-card__link {
	padding: 1rem 1.15rem;
}
.mg-country-page .mg-card__title {
	margin: 0 0 0.35rem;
	font-size: 1.15rem;
}
.mg-country-page .mg-card__meta {
	font-weight: 700;
	color: var(--mg-accent);
	margin: 0;
}
.mg-country-page .mg-card__excerpt {
	margin: 0;
	opacity: 0.8;
}

/* ---- How we work ------------------------------------------------------- */
.mg-country-page .mg-how__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--mg-gap);
}
.mg-country-page .mg-how__item {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}
.mg-country-page .mg-how__num {
	flex: 0 0 auto;
	width: 2.5rem;
	height: 2.5rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--mg-accent);
	color: #fff;
	font-weight: 700;
}
.mg-country-page .mg-how__title {
	margin: 0.2rem 0 0.25rem;
}

/* ---- FAQ --------------------------------------------------------------- */
.mg-country-page .mg-faq__list {
	display: grid;
	gap: 0.75rem;
	max-width: 820px;
}
.mg-country-page .mg-faq__item {
	border: 1px solid var(--mg-muted);
	border-radius: var(--mg-radius);
	padding: 0.5rem 1rem;
}
.mg-country-page .mg-faq__q {
	cursor: pointer;
	font-weight: 600;
	padding: 0.5rem 0;
}
.mg-country-page .mg-faq__a {
	padding-bottom: 0.75rem;
}

/* ---- Gallery ----------------------------------------------------------- */
.mg-country-page .mg-gallery__item {
	margin: 0;
}
.mg-country-page .mg-gallery__item img {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: cover;
	border-radius: var(--mg-radius);
}

/* ---- CTA band ---------------------------------------------------------- */
.mg-country-page .mg-cta {
	position: relative;
	text-align: center;
	background-size: cover;
	background-position: center;
}
.mg-country-page .mg-cta--has-bg {
	color: #fff;
}
.mg-country-page .mg-cta--has-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}
.mg-country-page .mg-cta__inner {
	position: relative;
}

/* ---- Dark-scheme nicety for the neutral card border ------------------- */
@media (prefers-color-scheme: dark) {
	.mg-country-page {
		--mg-muted: rgba(255, 255, 255, 0.14);
	}
}
