/* Country single & archive: minimal layout on top of TT5. */

/* Sitewide accent: actions, hovers, section tints, hero wash. */
:root {
	--ebc-accent: #3b82f6;
	--ebc-accent-hover: #2563eb;
	--ebc-accent-soft: rgba(59, 130, 246, 0.12);
	--ebc-surface-tint-a: #f2f6fc;
	--ebc-surface-tint-b: #e8eef6;
	--ebc-surface-tint-mid: #eef3f9;
}

/* Top chrome: any header link (nav + site title get underline in the block below) */
header a:hover:not(.wp-block-button__link),
header a:focus:not(.wp-block-button__link) {
	color: var(--ebc-accent-hover) !important;
}

/* Nav & site title: color + soft underline (hover/focus so theme’s default none is unchanged) */
.wp-block-navigation .wp-block-navigation-item__content,
.wp-block-site-title a {
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .wp-block-navigation-item__content:focus,
.wp-block-site-title a:hover,
.wp-block-site-title a:focus {
	color: var(--ebc-accent-hover) !important;
	text-decoration: underline 2px;
	text-decoration-color: rgba(37, 99, 235, 0.45);
	text-underline-offset: 0.28em;
}

footer .ebc-site-footer-shell a.ebc-site-footer__link:hover,
footer .ebc-site-footer-shell a.ebc-site-footer__link:focus,
footer .ebc-site-footer-shell a.ebc-site-footer__cta:hover,
footer .ebc-site-footer-shell a.ebc-site-footer__cta:focus {
	color: #3b82f6 !important;
}

/* Legacy / non-EBC footer links */
footer a:hover:not( .ebc-site-footer__link ):not( .ebc-site-footer__cta ),
footer a:focus:not( .ebc-site-footer__link ):not( .ebc-site-footer__cta ) {
	color: var(--ebc-accent-hover) !important;
}

/* Main content: text links (not primary buttons) */
.ebc-site-main a:hover:not(.wp-block-button__link),
.ebc-site-main a:focus:not(.wp-block-button__link) {
	color: var(--ebc-accent-hover);
}

.ebc-site-main {
	max-width: var(--wp--style--global--content-size, 800px);
	margin-left: auto;
	margin-right: auto;
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
}

.ebc-hero {
	position: relative;
	margin-bottom: var(--wp--preset--spacing--50);
}

.ebc-hero__img {
	margin: 0;
}

.ebc-hero__img img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}

.ebc-hero__title {
	margin: 0.5em 0 0;
}

.ebc-visited {
	display: inline-block;
	padding: 0.2em 0.5em;
	font-size: 0.9rem;
	font-weight: 600;
	border-radius: 4px;
}

.ebc-visited--yes {
	background: #e6f4ea;
	color: #1e4d2b;
}

.ebc-visited--no {
	background: #f1f1f1;
	color: #555;
}

.ebc-prose p {
	margin-top: 0.75em;
}

.ebc-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 0.75rem;
	margin: 1.5em 0;
}

.ebc-gallery__item {
	margin: 0;
}

.ebc-gallery__item img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}

.ebc-things,
.ebc-notes {
	margin: 1.5em 0;
}

.ebc-things__list {
	margin: 0.5em 0 0 1.2em;
	padding: 0;
}

.ebc-map {
	margin: 1.5em 0;
}

.ebc-map iframe {
	width: 100% !important;
	max-width: 100%;
	min-height: 320px;
	border: 0;
	border-radius: 4px;
}

