/**********************************************************
=TOC (Table Of Contents)
/**********************************************************

TOC (Table Of Contents)
Reference
Imports/Includes
Debug
Fonts
Spacing
Forms
Header
Menu (Desktop)
Menu (Mobile)
Footer
Global Styles
- HR
- Videos
- Blogs
- Hero (Homepage)
- Split Row
- Maps
Special Pages

/**********************************************************
=Reference
/**********************************************************

/* Media breakpoints / screen sizes /*
Phone:     ~499px
Smartphone: 500px~
Tablet:     768px~
Desktop:    990px~
Widescreen: 1200px~

/* Example font import from Google Fonts /*
@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@900&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;0,700;0,900;1,500&display=swap');

/* Example font import from Adobe Fonts--must use "Add To Web Project" option and create project for client /*
@import url("https://use.typekit.net/eie1ktp.css");

/* Example font face from a local file /*
@font-face {
	font-family: 'ExampleFont';
	font-display: swap;
	font-weight: bold;
	font-style: normal;
	src:
		url('/wp-content/themes/enfold-child-estland/fonts/ExampleFont-Bold.ttf') format('truetype'),
		url('/wp-content/themes/enfold-child-estland/fonts/ExampleFont-Bold.woff') format('woff'),
		url('/wp-content/themes/enfold-child-estland/fonts/ExampleFont-Bold.woff2') format('woff2'),
		url('/wp-content/themes/enfold-child-estland/fonts/ExampleFont-Bold.otf') format('opentype');
}

/**********************************************************
=Debug
/*********************************************************/

/* Elements that are probably copy+pasted badly in Enfold */
/*:where(h1,h2,h3,h4,h5,h6) :where(span,bold,b,strong),
.avia_textblock > :where(h1,h2,h3,h4,h5,h6)[style]:not([style="text-align: center;"]),
.avia_textblock > p[style]:not([style="text-align: center;"]),
.avia_textblock > p span {
	box-shadow: 0 0 0 1rem red;
}*/

/* Debug box shadow: change min width or comment out to disable */
/* @media( min-width:9px ) {
	#top.page-id-511 { box-shadow: inset 0 0 1rem 0 pink; background-clip: content-box; }
	#top.page-id-511 * > * { box-shadow: inset 0 0 1rem 0 red; }
	#top.page-id-511 * > * > * { box-shadow: inset 0 0 1rem 0 orange; }
	#top.page-id-511 * > * > * > * { box-shadow: inset 0 0 1rem 0 yellow; }
	#top.page-id-511 * > * > * > * > * { box-shadow: inset 0 0 1rem 0 green; }
	#top.page-id-511 * > * > * > * > * > * { box-shadow: inset 0 0 1rem 0 blue; }
	#top.page-id-511 * > * > * > * > * > * > * { box-shadow: inset 0 0 1rem 0 indigo; }
	#top.page-id-511 * > * > * > * > * > * > * > * { box-shadow: inset 0 0 1rem 0 violet; }
} */

/**********************************************************
=Fonts
/*********************************************************/

#top h4 {
	font-weight: var(--weight--normal);
	text-transform: uppercase;
}

/**********************************************************
=Spacing
/*********************************************************/

/* Rows separated by HR */
#top .avia-section:not(.est-split):has(+ div:not(.avia-section) + .avia-section) .content { /* row followed by solo HR */
	padding-bottom: calc( var(--row-bottom-padding) / 1.5 );
}
#top .avia-section + div:not(.avia-section) + .avia-section:not(.est-split) .content { /* row followed by solo HR */
	padding-top: calc( var(--row-top-padding) / 1.5 );
}

/**********************************************************
=Header
/*********************************************************/

/* Make header bar have semi-transparent background */
@property --header__bottom-color { /* define as property so we can transition */
  syntax: "<color>";
  inherits: true; /* need true so can set at root level and change at child level */
  initial-value: transparent;
}
@property --header__bottom-opacity {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}
:root {
	--header__bottom-color: var(--navy--light);
}
#top #header {
	--header__bottom-opacity: 0.95;
	background: linear-gradient( to bottom, var(--navy--dark), rgb( from var(--header__bottom-color) r g b / var(--header__bottom-opacity) ) );
	transition: --header__bottom-color 0.2s ease-in-out, --header__bottom-opacity 0.2s ease-in-out;
}
/* When open submenu, header transparency and color should change */
#top #header:has(li.menu-item-top-level.menu-item-has-children:where(:hover,:focus-visible,:focus-within)),
.av-burger-overlay-active #top #header {
	--header__bottom-color: var(--navy--dark);
	--header__bottom-opacity: 1;
}

/* Since header is semi-transparent, need to set top of #main to use same gradient so it looks opaque at top of page */
#top #wrap_all {
	background-image: linear-gradient( to bottom, var(--navy--dark), rgb( from var(--header__bottom-color) r g b / var(--header__bottom-opacity) ) );
	background-position: center top;
	background-repeat: no-repeat;
	background-size: 100% calc( var(--header--secondary__height) + var(--header__height) );
}
#top #main {
	background: transparent;
}

/* Header resets */
#top #header_main * {
	align-items: center;
	border: none;
	flex: none;
	font-size: inherit;
	height: auto;
	line-height: 1;
	min-height: 0;
	min-width: 0;
	padding: 0;
	vertical-align: middle;
	width: auto;
}

/* Header structure */
#top#top #header_main .inner-container {
	display: flex;
	gap: var(--padding--normal);
	height: var(--header__height);
}

/* Secondary header (contact info) */
@media( max-width:989px ) {
	:root {
		--header--secondary__height: 0px;
	}
	#top #header_meta {
		display: none;
	}
}
#top #header_meta,
#top #header_meta * {
	float: none;
	height: auto;
	line-height: 1;
	margin-block: 0;
	min-height: 0;
	padding: 0;
	position: static;
}
#top #header_meta {
	height: var(--header--secondary__height);
	position: relative;
}
#top #header_meta .menu {
	display: flex;
	gap: var(--padding--small);
	justify-content: flex-end;
}

