/*
Theme Name: Hello ESI
Template: hello-elementor
Description: Hello Elementor child theme for Engineering Solutions, Inc. Header and footer are Elementor templates (Templates > Saved Templates: "ESI Header" / "ESI Footer").
Version: 1.0.1
Text Domain: hello-esi
*/

:root {
	--esi-green: #4f6b2c;
	--esi-green-dark: #22591b;
	--esi-gray: #5f5f5f;
	--esi-ink: #262b2e;
}

body {
	font-family: "EB Garamond", Georgia, serif;
	font-size: 19px;
	line-height: 1.5;
	color: #000;
}

h1, h2, h3, h4, h5, h6 { font-family: "Open Sans", Helvetica, Arial, sans-serif; color: var(--esi-ink); }
a { color: var(--esi-green); }

/* ---------- Main menu (rendered by [esi_menu]) ---------- */
.esi-nav { position: relative; font-family: Arial, Helvetica, sans-serif; }
.esi-nav ul { list-style: none; margin: 0; padding: 0; }
.esi-nav > ul { display: flex; flex-wrap: wrap; align-items: stretch; }
.esi-nav > ul > li { position: relative; }
.esi-nav > ul > li + li::before {
	content: ""; position: absolute; left: 0; top: 50%; height: 16px; margin-top: -8px;
	border-left: 1px solid rgba(255,255,255,.45);
}
.esi-nav a { display: block; color: #fff; text-decoration: none; font-size: 15px; }
.esi-nav > ul > li > a { padding: 20px 15px; line-height: 20px; position: relative; }
.esi-nav > ul > li > a::after {
	content: ""; position: absolute; left: 15px; right: 15px; bottom: 0; height: 3px;
	background: #7fae3c; transform: scaleX(0); transition: transform .25s;
}
.esi-nav > ul > li:hover > a::after,
.esi-nav > ul > li.current-menu-item > a::after,
.esi-nav > ul > li.current-menu-ancestor > a::after,
.esi-nav > ul > li.current-menu-parent > a::after { transform: scaleX(1); }
.esi-nav .menu-item-has-children > a::after { }
.esi-nav .menu-item-has-children > a .esi-caret { display: inline-block; margin-left: 4px; font-size: 10px; vertical-align: 1px; }
.esi-nav .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 230px; z-index: 999;
	background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.18); padding: 10px 0;
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s;
}
.esi-nav li:hover > .sub-menu, .esi-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.esi-nav .sub-menu a { color: #333; padding: 8px 20px; font-size: 14px; }
.esi-nav .sub-menu a:hover, .esi-nav .sub-menu .current-menu-item > a { color: var(--esi-green); background: #f4f4f4; }
.esi-nav-toggle { display: none; background: #4a4a4a; color: #fff; border: 0; padding: 10px 14px; font-size: 22px; line-height: 1; cursor: pointer; margin: 10px 0; }

@media (max-width: 1024px) {
	.esi-nav-toggle { display: inline-block; }
	.esi-nav > ul { display: none; flex-direction: column; background: #4f4f4f; }
	.esi-nav.is-open > ul { display: flex; }
	.esi-nav > ul > li + li::before { display: none; }
	.esi-nav > ul > li > a { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.12); }
	.esi-nav > ul > li > a::after { display: none; }
	.esi-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: #5c5c5c; padding: 0; }
	.esi-nav .sub-menu a { color: #fff; padding-left: 34px; }
	.esi-nav .sub-menu a:hover { background: #666; color: #fff; }
}

/* ---------- Header / footer templates ---------- */
.esi-site-header { position: relative; z-index: 50; }
.esi-topbar, .esi-topbar a { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #fff; }
.esi-topbar p { margin: 0; }
.esi-topbar span + span { margin-left: 22px; }
.esi-tagline .elementor-heading-title { font-weight: 300; }
.esi-site-header .esi-head-logo { width: auto !important; max-width: 60%; }
.esi-site-header .esi-head-right { width: auto !important; }
@media (max-width: 767px) { .esi-site-header .esi-head-logo { max-width: 100%; } }

/* ---------- Home hero carousel ---------- */
.esi-hero .swiper-slide, .esi-hero .swiper-slide-inner { position: relative; }
.esi-hero .swiper-slide-image { width: 100%; height: 600px; object-fit: cover; display: block; }
.esi-hero .elementor-image-carousel-caption {
	position: absolute; left: 3%; top: 38%; text-align: left;
	font-family: "Open Sans", Helvetica, Arial, sans-serif; font-style: normal;
}
.esi-hero .esi-cap-title { display: inline-block; background: rgba(255,255,255,.82); color: #4d4d4d; font-size: 26px; padding: 6px 12px; }
.esi-hero .esi-cap-loc { display: block; color: #fff; font-size: 22px; margin: 8px 0 0 12px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.esi-hero .esi-cap-tag { display: inline-block; margin: 8px 0 0 12px; background: rgba(40,40,40,.75); color: #fff; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; }
@media (max-width: 767px) {
	.esi-hero .swiper-slide-image { height: 300px; }
	.esi-hero .esi-cap-title { font-size: 18px; }
	.esi-hero .esi-cap-loc { font-size: 16px; }
}

/* Featured-project carousels on service pages */
.esi-feature-carousel .swiper-slide-image { width: 100%; height: 280px; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,.3); }

/* ---------- Recent projects ([esi_recent_projects]) ---------- */
.esi-recent { position: relative; }
.esi-recent-track { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 6px; }
.esi-recent-track::-webkit-scrollbar { display: none; }
.esi-card { flex: 0 0 calc((100% - 48px) / 3); scroll-snap-align: start; background: #e5e5e5; text-align: center; display: flex; flex-direction: column; }
.esi-card-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.esi-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.esi-card:hover .esi-card-img img { transform: scale(1.05); }
.esi-card-body { padding: 14px 18px 18px; }
.esi-card h3 { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.esi-card h3 a { color: var(--esi-ink); text-decoration: none; }
.esi-card time { display: block; color: #8a8a8a; font-size: 15px; margin-bottom: 8px; }
.esi-card p { font-size: 17px; margin: 0 0 8px; }
.esi-card .esi-more { font-weight: 600; color: var(--esi-ink); text-decoration: none; font-size: 16px; }
.esi-recent-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.esi-recent-dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #494949; background: transparent; padding: 0; cursor: pointer; }
.esi-recent-dots button.is-active { background: #494949; }
@media (max-width: 1024px) { .esi-card { flex-basis: calc((100% - 24px) / 2); } }
@media (max-width: 767px) { .esi-card { flex-basis: 100%; } }

/* ---------- Home service tiles ---------- */
.esi-tile .elementor-image-box-img { margin-bottom: 0 !important; }
.esi-tile .elementor-image-box-img img { transition: transform .3s; }
.esi-tile:hover .elementor-image-box-img img { transform: scale(1.06); }
.esi-tile .elementor-image-box-content { opacity: 0; transform: translateY(-6px); transition: all .3s; }
.esi-tile:hover .elementor-image-box-content { opacity: 1; transform: none; }
@media (hover: none) { .esi-tile .elementor-image-box-content { opacity: 1; transform: none; } }

/* Service picker (services + service pages) */
.esi-pick .elementor-image-box-img img { transition: transform .3s; }
.esi-pick:hover .elementor-image-box-img img { transform: translateY(-4px); }

/* Completed projects grid */
.esi-project .elementor-image-box-img { position: relative; overflow: hidden; }
.esi-project img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* Client logos */
.esi-logo img { box-shadow: 0 6px 12px -6px rgba(0,0,0,.45); }

/* Bordered map frames on the contact page */
.esi-map iframe { border: 5px solid var(--esi-green-dark) !important; background: #564c37; padding: 2px; }

/* Single news posts */
.single-post .site-main { max-width: 1140px; margin: 40px auto; padding: 0 20px; }
.esi-post-thumb img { width: 100%; height: auto; margin-bottom: 20px; }
