/* =========================================================
   COUNTRY PAGE
   ========================================================= */

.country-page-template {
	margin: 0;
}


/* =========================================================
   COUNTRY BANNER
   ========================================================= */

.country-banner {
	margin: 0;
}


/* =========================================================
   BREADCRUMBS
   ========================================================= */

.aupair-breadcrumb-area {
	padding: 16px 24px;
	background: var(--wp--preset--color--background);
}

.aupair-breadcrumbs {
	font-size: 14px;
}

.aupair-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;

	margin: 0;
	padding: 0;

	list-style: none;
}

.aupair-breadcrumbs li {
	display: flex;
	align-items: center;
}

.aupair-breadcrumbs li:not(:last-child)::after {
	content: "›";

	margin-left: 8px;

	color: var(--wp--preset--color--muted);
}

.aupair-breadcrumbs a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.aupair-breadcrumbs a:hover {
	text-decoration: underline;
}

.aupair-breadcrumbs [aria-current="page"] {
	color: var(--wp--preset--color--body-text);
}


/* =========================================================
   GENERAL COUNTRY SECTIONS
   ========================================================= */

.country-section {
	padding:
		clamp(60px, 7vw, 96px)
		clamp(20px, 4vw, 40px);
}

/*
 * Important:
 * Do NOT set margin-top / margin-bottom here on headings,
 * paragraphs, lists, etc.
 *
 * Gutenberg's "Block spacing" control uses margins between
 * child blocks. Hard-coded margins here would override it.
 */

.country-section p {
	line-height: 1.65;
}


/* =========================================================
   CTA ROW
   ========================================================= */

.country-cta-row {
	margin-top: 26px;
	margin-bottom: 36px;

	gap: 12px;
}


/* =========================================================
   QUICK FACTS
   ========================================================= */

.country-facts-grid {
	display: grid !important;

	grid-template-columns: repeat(6, minmax(0, 1fr));

	gap: 12px;

	margin-top: 30px;
}

.country-fact-card {
	height: 100%;

	padding: 18px;

	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
}

/*
 * Heading and paragraph margins are intentionally not
 * defined here so Gutenberg Block Spacing can control them.
 */


/* =========================================================
   REQUIREMENT CARDS
   ========================================================= */

.country-requirement-cards {
	gap: 24px;
}

.country-requirement-card {
	height: 100%;

	padding: clamp(28px, 4vw, 42px);

	border-radius: 14px;
}

.country-tag {
	display: inline-block;

	font-family: var(--wp--preset--font-family--oswald);

	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}


/* =========================================================
   APPLICATION / PROCESS STEPS
   ========================================================= */

.country-steps {
	display: grid !important;

	grid-template-columns: repeat(5, minmax(0, 1fr));

	gap: 16px;
}

.country-step {
	height: 100%;

	padding: 22px;

	border-radius: 12px;
}

/*
 * No heading or paragraph margin rules here.
 *
 * You can now select each .country-step Group in Gutenberg:
 *
 * Dimensions
 * → Block spacing
 * → Small / Medium / Large
 */


/* =========================================================
   PROGRAM DETAILS TABS
   ========================================================= */

.country-details-section .wp-block-tab-list {
	display: flex;
	flex-wrap: wrap;

	gap: 10px;

	margin: 0 0 30px;
	padding: 0;

	/*
	 * Remove Gutenberg's default line below tabs.
	 */
	border: 0 !important;
	border-top: 0 !important;
	border-right: 0 !important;
	border-bottom: 0 !important;
	border-left: 0 !important;

	box-shadow: none !important;
}


/* Remove any line generated using pseudo-elements */

.country-details-section .wp-block-tab-list::before,
.country-details-section .wp-block-tab-list::after {
	display: none !important;

	content: none !important;

	border: 0 !important;
	box-shadow: none !important;
}


/* Individual tab buttons */

.country-details-section .wp-block-tab-list button {
	padding: 10px 18px;

	border: 1px solid var(--wp--preset--color--border) !important;
	border-bottom: 1px solid var(--wp--preset--color--border) !important;

	border-radius: 999px;

	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--body-text);

	cursor: pointer;

	font: inherit;
	font-weight: 700;

	box-shadow: none !important;
}


/* Active tab */

.country-details-section
	.wp-block-tab-list
	button[aria-selected="true"] {

	background: var(--wp--preset--color--primary);

	border-color:
		var(--wp--preset--color--primary) !important;

	border-bottom-color:
		var(--wp--preset--color--primary) !important;

	color: var(--wp--preset--color--white);

	box-shadow: none !important;
}


/* Remove possible active-tab underline */

.country-details-section
	.wp-block-tab-list
	button[aria-selected="true"]::before,

.country-details-section
	.wp-block-tab-list
	button[aria-selected="true"]::after {

	display: none !important;

	content: none !important;

	border: 0 !important;

	box-shadow: none !important;
}