/* Header logo */
#header .logo {
	margin-right: auto;
	overflow: visible;
	transform: translateY( calc( -1 * var(--header--secondary__height) / 2 ) ); /* account for top bar */
}
#top #header .logo,
#top #header .logo * {
	display: inline-block;
	height: var(--logo__height) !important; /* override Enfold */
	width: var(--logo__width);
	vertical-align: top;
}
#header .logo a {
	transform: scale(1);
	transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}
#header .logo a:where(:hover,:focus-visible) {
	opacity: 0.75;
	transform: scale(1.05);
}

/* Hide admin bar stuff */
#top#top #wp-admin-bar-updates,
#top#top #wp-admin-bar-gform-forms,
#top#top #wp-admin-bar-my-account,
#top#top #wp-admin-bar-customize,
#top#top #wp-admin-bar-comments,
#top#top #wp-admin-bar-wpseo-menu,
#top#top #wp-admin-bar-toolset_admin_bar_menu {
	display: none;
}
#wp-admin-bar-edit .ab-item {
	font-size: 0;
}
#wp-admin-bar-edit .ab-item::before {
	font-size: 20px;
}
#wp-admin-bar-edit .ab-item::after {
	content: "Edit";
	font-size: 13px;
}

/**********************************************************
=Menu (Desktop)
/*********************************************************/

/* All menu links */
#top #avia-menu * {
	box-shadow: none;
}
#top #avia-menu a {
	display: inline-flex;
	font-size: var(--header-link__size);
	font-weight: var(--weight--medium);
	padding-bottom: var(--header-link__padding--bottom);
	padding-top: var(--header-link__padding--top);
	padding-inline: var(--padding--small);
	position: relative;
}
#top#top #avia-menu a {
	color: var(--white); /* override Enfold */
}

/* Secondary menu links (contact info at top) */
#top #header_meta a {
	background-position: center bottom;
	background-size: calc( 100% - 2 * ( var(--header--secondary__padding) ) ) 0;
	color: var(--white);
	display: inline-block;
	font-family: var(--family--normal);
	font-size: var(--header--secondary__size);
	font-weight: var(--weight--medium);
	line-height: var(--size--input);
	padding: var(--header--secondary__padding);
}
#top #header_meta a[href^="tel:"] {
	font-size: 0.9em;
}
#top #header_meta a:where(:hover,:focus-visible) {
	color: var(--green--bright);
}
#top#top #header_meta a:where(:hover,:focus-visible) {
	background-size: calc( 100% - 2 * ( var(--header--secondary__padding) ) ) 2px;
}
#top #header_meta li:last-child {
	margin-right: calc( -1 * var(--padding--smaller) );
}
#top #header a[href^="tel:"]::before {
	content: "";
	display: inline-block;
	font-family: var(--family--icon);
	margin-right: 0.25rem;
	transform: scaleX(-100%);
}

/* Main level menu links (i.e. Commercial) */
#top #avia-menu a::before {
	background: var(--green--bright);
	bottom: 0;
	content: "";
	height: 6px;
	left: 0;
	opacity: 0;
	position: absolute;
	transition: opacity 0.2s ease-in-out;
	width: 100%;
}
#top #avia-menu li:where(:hover,:focus-visible,:focus-within) > a::before {
	opacity: 1;
}
/* Menu links dropdown icon */
#top #avia-menu {
	--arrow__direction: 90deg;
}
#top #avia-menu li.menu-item-has-children > a span {
	margin-right: auto;
}
#top #avia-menu li.menu-item-has-children > a::after {
	background-color: currentcolor;
	content: "";
	display: inline-block;
	height: 0.6em;
	margin-left: 0.5ch;
	mask-image: url("images/est-icon--caret.svg");
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	transform: rotate( var(--arrow__direction) );
	transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
	width: 0.6em;
}
/* Make last top level link touch edge */
li.menu-item-top-level:has(+ .av-burger-menu-main) {
	margin-right: calc( -1 * var(--padding--small) );
}

