/* Land Value and the NYC Subway System - plugin styles */

.hg-subway-wrapper {
	box-sizing: border-box;
	max-width: 100%;
	margin: 0 auto;
}

/* Center content container */
.hg-subway-content-container {
	max-width: 1600px;
	margin: 0 auto;
	padding: 0 2rem;
}

.hg-subway-wrapper *,
.hg-subway-wrapper *::before,
.hg-subway-wrapper *::after {
	box-sizing: inherit;
}

/* Hero */
.hg-subway-hero {
	position: relative;
	background-color: #002d59;
	color: #fff;
	padding: 3rem 1.5rem;
	min-height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.hg-subway-hero-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.3);
	z-index: 1;
}

.hg-subway-hero-content {
	position: relative;
	z-index: 2;
	background: rgba(0, 0, 0, 0.6);
	padding: 2rem 2.5rem;
	border-radius: 4px;
	max-width: 90%;
	text-align: center;
}

.hg-subway-hero-title {
	margin: 0 0 0.75rem;
	font-size: 1.75rem;
	line-height: 1.3;
	font-weight: 700;
	text-transform: uppercase;
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	letter-spacing: 0.5px;
}

.hg-subway-hero-subtitle {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.4;
	font-weight: 400;
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	text-transform: none;
}

@media (min-width: 768px) {
	.hg-subway-hero {
		min-height: 300px;
		padding: 4rem 2rem;
	}
	.hg-subway-hero-content {
		padding: 2.5rem 3.5rem;
		max-width: 80%;
	}
	.hg-subway-hero-title {
		font-size: 2.25rem;
		margin-bottom: 1rem;
	}
	.hg-subway-hero-subtitle {
		font-size: 1.5rem;
	}
}

@media (min-width: 1024px) {
	.hg-subway-hero-content {
		max-width: 70%;
		padding: 3rem 4rem;
	}
	.hg-subway-hero-title {
		font-size: 2.5rem;
	}
	.hg-subway-hero-subtitle {
		font-size: 1.65rem;
	}
}

/* Intro */
.hg-subway-intro {
	padding: 2rem 0;
	max-width: 900px;
	margin: 0 auto;
}

.hg-subway-intro ul {
	margin: 1rem 0;
	padding-left: 1.5rem;
	font-size: 1.15rem;
}

.hg-subway-intro li {
	margin-bottom: 0.5rem;
	font-size: 1.15rem;
}

.hg-subway-intro p {
	margin: 0 0 1rem;
	color: #333;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 1.15rem;
	line-height: 1.7;
}

/* How to Use */
.hg-subway-how-to-use {
	padding: 2rem 0;
	max-width: 900px;
	margin: 0 auto;
}

.hg-subway-how-to-use-title {
	color: #002d59;
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 1rem;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	text-transform: uppercase;
}

.hg-subway-how-to-use-list {
	margin: 0;
	padding-left: 1.5rem;
	color: #333;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.6;
}

.hg-subway-how-to-use-list li {
	margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
	.hg-subway-content-container {
		padding: 0 2rem;
	}
	.hg-subway-intro {
		padding: 2.5rem 0;
	}
	.hg-subway-how-to-use {
		padding: 2.5rem 0;
	}
	.hg-subway-how-to-use-title {
		font-size: 1.75rem;
	}
}

@media (min-width: 1024px) {
	.hg-subway-content-container {
		padding: 0 3rem;
	}
}

/* Tabs */
.hg-subway-tabs-wrap {
	background-color: rgba(123, 176, 231, 0.5);
	padding: 1.25rem 0.75rem;
	margin: 0 auto 1rem;
	max-width: 1600px;
}

.hg-subway-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
	border: none;
}