/* =========================================================
   TABLES
   ========================================================= */

.country-table {
	overflow-x: auto;
}

/* =========================================================
   TABLES
   Gutenberg controls visual styling
   ========================================================= */

.country-table {
	width: 100%;
	overflow-x: auto;
}

.country-table table {
	width: 100%;
}

/* =========================================================
   NOTES / INFORMATION BOXES
   ========================================================= */

.country-note {
	padding: 18px 20px;

	border-left:
		4px solid var(--wp--preset--color--aupair-yellow);
}


/* =========================================================
   FAQ
   ========================================================= */

.country-faq .wp-block-details {
	margin-bottom: 12px;

	padding: 0 20px;

	border:
		1px solid var(--wp--preset--color--border);

	border-radius: 10px;

	background:
		var(--wp--preset--color--white);
}

.country-faq .wp-block-details summary {
	padding: 16px 0;

	font-weight: 700;

	cursor: pointer;
}


/* =========================================================
   FINAL CTA
   ========================================================= */

.country-final-cta {
	padding: clamp(42px, 6vw, 70px);

	border-radius: 14px;
}

.country-sources {
	margin-top: 42px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

	.country-facts-grid {
		grid-template-columns:
			repeat(3, minmax(0, 1fr));
	}

	.country-steps {
		grid-template-columns:
			repeat(2, minmax(0, 1fr));
	}
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 782px) {

	.country-banner {
		min-height: 320px !important;
	}

	.country-section {
		padding-top: 55px;
		padding-bottom: 55px;
	}

	.country-facts-grid {
		grid-template-columns:
			repeat(2, minmax(0, 1fr));
	}

	.country-steps {
		grid-template-columns: 1fr;
	}

	.country-details-section .wp-block-tab-list {
		gap: 8px;
	}
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

	.country-facts-grid {
		grid-template-columns: 1fr;
	}

	.country-details-section .wp-block-tab-list {
		display: grid;

		grid-template-columns: 1fr;
	}

	.country-details-section
		.wp-block-tab-list
		button {

		width: 100%;
	}
}


/* =========================================================
   COUNTRY INTRO
   ========================================================= */

.country-intro-columns {
	align-items: center;
}


/* =========================================================
   COUNTRY INTRO IMAGE
   ========================================================= */

.country-intro-media {
	overflow: hidden;
}

.country-intro-image {
	margin: 0;
}

.country-intro-image img {
	display: block;

	width: 100%;
	height: 100%;

	aspect-ratio: 4 / 3;

	object-fit: cover;
}


/* =========================================================
   COUNTRY INTRO CONTENT
   ========================================================= */

.country-lead {
	line-height: 1.65;
}


/* =========================================================
   QUICK FACTS
   ========================================================= */

.country-facts-grid {
	display: grid !important;

	grid-template-columns:
		repeat(6, minmax(0, 1fr));

	gap: var(--wp--preset--spacing--20);
}

.country-fact-card {
	height: 100%;

	padding: 18px;

	border-radius: 12px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

	.country-facts-grid {
		grid-template-columns:
			repeat(3, minmax(0, 1fr));
	}
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 782px) {

	.country-intro-columns {
		flex-direction: column;
	}

	.country-intro-columns > .wp-block-column {
		flex-basis: 100% !important;
	}

	.country-intro-media {
		width: 100%;
	}

	.country-intro-image img {
		aspect-ratio: 16 / 10;
	}

	.country-facts-grid {
		grid-template-columns:
			repeat(2, minmax(0, 1fr));
	}
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

	.country-facts-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
   COUNTRY PAGE
   ========================================================= */

.country-page-template {
	margin: 0;
}


/* =========================================================
   SECTION SPACING
   ---------------------------------------------------------
   Outer section = vertical separation between sections.
   Inner Gutenberg Groups = spacing between content blocks.
   ========================================================= */

.country-section {
	padding:
		clamp(56px, 6vw, 80px)
		clamp(20px, 4vw, 40px);
}


/* =========================================================
   DEFAULT CONTENT RHYTHM
   ---------------------------------------------------------
   These are LOW-SPECIFICITY fallback values.
   Gutenberg Block Spacing can override them.
   ========================================================= */

/*
 * Heading followed by content.
 */
:where(.country-section h1 + p),
:where(.country-section h2 + p),
:where(.country-section h3 + p) {
	margin-block-start: 16px;
}


/*
 * Paragraph followed by paragraph.
 */
:where(.country-section p + p) {
	margin-block-start: 14px;
}


/*
 * Heading followed by list.
 */
:where(.country-section h2 + ul),
:where(.country-section h2 + ol),
:where(.country-section h3 + ul),
:where(.country-section h3 + ol) {
	margin-block-start: 16px;
}


/*
 * Paragraph followed by buttons.
 */
:where(.country-section p + .wp-block-buttons) {
	margin-block-start: 24px;
}


/*
 * Heading followed by columns/cards/table/details.
 */
:where(.country-section h2 + .wp-block-columns),
:where(.country-section h2 + .wp-block-group),
:where(.country-section h2 + .wp-block-table),
:where(.country-section h2 + .wp-block-tabs) {
	margin-block-start: 24px;
}


/* =========================================================
   TYPOGRAPHY RHYTHM
   ========================================================= */

.country-section p {
	line-height: 1.65;
}

.country-section ul,
.country-section ol {
	line-height: 1.65;
}


/* =========================================================
   COUNTRY INTRO
   ========================================================= */

.country-intro-columns {
	align-items: center;
}

.country-lead {
	line-height: 1.65;
}

.country-intro-image {
	margin: 0;
}

.country-intro-image img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}