/* Three column submenu wrapper */
#top .avia-menu,
#top .av-main-nav,
#top .menu-item-top-level {
	position: static; /* make main submenu container as wide as content */
}
#top #avia-menu ul,
#top #avia-menu ul li,
#top #avia-menu ul a { /* make all submenus/submenu items full-width */
	width: 100%;
}
#top #avia-menu li.menu-item-top-level > ul {
	--header__bottom-opacity: 0.95;
	background: linear-gradient( to bottom, var(--navy), rgb( from var(--header__bottom-color) r g b / var(--header__bottom-opacity) ) ); /* same as header */
	column-gap: var(--padding--normal);
	grid-template-columns: 1fr 1fr 1fr;
	grid-template-rows: repeat( 999,  minmax( 0, min-content ) );
	left: 50%;
	margin-top: 0;
	max-height: calc( 100vh - var(--admin-bar-height) - var(--header--secondary__height) - var(--header__height) );
	overflow-x: hidden;
	overflow-y: auto;
	padding-block: var(--padding--normal);
	padding-inline: var(--calculated-gutter-width);
	position: absolute;
	transform: translateX( -50% );
	width: 100vw;
}
#top #avia-menu li > ul {
	display: none !important; /* overwrite inline style */
	opacity: 0 !important;
	transition:
		opacity 0.2s linear,
		display 0.2s allow-discrete;
}
#top #avia-menu:not(.est-menu--js) li.menu-item-top-level:hover > ul,
#top #avia-menu li.menu-item-top-level:where(:focus-visible,:focus-within) > ul,
#top#top .est-menu--open > ul {
	display: grid !important;
	opacity: 1 !important;
	visibility: visible !important;
}
#top #avia-menu li.menu-item-top-level > ul > li {  /* all items within large submenu share the same grid */
	display: grid;
	grid-column: 1 / -1;
	grid-row: 1 / -1;
	grid-template-columns: subgrid;
	grid-template-rows: subgrid;
	pointer-events: none;
	width: 100%;
}
/* #top .hello a {
	background: rgba(255,255,255,0.1) !important;
} */
#top #avia-menu li.menu-item-top-level > ul > li * {
	pointer-events: initial;
}
/* All links within any submenu */
#top #avia-menu ul {
	--arrow__direction: 0deg;
	--header-link__padding--top: var(--padding--small);
	--header-link__padding--bottom: var(--padding--small);
}
#top #avia-menu ul a {
	font-size: var(--size--h5);
	grid-column: 2;
	min-height: calc( var(--header-link__padding--top) + var(--header-link__size) + var(--header-link__padding--bottom) );
	padding-block: 0; /* simulate padding with height so that text can wrap within link */
	width: 100%;
}
#top #avia-menu ul a span {
	/*flex: 1;*/
	max-width: 100%;
}
#top #avia-menu ul a:hover,
#top #avia-menu ul a:focus-visible,
#top #avia-menu ul a[data-clicks="1"] {
	background: var(--blue--dark);
}
#top #avia-menu ul a::before {
	display: none;
}
/* Give underline to submenu items on hover */
#top #avia-menu ul .avia-menu-text {
	position: relative;
}
#top #avia-menu ul .avia-menu-text::after {
	background: var(--green--bright);
	content: "";
	height: 2px;
	left: 0;
	opacity: 0;
	position: absolute;
	right: 0;
	top: calc( 100% + 2px );
	transition: opacity 0.2s ease-in-out;
}
#top #avia-menu ul ul ul a .avia-menu-text::after {
	left: calc( 1.5 * var(--padding--small) );
}
#top #avia-menu ul a:where(:hover,:focus-visible) > .avia-menu-text::after {
	opacity: 1;
}
/* Left column of submenu wrapper (Description Of Commercial Services) */
#top #header .avia-builder-widget-area {
	background: var(--white);
	border-radius: var(--radius--small);
	display: block !important; /* overcome inline style */
	grid-column: 1;
	grid-row: 1 / -1;
	height: 100%;
	opacity: 1 !important; /* overcome inline style */
	padding: var(--padding--normal);
	position: static;
	visibility: visible !important; /* overcome inline style */
}
#top #header .avia-builder-widget-area h3 {
	font-size: var(--size--h3);
	font-weight: var(--weight--bold);
	line-height: 1.1em;
}
#top #header .avia-builder-widget-area p {
	font-size: var(--size--p);
	line-height: var(--line-height);
}
/* Middle column of submenu wrapper (Commercial > Commercial Heating & Cooling) */
#top li.menu-item-top-level > ul > li > a {
	grid-column: 2;
	grid-row: auto;
}
#top li.menu-item-top-level > ul > li > a::after {
	transform: rotate( -90deg );
}
#top li.menu-item-top-level > ul > li:nth-child(2) > a { /* for now, manually set the row of each middle column link within parent grid */
	grid-row: 1;
}
#top li.menu-item-top-level > ul > li:nth-child(3) > a {
	grid-row: 2;
}
#top li.menu-item-top-level > ul > li:nth-child(4) > a {
	grid-row: 3;
}
#top li.menu-item-top-level > ul > li:nth-child(5) > a {
	grid-row: 4;
}
#top li.menu-item-top-level > ul > li:nth-child(6) > a {
	grid-row: 5;
}
#top li.menu-item-top-level > ul > li:nth-child(7) > a {
	grid-row: 6;
}
#top li.menu-item-top-level > ul > li:nth-child(8) > a {
	grid-row: 7;
}
#top li.menu-item-top-level > ul > li:nth-child(9) > a {
	grid-row: 8;
}
#top li.menu-item-top-level > ul > li:nth-child(10) > a {
	grid-row: 9;
}
/* Right column of submenu wrapper (Commercial > Commercial Heating & Cooling > Commercial Heating) */
#top #avia-menu > li > ul > li > ul {
	align-self: start;
	bottom: auto;
	display: none !important; /* overwrite inline style */
	flex-direction: column;
	grid-column: 3;
	grid-row: 1 / -1;
	height: 100%;
	left: auto;
	opacity: 0 !important; /* overwrite inline style */
	position: relative;
	right: auto;
	top: auto;
	transition: opacity 0.2s ease-in-out;
}
#top #avia-menu > li > ul > li > ul::before {
	background-image: linear-gradient( var(--navy--light), var(--navy--light) );
	background-position: center;
	background-repeat: no-repeat;
	background-size: 2px 100%;
	content: "";
	height: 100%;
	position: absolute;
	right: 100%;
	top: 0;
	width: var(--padding--normal);
}
#top #avia-menu:not(.est-menu--js) li.menu-item-top-level > ul > li:hover > ul,
#top #avia-menu li.menu-item-top-level > ul > li:where(:focus-visible,:focus-within) > ul,
#top #avia-menu li.menu-item-top-level > ul > li.est-menu--open > ul { /* sub-submenu on right, when visible */
	display: flex !important; /* overwrite inline style */
	opacity: 1 !important;
	visibility: visible !important;
}
#top#top #avia-menu ul ul a::after {
	display: none;
}
/* Right column, sub-sub-submenus (Commercial > Commercial Heating & Cooling > Commercial Heating > Commercial Heating Repair) */
#top #avia-menu ul ul > li {
	display: flex;
	flex-direction: column;
}
#top #avia-menu ul ul ul {
	align-items: flex-start;
	display: block !important; /* always have sub-sub-submenus visible; overcome inline style */
	opacity: 1 !important; /* overcome inline style */
	position: static;
	visibility: visible !important; /* overcome inline style */
}
#top #avia-menu ul ul ul a {
	font-size: var(--size--s);
}
#top #avia-menu ul ul ul a span {
	background-image: linear-gradient( var(--blue), var(--blue) );
	background-position: left center;
	background-repeat: no-repeat;
	background-size: var(--padding--small) 2px;
	padding-left: calc( 1.5 * var(--padding--small) );
}

