/**
 * Single country — travel profile (dark).
 *
 * @package EveryCountry
 */

html:has( body.ebc-country-page ) {
	background-color: #0b1220;
}

body.ebc-country-page {
	--ebc-c-bg: #0b1220;
	--ebc-c-section: #0f172a;
	--ebc-c-card: #1f2937;
	--ebc-c-line: rgba( 255, 255, 255, 0.08 );
	--ebc-c-muted: #94a3b8;
	--ebc-c-heading: #e2e8f0;
	--ebc-c-accent: #3b82f6;
	background-color: var( --ebc-c-bg ) !important;
	color: #e2e8f0;
}

body.ebc-country-page .ebc-site-main.ebc-c-main,
body.ebc-country-page .wp-site-blocks,
body.ebc-country-page .alignfull:not( .ebc-header ):not( .ebc-header--dashboard ) {
	background-color: transparent;
}

/* Single row: the mobile rule in home-hero.css set .ebc-header__nav { width: 100% }, which
 * wraps the title above the nav. Keep a classic bar: title | links + log in. */
body.ebc-country-page .ebc-header__bar {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 1rem;
}

body.ebc-country-page .ebc-header__bar .wp-block-site-title {
	flex: 0 1 auto;
	min-width: 0;
}

body.ebc-country-page .ebc-header__nav {
	width: auto !important;
	max-width: none;
	flex: 1 1 auto;
	min-width: 0;
	flex-wrap: wrap;
	justify-content: flex-end;
}

/* Full-width main (overrides child default content width) */
body.ebc-country-page .ebc-site-main.ebc-c-main {
	max-width: none;
	margin: 0;
	padding: 0;
}

/* ------------------------------------------------------------------ Hero */
.ebc-c-hero {
	position: relative;
	width: 100%;
	min-height: min( 52vh, 28rem );
	background-color: #0f172a;
	background-image: linear-gradient( 160deg, #0f172a 0%, #0b1220 100% );
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: flex-end;
}

.ebc-c-hero[style*='--ebc-c-hero-image'] {
	background-image: var( --ebc-c-hero-image );
}

.ebc-c-hero__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	backdrop-filter: blur( 3px );
	-webkit-backdrop-filter: blur( 3px );
	background: linear-gradient( to bottom, rgba( 0, 0, 0, 0.6 ) 0%, rgba( 0, 0, 0, 0.9 ) 100% );
}

.ebc-c-hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 75rem; /* 1200px */
	margin: 0 auto;
	padding: 2.5rem var( --wp--preset--spacing--50, 1.5rem ) 2.25rem;
	box-sizing: border-box;
}

.ebc-c-hero__top {
	margin-bottom: 0.4rem;
}

.ebc-c-hero__flag {
	font-size: clamp( 2.25rem, 6vw, 3.25rem );
	line-height: 1;
}

.ebc-c-hero__title {
	margin: 0 0 0.75rem;
	font-size: clamp( 1.9rem, 4.2vw, 2.6rem );
	font-weight: 700;
	letter-spacing: -0.03em;
	color: #f8fafc !important;
}

.ebc-c-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem 1rem;
}

.ebc-c-hero__badge {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.3rem 0.6rem;
	border-radius: 6px;
}

.ebc-c-hero__badge--yes {
	background: rgba( 59, 130, 246, 0.2 );
	color: #93c5fd !important;
	border: 1px solid rgba( 59, 130, 246, 0.4 );
}

.ebc-c-hero__badge--no {
	background: rgba( 148, 163, 184, 0.12 );
	color: #94a3b8 !important;
	border: 1px solid rgba( 255, 255, 255, 0.1 );
}

.ebc-c-hero__date {
	font-size: 0.9rem;
	color: rgba( 203, 213, 225, 0.85 ) !important;
}

/* ------------------------------------------------------------------ Page wrap */
.ebc-c-page__inner {
	width: 100%;
	max-width: 75rem; /* 1200px */
	margin: 0 auto;
	padding: 2.5rem var( --wp--preset--spacing--50, 1.5rem ) 4rem;
	box-sizing: border-box;
}

