/* ============================================================
   Creative Networks — Custom Nav
   Drop into child theme: assets/cn-nav.css
   Enqueue in functions.php (see cn-nav.js notes)
   ============================================================ */

:root {
  --cn-or: #E07020;
  --cn-or-d: #B85510;
  --cn-or-l: rgba(224, 112, 32, 0.10);
  --cn-navy: #12203A;
  --cn-surf: #F6F7F9;
  --cn-bdr: rgba(18, 32, 58, 0.10);
  --cn-muted: #6B7280;
}

/* ── HEADER ── */
.cn-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--cn-bdr);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: box-shadow 0.2s;
}
.cn-header.scrolled {
  box-shadow: 0 2px 16px rgba(18, 32, 58, 0.09);
}

/* Logo */
.cn-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}
.cn-logo-mark {
  width: 38px;
  height: 38px;
  background: var(--cn-or);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cn-logo-mark img,
.cn-logo-mark svg { width: 22px; height: 22px; }
.cn-logo-words { line-height: 1.15; }
.cn-logo-top {
  font-size: 15px;
  font-weight: 800;
  color: var(--cn-navy);
  letter-spacing: -0.3px;
}
.cn-logo-top span { color: var(--cn-or); }
.cn-logo-sub {
  font-size: 10px;
  color: var(--cn-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Desktop nav */
.cn-desk-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
}
.cn-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--cn-navy);
  padding: 7px 13px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.14s, color 0.14s;
  white-space: nowrap;
  font-family: inherit;
}
.cn-nav-btn:hover,
.cn-nav-btn[aria-expanded="true"] {
  background: var(--cn-or-l);
  color: var(--cn-or);
}
.cn-nav-arr {
  display: inline-block;
  font-size: 10px;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}
.cn-nav-btn[aria-expanded="true"] .cn-nav-arr {
  transform: rotate(180deg);
}
.cn-nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--cn-navy);
  padding: 7px 13px;
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.14s, color 0.14s;
  white-space: nowrap;
}
.cn-nav-link:hover { background: var(--cn-or-l); color: var(--cn-or); }

/* Header right */
.cn-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cn-ph-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cn-navy);
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 7px;
  border: 1px solid var(--cn-bdr);
  transition: border-color 0.14s, color 0.14s;
}
.cn-ph-link:hover { border-color: var(--cn-or); color: var(--cn-or); }
.cn-cta {
  background: var(--cn-or);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  transition: background 0.14s, transform 0.1s;
}
.cn-cta:hover { background: var(--cn-or-d); color: #fff; }
.cn-cta:active { transform: scale(0.97); }

/* Hamburger */
.cn-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--cn-bdr);
  border-radius: 7px;
  padding: 8px;
  cursor: pointer;
  color: var(--cn-navy);
  transition: border-color 0.14s;
}
.cn-hamburger:hover { border-color: var(--cn-or); color: var(--cn-or); }
.cn-ham-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}
.cn-ham-lines span {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.cn-hamburger.is-open .cn-ham-lines span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.cn-hamburger.is-open .cn-ham-lines span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.cn-hamburger.is-open .cn-ham-lines span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* ── MEGA MENU ── */
.cn-mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  width: min(900px, calc(100vw - 48px));
  background: #fff;
  border: 1px solid var(--cn-bdr);
  border-radius: 14px;
  box-shadow:
    0 20px 60px rgba(18, 32, 58, 0.13),
    0 4px 16px rgba(18, 32, 58, 0.07);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.cn-mega.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.cn-mega-body {
  display: flex;
  min-height: 340px;
}

/* Rail */
.cn-mega-rail {
  width: 200px;
  flex-shrink: 0;
  background: var(--cn-surf);
  border-right: 1px solid var(--cn-bdr);
  padding: 12px 0;
}
.cn-rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--cn-muted);
  border-left: 2.5px solid transparent;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  user-select: none;
}
.cn-rail-item:hover { color: var(--cn-navy); background: rgba(18,32,58,.04); }
.cn-rail-item.is-active {
  color: var(--cn-or);
  background: var(--cn-or-l);
  border-left-color: var(--cn-or);
}
.cn-rail-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Panels */
.cn-mega-panel {
  flex: 1;
  padding: 24px 28px;
  display: none;
  flex-direction: column;
}
.cn-mega-panel.is-active { display: flex; }
.cn-panel-head { margin-bottom: 18px; }
.cn-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--cn-navy);
  margin-bottom: 3px;
}
.cn-panel-desc {
  font-size: 12px;
  color: var(--cn-muted);
  line-height: 1.55;
}
.cn-panel-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  flex: 1;
}
.cn-panel-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--cn-navy);
  font-size: 13px;
  transition: background 0.12s, color 0.12s;
}
.cn-panel-link:hover { background: var(--cn-or-l); color: var(--cn-or); }
.cn-panel-link:hover .cn-link-dot { opacity: 1; }
.cn-link-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cn-or);
  opacity: 0.4;
  flex-shrink: 0;
  transition: opacity 0.12s;
}
.cn-panel-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--cn-bdr);
  display: flex;
  justify-content: flex-end;
}
.cn-view-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--cn-or);
  text-decoration: none;
}
.cn-view-all:hover { text-decoration: underline; }