/* Debug */
/* #top #avia-menu li.menu-item-top-level > ul > li:where(:hover,:focus-visible,:focus-within) > ul {
	transition: opacity 0.2s ease-in-out;
}
#avia-menu * {
	transition-delay: 0.5s !important;
} */

/**********************************************************
=Menu (Mobile)
/*********************************************************/

/* Fixes to make hamburger menu scroll on mobile */
@media( max-width:767px ) {
	/* Make admin bar fixed on mobile b/c hamburger button is fixed */
	#top#top#top #wpadminbar { /* overcome layout.css */
		position: fixed;
	}
	/* Specify header wrapper height on mobile so we can make logo fixed */
	#top#top#top #header { /* override layout.css */
		height: var(--header__height);
	}
	/* Animation to give logo time to fade in */
	@keyframes fadeIn {
		from { opacity: 0; }
		to { opacity: 1; }
	}
	/* Make logo fixed only when menu is open */
	.av-burger-overlay-active-delayed .av-logo-container {
		position: fixed;
	}
	.av-burger-overlay-active-delayed .logo {
		/*animation: fadeIn;
		animation-delay: 0.3s;
		animation-duration: 0.2s;
		animation-fill-mode: forwards;
		animation-timing-function: ease-in-out;
		opacity: 0;*/
	}
}

/* Hamburger button wrapper */
#top#top .av-burger-menu-main {
	--hamburger__padding: var(--padding--small);
	background: transparent;
	height: var(--header__height);
	margin: calc( -1 * var(--calculated-gutter-width) );
	transition: background 0.2s ease-in-out;
	width: calc( var(--hamburger__padding) + var(--padding--normal) + var(--hamburger__padding) );
}
#top#top .av-burger-menu-main > a::before {
	display: none;
}
/* Hamburger button inner container */
#top#top#top#top .av-hamburger-box {
	padding: var(--hamburger__padding);
}
@media( max-width:767px ) {
	#top .av-hamburger-box {
		background: linear-gradient( to bottom, var(--navy--dark), rgb( from var(--header__bottom-color) r g b / var(--header__bottom-opacity) ) );
		border-bottom-left-radius: var(--radius--small);
	}
}
#top#top .av-hamburger-box:where(:hover,:focus-visible) {
	background: var(--blue);
}
/* Hamburger lines */
#top#top#top#top .burger-menu-open .av-burger-menu-main:not(:hover,:focus-visible) .av-hamburger-inner {
	background: var(--navy);
}

/* Hamburger menu structure */
#top#top .av-burger-overlay,
#top#top .av-burger-overlay-scroll,
#top#top .av-burger-overlay-inner,
#top#top #av-burger-menu-ul {
/* 	height: 100%; */
	margin: 0 !important; /* override Enfold */
	padding: 0 !important;
	/*max-height: 100%;
	overflow-x: visible;
	overflow-y: visible;*/
	width: 100%;
}
#top#top .av-burger-overlay {
	/*height: -webkit-fill-available;*/ /* account for shifting URL bar, etc on iOS */
	/*height: 50%;
	overflow: scroll;
	pointer-events: none;
	top: 0;*/
	overflow: visible;
}
#top .av-burger-overlay::before { /* cover the transparent section at top when hamburger menu is open */
	/*content: "";
	background: var(--navy--dark);
	height: var(--header__height);
	top: var(--admin-bar-height);
	left: 0;
	width: 100%;
	position: absolute;
	z-index: 1;*/
}
#top#top .av-burger-overlay-scroll {
	/*border: 30px solid blue;*/
	background: rgb( 255,255,255, 0 ); /* mobile bug where transparent border isn't rendered so had to use transparent background to force it */
	background: linear-gradient( to bottom, var(--navy--dark), rgb( from var(--header__bottom-color) r g b / var(--header__bottom-opacity) ) ); /* match header */
	border-top: calc( var(--admin-bar-height) + var(--header--secondary__height) + var(--header__height) ) solid var(--navy--dark); /* set below header w/out affecting height */
	/*overflow-y: scroll;
	overflow: scroll;
	pointer-events: none;*/
	overflow-x: hidden;
	overflow-y: auto;
	height: 200px;
	height: 100vh;
	max-height: -webkit-fill-available;
	max-height: 100vh;
}
#top .av-burger-overlay-scroll * {
	/*pointer-events: initial;*/
}
#top#top .av-burger-overlay-inner {
	/*--header__bottom-color: var(--navy--light);
	overflow: scroll;*/
	height: 100%;
}
#top #av-burger-menu-ul {
	align-items: stretch;
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Hamburger menu links */
#top .av-burger-overlay a {
	--mobile__background: transparent;
	--mobile__color: var(--white);
	--mobile__padding: var(--padding--small);
	--mobile__size: var(--size--h3);
}
#top#top#top .av-burger-overlay a { /* override Enfold layout.css */
	display: flex;
	font-family: var(--family--attention);
	font-weight: var(--weight--medium);
	font-size: var(--mobile__size);
	line-height: var(--mobile__size);
	padding: var(--mobile__padding) var(--page-gutter);
	transition: color 0.2s ease-in-out;
}
#top#top#top#top .av-burger-overlay a { /* override Enfold */
	background: var(--mobile__background);
	color: var(--mobile__color);
}
#top .av-burger-overlay a:where(:hover,:focus-visible) {
	--mobile__background: var(--navy);
}
#top#top#top .av-burger-overlay a * {
	color: inherit;
	display: inline-block;
	font: inherit;
	line-height: inherit;
	vertical-align: middle;
}
#top#top .av-burger-overlay .avia-menu-text {
	flex: 1;
	margin-right: auto;
	white-space: normal;
}
/* Hamburger menu dropdown arrow */
#top#top#top .av-burger-overlay .av-submenu-indicator {
	--mobile__rotate: 0deg;
	align-self: stretch;
	bottom: auto;
	flex: none;
	left: auto;
	margin: 0;
	margin-left: 1ch;
	opacity: 1;
	position: relative;
	right: auto;
	top: auto;
	transform: none;
	width: 1em;
}
#top#top#top .av-burger-overlay .av-submenu-indicator::before,
#top#top#top .av-burger-overlay .av-submenu-indicator::after {
	background: currentcolor;
	border-radius: 2px;
	content: "";
	height: 2px;
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate( -50%, -50% ) rotate( var(--mobile__rotate) );
	transition: transform 0.2s ease-in-out;
	width: 100%;
}
#top#top#top .av-burger-overlay .av-submenu-indicator::after {
	--mobile__rotate: 90deg;
}
#top#top#top .av-burger-overlay .av-show-submenu > a > .av-submenu-indicator::after {
	--mobile__rotate: 0deg;
}
/* Border between hamburger links */
#top .av-burger-overlay-inner > ul > li + li:not(.est-menu__meta) > a::before {
	background: var(--navy--light);
	background-clip: content-box;
	bottom: 100%;
	content: "";
	height: 2px;
	left: 0;
	padding-inline: inherit;
	position: absolute;
	right: 0;
	transform: translateY( 50% );
}

