/* ==========================================================================
   Country Page (pages/template-country.php)
   Scoped to .cp. Policies section reuses the theme's .documents__* styles.
   ========================================================================== */

.cp {
	--cp-blue: #0061aa;
	--cp-blue-dark: #004b85;
	--cp-yellow: #ffd046;
	--cp-gold: #dcc874;
	--cp-ink: #164059;
	/* Design is set in Gotham (Book 400 / Medium 500 / Bold 700 / Light 300). Montserrat is the free stand-in until a Gotham web licence is loaded. */
	--cp-font: 'Gotham', 'Montserrat', 'HelveticaNeueCyr', Arial, sans-serif;
	--cp-track: -0.03em; /* PSD tracking is -60 (-0.06em); halved for body copy legibility, headings use the full value */
	--cp-radius: 1rem;
	--cp-gutter: clamp(1.25rem, 3.125vw, 3.75rem); /* 60px at 1920 */
	--cp-header-h: 110px; /* theme .header is position:absolute over the page */

	font-family: var(--cp-font);
	letter-spacing: var(--cp-track);
	color: var(--cp-ink);
	overflow-x: clip;
}

.cp *,
.cp *::before,
.cp *::after { box-sizing: border-box; }

.cp img { max-width: 100%; height: auto; display: block; }

.cp-container {
	width: 100%;
	max-width: 1920px;
	margin: 0 auto;
	padding: 0 var(--cp-gutter);
}

.cp-heading {
	font-family: var(--cp-font);
	font-weight: 700;
	font-size: clamp(2rem, 3vw, 3.6rem); /* 57.6px */
	line-height: 1.1;
	letter-spacing: -0.06em;
	color: var(--cp-blue);
	margin: 0 0 clamp(1.5rem, 2.5vw, 2.75rem);
}
.cp-heading--light { color: #fff; }

.cp-rule {
	border: 0;
	height: 0.5rem; /* 8px */
	background: #fff;
	margin: clamp(3rem, 5vw, 5rem) 0 0;
}
.cp-rule--blue { background: var(--cp-blue); }

/* ----------------------------------------------------------------- Sub-nav */
.cp-subnav {
	background: var(--cp-blue);
	position: sticky;
	top: 0;
	z-index: 50;
}
.cp-subnav__inner {
	display: flex;
	align-items: center;
	gap: 2rem;
	min-height: clamp(4.5rem, 6.67vw, 8rem); /* 128px */
}
.cp-subnav__logo img { height: clamp(2.75rem, 3.55vw, 4.25rem); width: auto; } /* 223x68 */
.cp-subnav__menu {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	display: flex;
	gap: clamp(1.5rem, 6vw, 8rem);
}
.cp-subnav__menu a {
	color: #fff;
	text-decoration: none;
	font-weight: 400;
	font-size: clamp(1rem, 1.1vw, 1.3125rem); /* 21px */
	padding: 0.5rem 0;
	border-bottom: 2px solid transparent;
	transition: border-color 0.3s ease;
}
.cp-subnav__menu a:hover,
.cp-subnav__menu a:focus-visible { border-color: var(--cp-yellow); }

/* ------------------------------------------------------------------- Hero */
.cp-hero {
	position: relative;
	text-align: center;
	padding: calc(var(--cp-header-h) + clamp(1.25rem, 2.5vw, 3rem)) 0 clamp(2.5rem, 4vw, 4rem);
	background:
		linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 45%, #fff 82%),
		var(--cp-hero-bg, none) center top / cover no-repeat,
		#fff;
}
.cp-hero__inner { max-width: 1400px; }

.cp-hero__logo { margin: 0 auto 1.5rem; }
.cp-hero__logo img { margin: 0 auto; width: clamp(14rem, 27vw, 32.5rem); } /* 520px */

.cp-hero__title {
	margin: 0 auto 2.5rem;
	font-family: var(--cp-font);
	font-weight: 900;
	line-height: 0.85;
	letter-spacing: -0.06em;
}
.cp-hero__title img { margin: 0 auto; width: min(100%, 58.875rem); } /* 942px */

.cp-hero__line1 {
	display: block;
	color: var(--cp-blue);
	font-size: clamp(4rem, 13vw, 14rem);
}
.cp-hero__line2 {
	display: inline-flex;
	align-items: flex-end;
	gap: 0.15em;
	font-size: clamp(3.25rem, 10vw, 10.5rem);
}
.cp-hero__line2 small {
	color: var(--cp-blue);
	font-size: 0.3em;
	padding-bottom: 0.18em;
}
.cp-hero__country {
	background: linear-gradient(90deg, #e3262b 0%, #f39220 22%, #fcd22c 48%, #9cc63e 72%, #22a24a 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.cp-hero__intro {
	max-width: 86rem; /* 1374px */
	margin: 0 auto 2rem;
	font-weight: 400;
	font-size: clamp(1.1rem, 1.8vw, 2.15625rem); /* 34.5px Book */
	line-height: 1.3;
	color: var(--cp-blue);
}
.cp-hero__tagline {
	margin: 0 auto 2rem;
	font-weight: 700;
	font-size: clamp(1.2rem, 2.08vw, 2.5rem); /* 40px Bold */
	color: var(--cp-blue);
}

.cp-hero__logos {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: clamp(1rem, 3.5vw, 3.75rem);
}
.cp-hero__logos img {
	height: clamp(2.5rem, 5vw, 6rem);
	width: auto;
	max-width: 15rem;
	object-fit: contain;
	transition: transform 0.3s ease;
}
.cp-hero__logos a:hover img { transform: translateY(-3px); }

/* ------------------------------------------------------------------- News */
.cp-news {
	background: var(--cp-blue);
	color: #fff;
	padding: clamp(4rem, 6vw, 7rem) 0 clamp(4rem, 8vw, 9rem);
}
.cp-news__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.25rem, 1.77vw, 2.125rem); /* 34px */
}
.cp-news__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
.cp-news__img {
	display: block;
	width: 100%;
	aspect-ratio: 576 / 363;
	border-radius: var(--cp-radius);
	overflow: hidden;
	background: var(--cp-blue-dark);
	margin-bottom: 1.25rem;
}
.cp-news__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.cp-news__card:hover .cp-news__img img { transform: scale(1.03); }

