/* Italy Map — front-end styles.
 * Built on the Family Album design tokens (the live site's approved
 * design system): paper #f8f2e4, paper2 #fdfaf2, ink #2c2115,
 * soft #6f5f49, terra #a34d21, olive #5d6b3f, rule #ddd0b8;
 * Newsreader / Source Serif 4 / Archivo / Caveat.
 * A dark scheme is included via prefers-color-scheme, matching the
 * mockup's "Dark mode included" verdict chip. */

.italy-map {
	--paper: #f8f2e4;
	--paper2: #fdfaf2;
	--ink: #2c2115;
	--soft: #6f5f49;
	--terra: #a34d21;
	--olive: #5d6b3f;
	--rule: #ddd0b8;
	color: var(--ink);
	font-family: "Source Serif 4", Georgia, serif;
	max-width: 1180px;
	margin: 0 auto;
}
@media (prefers-color-scheme: dark) {
	.italy-map {
		--paper: #221a10;
		--paper2: #2c2115;
		--ink: #f3ead6;
		--soft: #c9b995;
		--terra: #e08a52;
		--olive: #a9bc7f;
		--rule: #57462c;
	}
}
.italy-map * { box-sizing: border-box; }

.im-eyebrow {
	font-family: Archivo, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--terra);
	margin: 8px 0 4px;
}
.im-title {
	font-family: Newsreader, "Source Serif 4", serif;
	font-size: clamp(40px, 6vw, 64px);
	line-height: 1.05;
	margin: 0 0 12px;
}
.im-title em { color: var(--terra); }
.im-standfirst { font-size: clamp(17px, 2vw, 20px); line-height: 1.55; max-width: 46em; margin: 0 0 20px; }

.im-glance { display: flex; gap: 28px; flex-wrap: wrap; margin: 0 0 18px; }
.im-stat { display: flex; flex-direction: column; }
.im-stat-num { font-family: Newsreader, serif; font-size: 40px; font-weight: 700; line-height: 1; color: var(--terra); }
.im-stat-label { font-family: Archivo, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin-top: 4px; }

.im-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 22px; }
.italy-map .im-btn {
	display: inline-block;
	min-width: 15em;
	text-align: center;
	padding: 12px 22px;
	border: 2px solid var(--terra);
	border-radius: 999px;
	font-family: Archivo, sans-serif;
	font-weight: 700;
	font-size: 14px;
	color: var(--terra);
	text-decoration: none;
	background: transparent;
}
.italy-map .im-btn-fill { background: var(--terra); color: var(--paper2); }
.italy-map .im-btn:hover { filter: brightness(1.07); }

.im-hero { margin: 0 0 10px; }
.im-hero img { width: 100%; aspect-ratio: 16 / 8.2; object-fit: cover; border-radius: 14px; display: block; }
.im-hero figcaption { font-size: 15px; color: var(--soft); margin-top: 8px; line-height: 1.5; }
.im-hero figcaption strong { color: var(--ink); }
.im-hero-note { font-style: italic; color: var(--soft); font-size: 15px; line-height: 1.55; max-width: 46em; }

.im-photo-fallback {
	aspect-ratio: 16 / 8.2;
	border-radius: 14px;
	background: var(--paper);
	border: 1px solid var(--rule);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	font-family: Newsreader, serif;
	font-size: 30px;
	color: var(--soft);
}
.im-photo-fallback span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px; height: 44px;
	border-radius: 50%;
	background: var(--terra);
	color: var(--paper2);
	font-family: Archivo, sans-serif;
	font-weight: 800;
	font-size: 19px;
}

.im-h2 { font-family: Newsreader, serif; font-size: clamp(28px, 3.6vw, 38px); margin: 38px 0 8px; }
.im-intro { font-size: 17px; line-height: 1.55; max-width: 46em; margin: 0 0 18px; }

.im-explore { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .im-explore { grid-template-columns: 1fr; } }

.im-mapcard, .im-listcard, .im-detail, .im-journey, .im-thread, .im-notes, .im-story-card {
	background: var(--paper2);
	border: 1px solid var(--rule);
	border-radius: 14px;
}
.im-mapcard { overflow: hidden; }
.im-mapcard-head, .im-mapcard-foot {
	display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
	padding: 12px 16px;
	font-family: Archivo, sans-serif; font-size: 13px; font-weight: 600; color: var(--soft);
}
.im-map { height: 460px; background: var(--paper); z-index: 0; }
.im-pin-wrap { background: transparent; border: none; }
.im-pin {
	display: flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; border-radius: 50%;
	background: var(--terra); color: #fff;
	font-family: Archivo, sans-serif; font-weight: 800; font-size: 15px;
	border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.35);
}
.im-pin-active .im-pin { background: var(--olive); transform: scale(1.15); }