.hg-subway-tab-block {
	appearance: none;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.hg-subway-tab-block:hover {
	transform: translateY(-3px);
	opacity: 0.9;
}

.hg-subway-tab-block.active {
	opacity: 1;
}

.hg-subway-tab-block.active .hg-subway-tab-circle {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hg-subway-tab-circle {
	width: 65px;
	height: 65px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.6rem;
	font-weight: 700;
	color: #fff;
	margin-bottom: 0.4rem;
	transition: all 0.2s ease;
}

/* Default: unselected line circles are gray */
.hg-subway-tab-circle-1,
.hg-subway-tab-circle-gray {
	background-color: #808183; /* Gray when not selected */
}

/* Selected/active state: line-specific colors */
.hg-subway-tab-block.active .hg-subway-tab-circle-1 {
	background-color: #ee352e; /* Red for Line 1 */
	color: #fff;
}

.hg-subway-tab-block.active#subway-line-7 .hg-subway-tab-circle {
	background-color: #9b59b6; /* Purple/magenta for Line 7 */
	color: #fff;
}

.hg-subway-tab-block.active#subway-line-g .hg-subway-tab-circle {
	background-color: #2ecc71; /* Green for Line G */
	color: #fff;
}

.hg-subway-tab-block.active#subway-line-n .hg-subway-tab-circle {
	background-color: #f1c40f; /* Yellow for Line N */
	color: #000;
}

.hg-subway-tab-block.active#subway-line-l .hg-subway-tab-circle {
	background-color: #e67e22; /* Orange for Line L */
	color: #fff;
}

.hg-subway-tab-circle-info {
	background-color: #7bb0e7; /* Light blue for More Info */
}

.hg-subway-tab-block.active#subway-learn-more .hg-subway-tab-circle-info {
	background-color: #5a9fd4; /* Slightly darker blue when More Info selected */
	color: #fff;
}

.hg-subway-tab-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #002d59;
	margin-bottom: 0.15rem;
	text-transform: uppercase;
	letter-spacing: 0.2px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.2;
}