/* ── MOBILE FULLSCREEN OVERLAY ── */
.cn-mob-overlay {
  position: fixed;
  inset: 0;
  background: var(--cn-navy);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overscroll-behavior: contain;
}
.cn-mob-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cn-mob-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.cn-mob-logo {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.cn-mob-logo span { color: var(--cn-or); }
.cn-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 8px;
  padding: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s;
}
.cn-close-btn:hover { background: rgba(255, 255, 255, 0.15); }
.cn-close-btn svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.cn-mob-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cn-mob-ctas {
  display: flex;
  gap: 10px;
  padding: 14px 20px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 4px;
}
.cn-mob-cta-p {
  flex: 1;
  background: var(--cn-or);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.cn-mob-cta-s {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

/* Accordion */
.cn-acc-item { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.cn-acc-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.12s;
}
.cn-acc-hdr:hover { background: rgba(255, 255, 255, 0.04); }
.cn-acc-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cn-acc-icon {
  width: 18px;
  height: 18px;
  stroke: var(--cn-or);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.cn-acc-label {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}
.cn-acc-chev {
  width: 16px;
  height: 16px;
  stroke: rgba(255, 255, 255, 0.35);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.14s;
  flex-shrink: 0;
}
.cn-acc-item.is-open .cn-acc-chev {
  transform: rotate(90deg);
  stroke: var(--cn-or);
}
.cn-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.cn-acc-item.is-open .cn-acc-body { max-height: 800px; }
.cn-acc-links { padding: 4px 0 12px 52px; }
.cn-acc-link {
  display: block;
  padding: 9px 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-radius: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.1s, color 0.1s;
}
.cn-acc-link:last-child { border-bottom: none; }
.cn-acc-link:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* Plain links (non-service nav items) */
.cn-mob-plain-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: color 0.12s;
}
.cn-mob-plain-link:hover { color: #fff; }
.cn-mob-plain-link svg {
  width: 14px; height: 14px;
  stroke: rgba(255,255,255,0.3);
  fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Footer badge */
.cn-mob-foot {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.cn-mob-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(224, 112, 32, 0.12);
  border: 1px solid rgba(224, 112, 32, 0.28);
  border-radius: 8px;
  padding: 10px 14px;
}
.cn-mob-badge svg {
  width: 20px; height: 20px;
  stroke: var(--cn-or); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.cn-mob-badge-text { font-size: 11.5px; color: rgba(255,255,255,0.55); line-height: 1.4; }
.cn-mob-badge-text strong { color: #fff; display: block; font-size: 12.5px; margin-bottom: 1px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .cn-desk-nav { display: none; }
  .cn-header-right .cn-ph-link,
  .cn-header-right .cn-cta { display: none; }
  .cn-hamburger { display: flex; }
  .cn-header { padding: 0 20px; }
}
@media (min-width: 901px) {
  .cn-hamburger { display: none; }
  .cn-mob-overlay { display: none !important; }
}