.im-listcard { padding: 14px 16px; }
.im-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.im-filter {
	font-family: Archivo, sans-serif; font-weight: 700; font-size: 13px;
	padding: 7px 14px; border-radius: 999px; cursor: pointer;
	border: 1.5px solid var(--terra); color: var(--terra); background: transparent;
}
.im-filter.is-on { background: var(--terra); color: var(--paper2); }
.im-filter-n { opacity: .75; font-weight: 600; }
.im-list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-top: 1px solid var(--rule); padding-top: 10px; }
.im-list-head h3 { font-family: Newsreader, serif; font-size: 21px; margin: 0; }
.im-list-head span { font-family: Archivo, sans-serif; font-size: 12.5px; color: var(--soft); }
.im-townlist { list-style: none; margin: 10px 0 4px; padding: 0; }
.im-townrow {
	width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
	padding: 10px 8px; background: transparent; border: none; border-top: 1px solid var(--rule);
	cursor: pointer; color: var(--ink); font: inherit;
}
.im-townrow:hover, .im-townrow.is-selected { background: var(--paper); }
.im-pin-badge {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; border-radius: 50%;
	background: var(--terra); color: #fff;
	font-family: Archivo, sans-serif; font-weight: 800; font-size: 14px;
}
.im-townrow.is-selected .im-pin-badge { background: var(--olive); }
.im-row-thumb { flex: 0 0 auto; width: 62px; height: 52px; object-fit: cover; border-radius: 8px; display: block; }
.im-townrow-main { flex: 1 1 auto; display: flex; flex-direction: column; }
.im-townrow-name { font-family: Newsreader, serif; font-size: 19px; font-weight: 600; }
.im-townrow-tag { font-size: 14px; color: var(--soft); line-height: 1.4; }
.im-townrow-meta { font-family: Archivo, sans-serif; font-size: 12px; color: var(--soft); text-align: right; line-height: 1.5; }

.im-detail { display: grid; grid-template-columns: .9fr 1.1fr; gap: 0; margin-top: 20px; overflow: hidden; }
@media (max-width: 860px) { .im-detail { grid-template-columns: 1fr; } }
.im-detail-photo { position: relative; }
.im-detail-photo img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 260px; }
.im-detail-photo .im-photo-fallback { border: none; border-radius: 0; height: 100%; min-height: 260px; }
.im-photo-tag {
	position: absolute; left: 12px; bottom: 12px;
	background: var(--terra); color: #fff;
	font-family: Archivo, sans-serif; font-weight: 700; font-size: 12.5px;
	padding: 5px 12px; border-radius: 999px;
}
.im-detail-main { padding: 20px 22px; }
.im-detail-region { font-family: Archivo, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--terra); margin: 0 0 4px; }
.im-detail-name { font-family: Newsreader, serif; font-size: 32px; margin: 0 0 2px; }
.im-detail-tagline { font-style: italic; color: var(--soft); margin: 0 0 10px; font-size: 16.5px; }
.im-detail-desc { line-height: 1.55; margin: 0 0 14px; }
.im-detail-stories { list-style: none; margin: 0 0 14px; padding: 0; }
.im-detail-stories li { padding: 8px 0; border-top: 1px solid var(--rule); font-size: 15.5px; }
.im-story-chip {
	display: inline-block; background: var(--olive); color: #fff;
	font-family: Archivo, sans-serif; font-size: 11.5px; font-weight: 700;
	padding: 2px 9px; border-radius: 999px; margin-right: 6px;
}
.im-story-label { font-family: Archivo, sans-serif; font-size: 12px; color: var(--soft); margin-right: 8px; }
.italy-map .im-detail-stories a { color: var(--terra); }
.im-detail-links { display: flex; gap: 18px; flex-wrap: wrap; font-family: Archivo, sans-serif; font-weight: 700; font-size: 14px; }
.italy-map .im-detail-links a { color: var(--terra); }

.im-shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 980px) { .im-shelf { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .im-shelf { grid-template-columns: 1fr; } }
.im-story-card { padding: 16px 18px; display: flex; flex-direction: column; overflow: hidden; }
.im-card-photo { margin: -16px -18px 12px; }
.im-card-photo img { width: 100%; height: 172px; object-fit: cover; display: block; }
.im-card-photo .im-photo-fallback { border: none; border-radius: 0; aspect-ratio: auto; height: 172px; }
.im-card-town { font-family: Archivo, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--olive); margin: 0 0 6px; }
.im-story-card h3 { font-family: Newsreader, serif; font-size: 20px; line-height: 1.25; margin: 0 0 8px; }
.im-story-card p { line-height: 1.5; font-size: 15.5px; margin: 0 0 12px; }
.italy-map .im-card-link { margin-top: auto; color: var(--terra); font-family: Archivo, sans-serif; font-weight: 700; font-size: 14px; text-decoration: none; }