.cp-news__cat {
	color: var(--cp-yellow);
	font-size: clamp(1rem, 1.2vw, 1.45rem); /* 23.2px Book */
	margin-bottom: 0.75rem;
}
.cp-news__title {
	font-family: var(--cp-font);
	font-weight: 500;
	font-size: clamp(1.2rem, 1.72vw, 2.0625rem); /* 33px Medium */
	line-height: 1.2;
	margin: 0 0 1.5rem;
}
.cp-news__title a { color: #fff; text-decoration: none; }
.cp-news__title a:hover { text-decoration: underline; text-underline-offset: 0.15em; }

.cp-news__more,
.cp-news__all {
	margin-top: auto;
	color: #fff;
	font-weight: 300;
	font-size: clamp(1.1rem, 1.72vw, 2.0625rem); /* 33px Light */
	text-decoration: none;
}
.cp-news__more:hover,
.cp-news__all:hover { color: var(--cp-yellow); }
.cp-news__all { display: inline-block; margin-top: 2.5rem; }

/* ---------------------------------------------------------------- Sectors */
.cp-sectors {
	background: #fff;
	padding: clamp(4rem, 6vw, 7rem) 0 clamp(2rem, 3vw, 3rem);
}
.cp-sectors__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.5rem, 1.95vw, 2.35rem) 0.375rem; /* 6px column gap */
}
.cp-sector {
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
	text-decoration: none;
	color: var(--cp-blue);
}
.cp-sector__media {
	position: relative;
	display: block;
	aspect-ratio: 596 / 316;
	border-radius: var(--cp-radius);
	overflow: hidden;
	background: #e9f1f8;
}
.cp-sector__photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
a.cp-sector:hover .cp-sector__photo { transform: scale(1.04); }

.cp-sector__badge {
	position: absolute;
	top: 0;
	left: 0;
	width: 32.5%;
	aspect-ratio: 197 / 159;
	background: var(--cp-yellow);
	border-radius: var(--cp-radius) 0 var(--cp-radius) 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem;
}
.cp-sector__badge img {
	max-height: 100%;
	width: auto;
	object-fit: contain;
}
.cp-sector__name {
	text-align: center;
	font-weight: 700;
	font-size: clamp(1.1rem, 1.72vw, 2.07rem); /* 33px Bold */
	line-height: 1.2;
}

