/**
 * Petersburg Neighborhoods — Frontend Styles
 * Design by Agent View Digital
 */

/* ================================================================== */
/*  Layout                                                            */
/* ================================================================== */

.pn-section {
	display: grid;
	grid-template-columns: 1fr var(--pn-map-col, 1.35fr);
	gap: 40px;
	align-items: center;
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}

/* geo data script tags — hide fallback */
.pn-section > script { display: none; }

/* Map-only mode: no left column, map fills the row */
.pn-section.pn-map-only {
	grid-template-columns: 1fr !important;
}

.pn-section.pn-map-only .pn-map {
	max-width: 100%;
}

/* ================================================================== */
/*  Left: Header + List                                               */
/* ================================================================== */

.pn-eyebrow {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 12px;
	letter-spacing: 0.42em;
	font-weight: 500;
	text-transform: uppercase;
}

.pn-eyebrow::after {
	content: "";
	flex: 1;
	height: 1px;
	background: currentColor;
	opacity: 0.35;
	max-width: 90px;
}

.pn-title {
	font-size: 56px;
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1.05;
	margin: 8px 0 6px;
}

.pn-subtitle {
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	margin-bottom: 28px;
}

.pn-description {
	font-size: 15px;
	line-height: 1.7;
	margin-bottom: 24px;
	max-width: 46ch;
}

.pn-description p {
	margin: 0 0 0.8em;
}

.pn-description p:last-child {
	margin-bottom: 0;
}

/* ---- Area list ---- */

.pn-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	gap: 9px;
}

.pn-list li {
	background: var(--pn-pill-bg, #182A31);
	color: var(--pn-pill-text, #FBF8F2);
	font-size: 19px;
	letter-spacing: 0.08em;
	font-weight: 600;
	font-variant: small-caps;
	padding: 9px 18px;
	border-left: 3px solid transparent;
	cursor: pointer;
	user-select: none;
	transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.pn-list li:hover,
.pn-list li.pn-active {
	background: var(--pn-pill-hover, #234F5B);
	color: var(--pn-pill-hover-text, #FFFFFF);
	border-left-color: var(--pn-pill-border, #8FB6B3);
	transform: translateX(5px);
}

/* When an anchor wraps the content, it carries the flex layout */
.pn-list li a {
	color: inherit;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
}

.pn-area-label {
	display: inline-block;
}

.pn-area-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 1;
	color: currentColor;
	transition: color 0.25s ease, transform 0.25s ease;
}

.pn-area-icon svg {
	width: 1em;
	height: 1em;
	display: block;
	fill: currentColor;
}

.pn-list li:hover .pn-area-icon {
	transform: translate(2px, -2px);
}

/* ================================================================== */
/*  Right: Map SVG                                                    */
/* ================================================================== */

.pn-map {
	position: relative;
}

.pn-map svg {
	width: 100%;
	height: auto;
	display: block;
	overflow: visible;
}

/* --- County / Neighborhood polygons --- */

.pn-hood {
	fill: var(--pn-ctx, #EFE9DC);
	stroke: var(--pn-stroke, #FBF8F2);
	stroke-width: 2;
	transition: fill 0.3s ease;
}

.pn-hood.pn-featured {
	fill: var(--pn-feat, #E2D9C6);
	cursor: pointer;
}

.pn-hood.pn-featured:hover {
	fill: var(--pn-hover, #234F5B);
}

.pn-hood.pn-active {
	fill: var(--pn-active, #182A31);
}

/* Coffee Pot / approximate overlay */
.pn-hood.pn-approx {
	fill: transparent;
	stroke: var(--pn-pill-border, #8FB6B3);
	stroke-width: 1.4;
	stroke-dasharray: 5 4;
	cursor: pointer;
}

.pn-hood.pn-approx:hover {
	fill: var(--pn-hover, #234F5B);
	fill-opacity: 0.92;
}

.pn-hood.pn-approx.pn-active {
	fill: var(--pn-active, #182A31);
	fill-opacity: 0.96;
	stroke: var(--pn-pill-border, #8FB6B3);
}

/* --- Labels --- */

.pn-hood-label {
	font-size: 14px;
	letter-spacing: 0.16em;
	font-weight: 600;
	fill: var(--pn-lbl, #182A31);
	text-anchor: middle;
	pointer-events: none;
	text-transform: uppercase;
	transition: fill 0.3s ease;
}

.pn-hood-label.pn-active {
	fill: var(--pn-lbl-active, #F5EFE3);
}

.pn-bay-label {
	font-size: 20px;
	letter-spacing: 0.5em;
	font-weight: 500;
	fill: var(--pn-bay, #9db9bb);
	text-anchor: middle;
	pointer-events: none;
	text-transform: uppercase;
	opacity: 0.75;
}

/* ================================================================== */
/*  Responsive                                                        */
/* ================================================================== */

@media (max-width: 1024px) {
	.pn-section {
		grid-template-columns: 1fr var(--pn-map-col, 1.2fr);
		gap: 24px;
	}

	.pn-title {
		font-size: 42px;
	}
}

@media (max-width: 860px) {
	.pn-section {
		grid-template-columns: 1fr !important;
		gap: 20px;
	}

	.pn-left {
		order: 1;
	}

	.pn-map {
		order: 0;
		max-width: 560px;
		margin: 0 auto;
		width: 100%;
	}

	.pn-description {
		max-width: 60ch;
		margin-left: auto;
		margin-right: auto;
		text-align: center;
	}

	.pn-list li {
		font-size: 16px;
		padding: 8px 14px;
	}

	.pn-list li:hover,
	.pn-list li.pn-active {
		transform: none;
	}

	.pn-list li:hover .pn-area-icon {
		transform: none;
	}

	.pn-title {
		font-size: 36px;
		text-align: center;
	}

	.pn-eyebrow {
		justify-content: center;
	}

	.pn-subtitle {
		text-align: center;
		margin-bottom: 18px;
	}
}

@media (max-width: 480px) {
	.pn-list li {
		min-width: 120px;
		font-size: 14px;
		padding: 7px 10px;
	}

	.pn-title {
		font-size: 30px;
	}

	.pn-hood-label {
		font-size: 11px;
	}
}

/* ================================================================== */
/*  Accessibility / Motion                                            */
/* ================================================================== */

@media (prefers-reduced-motion: reduce) {
	.pn-list li,
	.pn-hood,
	.pn-hood-label {
		transition: none !important;
	}
}