/* Journey strip — the mockup's dark-green band. Colors sampled from the
 * mockup's own rendered capture (v1.0.7): band #22301d, step pills
 * #33402e with cream text and a faint cream outline, gold step badges
 * #e8b44a with ink numerals, muted-cream intro and arrows. */
.im-journey { margin-top: 26px; padding: 24px 28px; background: #22301d; border-color: #22301d; color: #edead9; }
.im-journey h3 { font-family: Newsreader, serif; font-size: 23px; margin: 0 0 6px; color: #f6f1e7; }
/* The page renders inside the theme's .fa-story-body, whose heading rule
 * (equal specificity, loaded later) would force its ink color onto the
 * band heading — out-specify it. */
.italy-map .im-journey h3 { color: #f6f1e7; }
.im-journey p { line-height: 1.55; margin: 0 0 12px; }
.im-journey .im-journey-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 2px; }
.im-step {
	display: inline-flex; align-items: center; gap: 8px;
	font-family: Archivo, sans-serif; font-weight: 700; font-size: 13.5px;
	background: #33402e; border: 1px solid rgba(246, 241, 231, .38); color: #f6f1e7;
	border-radius: 999px; padding: 5px 14px 5px 6px; cursor: pointer;
}
.im-step-n {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	width: 22px; height: 22px; border-radius: 50%;
	background: #e8b44a; color: #2c2115; font-weight: 800; font-size: 12.5px;
}
.im-step:hover { border-color: #e8b44a; }
.im-arrow { color: rgba(237, 234, 217, .55); font-weight: 700; }

.im-threads { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .im-threads { grid-template-columns: 1fr; } }
.im-thread { padding: 18px 22px; }
/* Thread 1 sits on the mockup's tan (sampled #f3e8c3); Thread 2 keeps
 * the shared paper2 card above. */
.im-thread1 { background: #f3e8c3; }
.im-thread-label { font-family: Archivo, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 4px; }
/* Label colors sampled from the mockup render (v1.0.7): Thread 1 ochre
 * gold #a67e1f, Thread 2 dark olive #475c38. */
.im-thread1 .im-thread-label { color: #a67e1f; }
.im-thread2 .im-thread-label { color: #475c38; }
.im-thread h3 { font-family: Newsreader, serif; font-size: 24px; margin: 0 0 8px; }
.im-thread p { line-height: 1.55; margin: 0 0 10px; }
/* Thread items carry the mockup's dark circle number badges (sampled
 * #1d2420, cream numerals); the lead-ins are bolded by the template. */
/* Selector carries .italy-map so it out-specifies the theme's
 * .fa-story-body ol padding, which would push the items ~34px right of
 * the mockup's alignment. */
.italy-map .im-thread-list { margin: 0; padding-left: 0; list-style: none; line-height: 1.6; counter-reset: im-thread-item; }
.im-thread-list li { counter-increment: im-thread-item; position: relative; padding-left: 33px; margin-bottom: 7px; }
.im-thread-list li::before {
	content: counter(im-thread-item);
	position: absolute; left: 0; top: 0;
	display: inline-flex; align-items: center; justify-content: center;
	width: 22px; height: 22px; border-radius: 50%;
	background: #1d2420; color: #f6f1e7;
	font-family: Archivo, sans-serif; font-weight: 800; font-size: 12.5px; line-height: 1;
}

.im-notes { margin-top: 26px; padding: 20px 24px; }
.im-notes-tag { font-family: Archivo, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--olive); margin: 0; }
.im-notes .im-h2 { margin-top: 6px; }
.im-notes p { line-height: 1.55; }
.im-notes-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.im-chip-verdict {
	font-family: Archivo, sans-serif; font-weight: 700; font-size: 13px;
	background: var(--olive); color: #fff; padding: 5px 13px; border-radius: 999px;
}
.im-notes-list { line-height: 1.6; padding-left: 22px; }
.im-notes-list li { margin-bottom: 8px; }

.im-closing { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--rule); }
.im-closing p { font-size: 14.5px; color: var(--soft); line-height: 1.55; margin: 0; max-width: 52em; }
.im-closing-regions { font-family: Archivo, sans-serif; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