/* Hamburger submenus */
#top#top .av-burger-overlay .av-show-submenu > ul {
	align-items: stretch;
	display: flex !important; /* override inline style */
	flex-direction: column;
	margin-top: 0;
}
/* Hamburger menu submenu links */
#top .av-burger-overlay .sub-menu a {
	--mobile__size: var(--size--p);
}
/* Hamburger menu submenu submenu links */
#top .av-burger-overlay .sub-menu .sub-menu {
	background: var(--navy--darker);
}
#top .av-burger-overlay .sub-menu .sub-menu .sub-menu a::before {
	background: var(--blue);
	border-radius: var(--padding--small);
	content: "";
	flex: none;
	height: 2px;
	margin-right: 0.5ch;
	width: var(--padding--small);
}

/* Descriptions copied from desktop menu to mobile */
#top#top .av-burger-overlay .est-menu__description {
	margin-block: var(--padding--smaller);
	order: -1;
	padding-inline: var(--calculated-gutter-width);
	text-align: left;
}

/* Mobile menu links copied from top bar menu */
#top#top [role="menuitem"]:not(.est-menu__meta) + .est-menu__meta + .est-menu__meta { /* although copied as 2nd item, it's moved to front */
	border-top: var(--padding--small) solid var(--white);
	margin-top: auto;
}
#top#top [role="menuitem"]:not(.est-menu__meta) + .est-menu__meta { /* although it's copied as 1st item, we move it to end */
	border-bottom: var(--padding--small) solid var(--white);
	order: 1;
}
#top .est-menu__meta a {
	--mobile__background: var(--white);
	--mobile__color: var(--navy);
	--mobile__padding: var(--padding--small);
	--mobile__size: var(--size--p);
	margin-top: -0.5px;
	text-transform: uppercase;
}
#top .est-menu__meta a:where(:hover,:focus-visible) {
	--mobile__background: var(--grey);
}

/**********************************************************
=Text on dark backgrounds
/*********************************************************/

/* Normal text */
#top .est-text--on-dark h1,
#top .est-text--on-dark h2,
#top .est-text--on-dark h3,
#top .est-text--on-dark h4,
#top .est-text--on-dark h5,
#top .est-text--on-dark h6,
.est-text--on-dark p,
.est-text--on-dark li {
	color: var(--white);
}
/* Links */
.est-text--on-dark a {
	color: var(--white);
}
#top .est-text--on-dark a:where(:hover,:focus-visible) {
	color: var(--white);
}
/* Buttons */
.est-text--on-dark {
	--button__color: var(--white);
	--button__background--hover: var(--green--bright);
}

/**********************************************************
=Global
/*********************************************************/

/* LiveChat */
#chat-widget-container {
}

/* Scroll to top */
#top #scroll-top-link {
	--button__background--hover: var(--navy--dark);
	border-radius: 50%;
	bottom: 90px; /* have to use px b/c can't control LiveChat spacing which appears underneath */
	height: 60px;
	right: var(--desired-content-gutter);
	width: 60px;
}
#top #scroll-top-link::before {
	inset: 12px;
}

/* Tables */
#top table,
#top table * {
	background: transparent;
	border: none;
	font-family: var(--family--normal);
	font-size: var(--size--s);
	font-weight: var(--weight--normal);
	letter-spacing: 0;
	line-height: 1;
	margin: 0;
	padding: 0;
	text-transform: none;
}
#top#top th {
	font-weight: var(--weight--bold);
	text-transform: uppercase;
}
#top th,
#top td {
	border: 1px solid var(--grey);
	padding: calc( var(--padding--small) * 0.6 );
	text-align: center;
}
#top tr:nth-child(even) {
	background: var(--white);
}
#top tr:where(:hover,:focus-visible) {
	box-shadow: inset 0 0 0 2px var(--blue);
}
#top th:where(:hover,:focus-visible),
#top td:where(:hover,:focus-visible) {
	background: var(--navy);
	color: var(--white);
}
#top tr:not(.avia-heading-row) th:first-child {
	text-align: right;
}

/* NYMEX table */
#top#top#top .est-nymex .container { /* redo structure so table can extend beyond borders of content area */
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	padding-inline: 0;
	width: auto;
}
#top#top#top .est-nymex .content {
	margin: 0;
	max-width: none;
	padding-left: calc( var(--calculated-gutter-width) - var(--desired-content-gutter) );
	width: auto;
}
#top .est-nymex .container::before,
#top .est-nymex .container::after { /* fade effect on table when expanding past content area */
	align-self: stretch;
	background: linear-gradient( to right, var(--blue--light), transparent );
	display: block;
	content: "";
	flex: none;
	height: auto;
	opacity: 1;
	position: sticky;
	left: 0;
	top: 0;
	width: var(--desired-content-gutter);
	visibility: visible;
	z-index: 10;
}
#top .est-nymex .container::after {
	left: auto;
	right: 0;
	transform: rotate(180deg);
}
#top .est-nymex table,
#top .est-nymex table * {
	position: static;
}
#top .est-nymex table {
	flex: none;
	max-width: none;
	width: auto;
}
#top .est-nymex td { /* make numbers easier to read */
	font-family: monospace;
}
#top .est-nymex tr:last-child th + td { /* make average bold */
	font-weight: var(--weight--bold);
}

