/* ============================================================
   KEY BRAINS 2 — GLOBAL STYLES
   Extracted from key-brains.html, key-brains-blog.html, key-brains-work.html
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --kb-black: #0a0a0a;
  --kb-white: #ffffff;
  --kb-blue: #f9572e;
  --kb-blue-hover: #d94420;
  --kb-blue-light: #fff3f0;
  --kb-gray-10: #f4f4f4;
  --kb-gray-20: #e0e0e0;
  --kb-gray-30: #c6c6c6;
  --kb-gray-50: #8d8d8d;
  --kb-gray-70: #525252;
  --kb-gray-90: #262626;
  --kb-green: #24a148;
  --kb-teal: #009d9a;
  --kb-purple: #8a3ffc;
  --kb-orange: #f1620a;
  --font: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --serif: 'IBM Plex Serif', Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--kb-black);
  background: var(--kb-white);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
svg { display: inline-block; vertical-align: middle; }
button { cursor: pointer; font-family: var(--font); }

/* ── RESET WP WRAPPERS ── */
#page, #content, #primary, #main, main,
.site, .site-content, .content-area,
.entry-content, article, .hfeed,
.wp-site-blocks {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
}

/* ── NAV ── */
#kb-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--kb-black);
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid #393939;
  box-sizing: border-box;
}
.admin-bar #kb-nav { top: 32px; }
.kb-nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; height: 48px; }
.kb-nav-logo img { height: 32px; width: auto; display: block; margin: 0; padding: 0; vertical-align: middle; object-fit: contain; }
.kb-nav-logo span { line-height: 1; }
.kb-nav-links { display: flex; align-items: center; }
.kb-nav-links a,
.kb-nav-item > a {
  color: #c6c6c6;
  font-size: 14px;
  padding: 0 16px;
  height: 48px;
  display: flex;
  align-items: center;
  transition: color .15s, background .15s;
  white-space: nowrap;
  text-decoration: none;
}
.kb-nav-links a:hover,
.kb-nav-item > a:hover,
.kb-nav-links a.active { background: #393939; color: white; }
.kb-nav-links a.active { border-bottom: 2px solid var(--kb-blue); }
.kb-nav-item { position: relative; }
.kb-nav-item > a svg { margin-left: 4px; }
.kb-dropdown {
  display: none;
  position: absolute;
  top: 48px;
  left: 0;
  background: #1a1a1a;
  border: 1px solid #393939;
  border-top: 2px solid var(--kb-blue);
  min-width: 180px;
  z-index: 100;
}
.kb-nav-item:hover .kb-dropdown { display: block; }
.kb-dropdown a {
  display: block;
  color: #c6c6c6;
  font-size: 13px;
  padding: 10px 16px;
  border-bottom: 1px solid #2a2a2a;
  transition: background .15s, color .15s;
  height: auto;
}
.kb-dropdown a:last-child { border-bottom: none; }
.kb-dropdown a:hover { background: #393939; color: white; }
.kb-nav-icons { display: flex; align-items: center; }
.kb-nav-search {
  background: none;
  border: none;
  color: #c6c6c6;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.kb-nav-search:hover { background: #393939; color: white; }
.kb-btn-primary {
  background: var(--kb-blue);
  color: white;
  border: none;
  padding: 0 20px;
  height: 48px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 400;
  transition: background .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.kb-btn-primary:hover { background: var(--kb-blue-hover); color: white; }

/* ── NAV SPACER ── */
.kb-nav-spacer { height: 48px; }
.admin-bar .kb-nav-spacer { height: 80px; }

/* ── BREADCRUMB ── */
.kb-breadcrumb {
  padding: 10px 48px;
  background: var(--kb-gray-10);
  border-bottom: 1px solid var(--kb-gray-20);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--kb-gray-50);
}
.kb-breadcrumb a { color: var(--kb-blue); }
.kb-breadcrumb a:hover { text-decoration: underline; }
.kb-breadcrumb-sep { color: var(--kb-gray-30); }

/* ── SECTION LABEL ── */
.kb-section-label {
  font-size: 12px;
  color: var(--kb-gray-50);
  padding: 12px 16px;
  border-bottom: 1px solid var(--kb-gray-20);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-family: var(--font);
  background: white;
}

/* ── BUTTONS ── */
.kb-btn-white {
  background: white;
  color: var(--kb-black);
  padding: 14px 24px;
  font-size: 14px;
  font-family: var(--font);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}
.kb-btn-white:hover { background: var(--kb-gray-10); }
.kb-btn-outline-white {
  background: none;
  color: white;
  border: 1px solid rgba(255,255,255,.4);
  padding: 14px 24px;
  font-size: 14px;
  font-family: var(--font);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
  margin-left: -1px;
}
.kb-btn-outline-white:hover { background: rgba(255,255,255,.08); border-color: white; }
.kb-btn-blue {
  background: var(--kb-blue);
  color: white;
  padding: 14px 24px;
  font-size: 14px;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background .15s;
  border: none;
  cursor: pointer;
}
.kb-btn-blue:hover { background: var(--kb-blue-hover); color: white; }

/* ── CTA STRIP (blue) ── */
.kb-cta-strip {
  background: var(--kb-blue);
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.kb-cta-strip h2 { font-size: 30px; font-weight: 300; color: white; margin: 0 0 8px; padding: 0; }
.kb-cta-strip h2 strong { font-weight: 600; }
.kb-cta-strip p { font-size: 14px; color: rgba(255,255,255,.7); max-width: 480px; line-height: 1.7; margin: 0; }
.kb-cta-actions { display: flex; flex-shrink: 0; }

/* ── CTA STRIP (dark) ── */
.kb-cta-strip-dark {
  background: var(--kb-black);
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.kb-cta-strip-dark h2 { font-size: 32px; font-weight: 300; color: white; margin: 0 0 8px; padding: 0; }
.kb-cta-strip-dark h2 strong { font-weight: 600; }
.kb-cta-strip-dark p { font-size: 14px; color: rgba(255,255,255,.5); max-width: 480px; line-height: 1.7; margin: 0; }

/* ── FOOTER ── */
#kb-footer {
  background: var(--kb-black);
  color: #c6c6c6;
  padding: 40px 48px 24px;
  border-top: 1px solid #393939;
}
.kb-footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.kb-footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 16px;
  padding: 0;
}
.kb-footer-col a {
  display: block;
  font-size: 12px;
  color: #8d8d8d;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color .15s;
}
.kb-footer-col a:hover { color: white; }
.kb-footer-bottom {
  border-top: 1px solid #393939;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kb-footer-logo { display: flex; align-items: center; gap: 8px; }
.kb-footer-logo-mark {
  width: 28px; height: 28px;
  background: var(--kb-blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 10px; color: white;
  clip-path: polygon(10% 0%,90% 0%,100% 10%,100% 90%,90% 100%,10% 100%,0% 90%,0% 10%);
}
.kb-footer-logo-text { color: #8d8d8d; font-size: 12px; }
.kb-footer-legal { display: flex; gap: 16px; }
.kb-footer-legal a { font-size: 11px; color: #8d8d8d; text-decoration: none; }
.kb-footer-legal a:hover { color: white; }

/* ── SEARCH OVERLAY ── */
#kb-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
#kb-search-overlay.active { display: flex; }
.kb-search-box {
  background: white;
  padding: 32px;
  width: 100%;
  max-width: 600px;
  margin: 16px;
}
.kb-search-box input {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--kb-blue);
  font-size: 24px;
  font-family: var(--font);
  outline: none;
  padding: 8px 0;
}
.kb-search-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

/* ── MOBILE BURGER ── */
.kb-burger {
  display: none;
  background: none;
  border: none;
  color: #c6c6c6;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
}
#kb-mobile-menu {
  display: none;
  position: fixed;
  top: 48px;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border-bottom: 1px solid #393939;
  z-index: 999;
  padding: 16px 0;
}
.admin-bar #kb-mobile-menu { top: 80px; }
#kb-mobile-menu.active { display: block; }
#kb-mobile-menu a {
  display: block;
  color: #c6c6c6;
  font-size: 15px;
  padding: 12px 24px;
  border-bottom: 1px solid #2a2a2a;
  text-decoration: none;
  transition: background .15s;
}
#kb-mobile-menu a:hover { background: #393939; color: white; }

/* Kill Elementor injected headers/footers — our header.php/footer.php handle everything */
.elementor-location-header,
.elementor-location-footer,
header.elementor-section,
footer.elementor-section,
.e-con[data-elementor-type="header"],
.e-con[data-elementor-type="footer"] {
    display: none !important;
}

@media (max-width: 1024px) {
  .kb-cta-strip, .kb-cta-strip-dark { grid-template-columns: 1fr; }
  .kb-footer-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .kb-nav-links { display: none; }
  .kb-burger { display: flex; }
  .kb-breadcrumb { padding: 10px 16px; }
  .kb-cta-strip, .kb-cta-strip-dark { padding: 40px 16px; }
  .kb-footer-grid { grid-template-columns: 1fr 1fr; }
  #kb-footer { padding: 32px 16px 16px; }
  .kb-cta-actions { flex-direction: column; }
  .kb-btn-outline-white { margin-left: 0; margin-top: -1px; }
}

/* ============================================================
   MOBILE RESPONSIVE — Global
   ============================================================ */
@media (max-width: 768px) {

  /* NAV */
  .kb-nav-links { display: none !important; }
  .kb-burger { display: flex !important; }
  #kb-nav { padding: 0 12px; }
  .kb-btn-primary { padding: 0 14px; font-size: 12px; }

  /* BREADCRUMB */
  .kb-breadcrumb { padding: 8px 16px; font-size: 11px; }

  /* CTA STRIPS */
  .kb-cta-strip,
  .kb-cta-strip-dark {
    grid-template-columns: 1fr !important;
    padding: 40px 16px !important;
    gap: 24px !important;
  }
  .kb-cta-strip h2,
  .kb-cta-strip-dark h2 { font-size: 24px !important; }
  .kb-cta-actions { flex-direction: column !important; }
  .kb-cta-actions a { margin-left: 0 !important; }

  /* FOOTER */
  #kb-footer { padding: 32px 16px 16px !important; }
  .kb-footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px 16px !important;
  }
  .kb-footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  /* SEARCH OVERLAY */
  .kb-search-box { padding: 20px 16px; }
  .kb-search-box input { font-size: 18px; }
}

@media (max-width: 480px) {
  .kb-footer-grid { grid-template-columns: 1fr !important; }
}

/* ── BLOG SINGLE CONTENT STYLES ── */
.kb-blog-content h2 { font-size: 24px; font-weight: 500; color: #0a0a0a; margin: 40px 0 16px; padding: 0; line-height: 1.3; }
.kb-blog-content h3 { font-size: 19px; font-weight: 500; color: #0a0a0a; margin: 32px 0 12px; padding: 0; }
.kb-blog-content h4 { font-size: 16px; font-weight: 600; color: #0a0a0a; margin: 24px 0 10px; padding: 0; }
.kb-blog-content p { margin-bottom: 20px; }
.kb-blog-content p:last-child { margin-bottom: 0; }
.kb-blog-content a { color: #f9572e; text-decoration: underline; }
.kb-blog-content ul, .kb-blog-content ol { padding-left: 24px; margin-bottom: 20px; }
.kb-blog-content li { margin-bottom: 8px; line-height: 1.75; }
.kb-blog-content blockquote { border-left: 3px solid #f9572e; padding: 16px 20px; margin: 28px 0; background: #fff3f0; font-style: italic; color: #262626; }
.kb-blog-content pre, .kb-blog-content code { font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.kb-blog-content pre { background: #0a0a0a; color: #f4f4f4; padding: 20px 24px; overflow-x: auto; margin: 24px 0; border-radius: 2px; }
.kb-blog-content code { background: #f4f4f4; padding: 2px 6px; border: 1px solid #e0e0e0; color: #f9572e; }
.kb-blog-content pre code { background: none; border: none; color: inherit; padding: 0; }
.kb-blog-content img { max-width: 100%; height: auto; margin: 24px 0; }
.kb-blog-content hr { border: none; border-top: 1px solid #e0e0e0; margin: 40px 0; }

/* Single post mobile */
@media (max-width: 1024px) {
  div[style*="grid-template-columns:1fr 320px"] { grid-template-columns: 1fr !important; }
  div[style*="padding:48px 0 64px 40px"] { padding: 32px 0 0 0 !important; border-left: none !important; border-top: 1px solid #e0e0e0 !important; position: static !important; }
}
@media (max-width: 768px) {
  div[style*="display:grid;grid-template-columns:1fr 320px"] { padding: 0 16px !important; }
  div[style*="padding:48px 48px 64px 0"] { padding: 32px 0 !important; }
}

/* ── MOBILE NAV CTA — hide on mobile, show in mobile menu ── */
@media (max-width: 768px) {
  .kb-cta-desktop { display: none !important; }
  /* Kill any WP registered menu injected into our nav */
  #kb-nav .menu,
  #kb-nav ul.nav-menu,
  #kb-nav .wp-block-navigation,
  #kb-nav > ul { display: none !important; }
}

/* ── NAV LOGO ALIGNMENT FIX ── */
#kb-nav img {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
  max-height: 36px !important;
  width: auto !important;
  object-fit: contain !important;
}
#kb-nav .kb-nav-logo {
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
}

/* ── DROPDOWN NAV (KB2_Dropdown_Walker) ── */
.kb-nav-item { position: relative; display: flex; align-items: center; }
.kb-nav-link {
  color: #ffffff; font-size: 13px; font-weight: 600; letter-spacing: .5px;
  text-transform: uppercase; padding: 0 16px; height: 48px;
  display: flex; align-items: center; gap: 4px;
  text-decoration: none; white-space: nowrap; transition: background .15s;
}
.kb-nav-link:hover, .kb-nav-link.active { background: #393939; color: #fff; }
.kb-nav-link.active { border-bottom: 2px solid #f9572e; }

/* Level 1 dropdown */
.kb-dropdown {
  display: none; position: absolute; top: 48px; left: 0;
  min-width: 200px; background: #1a1a1a;
  border: 1px solid #393939; border-top: 2px solid #f9572e;
  z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.kb-has-drop:hover > .kb-dropdown { display: block; }

.kb-drop-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; font-size: 13px; color: #c6c6c6;
  text-decoration: none; border-bottom: 1px solid #2a2a2a;
  transition: background .15s, color .15s; white-space: nowrap; position: relative;
}
.kb-drop-link:last-child { border-bottom: none; }
.kb-drop-link:hover, .kb-drop-link.active { background: #393939; color: #fff; }

/* Level 2 sub-dropdown */
.kb-dropdown-sub {
  display: none; position: absolute; left: 100%; top: 0;
  min-width: 200px; background: #222;
  border: 1px solid #393939; border-left: 2px solid #f9572e;
  box-shadow: 4px 4px 20px rgba(0,0,0,.3); z-index: 201;
}
.kb-dropdown > div { position: relative; }
.kb-dropdown > div:hover > .kb-dropdown-sub { display: block; }

/* Mobile sub */
.kb-mobile-sub { background: #111; }

/* Mobile: hide CTA on small screens */
@media (max-width: 768px) {
  .kb-nav-links { display: none !important; }
  .kb-burger { display: flex !important; }
  .kb-cta-desktop { display: none !important; }
  #kb-nav .menu, #kb-nav ul.nav-menu { display: none !important; }
}

/* ── KB2 Mega Menu: suppress old dropdown on mega items ── */
.kb2mm-has-mega > .kb-dropdown,
.kb2mm-has-mega:hover > .kb-dropdown,
.kb-nav-item.kb2mm-has-mega .kb-dropdown { display:none!important; }
