/*
 * Ping Media – Custom Header Styles
 * File: /wp-content/themes/oceanwp-child/header-custom.css
 */

/* ── RESET & VARIABLES ── */
:root {
  --pm-teal: #08a0b5;
  --pm-teal-dark: #078a9c;
  --pm-yellow: #f5c518;
  --pm-white: #ffffff;
  --pm-text: #ffffff;
  --pm-text-soft: rgba(255,255,255,0.85);
  --pm-card: rgba(255,255,255,0.12);
  --pm-border: rgba(255,255,255,0.18);
  --header-h: 72px;
}

/* ── MAIN HEADER ── */
.pm-header {
  background-color: var(--pm-teal) !important;
  position: fixed;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  transition: box-shadow 0.3s;
  font-family: 'Inter', sans-serif;
  width: 100%;
}
.pm-header.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.pm-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px !important;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-sizing: border-box;
}

/* ── LOGO ── */
.pm-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}
.pm-logo img { height: 50px; width: auto; display: block; }
.pm-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--pm-white);
  letter-spacing: -0.02em;
}
.pm-logo-text span { color: var(--pm-white); }

/* ── DESKTOP NAV ── */
.pm-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pm-nav > li {
  list-style: none;
  position: relative;
}
.pm-nav > li > a,
.pm-nav > li > button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pm-text-soft);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  box-shadow: none;
}
.pm-nav > li > a:hover,
.pm-nav > li > button:hover {
  color: var(--pm-white);
  background: var(--pm-card);
}
/* Active link: same look as the rest of the nav, just slightly bolder/whiter
   so it stays visible on the teal bar without a box or underline */
.pm-nav > li > a.active {
  color: var(--pm-white);
  font-weight: 700;
}
.pm-nav > li > button .pm-caret {
  width: 14px;
  height: 14px;
  transition: transform 0.25s;
  flex-shrink: 0;
}
.pm-nav > li:hover > button .pm-caret,
.pm-nav > li.open > button .pm-caret { transform: rotate(180deg); }

/* ── MEGA MENU (hover-triggered) ── */
.pm-mega {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 680px;
  background: var(--pm-white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 8px;
  margin-top: 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  box-shadow: 0 24px 64px rgba(7,40,46,0.25);
  z-index: 9999;
}
/* invisible bridge so the cursor doesn't lose hover crossing the gap */
.pm-nav > li#servicesItem::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  height: 14px;
}
.pm-mega::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--pm-white);
  border: 1px solid rgba(0,0,0,0.06);
  border-bottom: none;
  border-right: none;
}
.pm-nav > li:hover .pm-mega,
.pm-nav > li.open .pm-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.pm-mega-header {
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pm-mega-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--pm-teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pm-mega-all {
  font-size: 12px;
  color: var(--pm-teal-dark);
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.pm-mega-all:hover { color: var(--pm-teal); }
.pm-mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px 4px 8px;
}
.pm-mega-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.18s;
  cursor: pointer;
}
.pm-mega-item:hover { background: rgba(8,160,181,0.08); }
.pm-mega-item:hover .pm-mi-icon {
  background: var(--pm-teal);
}
.pm-mega-item:hover .pm-mi-icon svg { stroke: #fff; }
.pm-mi-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(8,160,181,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s;
}
.pm-mi-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--pm-teal);
  fill: none;
  transition: stroke 0.18s;
}
.pm-mi-label {
  font-size: 13px;
  font-weight: 600;
  color: #0d2b32;
  line-height: 1.3;
  display: block;
}
.pm-mi-desc {
  font-size: 11px;
  color: #6b7c80;
  margin-top: 2px;
  line-height: 1.4;
  display: block;
}

/* ── CTA AREA ── */
.pm-cta-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.pm-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--pm-white);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.pm-phone:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.pm-phone-icon {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.18);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.pm-phone-icon svg { width: 14px; height: 14px; }

/* Quote button: white background, theme-teal text, theme-teal on hover */
.pm-btn-quote {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--pm-white);
  color: var(--pm-teal);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  position: relative;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.18s ease, color 0.18s ease;
}
.pm-btn-quote:hover {
  background: var(--pm-teal-dark);
  color: var(--pm-white);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
}
.pm-btn-quote:active {
  transform: translateY(0);
}

/* ── HAMBURGER ── */
.pm-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.2s;
  box-shadow: none;
}
.pm-hamburger:hover { background: var(--pm-card); }
.pm-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--pm-white);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}
.pm-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pm-hamburger.open span:nth-child(2) { opacity: 0; }
.pm-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE MENU ── */
.pm-mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  background: var(--pm-teal);
  z-index: 999;
  overflow-y: auto;
  padding: 16px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  font-family: 'Inter', sans-serif;
}
.pm-mobile-menu.open { transform: translateX(0); }
.pm-mob-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: var(--pm-white);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  cursor: pointer;
  background: none;
  border-left: none; border-right: none; border-top: none;
  width: 100%;
  font-family: 'Inter', sans-serif;
  text-align: left;
}
.pm-mob-submenu { display: none; padding: 4px 0 8px 16px; }
.pm-mob-submenu.open { display: block; }
.pm-mob-sublink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.pm-mob-sublink:hover { background: rgba(255,255,255,0.12); color: var(--pm-white); }
.pm-mob-sublink-dot {
  width: 6px; height: 6px;
  background: var(--pm-white);
  border-radius: 50%;
  flex-shrink: 0;
}
.pm-mob-cta { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.pm-mob-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 10px;
  color: var(--pm-white);
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
}
.pm-mob-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px;
  background: var(--pm-white);
  border-radius: 10px;
  color: var(--pm-teal);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .pm-nav { display: none; }
  .pm-cta-area .pm-btn-quote { display: none; }
  .pm-cta-area .pm-phone { display: none; }
  .pm-hamburger { display: flex; }
  .pm-mobile-menu { display: block; }
}

/* ── BODY PADDING ADJUST ── */
html, body {
  margin: 0 !important;
  padding: 0 !important;
}
body.pm-custom-header-active {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* OceanWP leftover spacing fixes — kill the white gap below the header
   left behind by OceanWP's own header/content wrappers on both
   desktop and mobile */
.pm-custom-header-active #wrap,
.pm-custom-header-active #main,
.pm-custom-header-active #content,
.pm-custom-header-active .site-content,
.pm-custom-header-active #primary,
.pm-custom-header-active .content-area,
.pm-custom-header-active .ocean-row,
.pm-custom-header-active .entry-header {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.pm-custom-header-active #site-header,
.pm-custom-header-active #site-header-inner,
.pm-custom-header-active #site-navigation-wrap,
.pm-custom-header-active .top-header-wrap,
.pm-custom-header-active .middle-header-wrap {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