/* Breadcrumbs in secondary */
#top .est-hero--secondary .breadcrumb {
	margin-top: var(--padding--small);
}
/* Remove unused category links */
#top .breadcrumb [itemtype="https://schema.org/BreadcrumbList"]:has(a[href*="/category/"]),
#top .breadcrumb [itemtype="https://schema.org/BreadcrumbList"]:has(a[href*="/category/"]) + .sep {
	display: none;
}

/* Rows with navy background */
.est-bg--navy {
	--color-section__background: var(--navy);
}
#top .est-bg--navy::before {
	background-image: linear-gradient( to bottom, var(--navy--light), var(--navy--dark) );
}

/**********************************************************
=Videos
/*********************************************************/

#top .mejs-mediaelement,
#top .mejs-mediaelement * {
	height: calc( 100% + 2px ) !important; /* fix issue where small black border is visible */
	width: calc( 100% + 2px ) !important; /* override inline styles/video stylesheets */
	object-fit: cover !important;
}
#top .mejs-controls {
	background: linear-gradient( to top, rgba(0,0,0, 0.3), transparent );
}
#top .mejs-time-float-current {
	font-size: var(--size--xs);
	line-height: 1;
}
#top .mejs-overlay-button {
	filter: drop-shadow( 0 0 0.5rem rgba(0,0,0,0.5) );
}

/**********************************************************
=Maps
/*********************************************************/

/* Filtered map */
#top .mapsvg-disabled {
	opacity: 0.1 !important;
}
/* Map filters (just used in JS, not shown) */
#top .est-map__filters {
	display: none;
}
/* Force header hidden even on mobile */
#top .mapsvg-header {
	display: none !important; /* override mapsvg inline */
}
/* Filtered map buttons */
#top .est-map__buttons {
	--button__background--hover: var(--blue);
	--button__radius: var(--padding--small);
}
#top .est-map__buttons a {
	--button__background--hover: var(--blue);
	cursor: pointer;
}
#top .est-map__button--active {
	--button__background: var(--navy);
	--button__border: var(--navy);
	--button__color: var(--white);
}
/* Map styling */
#top .mapsvg-region {
	cursor: pointer;
	fill: rgb( from var(--blue) r g b / 0.3 ) !important; /* all importants required to get around inline styling from mapsvg */
	opacity: 1 !important;
	stroke: var(--navy) !important;
	stroke-miterlimit: 1 !important;
	/*stroke-width: 0.00005% !important;*/
	stroke-width: 1px !important;
	vector-effect: non-scaling-stroke !important;
}
#top .mapsvg-region[id^="extended"] {
	stroke-width: 0.5 !important;
}
#top .mapsvg-region[id^="primary"],
#top .mapsvg-region[id^="service"] {
	stroke-width: 0.25 !important;
}
#top .mapsvg-region:hover {
	fill: rgb( from var(--blue) r g b / 0.6 ) !important;
	/*stroke-width: 0.002% !important;*/
}
#top .mapsvg-region[id*="bounding"] {
	fill: transparent !important;
	opacity: 0 !important;
}
#top .mapsvg-region-active,
#top .mapsvg-region-active:hover {
	fill: rgb( from var(--green--bright) r g b / 0.6 ) !important;
}
#top .mapsvg-disabled {
	opacity: 0 !important;
	pointer-events: none;
}
/* Fix Google info in map */
#top :is(.gmnoprint,.gm-style-cc) :is(span,a) {
	color: black !important; /* override inline styles */
	font-family: var(--family--normal) !important;
	font-size: var(--size--xxs) !important;
	font-weight: var(--weight--normal) !important;
}
/* Info accordion w/ map */
#top .est-map__accordion {
	--toggler-padding: 0.5rem;
}
/* Accordion container */
#top#top#top .est-map__accordion .av_toggle_section {
	background: transparent;
	border-radius: 0;
	border-top: 2px solid var(--grey);
	box-shadow: none;
	margin-top: 0;
}
#top#top#top .est-map__accordion .av_toggle_section:first-child {
	border-top: none;
}
#top#top#top .est-map__accordion .av_toggle_section::before {
	display: none;
}
#top#top .est-map__accordion .av_textblock_section + .togglecontainer {
	margin-top: var(--padding--smaller);
}
#top#top .est-map__accordion .av_textblock_section + .togglecontainer + .av_textblock_section {
	margin-top: var(--padding--normal);
}
/* Accordion title */
#top#top#top .est-map__accordion .toggler {
	background: transparent;
	border-radius: 0;
	color: var(--navy);
	font-size: var(--size--h3);
	padding-inline: 0;
}
#top#top#top .est-map__accordion .activeTitle {
}
/* Accordion content */
#top#top#top .est-map__accordion .toggle_wrap {
	background: transparent;
	border: none;
	box-shadow: none;
}
#top#top#top .est-map__accordion .toggle_content {
	padding-inline: 0;
	padding-top: 0;
}
/* Accordion inner content */
#top#top .est-map__accordion h4 {
	font-size: var(--size--h5);
	margin-top: var(--padding--smaller);
}
#top#top#top .est-map__accordion li {
	padding-left: 0;
}
#top#top#top .est-map__accordion .toggle_content {
	padding-bottom: 0.5rem;
}
@media( min-width:768px ) {
	#top#top#top .est-map__accordion .toggle_content {
		display: grid;
		gap: var(--padding--smaller);
		grid-template-columns: 1fr 1fr;
	}
	#top#top#top .est-map__accordion .toggle_content :nth-child(1) {
		grid-column: 1;
		grid-row: 1;
	}
	#top#top#top .est-map__accordion .toggle_content :nth-child(2) {
		grid-column: 1;
		grid-row: 2;
	}
	#top#top#top .est-map__accordion .toggle_content :nth-child(3) {
		grid-column: 2;
		grid-row: 1;
	}
	#top#top#top .est-map__accordion .toggle_content :nth-child(4) {
		grid-column: 2;
		grid-row: 2;
	}
	#top#top#top .est-map__accordion .toggle_content h4,
	#top#top#top .est-map__accordion .toggle_content ul {
		margin: 0;
	}
}

