#nav-modal {
    position: fixed;
    width: 100dvw;
    height: 100dvh;
    top: 0;
    background: rgba(0, 0, 0, 0);
    display: none;
    z-index: -1;
    transition: all var(--trans-duration) linear;
}

.showMobileMenu #nav-modal {
    background: rgba(0, 0, 0, 0.5);
    display: block;
    z-index: 99998;
}

#masthead {
	--max-width: 108.75rem;
	--_logo-width: 10.25rem;

	position: fixed;
	top: 0;
	width: 100%;
	z-index: 9;
	display: grid;
	background-color: hsla(0, 0%, 100%);

	.dc-content {
		justify-self: center;
		display: grid;
		padding: 0.8rem 1.75rem;
		grid-template-columns: var(--_logo-width) var(--burger-width);
		grid-template-areas: 'logo burger';
		justify-content: space-between;
		z-index: 99999;

		.logo-content {
			grid-area: logo;
			z-index: 999999;
		}
	}

	ul {
		margin-bottom: unset;
	}
}

#header-content {
    position: relative;
    display: block;
    background-color: hsl(0, 0%, 100%);
    z-index: 99999;
}

#header-links {
	--max-width: 87.5rem;

	grid-area: hl;
	width: 100%;
	max-width: calc(var(--max-width) - 1.75rem * 2);
	position: absolute;
	justify-self: center;
	visibility: hidden;
	top: -100dvh;
	transition: all var(--trans-duration) linear;
}

.showMobileMenu #header-links {
	visibility: visible;
	top: var(--ht-header);
	box-shadow: 0 0 12px hsl(0deg 0% 84%);
}

.burger {
	grid-area: burger;
}

@media (width < 46.875rem) { /* 750px */
	#masthead {
		box-shadow: 0 0.625rem 1.25rem -0.5rem hsl(0, 0%, 50%);
	}

	.top-links.wide {
		display: none;
	}
}

@media (width >= 46.875rem) { /* 750px */
	#masthead {
		--_logo-width: 23.1875rem;

		.scrolled & {
			box-shadow: 0 0.625rem 1.25rem -0.5rem hsl(0, 0%, 50%);
		}

		.dc-content {
			padding-top: 3.75rem;
			transition: padding var(--trans-duration) linear;
		}

		.scrolled & .dc-content {
			padding-top: 1.5rem;
		}
	}

	.burger-wrapper {
		justify-self: flex-end;
	}

	.top-links.wide {
		grid-area: toplinks;
		gap: 2.8rem;
		padding-inline: 0;

		.top-menu {
			display: flex;
			gap: 3.125rem;
		}
	}

	#masthead {
		.dc-content {
			grid-template-columns: var(--_logo-width) 1fr auto;
			grid-template-areas: 'logo burger toplinks';
		}
	}
}

@media (46.875rem <= width < 75rem) { /* 750px to 1200px */
	.top-links.wide {
		#top-menu {
			display: none;
		}

		.phone {
			padding-left: 2.5rem;
			margin-left: 2.5rem;
			border-left: 1px solid hsl(0, 0%, 0%);
		}
	}

	.top-links.mobile {
		justify-content: center;

		.top-menu {
			display: flex;
			gap: 3.125rem;
		}

		a {
			font-weight: 300;
		}
	}
}

@media (51.875rem <= width < 75rem) { /* 830px to 1200px */
	.top-links.wide .phone {
		padding-left: 4.375rem;
		margin-left: 4.375rem;
	}
}


/***** Menu Modal **********/
.close-icon {
    position: absolute;
    display: grid;
    align-content: center;
    --_dimension: 1.5rem;
    width: var(--_dimension);
    height: var(--_dimension);
    top: 0.5rem;
    right: 0.5rem;
    border: 3px solid var(--clr-link);
    border-radius: 50%;
    background-color: transparent;
    cursor: pointer;

	visibility: hidden;
	opacity: 0;

	span {
		position: relative;
		font-family: var(--ff-secondary);
		font-size: var(--_dimension);
		line-height: 1;
	}

	&:hover,
	&:focus-visible {
		outline: none;
		border-color: hsl(0, 0%, 0%);

		span {
			color: hsl(0, 0%, 0%);
		}
	}

	&:focus-visible {
		visibility: visible;
		opacity: 1;
	}
}

.showMobileMenu .close-icon {
	visibility: visible;
}

.close-button {
    display: block;
    background: var(--background-button);
    font-size: 1rem;
    font-weight: 600;
    color: var(--clr-button);
    border-radius: 100vw;
	border: none;
    padding: 0 1em;
    line-height: 2em;
    position: absolute;
	bottom: 0.25rem;
	right: 0.25rem;
    cursor: pointer;
    transition: var(--trans-duration) linear;

	opacity: 0;

	&:hover,
	&:focus {
		background-color: hsl(0, 0%, 0%);
	}

	&:focus {
		opacity: 1;
	}
}
/***** end Menu Modal ******/