/* --------------------------------------------- Policies (on top of .documents) */
.cp-policies { padding: clamp(4rem, 6vw, 7rem) 0; background: #fff; }
.cp-policies .documents__items { max-width: 1800px; }

/* ------------------------------------------------------------ Quick links */
.cp-quick {
	background: #fff;
	padding: clamp(5rem, 9vw, 10rem) 0 clamp(5rem, 9vw, 10rem);
}
.cp-quick__row {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: clamp(2rem, 4vw, 4.5rem);
}
.cp-quick__logo {
	padding-right: clamp(2rem, 4vw, 4.5rem);
	border-right: 5px solid var(--cp-blue);
	align-self: stretch;
	display: flex;
	align-items: center;
}
.cp-quick__logo img { width: clamp(11rem, 15vw, 18.0625rem); } /* 289px */

.cp-quick__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.cp-quick__link {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
}
.cp-quick__icon { color: var(--cp-blue); display: inline-flex; width: 3.125rem; justify-content: center; } /* 50px */
.cp-quick__icon svg { width: 100%; height: auto; }
.cp-quick__pill {
	min-width: clamp(14rem, 17.4vw, 20.875rem); /* 334px */
	min-height: clamp(2.75rem, 3.6vw, 4.3rem); /* 69px */
	display: inline-flex;
	align-items: center;
	background: var(--cp-blue);
	color: var(--cp-gold);
	font-weight: 500;
	font-size: clamp(1.2rem, 2.03vw, 2.4375rem); /* 39px Medium */
	padding: 0 1.1rem;
	border-radius: 2rem;
	transition: background-color 0.3s ease, color 0.3s ease;
}
.cp-quick__link:hover .cp-quick__pill,
.cp-quick__link:focus-visible .cp-quick__pill { background: var(--cp-blue-dark); color: #fff; }

.cp-quick__legal {
	list-style: none;
	margin: 3.5rem 0 0;
	padding: 0;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
}
.cp-quick__legal li + li::before {
	content: '|';
	color: var(--cp-blue);
	margin: 0 0.75rem;
}
.cp-quick__legal a {
	color: var(--cp-blue);
	text-decoration: none;
	font-size: clamp(1rem, 1.72vw, 2.0625rem); /* 33px Book */
}
.cp-quick__legal a:hover { text-decoration: underline; }

/* ----------------------------------------------------------- Flag gradient */
.cp-flagbar {
	height: clamp(0.75rem, 1.875vw, 2.25rem); /* 36px */
	background: linear-gradient(90deg, #f7e239 0%, #dfe239 25%, #a7e03d 40%, #479b7a 55%, #0762a9 75%, #0762ab 100%);
}

/* ------------------------------------------------------------- Responsive */
@media (max-width: 1024px) {
	.cp-news__grid,
	.cp-sectors__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cp-sectors__grid { gap: 2rem 1rem; }
}

@media (max-width: 770px) {
	.cp { --cp-header-h: 80px; }

	.cp-subnav { position: static; }
	.cp-subnav__inner { flex-direction: column; gap: 0.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
	.cp-subnav__menu {
		gap: 1.25rem;
		overflow-x: auto;
		max-width: 100%;
		scrollbar-width: none;
	}
	.cp-subnav__menu a { white-space: nowrap; font-size: 0.95rem; }

	.cp-news__grid,
	.cp-sectors__grid { grid-template-columns: 1fr; }

	/* Hero logo strip: 4 per row (last row centred) instead of one tiny row */
	.cp-hero__logos { gap: 1.5rem 1rem; }
	.cp-hero__logos li {
		flex: 0 0 calc(25% - 0.75rem);
		display: flex;
		justify-content: center;
	}
	.cp-hero__logos img { height: 3rem; max-width: 100%; }

	.cp-sector__badge { width: 27%; padding: 0.5rem; }

	.cp-quick { padding: 3.5rem 0 4rem; }
	.cp-quick__row { flex-direction: column; gap: 2rem; }
	.cp-quick__logo {
		align-self: center;
		justify-content: center;
		border-right: 0;
		border-bottom: 4px solid var(--cp-blue);
		padding: 0 1.5rem 1.75rem;
	}
	.cp-quick__logo img { width: 10rem; }
	.cp-quick__legal { margin-top: 2.5rem; }
	.cp-quick__pill { min-width: 14rem; }
}

@media (prefers-reduced-motion: reduce) {
	.cp *,
	.cp *::before,
	.cp *::after { transition: none !important; }
}
