/*
Theme Name:   Hello Elementor Child
Theme URI:    https://www.erjobs.co.uk/
Description:  Child theme for Emmerson Ross Recruitment. Provides a hand coded header and footer so the site no longer depends on Elementor Pro Theme Builder.
Author:       Protechmedia
Author URI:   https://protechmedia.co.uk/
Template:     hello-elementor
Version:      1.0.0
Text Domain:  hello-elementor-child
*/

/* ==========================================================
   BRAND TOKENS
   ========================================================== */
:root {
  --er-orange: #FF9000;
  --er-orange-dark: #e07f00;
  --er-charcoal: #4e4e4e;
  --er-ink: #2b2b2b;
  --er-footer-bg: #3A3A3A;
  --er-white: #ffffff;
  --er-grey-line: rgba(255, 255, 255, .18);
  --er-font-head: 'Poppins', sans-serif;
  --er-font-body: 'Open Sans', sans-serif;
  --er-wrap: 1180px;
}

/* ==========================================================
   HEADER
   ========================================================== */
.er-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--er-white);
  border-bottom: 2px solid var(--er-orange);
}

.er-header__inner {
  max-width: var(--er-wrap);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.er-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.er-logo img {
  width: 80px;
  height: 80px;
  display: block;
}

/* Primary nav */
.er-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}
.er-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 26px;
}
.er-nav li {
  position: relative;
}
.er-nav a {
  font-family: var(--er-font-head);
  font-size: 16px;
  font-weight: 600;
  color: var(--er-ink);
  text-decoration: none;
  padding: 8px 0;
  display: inline-block;
  transition: color .2s ease;
}
.er-nav a:hover,
.er-nav .current-menu-item > a,
.er-nav .current_page_item > a,
.er-nav .current-menu-ancestor > a {
  color: var(--er-orange);
}

/* Active underline */
.er-nav .current-menu-item > a,
.er-nav .current_page_item > a {
  border-bottom: 2px solid var(--er-orange);
}

/* Dropdown (Markets) */
.er-nav .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 7px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}
.er-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--er-white);
  border: 1px solid #ececec;
  border-top: 2px solid var(--er-orange);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .09);
  padding: 8px 0;
  display: block;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.er-nav li:hover > .sub-menu,
.er-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.er-nav .sub-menu li {
  width: 100%;
}
.er-nav .sub-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 0;
  white-space: nowrap;
}
.er-nav .sub-menu a:hover {
  background: #FFF7EE;
  color: var(--er-orange);
}

/* Header actions */
.er-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.er-link-plain {
  font-family: var(--er-font-head);
  font-size: 16px;
  font-weight: 600;
  color: var(--er-ink);
  text-decoration: none;
  transition: color .2s ease;
}
.er-link-plain:hover {
  color: var(--er-orange);
}
.er-btn {
  display: inline-block;
  font-family: var(--er-font-head);
  font-size: 16px;
  font-weight: 600;
  color: var(--er-white);
  background: var(--er-orange);
  padding: 12px 26px;
  border-radius: 50px;
  text-decoration: none;
  transition: background .2s ease, transform .12s ease;
}
.er-btn:hover {
  background: var(--er-orange-dark);
  color: var(--er-white);
}

/* Burger
   NOTE: Elementor's global kit (.elementor-kit-6 button) sets an orange
   pill style on every <button>. We must out-specify it, hence the
   compound selector and !important on the visual properties. */