/* =========================================================
   CTA ROW
   ========================================================= */

.country-cta-row {
	gap: var(--wp--preset--spacing--20);
}


/* =========================================================
   QUICK FACTS
   ========================================================= */

.country-facts-grid {
	display: grid !important;
	grid-template-columns: repeat(6, minmax(0, 1fr));

	gap: var(--wp--preset--spacing--20);
}

.country-fact-card {
	height: 100%;
	padding: 18px;

	border-radius: 12px;
}


/*
 * Fact cards deliberately have a compact rhythm.
 */
.country-fact-card h3 {
	margin: 0;
}

.country-fact-card p {
	margin: 4px 0 0;
}


/* =========================================================
   REQUIREMENTS
   ========================================================= */

.country-requirement-cards {
	gap: var(--wp--preset--spacing--40);
}

.country-requirement-card {
	height: 100%;

	padding: clamp(28px, 4vw, 42px);

	border-radius: 14px;
}


/* =========================================================
   HOW IT WORKS
   ========================================================= */

.country-steps {
	display: grid !important;

	grid-template-columns:
		repeat(5, minmax(0, 1fr));

	gap: var(--wp--preset--spacing--20);
}

.country-step {
	height: 100%;
	padding: 22px;

	border-radius: 12px;
}


/* =========================================================
   PROGRAM DETAILS / TABS
   ========================================================= */

.country-details-section .wp-block-tab-list {
	display: flex;
	flex-wrap: wrap;

	gap: 10px;

	margin: 0 0 30px;
	padding: 0;

	border: 0 !important;
	box-shadow: none !important;
}

.country-details-section .wp-block-tab-list::before,
.country-details-section .wp-block-tab-list::after {
	display: none !important;
	content: none !important;
}

.country-details-section .wp-block-tab-list button {
	padding: 10px 18px;

	border:
		1px solid
		var(--wp--preset--color--border-light) !important;

	border-radius: 999px;

	background:
		var(--wp--preset--color--white);

	color:
		var(--wp--preset--color--body-text);

	cursor: pointer;

	font: inherit;
	font-weight: 700;
}

.country-details-section .wp-block-tab-list button[aria-selected="true"] {
	background: var(--wp--preset--color--host-mint);
	border-color: var(--wp--preset--color--host-mint) !important;
	color: var(--wp--preset--color--body-text) !important;
}


/* =========================================================
   TABLES
   ========================================================= */

.country-table {
	width: 100%;
	overflow-x: auto;
}

.country-table table {
	width: 100%;
}


/* =========================================================
   FAQ
   ========================================================= */

.country-faq .wp-block-details {
	margin-bottom: 12px;

	padding: 0 20px;

	border:
		1px solid var(--wp--preset--color--border-light);

	border-radius: 10px;

	background:
		var(--wp--preset--color--white);
}

.country-faq .wp-block-details summary {
	padding: 16px 0;

	font-weight: 700;
	cursor: pointer;
}


/* =========================================================
   FINAL CTA
   ========================================================= */

.country-final-cta {
	padding: clamp(42px, 6vw, 70px);

	border-radius: 14px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

	.country-facts-grid {
		grid-template-columns:
			repeat(3, minmax(0, 1fr));
	}

	.country-steps {
		grid-template-columns:
			repeat(2, minmax(0, 1fr));
	}
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 782px) {

	.country-section {
		padding-top: 48px;
		padding-bottom: 48px;
	}

	.country-intro-columns {
		flex-direction: column;
	}

	.country-intro-columns > .wp-block-column {
		flex-basis: 100% !important;
	}

	.country-facts-grid {
		grid-template-columns:
			repeat(2, minmax(0, 1fr));
	}

	.country-steps {
		grid-template-columns: 1fr;
	}
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

	.country-facts-grid {
		grid-template-columns: 1fr;
	}

	.country-details-section .wp-block-tab-list {
		display: grid;
		grid-template-columns: 1fr;
	}

	.country-details-section
	.wp-block-tab-list
	button {

		width: 100%;
	}
}