/* Entire map */
#top .mapsvg {
	background: var(--navy--dark);
}
#top .est-map--services .mapsvg {
	padding-bottom: max( 400px, min( 80vh, 500px ) ) !important; /* override inline style */
}
/* Map buttons container */
#top#top#top#top .mapsvg-buttons {
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
	margin-right: var(--padding--small);
	margin-top: var(--padding--small);
	padding: 0;
}
#top .mapsvg-btn-group {
	box-shadow: none;
	display: flex;
	flex-direction: column;
	gap: var(--padding--smaller);
}
/* Map buttons */
#top .mapsvg-btn-map {
	background: var(--navy);
	border: none;
	border-radius: var(--radius--small);
	box-shadow: none;
	height: var(--padding--normal);
	margin: 0;
	opacity: 0.7;
	position: relative;
	transition: background 0.2s ease-in-out, opacity 0.2s ease-in-out;
	width: var(--padding--normal);
}
#top .mapsvg-btn-map:where(:hover,:focus-visible) {
	background: var(--navy--light);
	opacity: 1;
}
#top .mapsvg-btn-map::before,
#top .mapsvg-btn-map::after {
	background: var(--white);
	height: 2px;
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate( -50%, -50% );
	width: 50%;
}
#top .mapsvg-btn-map::after {
	height: 50%;
	width: 2px;
}
/* Hide advanced controls */
#top .mapsvg .gm-bundled-control {
	display: none;
}
/* Loading */
#top .mapsvg .mapsvg-loading {
	background: var(--white);
	border: none;
	border-radius: var(--radius--small);
	box-shadow: none;
}
#top .mapsvg .spinner-border {
	border-color: var(--navy);
	border-top-color: transparent;
}
#top .mapsvg .mapsvg-loading-text {
	color: var(--navy);
	font-weight: var(--weight--bold);
}

/* Map within split row */
:root {
	--map__height: 500px;
}
#top .est-split__media:has(.mapsvg),
#top .est-split__media .av_textblock_section,
#top .est-split__media .avia_textblock,
#top .est-split__media .mapsvg,
#top .est-split__media .mapsvg-wrap-all,
#top .est-split__media .mapsvg-wrap,
#top .est-split__media .mapsvg-with-google-map {
	height: var(--map__height) !important; /* overcome MapSVG styles */
	padding-bottom: 0 !important; /* overcome MapSVG styles */
}
@media( min-width:768px ) {
	:root {
		--map__height: 100%;
	}
}
#top .est-split__media .mapsvg,
#top .est-split__media .mapsvg-wrap-all {
	cursor: pointer;
}
#top .est-split__media .mapsvg *,
#top .est-split__media .mapsvg-wrap-all * {
	pointer-events: none;
}

/**********************************************************
=HR
/*********************************************************/

#top .hr-inner {
	background: var(--grey);
	height: 1px;
	margin: 0;
}

/**********************************************************
=Videos
/*********************************************************/

/* Video player controls */
#top .mejs-button,
#top .mejs-time {
	align-items: center;
	display: flex;
	gap: var(--padding--smaller);
	height: 30px; /* dupliate behavior of default mejs */
	justify-content: center;
	padding: 0;
}

/**********************************************************
=Blogs
/*********************************************************/

/* Blogs structure */
:root {
	--blog__num: 1;
}
#top .est-blog__page .av-alb-blogposts {
	display: grid;
	grid-template-columns: repeat( var(--blog__num), minmax( 0, 1fr ) );
}
@media( min-width:600px ) {
	:root {
		--blog__num: 2;
	}
}
@media( min-width:990px ) {
	:root {
		--blog__num: 3;
	}
}
@media( min-width:1200px ) {
	:root {
		--blog__num: 3;
	}
}
/* Blogs pagination */
#top .est-blog__page div.single-big:last-child { /* all blog cards also have .single-big */
	grid-column: 1 / -1;
}
#top#top#top#top .pagination .current {
	font-size: var(--size--s);
}

/**********************************************************
=Hero (Homepage)
/*********************************************************/