.er-header .er-burger,
.er-header button.er-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px !important;
  height: 44px !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  -webkit-appearance: none;
          appearance: none;
}
.er-header .er-burger:hover,
.er-header .er-burger:focus {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}
.er-header .er-burger span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 0 auto;
  background: var(--er-ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.er-header .er-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.er-header .er-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.er-header .er-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================
   MOBILE HEADER
   ========================================================== */
@media (max-width: 1024px) {
  .er-header .er-burger,
  .er-header button.er-burger {
    display: flex !important;
  }
  .er-header__inner {
    padding: 12px 20px;
  }
  .er-logo img {
    width: 62px;
    height: 62px;
  }

  /* Mobile panel: nav + actions drop below the bar as one block.
     Orange background, white centred text, matching the original. */
  .er-header .er-nav,
  .er-header .er-actions {
    display: none;
    width: 100%;
    background: var(--er-orange);
  }
  .er-header.is-open .er-nav {
    display: block;
    order: 3;
    padding: 8px 0 0;
    margin-left: 0;
    margin-top: 12px;
  }
  .er-header.is-open .er-actions {
    display: flex;
    order: 4;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 18px 0 24px;
  }

  /* The header bar itself wraps so the panel sits underneath.
     Negative margins let the orange bleed full width. */
  .er-header__inner {
    flex-wrap: wrap;
  }
  .er-header.is-open .er-nav,
  .er-header.is-open .er-actions {
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
    padding-left: 20px;
    padding-right: 20px;
  }
  .er-header.is-open {
    box-shadow: 0 14px 24px rgba(0, 0, 0, .12);
  }

  /* Stacked nav list, centred */
  .er-header .er-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .er-header .er-nav > ul > li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, .22);
  }
  .er-header .er-nav > ul > li:last-child {
    border-bottom: 0;
  }
  .er-header .er-nav a {
    display: block;
    padding: 15px 2px;
    font-size: 17px;
    text-align: center;
    color: var(--er-white);
  }
  .er-header .er-nav a:hover,
  .er-header .er-nav .current-menu-item > a,
  .er-header .er-nav .current_page_item > a,
  .er-header .er-nav .current-menu-ancestor > a {
    color: var(--er-white);
    opacity: .78;
    border-bottom: 0;
  }

  /* Submenu: always expanded, centred, slightly muted */
  .er-header .er-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    padding: 0 0 8px;
    min-width: 0;
    background: transparent;
  }
  .er-header .er-nav .sub-menu li {
    border-bottom: 0;
  }
  .er-header .er-nav .sub-menu a {
    padding: 10px 0;
    font-size: 15.5px;
    font-weight: 500;
    text-align: center;
    color: rgba(255, 255, 255, .85);
  }
  .er-header .er-nav .sub-menu a:hover {
    color: var(--er-white);
    background: transparent;
    opacity: 1;
  }

  /* Dropdown arrow: centre it next to the label rather than floating */
  .er-header .er-nav .menu-item-has-children > a::after {
    float: none;
    margin-top: 0;
    margin-left: 8px;
    border-top-color: currentColor;
  }

  /* Action links on the orange panel */
  .er-header .er-actions .er-link-plain {
    color: var(--er-white);
  }
  .er-header .er-actions .er-link-plain:hover {
    color: var(--er-white);
    opacity: .8;
  }
  /* Sign in becomes white pill with orange text so it reads on orange */
  .er-header .er-actions .er-btn {
    background: var(--er-white);
    color: var(--er-orange);
  }
  .er-header .er-actions .er-btn:hover {
    background: #fff4e6;
    color: var(--er-orange);
  }
}

/* ==========================================================
   FOOTER
   ========================================================== */
.er-footer {
  background: var(--er-footer-bg);
  color: #cfcfcf;
  font-family: var(--er-font-body);
}
.er-footer__inner {
  max-width: var(--er-wrap);
  margin: 0 auto;
  padding: 60px 28px 30px;
}
.er-footer__cols {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
  gap: 40px;
}
.er-footer h4 {
  color: var(--er-white);
  font-family: var(--er-font-head);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
}
.er-footer a {
  color: #cfcfcf;
  text-decoration: none;
  transition: color .2s ease;
}
.er-footer a:hover {
  color: var(--er-orange);
}
.er-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.er-footer ul li {
  margin-bottom: 10px;
  font-size: 15px;
}

/* Brand column */
.er-footer__brand img {
  width: 90px;
  height: 90px;
  display: block;
  margin-bottom: 18px;
}
.er-footer__strapline {
  font-size: 14.5px;
  line-height: 1.7;
  margin: 0 0 20px;
  max-width: 340px;
}
.er-social {
  display: flex;
  gap: 12px;
}
.er-social a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--er-grey-line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s ease, background .2s ease;
}
.er-social a:hover {
  border-color: var(--er-orange);
  background: rgba(255, 144, 0, .12);
}
.er-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Contact column */
.er-footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

/* Areas we cover */
.er-areas {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 34px;
  margin-top: 44px;
}
.er-areas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.er-areas .er-col > span {
  display: block;
  color: var(--er-orange);
  font-family: var(--er-font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.er-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.er-links a {
  display: inline-block;
  color: #cfcfcf;
  border: 1px solid var(--er-grey-line);
  border-radius: 50px;
  padding: 7px 15px;
  font-size: 13px;
  text-decoration: none;
  transition: all .2s ease;
}
.er-links a:hover {
  border-color: var(--er-orange);
  color: var(--er-white);
}

/* Bottom bar */
.er-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: 40px;
  padding-top: 24px;
  font-size: 13.5px;
  color: #9d9d9d;
  text-align: center;
}

/* Footer responsive */
@media (max-width: 1024px) {
  .er-footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}
@media (max-width: 768px) {
  .er-footer__inner {
    padding: 48px 20px 26px;
  }
  .er-footer__cols {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .er-areas-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   HELLO ELEMENTOR RESETS
   Hello theme adds its own header/footer hooks. Hide any
   leftovers so only our markup shows.
   ========================================================== */
.site-header:not(.er-header),
.site-footer:not(.er-footer) {
  display: none;
}