/* WordPress-specific additions (loaded after all ECS styles). */

/* Logged-in admin bar: keep the fixed homepage header below it. */
body.admin-bar.ecs-home-page header.header.main-header.active-sticky-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar.ecs-home-page header.header.main-header.active-sticky-header { top: 46px; }
}

/* Logo image on the right of the header (Site Settings → Header). */
/* The image uses the same "ecs-logo-header" class as the logo on the left: same white box,
   height and shrink-on-scroll. An image of the same size (679×209) gives an exact match. */
.ecs-header-badge { display: inline-flex; align-items: center; line-height: 0; }

/* Spam trap on the quote form: hidden from people, visible to bots. */
.ecs-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Text written in the WordPress editor (Privacy, Terms, product details). */
.ecs-content-narrow { max-width: 760px; }
.ecs-content > * + * { margin-top: 1em; }
.ecs-content h2, .ecs-content h3, .ecs-content h4 { margin-top: 1.6em; color: var(--primary-color); }
.ecs-content ul, .ecs-content ol { padding-left: 1.4em; }
.ecs-content li + li { margin-top: .35em; }
.ecs-content a:not(.btn-default) { color: var(--accent-color); text-decoration: underline; }
.ecs-content img { max-width: 100%; height: auto; border-radius: 8px; }
.ecs-content table { width: 100%; border-collapse: collapse; }
.ecs-content th, .ecs-content td { border: 1px solid #e4e9ef; padding: 10px 12px; text-align: left; vertical-align: top; }
.ecs-content thead th { background: var(--primary-color); color: #fff; font-weight: 600; }
.ecs-content tbody tr:nth-child(even) td { background: #f5f7fa; }
.ecs-content figure.wp-block-table { margin: 1em 0 0; overflow-x: auto; }
.ecs-content blockquote { border-left: 4px solid var(--accent-color); padding-left: 16px; color: var(--primary-color); }
.ecs-list-item + .ecs-list-item { margin-top: 32px; padding-top: 32px; border-top: 1px solid #e4e9ef; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, .wp-element-caption { font-size: 14px; color: var(--text-color); }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Drop-down sub-menus (e.g. About → Who We Are …), styled like the Products mega menu. */
.main-menu #menu > li.submenu { position: relative; }
/* Same chevron as the Products mega menu (12px SVG, stroke 3). */
.main-menu #menu li.submenu > a::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 6px;
  vertical-align: middle;
  opacity: .85;
  background-color: currentColor;
  -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='3'%3E%3Cpath d='M6 9l6 6 6-6'/%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='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s ease;
}
.main-menu #menu li.submenu:hover > a::after,
.main-menu #menu li.submenu:focus-within > a::after { transform: rotate(180deg); }
.main-menu #menu li.submenu > .sub-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: -12px;
  width: 280px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  text-align: left;
  background: #0f2240;
  border: 1px solid rgba(255, 255, 255, .1);
  border-top: 3px solid var(--accent-color);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 1200;
}
/* Invisible bridge so the menu doesn't close while moving the mouse down. */
.main-menu #menu li.submenu > .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -17px; height: 17px; }
.main-menu #menu li.submenu:hover > .sub-menu,
.main-menu #menu li.submenu:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-menu #menu .sub-menu li { margin: 0; display: block; }
.main-menu #menu .sub-menu li + li { border-top: 1px solid rgba(255, 255, 255, .08); }
.main-menu #menu .sub-menu a {
  display: block;
  padding: 13px 22px !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 500;
  white-space: normal;
  transition: background .2s ease, color .2s ease, padding .2s ease;
}
.main-menu #menu .sub-menu a:hover,
.main-menu #menu .sub-menu a:focus,
.main-menu #menu .sub-menu .current-menu-item > a {
  background: rgba(255, 106, 26, .12);
  color: var(--accent-color) !important;
  padding-left: 26px !important;
}

/* Text pages with photo (Mission, Safety, Competitive Price) and the About page story. */
.ecs-content h2:first-child, .ecs-content h3:first-child { margin-top: 0; }
.ecs-content ul li::marker { color: var(--accent-color); }
.ecs-content-wide { max-width: 900px; }
.ecs-content-photo { margin: 0; position: sticky; top: 120px; }
.ecs-content-photo img { width: 100%; height: auto; max-height: 460px; object-fit: cover; border-radius: 12px; box-shadow: 0 20px 40px rgba(11, 27, 51, .15); }

/* Product detail bullets. */
#solution-bullets { margin-top: 16px; }

/* Industry detail page. */
.ecs-industry-intro { font-size: 18px !important; line-height: 1.65; color: var(--primary-color); }
.ecs-industry-image { height: 440px; }
.ecs-checklist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.ecs-checklist li { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: #f5f7fa; border: 1px solid #e4e9ef; border-radius: 8px; color: var(--primary-color); font-weight: 500; line-height: 1.45; }
.ecs-checklist i { color: var(--accent-color); font-size: 18px; margin-top: 2px; flex-shrink: 0; }
@media (min-width: 768px) { .ecs-checklist { grid-template-columns: 1fr 1fr; } }
@media (max-width: 991px) { .ecs-industry-image { height: 300px; } }