/***** Top Links ********/
.top-links {
	display: flex;
	padding-inline: 1.25rem;
	justify-content: space-between;
	align-items: center;

	&.mobile {
		display: grid;
		position: relative;
		padding-block: 1.25rem;
	}

	.phone {
		font-weight: 700;
		font-size: 1.125rem;
		line-height: 2.25;
	}

	li {
		list-style-type: none;

		a {
			display: block;
			font-family: var(--ff-secondary);
			font-weight: 300;
			font-size: 1rem;
			color: hsl(0, 0%, 0%);
			line-height: 2.5;

			&:hover,
			&:focus {
				text-decoration: none;
				color: var(--clr-blue);
			}
		}

		@media (width < 75rem) { /* 1200px */
			a {
				font-weight: 400;

				&::before {
					content: '';
					width: 0;
					height: 0;
					border-style: solid;
					border-width: var(--_border-width);
					border-color: transparent;
					border-right-style: none;
					border-left-color: inherit;
					display: inline-block;
					position: relative;
					top: 1px;
					margin-right: 0.4em;
					transition: all var(--trans-duration) linear;
				}
			}
		}
	}

	@media (width >= 46.875rem) { /* 750px */
		.phone {
			font-size: 1.25rem;
		}

		&.mobile .phone {
			display: none;
		}
	}

	@media (width >= 53.125rem) { /* 850px */
		&.mobile::after {
			content: '';
			width: 80%;
			height: 1px;
			background-color: hsl(0, 0%, 0%);
			position: absolute;
			bottom: 0;
			left: 10%;
		}
	}

	@media (width >= 75rem) { /* 1200px */
		&.mobile {
			display: none;
		}

		&.wide {
			.top-menu {
				padding-left: 4.4375rem;
				margin-left: 4.8125rem;
				border-left: 1px solid hsl(0, 0%, 0%);
			}
		}
	}
}
/***** end Top Links ****/


/***** Main Menu ***********/
.nav-content {
	display: grid;
	background-color: hsl(0, 0%, 100%);
}

.main-menu {
	li {
		position: relative;
		list-style-type: none;
	}

	> li > span > a {
		font-size: 1.125rem;
		font-weight: 500;
	}
	
	a {
		display: block;
		font-size: 0.9375rem;
		font-weight: 300;
		color: hsl(0, 0%, 0%);
		line-height: 1;
		padding-block: 0.75em;

		&:hover,
		&:focus {
			text-decoration: none;
			color: var(--clr-link);
		}
	}

	.sub-menu a {
		line-height: 1.2;
		padding-block: 0.9em;
	}

	@media (width < 53.125rem) { /* 850px */
		> li {
			padding-left: 1.25rem;
			border-top: 1px solid var(--clr-gray-border);
		}

		.menu-item-has-children {
			display: grid;
			grid-template-columns: 1fr auto;
			grid-template-areas:
				'heading button'
				'submenu submenu';

			> span {
				grid-area: heading;
			}

			> .toggle-button {
				grid-area: button;
				display: block;
				position: absolute;
				right: 0;
				width: 2.8125rem;
				height: 2.8125rem;
				text-align: center;
				font-size: 2rem;
				color: #fff;
				background: #bdbdbd;
				border: none;
				cursor: pointer;
				z-index: 999;

				&::after {
					content: '+';
				}

				&[aria-expanded="true"]::after {
					content: '-';
				}
			}

			> .sub-menu {
				grid-area: submenu;
			}
		}
		
		> .menu-item-has-children > .sub-menu {
			height: auto;
			max-height: 0;
			visibility: hidden;
			overflow: hidden;

			> li {
				border-top: 1px solid #ccc;
			}
		}

		.showSubMenu > .sub-menu {
			transition: all var(--trans-duration) linear;
			visibility: visible;
			max-height: 100rem;
		}
	}

	@media (width >= 53.125rem) { /* 850px */
		& {
			display: flex;
			justify-content: space-between;
			gap: 3rem;
			padding: 3.25rem 1.25rem;
		}

		.menu-item-has-children > .toggle-button {
			display: none;
		}

		a {
			line-height: 1.3;
		}

		> li > span > a {
			font-size: 1.3125rem;
		}

		.sub-menu a {
			padding-block: 0.6em;

			&:hover,
			&:focus {
				font-weight: 400;
			}
		}
	}

	@media (min-width: 68.75rem) { /* 1100px */
		& {
			padding: 3.25rem;
		}
	}
}

.child-menu-icon {
	cursor: pointer;
	background: unset; /* unset default button styling */
	border: unset;
	position: absolute;
	right: 5rem;
	border-left: 1px solid hsl(0, 0%, 100%);
	border-right: 1px solid hsl(0, 0%, 100%);
}

.child-menu-icon.arrow {
	--_border-width: 0.7em;
	width: 5rem;
	height: 2.8125rem;
	top: 0;
}

.child-menu-icon.arrow::after {
	color: hsl(0, 0%, 100%);
	margin-left: 0;
}

.showSubMenu .child-menu-icon.arrow::after {
	transform: rotate(-180deg);
}
/***** end Main Menu *******/


/***** Logo *****************/
.logo-content {
	a {
		display: block;
	
		&:hover,
		&:focus {
			text-decoration: none;
	
			.logo-img {
				scale: 1.1;
			}
		}
	
	}

	.logo-img {
		width: 100%;
		max-width: var(--_logo-width);
		height: auto;
		transition: all var(--trans-duration) linear;
	}
}
/***** end Logo *************/