.hg-subway-tab-hint {
	font-size: 0.7rem;
	font-weight: 500;
	color: #7bb0e7;
	text-transform: uppercase;
	letter-spacing: 0.2px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (min-width: 768px) {
	.hg-subway-tabs-wrap {
		padding: 1.25rem 1rem;
	}
	.hg-subway-tabs {
		gap: 1rem;
	}
	.hg-subway-tab-circle {
		width: 70px;
		height: 70px;
		font-size: 1.75rem;
		margin-bottom: 0.5rem;
	}
	.hg-subway-tab-label {
		font-size: 0.9rem;
		margin-bottom: 0.15rem;
	}
	.hg-subway-tab-hint {
		font-size: 0.75rem;
	}
}

@media (min-width: 1024px) {
	.hg-subway-tabs-wrap {
		padding: 1.5rem 1rem;
	}
	.hg-subway-tabs {
		gap: 1.25rem;
	}
	.hg-subway-tab-circle {
		width: 75px;
		height: 75px;
		font-size: 1.9rem;
		margin-bottom: 0.5rem;
	}
	.hg-subway-tab-label {
		font-size: 0.95rem;
		margin-bottom: 0.15rem;
	}
	.hg-subway-tab-hint {
		font-size: 0.8rem;
	}
}

/* Panels */
.hg-subway-panel {
	display: none;
	padding: 1.5rem 1rem;
	max-width: 100%;
	width: 100%;
	text-align: center;
	box-sizing: border-box;
	overflow-x: hidden;
}

.hg-subway-panel.active {
	display: block;
}

.hg-subway-panel[hidden] {
	display: none !important;
}

/* Legend */
.hg-subway-legend {
	margin: 0 auto 0.75rem;
	font-size: 0.95rem;
	text-align: center;
	max-width: 900px;
}

/* Flourish embed */
.hg-subway-panel .flourish-embed {
	margin: 1rem auto 0;
	max-width: 100%;
	width: 100%;
	display: block;
	height: 600px;
	min-height: 600px;
	overflow: hidden;
	position: relative;
	padding: 0.5rem 0;
}

.hg-subway-panel .flourish-embed iframe,
.hg-subway-panel .flourish-embed object {
	max-width: 100%;
	width: 100%;
	height: 600px;
	min-height: 600px;
	display: block;
	transform: scale(0.85);
	transform-origin: top center;
}

@media (min-width: 768px) {
	.hg-subway-panel .flourish-embed {
		height: 600px;
		min-height: 600px;
		max-width: 100%;
		width: 100%;
		margin-bottom: 2rem;
		padding: 0.75rem 0;
	}
	.hg-subway-panel .flourish-embed iframe,
	.hg-subway-panel .flourish-embed object {
		max-width: 100%;
		width: 100%;
		height: 600px;
		min-height: 600px;
		transform: scale(0.85);
		transform-origin: top center;
	}
}

/* Caption */
.hg-subway-caption {
	margin: 1.5rem auto 1.5rem;
	font-size: 0.95rem;
	color: #333;
	text-align: center;
	max-width: 900px;
	padding: 1rem 0.5rem;
	position: relative;
	z-index: 10;
	background-color: transparent;
}

@media (min-width: 768px) {
	.hg-subway-caption {
		margin: 2rem auto 2rem;
		padding: 1.25rem 1rem;
	}
}

/* Data Studio iframe wrapper - responsive */
.hg-subway-iframe-wrap {
	position: relative;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	margin: 0 auto 1.5rem;
	display: block;
	clear: both;
}

.hg-subway-iframe-wrap iframe {
	width: 100%;
	max-width: 100%;
	height: 1000px;
	border: 0;
}

@media (max-width: 1320px) {
	.hg-subway-iframe-wrap iframe {
		height: calc(1000px * (100vw / 1250));
		min-height: 700px;
	}
}

@media (max-width: 768px) {
	.hg-subway-panel .flourish-embed {
		max-width: 100%;
		width: 100%;
		height: 400px;
		min-height: 400px;
		padding: 0.5rem 0;
	}
	.hg-subway-panel .flourish-embed iframe,
	.hg-subway-panel .flourish-embed object {
		height: 400px;
		min-height: 400px;
		transform: scale(0.85);
		transform-origin: top center;
	}
	.hg-subway-iframe-wrap {
		width: 100%;
		max-width: 100%;
	}
	.hg-subway-iframe-wrap iframe {
		height: calc(1000px * (100vw / 1250));
		min-height: 600px;
	}
}

@media (min-width: 1024px) {
	.hg-subway-iframe-wrap iframe {
		height: 900px;
	}
}

/* Learn more accordion */
.hg-subway-learn-more {
	max-width: 900px;
	margin: 0 auto;
}

.hg-subway-accordion {
	margin: 0;
}

.hg-subway-details {
	border: 1px solid #b02b2c;
	border-radius: 4px;
	margin-bottom: 0.5rem;
	overflow: hidden;
}

.hg-subway-details summary {
	padding: 0.85rem 1rem;
	font-weight: 600;
	cursor: pointer;
	background: #f8f8f8;
	list-style: none;
}

.hg-subway-details summary::-webkit-details-marker {
	display: none;
}

.hg-subway-details summary::before {
	content: '+ ';
	margin-right: 0.25rem;
}

.hg-subway-details[open] summary::before {
	content: '− ';
}

.hg-subway-details[open] summary {
	background: #fff;
	border-bottom: 1px solid #e0e0e0;
}

.hg-subway-details-content {
	padding: 1rem 1.25rem;
	background: #fff;
}

.hg-subway-details-content p {
	margin: 0 0 0.75rem;
}

.hg-subway-details-content p:last-child {
	margin-bottom: 0;
}

.hg-subway-details-content a {
	color: #002d59;
}

.hg-subway-details-content a:hover {
	text-decoration: underline;
}