/* Country archive (/countries/): body carries .ebc-country-archive — must stay full viewport width */
body.ebc-country-archive {
	--ebc-hero-canvas: #1a212a;
	--ebc-dk-base: #1a212a;
	--ebc-dk-section: #1a212a;
	--ebc-dk-card: #1f2937;
	--ebc-dk-hairline: rgba( 255, 255, 255, 0.04 );
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	background-color: var( --ebc-hero-canvas, #1a212a );
}

html:has( body.ebc-country-archive ) {
	background-color: var( --ebc-hero-canvas, #1a212a );
}

body.ebc-country-archive .wp-site-blocks {
	max-width: none !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.ebc-country-archive .ebc-header--dashboard {
	background: transparent !important;
	background-color: transparent !important;
	border-bottom: 1px solid rgba( 255, 255, 255, 0.06 );
}

body.ebc-country-archive .ebc-header__bar {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 1rem;
	width: 100% !important;
	max-width: 80rem;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box;
}

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

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

.ebc-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.5rem;
}

.ebc-filters a {
	text-decoration: none;
	padding: 0.25em 0.75em;
	border-radius: 4px;
	border: 1px solid #ccc;
}

.ebc-filters a.is-active {
	background: var(--ebc-accent);
	color: #fff;
	border-color: var(--ebc-accent);
}

.ebc-filters a.is-active:hover,
.ebc-filters a.is-active:focus {
	color: #fff !important;
	background: var(--ebc-accent-hover);
	border-color: var(--ebc-accent-hover);
}

.ebc-filters a:hover:not(.is-active) {
	color: var(--ebc-accent-hover);
	border-color: var(--ebc-accent);
}

.ebc-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ebc-card {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
}

.ebc-card a {
	color: inherit;
	text-decoration: none;
	display: block;
	transition: color 0.15s ease;
}

.ebc-card__image img {
	width: 100%;
	height: 140px;
	object-fit: cover;
	display: block;
}

.ebc-card__body {
	padding: 0.75rem 0.9rem 1rem;
}

.ebc-card__title {
	margin: 0 0 0.35rem;
	font-size: 1.1rem;
}

/* Front page progress */
.ebc-home-progress {
	max-width: var(--wp--style--wide-size, 1200px);
	margin: 0 auto;
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

.ebc-progress-bar {
	background: #e1e5ec;
	border-radius: 8px;
	height: 14px;
	overflow: hidden;
	margin: 0.5rem 0 0;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.ebc-progress-bar__fill {
	height: 100%;
	min-width: 5px;
	border-radius: 6px;
	background: linear-gradient(180deg, #60a5fa 0%, var(--ebc-accent) 50%, #2563eb 100%);
	box-shadow: 0 0 10px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ebc-link-dashboard {
	margin-top: 0.5rem;
	display: inline-block;
}

/* -------------------------------------------------------------------------
 * Homepage: one solid canvas (#1a212a) — no gradient atmosphere (matches Explore + hero)
 * Cards only: --ebc-dk-card. No striping between full-width sections.
 * ------------------------------------------------------------------------- */
html:has( body.ebc-front-hero ) {
	background-color: #1a212a;
}

body.ebc-front-hero {
	--ebc-hero-canvas: #1a212a;
	--ebc-hero-stack: none;
	--ebc-dk-base: #1a212a;
	--ebc-dk-section: #1a212a;
	--ebc-dk-card: #1f2937;
	--ebc-dk-hairline: rgba( 255, 255, 255, 0.04 );
	/* Pull hero under the header row so a transparent bar shows the map, not flat canvas. */
	--ebc-header-overlap: clamp( 3.75rem, 11vw, 5rem );
	background-color: var( --ebc-hero-canvas ) !important;
	color: #f8fafc;
}

body.ebc-front-hero .wp-site-blocks {
	background-color: var( --ebc-hero-canvas ) !important;
	background-image: none !important;
	min-height: 100vh;
}

body.ebc-front-hero main.ebc-home {
	background-color: transparent;
	background-image: none;
	margin-top: calc( -1 * var( --ebc-header-overlap ) ) !important;
	position: relative;
	z-index: 0;
}

/* Travel progress: same canvas as hero (no top border) */
body.ebc-front-hero .ebc-travel-progress {
	background-color: var( --ebc-hero-canvas ) !important;
	background-image: none !important;
	color: #f1f5f9 !important;
	border-top: none !important;
	box-shadow: none !important;
}

body.ebc-front-hero .ebc-travel-progress .ebc-travel-progress__value,
body.ebc-front-hero .ebc-travel-progress p.has-contrast-color {
	color: #f8fafc !important;
}

body.ebc-front-hero .ebc-travel-progress .ebc-travel-progress__pct,
body.ebc-front-hero .ebc-travel-progress .ebc-travel-progress__label {
	color: rgba( 226, 232, 240, 0.75 ) !important;
}

body.ebc-front-hero .ebc-travel-progress .ebc-travel-progress__bar {
	background: #334155 !important;
	box-shadow:
		inset 0 0 0 1px rgba( 0, 0, 0, 0.25 ),
		inset 0 1px 0 rgba( 255, 255, 255, 0.06 ) !important;
}
