/* Plan Your Visit directions: Divi Tabs module with CSS class "hc-dir"
   (one tab per origin) + the map, an SVG module inside the group with class
   "hc-dir-map" (assets/js/directions.js lights the active tab's route).
   Tab content is plain rich text: Heading 3 = small label, the paragraph
   after it = drive time, numbered list = steps, blockquote = sign tip.

   Layout classes on the Divi groups (set by the build, see their admin labels):
     hc-dir-layout   map + directions side by side
     hc-dir-mapwrap  map column (scroller + swipe hint)
     hc-dir-scroll   lets the map scroll sideways on phones
     hc-dir-wrap     tabs column */

/* Map: only the active origin's route and ring are drawn. The drawing may
   spill past its 700 × 560 grid so the land fills the whole box. */
.hc-dir-map svg {
	overflow: visible;
}
.hc-dir-map .hc-route,
.hc-dir-map .hc-ring {
	display: none;
}
.hc-dir-map .hc-route.is-active,
.hc-dir-map .hc-ring.is-active {
	display: inline;
}

/* Tabs → segmented origin buttons. */
.et_pb_tabs.hc-dir {
	display: flex;
	flex-direction: column;
	gap: 16px;
	height: 100%;
	border: 0;
	background: none;
}
.hc-dir .et_pb_tabs_controls {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
}
.hc-dir .et_pb_tabs_controls::after {
	display: none;
}
.hc-dir .et_pb_tabs_controls li {
	float: none;
	display: block;
	height: auto !important; /* Divi's script pins a height measured before the label is split; the grid already keeps the three equal */
	margin: 0;
	padding: 0;
	border: 2px solid rgba(10, 67, 4, 0.25);
	border-radius: 4px;
	background: var(--gcid-hc-card);
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.hc-dir .et_pb_tabs_controls li a {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	box-sizing: border-box;
	height: 100%;
	min-height: 60px;
	padding: 10px 14px !important;
	color: var(--gcid-primary-color) !important;
	font-family: "Archivo", sans-serif;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
	text-align: left;
}
.hc-dir .et_pb_tabs_controls li.et_pb_tab_active {
	background: var(--gcid-primary-color);
	border-color: var(--gcid-primary-color);
}
.hc-dir .et_pb_tabs_controls li.et_pb_tab_active a {
	color: var(--gcid-hc-cream) !important;
}
.hc-dir .hc-dir__from {
	font-size: 11px;
	line-height: normal;
	font-stretch: 125%;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* Panel card. */
/* All the tabs sit in one grid cell, so the card is always as tall as the
   longest set of directions and nothing jumps when you switch. Only the
   active one is visible (Divi's own show/hide is overridden). */
.hc-dir .et_pb_all_tabs {
	flex: 1 1 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	padding: 32px;
	background: var(--gcid-hc-card);
	border: 1px solid var(--gcid-hc-line);
	border-radius: 4px;
}
.hc-dir .et_pb_all_tabs > .et_pb_tab {
	grid-area: 1 / 1;
	display: flex !important;
	flex-direction: column;
	gap: 0;
	min-width: 0;
	margin: 0 !important;
	padding: 0;
	opacity: 1 !important;
	visibility: hidden;
}
.hc-dir .et_pb_all_tabs > .et_pb_tab.et-pb-active-slide {
	visibility: visible;
}
.hc-dir .et_pb_tab_content {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 18px;
	font-family: "Archivo", sans-serif;
	font-size: 17px;
	line-height: 1.55;
	color: var(--gcid-hc-body-dark);
}
.hc-dir .et_pb_tab_content,
.hc-dir .et_pb_tab_content > * {
	margin: 0;
	padding: 0;
}
.hc-dir .et_pb_tab_content h3 {
	font-family: "Archivo", sans-serif;
	font-size: 13px;
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: 0.16em;
	line-height: 1.6;
	text-transform: uppercase;
	color: var(--gcid-hc-gold-dark);
}
.hc-dir .et_pb_tab_content h3 + p {
	margin-top: -14px;
	font-family: "Ultra", Georgia, serif;
	font-size: 34px;
	line-height: 1.1;
	color: var(--gcid-primary-color);
}

/* Steps: hexagon numbers. */
.hc-dir .et_pb_tab_content ol {
	display: flex;
	flex-direction: column;
	gap: 14px;
	list-style: none;
	counter-reset: hc-step;
}
.hc-dir .et_pb_tab_content ol li {
	line-height: 1.55;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	counter-increment: hc-step;
}
.hc-dir .et_pb_tab_content ol li::before {
	content: counter(hc-step);
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 34px;
	clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
	background: var(--gcid-secondary-color);
	color: var(--gcid-hc-forest);
	font-family: "Ultra", Georgia, serif;
	font-size: 14px;
	line-height: 1;
}

/* Sign tip. */
.hc-dir .et_pb_tab_content blockquote {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 0;
	border-radius: 4px;
	background: var(--gcid-hc-open-bg);
	font-size: 16px;
	line-height: 1.5;
	color: var(--gcid-body-color);
}
.hc-dir .et_pb_tab_content blockquote::before {
	content: "";
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	background: var(--gcid-hc-open-text);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hc-dir .et_pb_tab_content blockquote p {
	margin: 0;
	padding: 0;
}

/* "Open in Google Maps ↗" sits at the bottom of the card. */
.hc-dir .et_pb_tab_content > p:last-child {
	margin-top: auto;
}
.hc-dir .hc-maps-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: var(--gcid-primary-color);
	font-size: 14px;
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
}
.hc-dir .hc-maps-link::after {
	content: "";
	flex: none;
	width: 14px;
	height: 14px;
	background-color: currentColor;
	-webkit-mask: var(--hc-arrow-ur) center / contain no-repeat;
	mask: var(--hc-arrow-ur) center / contain no-repeat;
}

@media (max-width: 767px) {
	/* Order on phones: tabs, map, swipe hint, directions card. The wrappers
	   dissolve so the four pieces line up in the "Map + directions" group. */
	.hc-dir-mapwrap,
	.hc-dir-wrap,
	.et_pb_tabs.hc-dir {
		display: contents !important;
	}
	.hc-dir .et_pb_tabs_controls {
		order: 1;
		gap: 6px;
	}
	.hc-dir-layout .hc-dir-scroll { /* two classes: outranks the module's own width setting */
		order: 2;
		flex: 0 0 auto !important;
		display: block;
		width: calc(100% + 40px) !important; /* bleeds to the screen edges */
		max-width: none;
		margin: 0 -20px;
		padding: 0 20px 6px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.hc-dir-scroll .hc-dir-map {
		width: 600px !important;
		max-width: none;
		aspect-ratio: 700 / 560;
	}
	.hc-dir-swipe {
		order: 3;
		margin-top: -10px !important;
	}
	.hc-dir .et_pb_all_tabs {
		order: 4;
		padding: 20px;
	}
	.hc-dir .et_pb_tabs_controls li a {
		padding: 8px 10px !important;
		font-size: 14px;
		overflow-wrap: normal; /* long names run past the edge rather than break mid-word */
		word-break: normal;
	}
	.hc-dir .hc-dir__from {
		font-size: 10px;
	}
	.hc-dir .et_pb_tab_content {
		gap: 16px;
		font-size: 16px;
	}
	.hc-dir .et_pb_tab_content h3 + p {
		margin-top: -12px;
		font-size: 28px;
	}
	.hc-dir .et_pb_tab_content ol {
		gap: 12px;
	}
	.hc-dir .et_pb_tab_content ol li {
		gap: 12px;
	}
	.hc-dir .et_pb_tab_content ol li::before {
		width: 28px;
		height: 32px;
		font-size: 13px;
	}
	.hc-dir .et_pb_tab_content blockquote {
		gap: 10px;
		padding: 12px 14px;
		font-size: 15px;
	}
}

/* Map labels (SVG units). The SVG module keeps classes but not font
   attributes, so the lettering is styled here. */
.hc-dir-map text {
	font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
}
.hc-dir-map .hc-map-water text {
	font-size: 14px;
	font-style: italic;
	font-weight: 600;
	letter-spacing: 0.6px;
	text-anchor: middle;
}
.hc-dir-map .hc-map-region text {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 2.6px;
	text-anchor: middle;
}
.hc-dir-map .hc-map-water text.is-sm {
	font-size: 12px;
}
.hc-dir-map .hc-map-region text.is-sm {
	font-size: 11px;
	letter-spacing: 1.6px;
}
.hc-dir-map .hc-map-labels text {
	font-size: 13px;
	font-weight: 700;
	paint-order: stroke;
}
.hc-dir-map .hc-map-labels text.is-end {
	text-anchor: end;
}
.hc-dir-map .hc-map-labels text.is-light {
	font-size: 12px;
	font-weight: 600;
}
.hc-dir-map .hc-map-shield,
.hc-dir-map .hc-map-civic,
.hc-dir-map .hc-map-farm,
.hc-dir-map .hc-map-north {
	text-anchor: middle;
}
.hc-dir-map .hc-map-shield,
.hc-dir-map .hc-map-north {
	font-size: 12px;
	font-weight: 800;
}
.hc-dir-map .hc-map-civic {
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 1.4px;
}
.hc-dir-map .hc-map-farm {
	font-size: 15px;
	font-weight: 700;
}
.hc-dir-map .hc-map-scale {
	font-size: 12px;
	font-weight: 700;
}
