/* Pipeline Safety – Header & Footer */

/* ─── Sticky footer ─── */
html, body { height: 100%; margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Mirror pages wrap everything in #wrapper; make it the flex container too */
#wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.fusion-footer.ps-footer { margin-top: auto; }

/* ─── Header ─── */
.ps-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.ps-header__inner {
  width: 100%;
  padding: 0 100px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "logo nav .";
  align-items: center;
  height: 70px;
}

.ps-header__logo { grid-area: logo; }
.ps-header__nav  { grid-area: nav;  }

.ps-header__logo img {
  display: block;
  height: 40px;
  width: auto;
}

.ps-header__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
  padding: 0;
}

.ps-header__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #333;
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.25s ease;
}

.ps-header__burger span:nth-child(1) { top: 0; }
.ps-header__burger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.ps-header__burger span:nth-child(3) { bottom: 0; }

/* ─── Nav ─── */
.ps-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.ps-nav > li > a,
.ps-nav__dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0.75rem;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.ps-nav > li > a:hover,
.ps-nav__dropdown-toggle:hover {
  background: #fff4e6;
  color: #F5901A;
}

/* ─── Dropdown ─── */
.ps-nav__has-dropdown { position: relative; }

.ps-nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  min-width: 280px;
  padding: 0.5rem 0;
  list-style: none;
  margin: 0.25rem 0 0;
  z-index: 100;
}

.ps-nav__has-dropdown.is-open .ps-nav__dropdown { display: block; }

.ps-nav__dropdown li a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: #333;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.15s, color 0.15s;
}

.ps-nav__dropdown li a:hover {
  background: #fff4e6;
  color: #F5901A;
}

/* ─── Mobile ─── */
@media (max-width: 900px) {
  .ps-header__inner {
    padding: 0 1.5rem;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo . burger";
  }

  .ps-header__burger { grid-area: burger; display: block; }

  .ps-header__nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    padding: 1rem;
  }

  .ps-header__nav.is-open { display: block; }

  .ps-nav {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }

  .ps-nav > li > a,
  .ps-nav__dropdown-toggle {
    width: 100%;
    padding: 0.75rem 1rem;
    justify-content: space-between;
    font-size: 1rem;
  }

  .ps-nav__dropdown {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    min-width: 0;
    padding-left: 1rem;
    margin: 0;
    background: #fafafa;
  }
}

/* ─── Footer ─── */
.ps-footer {
  background: #373839;
  color: #ccc;
}

.ps-footer a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.15s;
}

.ps-footer a:hover { color: #fff; }

.ps-footer__widgets {
  border: none;
}

.ps-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.ps-footer__col {
  flex: 1;
  min-width: 180px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.ps-footer__col strong { color: #fff; }

.ps-footer__logo {
  display: block;
  max-width: 78px;
  height: auto;
}

.ps-footer__social {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.ps-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  transition: background 0.2s;
}

.ps-footer__social a:hover { background: rgba(255,255,255,.2); }

.ps-footer__social svg { width: 18px; height: 18px; }

.ps-footer__copyright {
  background: #222;
  text-align: center;
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
  color: #888;
  border: none;
}

.ps-footer__copyright .ps-footer__inner {
  padding: 0;
}

@media (max-width: 600px) {
  .ps-footer__inner {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 1.25rem;
  }
}