/* Hero on homepage w/ video */
#top#top #main:has(.est-hero--home) {
	/*padding-top: 0;*/
}
#top#top#top .est-hero--home {
	--hero__padding: var(--padding--large);
}
#top#top .est-hero--home .container {
	margin-top: max( 400px, 40vh );
	padding-block: var(--hero__padding);
	position: relative;
	z-index: 1;
}
@media( min-width:768px ) {
	#top#top#top .est-hero--home {
		border-bottom: var(--input-height) solid transparent;
	}
	#top#top .est-hero--home .container {
		margin-bottom: calc( -1 * var(--input-height) );
	}
}
/* Homepage hero video */
#top#top#top .est-hero--home video { /* override video stylesheet */
	height: 100%;
	left: auto;
	object-fit: cover;
	object-position: center top;
	top: auto;
	width: 100%;
}
#top .est-hero--home .content::before {
	background: linear-gradient( to top, var(--navy--dark) 30px, rgb( from var(--navy--light) r g b / 0.9 ) );
	border-radius: var(--radius--small);
	box-shadow: var(--box-shadow);
	content: "";
	inset: calc( -1 * max( var(--hero__padding), var(--input-height) ) );
	position: absolute;
}
#top#top .est-hero--home .content {
	padding: 0;
}
#top .est-hero--home .mejs-layers {
	display: none;
}
/* Make homepage content flex so buttons will wrap to bottom */
#top .est-hero--home .flex_column {
	display: flex;
	flex-wrap: wrap;
}
#top .est-hero--home .flex_column .av_textblock_section {
	width: 100%;
}
/* Homepage hero buttons */
#top .est-hero--home,
#top .est-hero--home .avia-button:first-child {
	--button__border: var(--white);
	--button__background: var(--white);
	--button__background--hover: var(--white);
	--button__color: var(--navy);
	--button__radius: var(--radius--small) 0 0 0;
}
#top .est-hero--home .av_textblock_section + .avia-button-wrap {
	margin-left: auto;
}
@media( max-width:767px ) {
	#top .est-hero--home .av_textblock_section + .avia-button-wrap {
		margin-left: calc( -1 * var(--page-gutter) );
	}
	#top#top#top .est-hero--home .av_textblock_section + .avia-button-wrap a {
		border-radius: 0;
		padding-left: var(--page-gutter);
	}
}
#top .est-hero--home .avia-button-wrap {
	margin-bottom: calc( -1 * max( var(--hero__padding), var(--input-height) ) );
}
#top .est-hero--home .avia-button-wrap:last-child {
	border-radius: 0 var(--radius--small) 0 0;
	overflow: hidden;
	position: relative;
}
@media( min-width:768px ) {
	#top .est-hero--home .avia-button-wrap:last-child {
		border-radius: 0 0 var(--radius--small) 0;
		margin-right: calc( -1 * var(--hero__padding) );
	}
}
#top .est-hero--home .avia-button-wrap:last-child::before {
	background: var(--grey);
	background-clip: content-box;
	bottom: 0;
	content: "";
	left: 0;
	padding-block: var(--padding--smaller);
	position: absolute;
	top: 0;
	transform: translateX( -50% );
	width: 2px;
	z-index: 1;
}
#top#top#top .est-hero--home .avia-button-wrap:last-child a {
	border-radius: 0;
}
/* Pause button */
:root {
	--pause__height: calc( var(--size--input) * 2 );
	--pause__margin: calc( -1 * ( ( var(--pause__height) - var(--size--input) ) / 2 ) );
}
#top .est-video__pause .avia_iconbox_title,
#top .avia-buttonrow-wrap [aria-label="Pause/Play"] .avia_iconbox_title {
	border-radius: 50%;
	display: inline-flex;
	font-size: 0;
	height: var(--pause__height);
	overflow: hidden;
	white-space: nowrap;
	width: var(--pause__height);
}
#top#top#top#top .est-video__pause .avia_iconbox_title,
#top .avia-buttonrow-wrap [aria-label="Pause/Play"] .avia_iconbox_title { /* override rest */
	box-shadow: inset 0 0 0 2px currentcolor;
	margin-block: var(--pause__margin);
	padding: var(--padding--smaller);
}
#top .est-video__pause .avia_iconbox_title::before,
#top .avia-buttonrow-wrap [aria-label="Pause/Play"] .avia_iconbox_title::before {
	align-self: stretch;
	background: currentcolor;
	color: currentcolor;
	content: "";
	flex: none;
	margin-right: 1rem; /* just push text out of container */
	mask-image: url("images/est-icon--pause.svg");
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	width: 100%;
}
#top .est-video__pause [data-state="paused"] .avia_iconbox_title::before,
#top .avia-buttonrow-wrap [data-state="paused"] .avia_iconbox_title::before {
	mask-image: url("images/est-icon--play.svg");
	transform: translateX( 1px );
}

/**********************************************************
=Split Row
/*********************************************************/

/* Split row container */
#top .est-split {
	--split__gradient-direction: to bottom;
	--split__gap-width: var(--page-gutter);
}
@media( min-width:768px ) {
	#top .est-split {
		--split__gradient-direction: to left;
		--split__gap-width: ( 0.03 * var(--calculated-content-width) );
	}
}
#top .est-split::before {
	background: transparent;
}
#top .est-split .content {
	padding-block: 0;
}
/* Split row text column */
#top#top .est-split__content {
	padding-bottom: var(--row-bottom-padding);
	padding-top: var(--row-top-padding);
}
#top#top#top#top .est-split__content {
	margin-top: 0; /* need specificity to overcome reset */
}
#top .est-split__content::before {
	background-image: linear-gradient( var(--split__gradient-direction), var(--navy--light), var(--navy--dark) );
	background-position: left center;
	background-repeat: no-repeat;
	height: 100%;
	left: calc( -1 * var(--split__gap-width) );
	position: absolute;
	right: auto;
	top: 0;
	visibility: visible;
	width: 100vw;
	z-index: -1;
}
#top .est-split__content.first::before {
	left: auto;
	right: calc( -1 * var(--split__gap-width) );
}
@media( min-width:768px ) {
	#top .est-split__content::before {
		width: calc( 100% + var(--calculated-gutter-width) + var(--split__gap-width) ); /* columns have 6% gap so add 3% */
	}
}
/* Split row image/map/video column */
#top .est-split__media {
	height: var(--mobile-image-height);
}
#top#top#top#top .est-split__media {
	margin-bottom: 0 !important; /* overcome resets.css */
}
/* All elements within media column */
#top .est-split__media:not(:has(.av_textblock_section)) *:not(.mejs-inner *) {
	border-radius: 0;
	bottom: 0;
	height: 100%;
	left: 0;
	object-fit: cover;
	object-position: center;
	position: absolute;
	right: 0;
	top: 0;
	width: 100%;
}
/* Container directly inside the media column */
#top .est-split__media > * {
	height: 100%;
	left: calc( -1 * var(--page-gutter) );
	max-width: none;
	position: absolute;
	right: calc( -1 * var(--page-gutter) );
	width: 100vw;
}
@media( min-width:768px ) {
	#top .est-split__media > * {
		left: calc( -1 * var(--split__gap-width) );
		right: auto;
		width: calc( 100% + var(--calculated-gutter-width) + var(--split__gap-width) );
	}
	#top .est-split__media.first > * {
		left: auto;
		right: calc( -1 * var(--split__gap-width) );
		width: calc( 100% + var(--calculated-gutter-width) + var(--split__gap-width) );
	}
}