/* Section rhythm: 80–100px; subtle dividers (not first block under hero) */
.ebc-c-section {
	margin-top: 0;
	margin-bottom: 0;
}

.ebc-c-page__inner > .ebc-c-section:not( :first-child ) {
	margin-top: 0;
	padding-top: 5.75rem; /* 92px */
	border-top: 1px solid rgba( 255, 255, 255, 0.06 );
}

@media ( min-width: 800px ) {
	.ebc-c-page__inner > .ebc-c-section:not( :first-child ) {
		padding-top: 6.25rem; /* 100px */
	}
}

/* Scroll reveal: fade in + rise */
.ebc-c-reveal {
	opacity: 0;
	transform: translateY( 1rem );
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.ebc-c-reveal.is-visible {
	opacity: 1;
	transform: translateY( 0 );
}

/* Premium empty / placeholder blocks */
.ebc-c-placeholder {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	max-width: 40rem;
	padding: 1.35rem 1.4rem 1.45rem 1.25rem;
	background: rgba( 255, 255, 255, 0.02 );
	border: 1px solid rgba( 255, 255, 255, 0.07 );
	border-radius: 12px;
}

.ebc-c-placeholder--tight {
	padding: 1.1rem 1.1rem 1.2rem;
}

.ebc-c-placeholder--centered {
	align-items: center;
	text-align: center;
	max-width: 28rem;
	margin: 0 auto;
}

.ebc-c-placeholder__icon {
	color: rgba( 148, 163, 184, 0.45 );
	line-height: 0;
}

.ebc-c-placeholder__title {
	margin: 0.15rem 0 0;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: #94a3b8 !important;
	font-style: normal;
}

.ebc-c-placeholder__hint {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.6;
	color: #64748b !important;
	font-style: normal;
}

.ebc-c-empty {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
	color: #94a3b8 !important;
}

.ebc-c-page__inner > *:first-child {
	margin-top: 0;
}

.ebc-c-section__title {
	margin: 0 0 1.25rem;
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #f1f5f9 !important;
}

.ebc-c-story__title {
	margin: 0 0 1.25rem;
	font-size: clamp( 1.2rem, 2.2vw, 1.4rem );
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #f1f5f9 !important;
}

/* ------------------------------------------------------------------ At a glance: 4-card grid */
.ebc-c-facts__grid {
	display: grid;
	grid-template-columns: repeat( 2, 1fr );
	gap: 0.9rem 1rem;
}

.ebc-c-facts__card {
	background: rgba( 255, 255, 255, 0.04 );
	border: 1px solid rgba( 255, 255, 255, 0.08 );
	border-radius: 12px;
	padding: 1.1rem 1.15rem 1.2rem;
	min-height: 4.5rem;
	transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.ebc-c-facts__card:hover {
	background: rgba( 255, 255, 255, 0.06 );
	border-color: rgba( 59, 130, 246, 0.22 );
	box-shadow: 0 0 0 1px rgba( 59, 130, 246, 0.1 );
	transform: translateY( -2px );
}

.ebc-c-facts__label {
	margin: 0 0 0.5rem;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #64748b !important;
}

.ebc-c-facts__value {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	color: #f1f5f9 !important;
	line-height: 1.35;
	letter-spacing: -0.02em;
}

.ebc-c-facts__value--placeholder {
	font-weight: 500;
	color: #475569 !important;
	font-size: 1.25rem;
	letter-spacing: 0.02em;
}

.ebc-c-section__title--sm {
	font-size: 1.05rem;
}

@media ( min-width: 700px ) {
	.ebc-c-facts__grid {
		grid-template-columns: repeat( 4, 1fr );
	}
}

@media ( max-width: 420px ) {
	.ebc-c-facts__grid {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------ Gallery */
/* Breathing room above the next section divider (border is on the following .ebc-c-section). */
.ebc-c-page__inner > .ebc-c-gallery.ebc-c-section {
	margin-bottom: 2.5rem;
}

.ebc-c-gallery__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.9rem;
}

@media ( min-width: 600px ) {
	.ebc-c-gallery__grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( min-width: 900px ) {
	.ebc-c-gallery__grid {
		grid-template-columns: repeat( 3, 1fr );
	}
}

.ebc-c-gallery__empty {
	min-height: 10rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ebc-c-gallery__empty .ebc-c-gallery__empty-card {
	margin: 0;
	max-width: 26rem;
	border-style: solid;
}

.ebc-c-gallery__cell {
	margin: 0;
	border-radius: 12px;
	overflow: hidden;
	background: #111827;
}

.ebc-c-gallery__link {
	display: block;
	line-height: 0;
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	transition: box-shadow 0.28s ease, transform 0.28s ease;
	box-shadow: 0 4px 20px rgba( 0, 0, 0, 0.3 );
}

.ebc-c-gallery__link:hover,
.ebc-c-gallery__link:focus {
	box-shadow: 0 8px 28px rgba( 0, 0, 0, 0.4 ), 0 0 0 1px rgba( 59, 130, 246, 0.3 );
	transform: translateY( -2px );
}

.ebc-c-gallery__link:focus {
	outline: 2px solid var( --ebc-c-accent );
	outline-offset: 2px;
}

.ebc-c-gallery__img {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 16/10;
	max-height: 15rem;
	object-fit: cover;
	transition: transform 0.28s ease;
}

.ebc-c-gallery__hover {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	background: rgba( 2, 6, 23, 0.35 );
	opacity: 0;
	transition: opacity 0.28s ease;
}

.ebc-c-gallery__view {
	color: #f1f5f9;
	filter: drop-shadow( 0 1px 3px rgba( 0, 0, 0, 0.5 ) );
}

.ebc-c-gallery__link:hover .ebc-c-gallery__hover,
.ebc-c-gallery__link:focus .ebc-c-gallery__hover,
.ebc-c-gallery__cell--more .ebc-c-gallery__hover {
	opacity: 1;
}

.ebc-c-gallery__cell--more .ebc-c-gallery__hover {
	background: rgba( 2, 6, 23, 0.5 );
}

.ebc-c-gallery__link:hover .ebc-c-gallery__img,
.ebc-c-gallery__link:focus .ebc-c-gallery__img {
	transform: scale( 1.05 );
}

.ebc-c-gallery__more-badge {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #f8fafc !important;
	background: rgba( 2, 6, 23, 0.55 );
	pointer-events: none;
}

.ebc-c-gallery__cell--more .ebc-c-gallery__view {
	display: none;
}

.ebc-c-gallery__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0.5rem 0.75rem 0.65rem;
	font-size: 0.8rem;
	line-height: 1.35;
	color: #f1f5f9 !important;
	background: linear-gradient( to top, rgba( 2, 6, 23, 0.92 ) 0%, rgba( 2, 6, 23, 0.4 ) 50%, transparent 100% );
	pointer-events: none;
	z-index: 1;
}

/* Lightbox (carousel) — outside transformed ancestors for correct fixed positioning */
.ebc-c-lightbox {
	position: fixed;
	inset: 0;
	z-index: 200000;
	background: rgba( 2, 6, 23, 0.94 );
	box-sizing: border-box;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4rem max( 3.5rem, env( safe-area-inset-right ) ) 3rem max( 3.5rem, env( safe-area-inset-left ) );
}

.ebc-c-lightbox[hidden] {
	display: none !important;
}

.ebc-c-lightbox__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: min( 96vw, 1200px );
	max-height: min( 86vh, 86dvh );
	min-height: 0;
}

.ebc-c-lightbox__count {
	margin: 0 0 0.75rem;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #cbd5e1;
	min-height: 1.25em;
}

.ebc-c-lightbox__img {
	flex: 0 1 auto;
	max-width: 100%;
	max-height: min( calc( 86vh - 3.5rem ), calc( 86dvh - 3.5rem ) );
	width: auto;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.55 );
	object-fit: contain;
}

.ebc-c-lightbox__close {
	position: fixed;
	top: 1.25rem;
	right: 1.25rem;
	width: 2.75rem;
	height: 2.75rem;
	border: none;
	border-radius: 8px;
	background: rgba( 255, 255, 255, 0.1 );
	color: #f1f5f9;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
}

.ebc-c-lightbox__close:hover,
.ebc-c-lightbox__close:focus {
	background: rgba( 59, 130, 246, 0.4 );
}

.ebc-c-lightbox__nav {
	position: fixed;
	top: 50%;
	transform: translateY( -50% );
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba( 255, 255, 255, 0.12 );
	border-radius: 8px;
	background: rgba( 15, 23, 42, 0.85 );
	color: #e2e8f0;
	cursor: pointer;
	z-index: 2;
	transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ebc-c-lightbox__nav[hidden] {
	display: none !important;
}

.ebc-c-lightbox__nav--prev {
	left: max( 0.75rem, env( safe-area-inset-left ) );
}

.ebc-c-lightbox__nav--next {
	right: max( 0.75rem, env( safe-area-inset-right ) );
}

.ebc-c-lightbox__nav:hover,
.ebc-c-lightbox__nav:focus {
	background: rgba( 59, 130, 246, 0.3 );
	border-color: rgba( 59, 130, 246, 0.4 );
	box-shadow: 0 0 20px rgba( 59, 130, 246, 0.2 );
}

/* ------------------------------------------------------------------ Story + prose */
.ebc-c-story--journal {
	background: none;
	border: none;
	border-radius: 0;
	padding: 0;
}

.ebc-c-prose,
.ebc-c-story__prose {
	max-width: 45rem;
}

.ebc-c-prose--story,
.ebc-c-story--journal .ebc-c-prose--story,
.ebc-c-story--journal .ebc-c-story__prose {
	max-width: 43.75rem; /* 700px */
}

.ebc-c-prose p,
.ebc-c-story__prose p {
	margin: 0 0 0.9em;
	line-height: 1.7;
	color: #cbd5e1 !important;
}

.ebc-c-prose--story p,
.ebc-c-prose--story li,
.ebc-c-prose--story {
	line-height: 1.75;
	color: #e5e7eb !important;
}

.ebc-c-prose a,
.ebc-c-story__prose a {
	color: #93c5fd;
	text-decoration: none;
}

.ebc-c-prose a:hover,
.ebc-c-story__prose a:hover,
.ebc-c-prose--story a:hover {
	color: #3b82f6;
}

.ebc-c-prose--story a {
	color: #60a5fa;
	text-decoration: none;
}

.ebc-c-prose ul,
.ebc-c-prose ol,
.ebc-c-story__prose ul,
.ebc-c-story__prose ol {
	color: #cbd5e1;
}

/* ------------------------------------------------------------------ Travel lists (card columns) */
.ebc-c-travellists__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.1rem 1.25rem;
	align-items: stretch;
}

.ebc-c-travellists__card {
	background: rgba( 255, 255, 255, 0.03 );
	border: 1px solid rgba( 255, 255, 255, 0.08 );
	border-radius: 12px;
	padding: 1.25rem 1.35rem 1.4rem 1.35rem;
	min-width: 0; /* grid: allow shrinking so long tokens don’t blow column width */
	transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.ebc-c-travellists__card:hover {
	background: rgba( 255, 255, 255, 0.04 );
	border-color: rgba( 255, 255, 255, 0.12 );
	box-shadow: 0 4px 28px rgba( 0, 0, 0, 0.2 );
	transform: translateY( -1px );
}

.ebc-c-travellists__title {
	margin: 0 0 1rem;
	font-size: 1.02rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #f1f5f9 !important;
}

.ebc-c-travellists__list {
	margin: 0;
	padding: 0 0 0 1.2rem;
	list-style: disc;
}

.ebc-c-travellists__list li {
	margin: 0.45em 0;
	color: #cbd5e1 !important;
	line-height: 1.5;
	overflow-wrap: anywhere; /* long place names / URLs without spaces */
	word-break: break-word; /* older engines */
}

.ebc-c-travellists__list li::marker {
	color: #3b82f6;
}

@media ( max-width: 700px ) {
	.ebc-c-travellists__grid {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------ Map (CTA only) */
.ebc-c-mapsec {
	background: var( --ebc-c-section );
	border: 1px solid var( --ebc-c-line );
	border-radius: 12px;
	padding: 1.5rem 1.35rem 1.6rem;
}

.ebc-c-mapsec__embed {
	margin: 0 0 1rem;
	border-radius: 10px;
	overflow: hidden;
	line-height: 0;
	border: 1px solid var( --ebc-c-line );
	background: rgba( 0, 0, 0, 0.2 );
}

.ebc-c-mapsec__embed .wp-block-embed,
.ebc-c-mapsec__embed .fluid-width-video-wrapper,
.ebc-c-mapsec__embed iframe {
	margin: 0 !important;
	width: 100% !important;
	max-width: 100%;
}

.ebc-c-mapsec__embed iframe {
	min-height: min( 50vh, 22rem );
	aspect-ratio: 16 / 9;
	height: auto !important;
}

.ebc-c-mapsec__fallback {
	margin: 0 0 1rem;
}

.ebc-c-mapsec__external {
	font-size: 0.95rem;
	font-weight: 600;
	color: #3b82f6 !important;
	text-decoration: none;
}

.ebc-c-mapsec__external:hover,
.ebc-c-mapsec__external:focus {
	color: #60a5fa !important;
}

.ebc-c-mapsec__action {
	margin: 0;
}

.ebc-c-mapsec__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: #3b82f6 !important;
	text-decoration: none;
	transition: color 0.25s ease, text-shadow 0.25s ease, filter 0.25s ease;
}

.ebc-c-mapsec__btn:hover,
.ebc-c-mapsec__btn:focus {
	color: #60a5fa !important;
}

/* ------------------------------------------------------------------ Notes */
.ebc-c-notes {
	margin-top: 0;
}

.ebc-c-notes__body p {
	color: #94a3b8;
}

/* ------------------------------------------------------------------ Prev / Next */
.ebc-c-terms {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: stretch;
	gap: 0.9rem;
}

.ebc-c-terms__link {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-width: min( 100%, 24rem );
	padding: 1rem 1.25rem 1.05rem 1.15rem;
	background: rgba( 255, 255, 255, 0.02 );
	border: 1px solid rgba( 255, 255, 255, 0.14 );
	border-radius: 10px;
	color: #e2e8f0 !important;
	text-decoration: none;
	transition: border-color 0.28s ease, color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease, transform 0.28s ease;
}

.ebc-c-terms__link--next {
	margin-left: auto;
	text-align: right;
}

.ebc-c-terms__link:hover,
.ebc-c-terms__link:focus {
	border-color: rgba( 59, 130, 246, 0.6 );
	color: #93c5fd !important;
	background: rgba( 59, 130, 246, 0.08 );
	box-shadow: 0 0 0 1px rgba( 59, 130, 246, 0.25 ), 0 0 32px rgba( 59, 130, 246, 0.25 );
	transform: translateY( -1px );
}

.ebc-c-terms__row {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: #94a3b8 !important;
}

.ebc-c-terms__link--next .ebc-c-terms__row {
	margin-left: auto;
	flex-direction: row;
}

.ebc-c-terms__icon {
	color: #60a5fa;
	opacity: 0.9;
	display: flex;
	line-height: 0;
}

.ebc-c-terms__name {
	font-size: 0.95rem;
	font-weight: 600;
	color: #e2e8f0 !important;
}

.ebc-c-terms__empty {
	flex: 1;
}

@media ( max-width: 500px ) {
	.ebc-c-terms__link--next {
		margin-left: 0;
		text-align: left;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.ebc-c-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.ebc-c-reveal,
	.ebc-c-reveal.is-visible {
		transform: none;
	}

	.ebc-c-gallery__img,
	.ebc-c-gallery__hover,
	.ebc-c-facts__card,
	.ebc-c-travellists__card,
	.ebc-c-terms__link,
	.ebc-c-mapsec__btn,
	.ebc-c-gallery__link,
	.ebc-c-lightbox__nav {
		transition: none;
	}

	.ebc-c-facts__card,
	.ebc-c-gallery__link,
	.ebc-c-terms__link {
		transform: none;
	}
}
