/*
Theme Name:   Kinetix Sport + Spine
Theme URI:    https://kinetixatx.com
Description:  Child theme for Kinetix Sport + Spine built on Kadence.
              All custom styles live here — do not use Additional CSS.
Author:       Dr. Matt Centofonti
Author URI:   https://kinetixatx.com
Template:     kadence
Version: 6.1
License:      Private
Text Domain:  kinetix-child
*/

/* ============================================================
   DESIGN TOKENS
   Single source of truth for all colors, fonts, spacing.
   Change a token here and it updates everywhere on the site.
   ============================================================ */
:root {
  /* Brand colors */
  --kx-navy:       #0f2b44;
  --kx-navy-deep:  #071d30;
  --kx-navy-mid:   #1a3a56;
  --kx-mid:        #2e4d66;
  --kx-blue:       #5a99d2;
  --kx-blue-light: #8ab8e0;
  --kx-teal:       #67c4b8;
  --kx-teal-dark:  #4da89c;
  --kx-teal-pale:  #eaf4f3;
  --kx-muted:      #6b8299;
  --kx-border:     #dce8f0;
  --kx-bg-off:     #f4f8fb;
  --kx-white:      #ffffff;
  --kx-red:        #c0392b;
  --kx-red-pale:   #fdf3f2;

  /* Typography */
  --kx-font-h:     'DM Serif Display', Georgia, serif;
  --kx-font-b:     'DM Sans', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --kx-radius:     10px;
  --kx-radius-sm:  6px;
  --kx-radius-lg:  16px;

  /* Shadows */
  --kx-shadow-sm:  0 1px 8px rgba(15,43,68,.06);
  --kx-shadow:     0 2px 16px rgba(15,43,68,.08);
  --kx-shadow-md:  0 4px 28px rgba(15,43,68,.13);
  --kx-shadow-lg:  0 8px 48px rgba(15,43,68,.18);

  /* Layout */
  --kx-max:        1100px;
  --kx-max-wide:   1280px;
  --kx-max-prose:  740px;

  /* Header heights — used for scroll offset calculations */
  --kx-util-h:     36px;
  --kx-nav-h:      72px;
  --kx-header-h:   108px;
}

/* ============================================================
   GLOBAL RESETS & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--kx-font-b);
  color: var(--kx-navy);
  background: var(--kx-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--kx-blue);
  text-decoration: none;
  transition: color .15s;
}

a:hover {
  color: var(--kx-navy);
}

/* ============================================================
   KADENCE GLOBAL OVERRIDES
   Resets Kadence defaults to match our design system.
   ============================================================ */

/* Typography — override Kadence defaults */
.kadence-blocks-form label,
body .kb-btns-wrap .kb-btn,
.wp-block-button__link {
  font-family: var(--kx-font-b);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title {
  font-family: var(--kx-font-h);
  color: var(--kx-navy);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p {
  color: var(--kx-mid);
  line-height: 1.75;
  margin-bottom: 1.1em;
}

/* Kadence content max width */
.entry-content,
.wp-block-group.alignfull > .wp-block-group__inner-container,
.kadence-inner-column-inner {
  max-width: var(--kx-max);
}

/* Remove Kadence default link underlines in nav */
.primary-navigation a,
.header-navigation a {
  text-decoration: none;
}

/* ============================================================
   UTILITY BAR
   ============================================================ */
.kx-util-bar {
  background: var(--kx-navy-deep);
  border-bottom: 1px solid rgba(255,255,255,.06);
  height: var(--kx-util-h);
  display: flex;
  align-items: center;
  width: 100%;
}

.kx-util-bar__inner {
  width: 100%;
  max-width: var(--kx-max-wide);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kx-util-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.kx-util-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--kx-font-b);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  white-space: nowrap;
}

.kx-util-item:hover {
  color: rgba(255,255,255,.9);
}

.kx-util-item--phone {
  color: var(--kx-teal);
  font-weight: 700;
  font-size: 12.5px;
}

.kx-util-item--phone:hover { color: #fff; }

.kx-util-dot {
  color: rgba(255,255,255,.18);
  font-size: 10px;
  user-select: none;
}

.kx-util-hours {
  font-family: var(--kx-font-b);
  font-size: 11.5px;
  color: rgba(255,255,255,.45);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kx-util-hours__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--kx-teal);
}

.kx-util-hours__badge::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kx-teal);
  animation: kx-pulse 2s ease-in-out infinite;
}

@keyframes kx-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(103,196,184,.25); }
  50%       { box-shadow: 0 0 0 5px rgba(103,196,184,.1); }
}

.kx-util-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--kx-font-b);
  font-size: 11.5px;
  color: rgba(255,255,255,.38);
}

.kx-util-right a {
  color: rgba(255,255,255,.48);
  text-decoration: none;
  transition: color .15s;
}

.kx-util-right a:hover { color: rgba(255,255,255,.85); }

.kx-util-sep { color: rgba(255,255,255,.15); }

/* ============================================================
   MAIN NAV BAR
   ============================================================ */
.kx-navbar {
  background: var(--kx-navy);
  height: var(--kx-nav-h);
  display: flex;
  align-items: center;
  position: relative;
  z-index: 200;
  box-shadow: 0 2px 20px rgba(7,29,48,.3);
  width: 100%;
}

.kx-navbar__inner {
  width: 100%;
  max-width: var(--kx-max-wide);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo block */
.kx-logo-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  flex-shrink: 0;
}

.kx-logo-block:hover { text-decoration: none; }

.kx-logo-block img {
  height: 42px;
  width: auto;
  display: block;
}

.kx-logo-tagline {
  font-family: var(--kx-font-b);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  white-space: nowrap;
  line-height: 1;
}

/* Primary nav list */
.kx-nav {
  display: flex;
  align-items: center;
  list-style: none !important;
  gap: 2px;
  margin: 0 !important;
  padding: 0 !important;
  flex: 1;
  justify-content: center;
}

.kx-nav > li {
  position: relative;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.kx-nav > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--kx-font-b);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.82) !important;
  text-decoration: none !important;
  padding: 8px 13px;
  border-radius: var(--kx-radius-sm);
  white-space: nowrap;
  transition: color .15s, background .15s;
  letter-spacing: .01em;
  background: none !important;
}

.kx-nav > li > a:hover {
  color: var(--kx-white) !important;
  background: rgba(255,255,255,.08) !important;
}

.kx-nav > li.has-dropdown > a::after {
  content: '';
  display: block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid rgba(255,255,255,.38);
  margin-left: 2px;
  transition: transform .2s, border-top-color .15s;
  flex-shrink: 0;
}

.kx-nav > li.has-dropdown:hover > a::after {
  transform: rotate(180deg);
  border-top-color: var(--kx-teal);
}

/* ============================================================
   DROPDOWN MENUS
   ============================================================ */
.kx-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--kx-navy-deep);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--kx-radius);
  min-width: 220px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s, transform .18s, visibility .18s;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  z-index: 400;
  list-style: none !important;
  margin: 0 !important;
}

.kx-dropdown::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid rgba(255,255,255,.08);
}

.kx-dropdown::after {
  content: '';
  position: absolute;
  top: -5px; left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid var(--kx-navy-deep);
}

.kx-nav > li.has-dropdown:hover .kx-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.kx-dropdown li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.kx-dropdown li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-family: var(--kx-font-b);
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,.75) !important;
  text-decoration: none !important;
  border-radius: var(--kx-radius-sm);
  transition: background .12s, color .12s;
  white-space: nowrap;
  background: none !important;
}

.kx-dropdown li a:hover {
  background: rgba(103,196,184,.12) !important;
  color: var(--kx-white) !important;
}

.kx-dropdown li a::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 2px;
  background: var(--kx-teal);
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .15s, transform .15s, width .15s;
}

.kx-dropdown li a:hover::before {
  opacity: 1;
  transform: translateX(0);
  width: 16px;
}

.kx-dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: 6px 8px;
  list-style: none !important;
}

.kx-dropdown-label {
  font-family: var(--kx-font-b);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--kx-teal);
  padding: 8px 14px 4px;
  list-style: none !important;
}

/* Wide two-column dropdown for Conditions */
.kx-dropdown--wide {
  min-width: 400px;
  left: 0;
  transform: translateX(-15%) translateY(-6px);
}

.kx-nav > li.has-dropdown:hover .kx-dropdown--wide {
  transform: translateX(-15%) translateY(0);
}

.kx-dropdown--wide::before,
.kx-dropdown--wide::after { left: 25%; }

.kx-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

/* ============================================================
   BOOK ONLINE CTA BUTTON
   ============================================================ */
.kx-nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.kx-btn-book {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--kx-teal) !important;
  color: var(--kx-navy-deep) !important;
  font-family: var(--kx-font-b) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 10px 22px;
  border-radius: var(--kx-radius-sm);
  text-decoration: none !important;
  white-space: nowrap;
  letter-spacing: .01em;
  transition: background .15s, box-shadow .15s, transform .15s;
  box-shadow: 0 3px 12px rgba(103,196,184,.3);
  border: none !important;
}

.kx-btn-book:hover {
  background: var(--kx-teal-dark) !important;
  box-shadow: 0 5px 20px rgba(103,196,184,.45) !important;
  transform: translateY(-1px);
  color: var(--kx-navy-deep) !important;
  text-decoration: none !important;
}

/* ============================================================
   STICKY HEADER + SCROLL COMPRESSION
   ============================================================ */
.kx-site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  width: 100%;
}

.kx-site-header.is-scrolled .kx-util-bar {
  height: 0;
  overflow: hidden;
  transition: height .25s ease;
}

.kx-site-header.is-scrolled .kx-navbar {
  height: 60px;
  box-shadow: 0 2px 24px rgba(7,29,48,.45);
  transition: height .25s ease, box-shadow .25s ease;
}

.kx-site-header.is-scrolled .kx-logo-tagline {
  opacity: 0;
  transition: opacity .2s;
}

/* ============================================================
   MOBILE HAMBURGER
   ============================================================ */
.kx-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  border-radius: var(--kx-radius-sm);
  transition: background .15s;
}

.kx-hamburger:hover { background: rgba(255,255,255,.08); }

.kx-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--kx-white);
  border-radius: 2px;
  transition: transform .22s, opacity .22s;
}

.kx-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.kx-hamburger.is-open span:nth-child(2) { opacity: 0; }
.kx-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.kx-mobile-tel {
  display: none;
  align-items: center;
  gap: 6px;
  font-family: var(--kx-font-b);
  font-size: 13px;
  font-weight: 700;
  color: var(--kx-teal) !important;
  text-decoration: none !important;
}

/* ============================================================
   MOBILE DRAWER
   ============================================================ */
.kx-mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--kx-navy-deep);
  z-index: 999;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  -webkit-overflow-scrolling: touch;
}

.kx-mobile-menu.is-open {
  transform: translateX(0);
}

.kx-mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: var(--kx-navy);
  position: sticky;
  top: 0;
  z-index: 10;
}

.kx-mobile-menu__close {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 6px 10px;
  border-radius: var(--kx-radius-sm);
  transition: color .15s, background .15s;
}

.kx-mobile-menu__close:hover {
  color: var(--kx-white);
  background: rgba(255,255,255,.08);
}

.kx-mobile-book-strip {
  background: var(--kx-teal);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kx-mobile-book-strip a {
  font-family: var(--kx-font-b);
  font-weight: 700;
  text-decoration: none !important;
  color: var(--kx-navy-deep) !important;
}

.kx-mobile-book-strip a:first-child { font-size: 15px; }
.kx-mobile-book-strip a:last-child  { font-size: 13px; opacity: .75; }

.kx-mobile-nav {
  list-style: none !important;
  padding: 10px 0 !important;
  margin: 0 !important;
}

.kx-mobile-nav > li {
  border-bottom: 1px solid rgba(255,255,255,.05);
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.kx-mobile-nav > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  font-family: var(--kx-font-b);
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,.88) !important;
  text-decoration: none !important;
  transition: color .15s;
}

.kx-mobile-nav > li > a:hover { color: var(--kx-teal) !important; }

.kx-mobile-subnav {
  list-style: none !important;
  padding: 0 0 8px !important;
  margin: 0 !important;
  background: rgba(0,0,0,.15);
}

.kx-mobile-subnav li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.kx-mobile-subnav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 24px 11px 36px;
  font-family: var(--kx-font-b);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.6) !important;
  text-decoration: none !important;
  transition: color .15s;
}

.kx-mobile-subnav li a::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 2px;
  background: var(--kx-teal);
  flex-shrink: 0;
}

.kx-mobile-subnav li a:hover { color: rgba(255,255,255,.9) !important; }

.kx-mobile-info {
  padding: 24px;
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: 8px;
}

.kx-mobile-info p {
  font-family: var(--kx-font-b);
  font-size: 13px;
  color: rgba(255,255,255,.45);
  line-height: 1.6;
  margin-bottom: 4px;
}

.kx-mobile-info strong { color: rgba(255,255,255,.75); }

/* Mobile overlay */
.kx-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 998;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ============================================================
   GLOBAL BUTTONS
   ============================================================ */
.kx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--kx-radius-sm);
  font-family: var(--kx-font-b);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s;
  line-height: 1;
}

.kx-btn:hover { transform: translateY(-2px); text-decoration: none; }

.kx-btn--primary {
  background: var(--kx-teal);
  color: var(--kx-navy-deep);
  box-shadow: 0 4px 20px rgba(103,196,184,.3);
}

.kx-btn--primary:hover {
  background: var(--kx-teal-dark);
  box-shadow: 0 6px 28px rgba(103,196,184,.45);
  color: var(--kx-navy-deep);
}

.kx-btn--outline-light {
  background: transparent;
  border: 2px solid rgba(255,255,255,.28);
  color: var(--kx-white);
}

.kx-btn--outline-light:hover {
  border-color: rgba(255,255,255,.65);
  color: var(--kx-white);
}

.kx-btn--outline-dark {
  background: transparent;
  border: 2px solid var(--kx-navy);
  color: var(--kx-navy);
}

.kx-btn--outline-dark:hover {
  background: var(--kx-navy);
  color: var(--kx-white);
}

.kx-btn--sm { padding: 9px 18px; font-size: 13px; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.kx-breadcrumb {
  background: var(--kx-bg-off);
  border-bottom: 1px solid var(--kx-border);
  padding: 10px 0;
}

.kx-breadcrumb__inner {
  max-width: var(--kx-max);
  margin: 0 auto;
  padding: 0 24px;
  font-size: 13px;
  color: var(--kx-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.kx-breadcrumb__inner a {
  color: var(--kx-blue);
  font-weight: 500;
}

.kx-breadcrumb__sep { color: var(--kx-border); }
.kx-breadcrumb__current { color: var(--kx-navy); font-weight: 600; }

/* ============================================================
   EYEBROW / SECTION LABELS
   ============================================================ */
.kx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--kx-font-b);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--kx-teal);
  margin-bottom: 14px;
}

.kx-eyebrow--light { color: var(--kx-teal); }
.kx-eyebrow--dark  { color: var(--kx-teal-dark); }

.kx-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  flex-shrink: 0;
}

.kx-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--kx-teal-dark);
  margin-bottom: 6px;
}

.kx-section-title {
  font-family: var(--kx-font-h);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--kx-navy);
  line-height: 1.2;
  margin-bottom: 20px;
}

/* ============================================================
   TRUST / CREDENTIAL BAR (reusable)
   ============================================================ */
.kx-trust-bar {
  background: var(--kx-navy);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 16px 24px;
}

.kx-trust-bar__inner {
  max-width: var(--kx-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}

.kx-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--kx-font-b);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.78);
  white-space: nowrap;
}

.kx-trust-item::before {
  content: '✓';
  color: var(--kx-teal);
  font-size: 12px;
  font-weight: 700;
}

/* ============================================================
   BADGE ROW (hero credential badges)
   ============================================================ */
.kx-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.kx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(103,196,184,.28);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--kx-font-b);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  letter-spacing: .02em;
}

.kx-badge::before {
  content: '✓';
  color: var(--kx-teal);
  font-size: 11px;
}

/* ============================================================
   CARD GRIDS (internal linking patterns)
   ============================================================ */
.kx-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.kx-card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.kx-card-grid--4 { grid-template-columns: repeat(4, 1fr); }

.kx-link-card {
  background: var(--kx-white);
  border: 1px solid var(--kx-border);
  border-radius: var(--kx-radius);
  padding: 24px;
  text-decoration: none;
  display: block;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.kx-link-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--kx-shadow-md);
  border-color: var(--kx-teal);
  text-decoration: none;
}

.kx-link-card__type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--kx-teal-dark);
  margin-bottom: 8px;
}

.kx-link-card__title {
  font-family: var(--kx-font-h);
  font-size: 1.05rem;
  color: var(--kx-navy);
  margin-bottom: 8px;
  line-height: 1.3;
}

.kx-link-card__desc {
  font-size: .88rem;
  color: var(--kx-muted);
  line-height: 1.55;
}

.kx-link-card__arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--kx-blue);
  margin-top: 14px;
}

/* Condition chips */
.kx-condition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}

.kx-condition-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--kx-bg-off);
  border: 1px solid var(--kx-border);
  border-radius: var(--kx-radius);
  font-family: var(--kx-font-b);
  font-size: .9rem;
  font-weight: 600;
  color: var(--kx-navy);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.kx-condition-chip:hover {
  background: var(--kx-teal-pale);
  border-color: var(--kx-teal);
  color: var(--kx-navy);
  text-decoration: none;
}

.kx-condition-chip::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 2px;
  background: var(--kx-teal);
  flex-shrink: 0;
}

/* Service chips */
.kx-service-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}

.kx-service-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--kx-navy);
  border-radius: var(--kx-radius-sm);
  font-family: var(--kx-font-b);
  font-size: .88rem;
  font-weight: 700;
  color: var(--kx-white);
  text-decoration: none;
  transition: background .15s;
}

.kx-service-chip:hover {
  background: var(--kx-mid);
  color: var(--kx-white);
  text-decoration: none;
}

.kx-service-chip::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 2px;
  background: var(--kx-teal);
  flex-shrink: 0;
}

/* ============================================================
   HIGHLIGHT / CALLOUT BLOCKS
   ============================================================ */
.kx-highlight {
  background: var(--kx-teal-pale);
  border-left: 4px solid var(--kx-teal);
  border-radius: 0 var(--kx-radius) var(--kx-radius) 0;
  padding: 20px 24px;
  margin: 28px 0;
}

.kx-highlight p {
  margin: 0;
  color: var(--kx-navy);
  font-weight: 500;
}

.kx-callout {
  background: var(--kx-teal-pale);
  border-left: 4px solid var(--kx-teal);
  border-radius: 0 var(--kx-radius) var(--kx-radius) 0;
  padding: 22px 26px;
  margin: 32px 0;
}

.kx-callout__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--kx-teal-dark);
  margin-bottom: 8px;
}

.kx-callout p { margin: 0; color: var(--kx-navy); font-weight: 500; }

.kx-symptom-block {
  background: var(--kx-red-pale);
  border: 1px solid #f5c6c2;
  border-left: 4px solid var(--kx-red);
  border-radius: 0 var(--kx-radius) var(--kx-radius) 0;
  padding: 20px 24px;
  margin: 24px 0;
}

.kx-symptom-block__title {
  font-weight: 700;
  color: var(--kx-red);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.kx-symptom-block ul { color: #7a2b24; padding-left: 18px; margin: 0; }
.kx-symptom-block li { margin-bottom: 5px; font-size: .95rem; }

/* ============================================================
   SIDEBAR COMPONENTS
   ============================================================ */
.kx-sidebar { display: flex; flex-direction: column; gap: 24px; }

.kx-book-card {
  background: var(--kx-navy);
  border-radius: var(--kx-radius);
  padding: 28px 24px;
  text-align: center;
}

.kx-book-card--sticky { position: sticky; top: 88px; }

.kx-book-card h3 {
  font-family: var(--kx-font-h);
  font-size: 1.25rem;
  color: var(--kx-white);
  margin-bottom: 10px;
}

.kx-book-card p {
  font-size: .88rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 20px;
  line-height: 1.6;
}

.kx-book-card .kx-btn--primary {
  width: 100%;
  justify-content: center;
  margin-bottom: 10px;
}

.kx-book-tel {
  display: block;
  color: rgba(255,255,255,.72);
  font-weight: 600;
  font-size: .9rem;
  margin-top: 8px;
  text-decoration: none;
}

.kx-book-tel:hover { color: var(--kx-teal); }

.kx-nav-card {
  background: var(--kx-bg-off);
  border: 1px solid var(--kx-border);
  border-radius: var(--kx-radius);
  overflow: hidden;
}

.kx-nav-card__head {
  background: var(--kx-navy);
  padding: 13px 18px;
  font-family: var(--kx-font-b);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--kx-teal);
}

.kx-nav-card__list { list-style: none !important; margin: 0 !important; padding: 0 !important; }

.kx-nav-card__list li {
  border-bottom: 1px solid var(--kx-border);
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.kx-nav-card__list li:last-child { border-bottom: none; }

.kx-nav-card__list a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  font-family: var(--kx-font-b);
  font-size: .88rem;
  font-weight: 600;
  color: var(--kx-navy) !important;
  text-decoration: none !important;
  transition: background .12s;
}

.kx-nav-card__list a:hover { background: var(--kx-teal-pale); }
.kx-nav-card__list a.active { background: var(--kx-teal-pale); border-left: 3px solid var(--kx-teal); }

.kx-nav-card__list a::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 2px;
  background: var(--kx-teal);
  flex-shrink: 0;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.kx-faq { max-width: 780px; }

.kx-faq-item {
  border: 1px solid var(--kx-border);
  border-radius: var(--kx-radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.kx-faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 20px;
  font-family: var(--kx-font-b);
  font-weight: 700;
  font-size: .97rem;
  color: var(--kx-navy);
  cursor: pointer;
  list-style: none;
  background: var(--kx-bg-off);
  transition: background .12s;
  user-select: none;
}

.kx-faq-item summary::-webkit-details-marker { display: none; }

.kx-faq-item summary:hover,
.kx-faq-item[open] summary { background: var(--kx-teal-pale); }

.kx-faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--kx-teal);
  line-height: 1;
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform .2s;
}

.kx-faq-item[open] summary::after { content: '\2212'; }

.kx-faq-item__body {
  padding: 18px 20px;
  font-size: .93rem;
  color: var(--kx-mid);
  line-height: 1.75;
  background: var(--kx-white);
}

.kx-faq-item__body p { margin: 0; }
.kx-faq-item__body a { color: var(--kx-blue); font-weight: 600; }

/* ============================================================
   BOTTOM CTA SECTION
   ============================================================ */
.kx-bottom-cta {
  background: linear-gradient(135deg, var(--kx-navy-deep) 0%, #0d3a5e 100%);
  padding: 72px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.kx-bottom-cta::before {
  content: '';
  position: absolute;
  bottom: -80px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(103,196,184,.1) 0%, transparent 70%);
  pointer-events: none;
}

.kx-bottom-cta__inner {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.kx-bottom-cta h2 {
  font-family: var(--kx-font-h);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--kx-white);
  margin-bottom: 14px;
  line-height: 1.2;
}

.kx-bottom-cta p {
  color: rgba(255,255,255,.72);
  font-size: 1.05rem;
  margin-bottom: 32px;
  line-height: 1.7;
}

.kx-btn-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.kx-location-note {
  margin-top: 24px;
  font-size: .82rem;
  color: rgba(255,255,255,.35);
}

/* ============================================================
   PAGE LAYOUT PATTERNS
   ============================================================ */

/* Two-column: prose + sidebar */
.kx-page-body {
  max-width: var(--kx-max);
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

/* Related content section wrapper */
.kx-related-section {
  background: var(--kx-bg-off);
  padding: 56px 24px;
  border-top: 1px solid var(--kx-border);
}

.kx-related-section__inner {
  max-width: var(--kx-max);
  margin: 0 auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.kx-footer {
  background: var(--kx-navy-deep);
  padding: 64px 24px 32px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.kx-footer__grid {
  max-width: var(--kx-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.kx-footer__brand p {
  font-size: .88rem;
  color: rgba(255,255,255,.5);
  line-height: 1.7;
  margin-top: 16px;
  max-width: 280px;
}

.kx-footer__col-title {
  font-family: var(--kx-font-b);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--kx-teal);
  margin-bottom: 16px;
}

.kx-footer__links {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kx-footer__links li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  color: rgba(255,255,255,.5);
}

.kx-footer__links a {
  font-family: var(--kx-font-b);
  font-size: .88rem;
  text-decoration: none;
  transition: color .15s;
}

.kx-footer__links a:hover { color: rgba(255,255,255,.9); }

.kx-footer__bottom {
  max-width: var(--kx-max);
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--kx-font-b);
  font-size: 12px;
  color: rgba(255,255,255,.3);
}

.kx-footer__bottom a { color: rgba(255,255,255,.45); text-decoration: none; }
.kx-footer__bottom a:hover { color: rgba(255,255,255,.8); }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1020px) {
  .kx-nav > li > a { padding: 8px 10px; font-size: 13px; }
  .kx-btn-book { padding: 9px 16px; font-size: 13px; }
  .kx-util-hours { display: none; }
  .kx-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 840px) {
  .kx-nav { display: none !important; }
  .kx-btn-book { display: none !important; }
  .kx-hamburger { display: flex; }
  .kx-mobile-tel { display: flex; }
  .kx-mobile-menu { display: block; }
  .kx-util-bar .kx-util-right { display: none; }
  .kx-logo-tagline { display: none; }
  .kx-page-body { grid-template-columns: 1fr; padding: 40px 20px; }
  .kx-sidebar { order: -1; }
  .kx-book-card--sticky { position: static; }
  .kx-card-grid { grid-template-columns: 1fr 1fr; }
  .kx-card-grid--4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .kx-navbar__inner { padding: 0 16px; }
  .kx-util-bar__inner { padding: 0 16px; }
  .kx-logo-block img { height: 36px; }
  .kx-util-item--location { display: none; }
  .kx-card-grid { grid-template-columns: 1fr; }
  .kx-condition-grid { grid-template-columns: 1fr; }
  .kx-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .kx-bottom-cta { padding: 48px 20px; }
  .kx-btn-group { flex-direction: column; align-items: center; }
}

/* ============================================================
   TEMPLATE-SPECIFIC STYLES
   Added for PHP page templates
   ============================================================ */

/* Service hero — dark full-width */
.kx-service-hero {
  background: var(--kx-navy-deep);
  padding: 72px 24px 64px;
  position: relative;
  overflow: hidden;
}

.kx-service-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--kx-navy-deep) 60%, #0d3a5e 100%);
}

.kx-service-hero::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(103,196,184,.1) 0%, transparent 70%);
}

.kx-service-hero__inner {
  max-width: var(--kx-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.kx-service-hero h1 {
  font-family: var(--kx-font-h);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--kx-white);
  line-height: 1.15;
  max-width: 720px;
  margin-bottom: 20px;
}

.kx-service-hero h1 em {
  font-style: italic;
  color: var(--kx-teal);
}

.kx-service-hero__lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,.78);
  max-width: 640px;
  margin-bottom: 32px;
  line-height: 1.75;
}

/* Condition hero */
.kx-condition-hero {
  background: var(--kx-navy);
  padding: 64px 24px 56px;
  position: relative;
  overflow: hidden;
}

.kx-condition-hero__inner {
  max-width: var(--kx-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

.kx-condition-hero h1 {
  font-family: var(--kx-font-h);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--kx-white);
  line-height: 1.15;
  margin-bottom: 16px;
}

.kx-condition-hero h1 em {
  font-style: italic;
  color: var(--kx-teal);
}

.kx-condition-hero__lead {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  max-width: 600px;
  margin-bottom: 28px;
  line-height: 1.75;
}

.kx-hero-stat-box {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--kx-radius);
  padding: 24px 28px;
  min-width: 200px;
  text-align: center;
  flex-shrink: 0;
}

.kx-hero-stat {
  font-family: var(--kx-font-h);
  font-size: 2.4rem;
  color: var(--kx-teal);
  display: block;
  line-height: 1;
}

.kx-hero-stat-label {
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  margin-top: 6px;
  line-height: 1.4;
}

/* Post header */
.kx-post-header {
  background: var(--kx-navy);
  padding: 56px 24px 48px;
  position: relative;
  overflow: hidden;
}

.kx-post-header__inner {
  max-width: var(--kx-max-prose);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.kx-post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.kx-post-category {
  display: inline-flex;
  align-items: center;
  background: rgba(103,196,184,.15);
  border: 1px solid rgba(103,196,184,.3);
  color: var(--kx-teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  text-decoration: none;
}

.kx-post-date,
.kx-post-read-time {
  font-size: 13px;
  color: rgba(255,255,255,.42);
}

.kx-post-header h1 {
  font-family: var(--kx-font-h);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  color: var(--kx-white);
  line-height: 1.18;
  margin-bottom: 18px;
}

.kx-post-header__lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  line-height: 1.7;
  margin-bottom: 24px;
}

.kx-author-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.kx-author-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--kx-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kx-author-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.kx-author-name {
  font-weight: 700;
  color: var(--kx-white);
  font-size: .95rem;
}

.kx-author-creds {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  margin-top: 3px;
  line-height: 1.4;
}

/* Post body layout */
.kx-post-body {
  max-width: var(--kx-max);
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
}

/* Post tags */
.kx-post-tags {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--kx-border);
}

.kx-post-tags__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--kx-muted);
  margin-bottom: 12px;
}

.kx-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kx-tag {
  display: inline-block;
  padding: 5px 12px;
  background: var(--kx-bg-off);
  border: 1px solid var(--kx-border);
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--kx-mid);
  text-decoration: none;
  transition: background .12s;
}

.kx-tag:hover {
  background: var(--kx-teal-pale);
  color: var(--kx-navy);
  text-decoration: none;
}

/* Related posts grid */
.kx-related-posts {
  background: var(--kx-bg-off);
  padding: 56px 24px;
  border-top: 1px solid var(--kx-border);
}

.kx-related-posts__inner {
  max-width: var(--kx-max);
  margin: 0 auto;
}

.kx-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.kx-post-card {
  background: var(--kx-white);
  border: 1px solid var(--kx-border);
  border-radius: var(--kx-radius);
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform .15s, box-shadow .15s;
}

.kx-post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--kx-shadow-md);
  text-decoration: none;
}

.kx-post-card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.kx-post-card__body { padding: 20px; }

.kx-post-card__category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--kx-teal-dark);
  margin-bottom: 8px;
}

.kx-post-card__title {
  font-family: var(--kx-font-h);
  font-size: 1rem;
  color: var(--kx-navy);
  line-height: 1.3;
  margin-bottom: 7px;
}

.kx-post-card__desc {
  font-size: .84rem;
  color: var(--kx-muted);
  line-height: 1.5;
}

.kx-post-card__arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--kx-blue);
  margin-top: 12px;
}

/* Featured image */
.kx-featured-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* Template wrapper — removes Kadence default padding */
.kx-template-wrap {
  width: 100%;
}

.kx-main-content {
  min-width: 0;
}

/* Kadence content area resets for templates */
.kx-template-wrap .entry-content,
.kx-template-wrap .post-content {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* Override any Kadence padding on the content area */
.content-bg,
.site-content .content-container,
.site-content #inner-wrap {
  padding: 0 !important;
  margin: 0 !important;
}

/* ============================================================
   TEMPLATE RESPONSIVE ADDITIONS
   ============================================================ */
@media (max-width: 900px) {
  .kx-condition-hero__inner {
    grid-template-columns: 1fr;
  }
  .kx-hero-stat-box { display: none; }
  .kx-post-body {
    grid-template-columns: 1fr;
    padding: 40px 20px;
    gap: 40px;
  }
  .kx-post-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .kx-service-hero { padding: 48px 20px 40px; }
  .kx-condition-hero { padding: 48px 20px 40px; }
  .kx-post-header { padding: 40px 20px 36px; }
  .kx-post-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   DEFINITIVE KADENCE OVERRIDE
   Fixes: content left-aligned, max-width constraints,
   Kadence wrapper padding, article backgrounds.
   Applied only on our custom template pages.
   ============================================================ */

/* Target all three template body classes */
body.page-template-template-service,
body.page-template-template-condition,
body.page-template-template-blog {
  background: #ffffff;
}

/* Remove ALL Kadence content constraints on template pages */
body.page-template-template-service .site,
body.page-template-template-service .site-content,
body.page-template-template-service #content,
body.page-template-template-service #primary,
body.page-template-template-service .content-container,
body.page-template-template-service .inner-wrap,
body.page-template-template-service #inner-wrap,
body.page-template-template-service .kadence-content-wrap,
body.page-template-template-service .singular-content-wrap,
body.page-template-template-service .entry-content,
body.page-template-template-service .wp-block-post-content,
body.page-template-template-condition .site,
body.page-template-template-condition .site-content,
body.page-template-template-condition #content,
body.page-template-template-condition #primary,
body.page-template-template-condition .content-container,
body.page-template-template-condition .inner-wrap,
body.page-template-template-condition #inner-wrap,
body.page-template-template-condition .kadence-content-wrap,
body.page-template-template-condition .singular-content-wrap,
body.page-template-template-condition .entry-content,
body.page-template-template-condition .wp-block-post-content,
body.page-template-template-blog .site,
body.page-template-template-blog .site-content,
body.page-template-template-blog #content,
body.page-template-template-blog #primary,
body.page-template-template-blog .content-container,
body.page-template-template-blog .inner-wrap,
body.page-template-template-blog #inner-wrap,
body.page-template-template-blog .kadence-content-wrap,
body.page-template-template-blog .singular-content-wrap,
body.page-template-template-blog .entry-content,
body.page-template-template-blog .wp-block-post-content {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Remove article/entry backgrounds and padding */
body.page-template-template-service article.page,
body.page-template-template-service .entry-header,
body.page-template-template-service .entry-footer,
body.page-template-template-condition article.page,
body.page-template-template-condition .entry-header,
body.page-template-template-condition .entry-footer,
body.page-template-template-blog article,
body.page-template-template-blog .entry-header,
body.page-template-template-blog .entry-footer {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: none !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* Hide Kadence page title — our template renders its own hero */
body.page-template-template-service .entry-header .entry-title,
body.page-template-template-service .page-title,
body.page-template-template-condition .entry-header .entry-title,
body.page-template-template-condition .page-title {
  display: none !important;
}

/* Kill Gutenberg block constraints on template pages */
body.page-template-template-service .wp-block-columns,
body.page-template-template-service .wp-block-column,
body.page-template-template-service [class*="wp-container-core"],
body.page-template-template-service .is-layout-flex,
body.page-template-template-service .is-layout-flow,
body.page-template-template-condition .wp-block-columns,
body.page-template-template-condition .wp-block-column,
body.page-template-template-condition [class*="wp-container-core"],
body.page-template-template-condition .is-layout-flex,
body.page-template-template-condition .is-layout-flow,
body.page-template-template-blog .wp-block-columns,
body.page-template-template-blog .wp-block-column,
body.page-template-template-blog [class*="wp-container-core"],
body.page-template-template-blog .is-layout-flex,
body.page-template-template-blog .is-layout-flow {
  display: block !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  flex-wrap: unset !important;
}

/* Our layout grid — re-assert after all resets */
body.page-template-template-service .kx-page-body,
body.page-template-template-condition .kx-page-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 320px !important;
  gap: 48px !important;
  max-width: 1100px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 64px 24px !important;
  box-sizing: border-box !important;
  align-items: start !important;
}

body.page-template-template-blog .kx-post-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px !important;
  gap: 56px !important;
  max-width: 1100px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 56px 24px !important;
  box-sizing: border-box !important;
  align-items: start !important;
}

/* Main content column */
.kx-page-body > .kx-main-content,
.kx-post-body > main {
  grid-column: 1 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: auto !important;
  overflow-wrap: break-word !important;
}

/* Sidebar column */
.kx-page-body > .kx-sidebar,
.kx-post-body > .kx-sidebar {
  grid-column: 2 !important;
  min-width: 0 !important;
}

/* Section wrappers — full width */
.kx-template-wrap > section,
.kx-template-wrap > div,
.kx-related-section,
.kx-bottom-cta,
.kx-trust-bar,
.kx-service-hero,
.kx-condition-hero,
.kx-post-header,
.kx-breadcrumb,
.kx-related-posts {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Inner containers — centered with max width */
.kx-service-hero__inner,
.kx-condition-hero__inner,
.kx-related-section__inner,
.kx-related-posts__inner,
.kx-bottom-cta__inner,
.kx-trust-bar__inner,
.kx-breadcrumb__inner,
.kx-post-header__inner,
.kx-faq-section__inner {
  max-width: 1100px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Mobile responsive */
@media (max-width: 900px) {
  body.page-template-template-service .kx-page-body,
  body.page-template-template-condition .kx-page-body,
  body.page-template-template-blog .kx-post-body {
    grid-template-columns: 1fr !important;
    padding: 40px 20px !important;
    gap: 32px !important;
  }

  .kx-page-body > .kx-sidebar,
  .kx-post-body > .kx-sidebar {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .kx-page-body > .kx-main-content,
  .kx-post-body > main {
    grid-row: 2 !important;
  }
}

/* ============================================================
   BIO PAGE TEMPLATE
   ============================================================ */

/* Bio hero — two column, photo right */
.kx-bio-hero {
  background: var(--kx-navy-deep);
  padding: 72px 24px 64px;
  position: relative;
  overflow: hidden;
}

.kx-bio-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--kx-navy-deep) 50%, #0d3a5e 100%);
  z-index: 0;
}

.kx-bio-hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(103,196,184,.1) 0%, transparent 65%);
  z-index: 0;
}

.kx-bio-hero__inner {
  max-width: var(--kx-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 64px;
  align-items: center;
}

.kx-bio-hero__content { min-width: 0; }

.kx-bio-hero h1 {
  font-family: var(--kx-font-h);
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--kx-white);
  line-height: 1.1;
  margin-bottom: 14px;
}

.kx-bio-hero h1 em {
  font-style: italic;
  color: var(--kx-teal);
}

.kx-bio-hero__creds {
  font-family: var(--kx-font-b);
  font-size: .9rem;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  letter-spacing: .04em;
  margin-bottom: 20px;
  line-height: 1.5;
}

.kx-bio-hero__lead {
  font-size: 1.05rem;
  color: rgba(255,255,255,.78);
  max-width: 580px;
  margin-bottom: 28px;
  line-height: 1.75;
}

/* Photo column */
.kx-bio-hero__photo-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kx-bio-hero__photo-wrap {
  border-radius: var(--kx-radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.08);
}

.kx-bio-hero__photo-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Quick stats under photo */
.kx-bio-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kx-bio-stat {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--kx-radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kx-bio-stat__value {
  font-family: var(--kx-font-h);
  font-size: 1.4rem;
  color: var(--kx-teal);
  line-height: 1;
}

.kx-bio-stat__label {
  font-family: var(--kx-font-b);
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  line-height: 1.4;
  font-weight: 500;
}

/* Bio content wrapper — centers and constrains the Gutenberg content */
.kx-bio-content-wrap {
  width: 100%;
  background: var(--kx-white);
}

.kx-bio-content {
  max-width: var(--kx-max);
  width: 100%;
  margin: 0 auto;
  padding: 64px 24px;
  box-sizing: border-box;
}

/* Allow Gutenberg blocks inside bio content to go full width when needed */
.kx-bio-content .wp-block-group.alignfull,
.kx-bio-content .wp-block-cover.alignfull {
  max-width: 100vw !important;
  width: 100vw !important;
  margin-left: calc(-1 * ((100vw - 100%) / 2)) !important;
  margin-right: calc(-1 * ((100vw - 100%) / 2)) !important;
}

/* Gutenberg column blocks inside bio — restore normal behavior */
.kx-bio-content .wp-block-columns {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 24px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 24px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.kx-bio-content .wp-block-column {
  flex: 1 !important;
  min-width: 240px !important;
  max-width: 100% !important;
  padding: inherit !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Restore wp:group padding inside bio content */
.kx-bio-content .wp-block-group {
  box-sizing: border-box !important;
}

/* Kadence color palette variables for bio page */
body.page-template-template-bio {
  --wp--preset--color--base:            #ffffff;
  --wp--preset--color--contrast:        #0f2b44;
  --wp--preset--color--primary:         #5a99d2;
  --wp--preset--color--secondary:       #67c4b8;
  --wp--preset--color--tertiary:        #dce8f0;
  --wp--preset--color--theme-palette1:  #0f2b44;
  --wp--preset--color--theme-palette2:  #071d30;
  --wp--preset--color--theme-palette3:  #5a99d2;
  --wp--preset--color--theme-palette4:  #67c4b8;
  --wp--preset--color--theme-palette5:  #4da89c;
  --wp--preset--color--theme-palette6:  #dce8f0;
  --wp--preset--color--theme-palette7:  #67c4b8;
  --wp--preset--color--theme-palette8:  #f4f8fb;
  --wp--preset--color--theme-palette9:  rgba(255,255,255,.75);
}

/* Bio page — remove all Kadence wrappers */
body.page-template-template-bio .site-content,
body.page-template-template-bio #primary,
body.page-template-template-bio #content,
body.page-template-template-bio .content-container,
body.page-template-template-bio #inner-wrap,
body.page-template-template-bio .inner-wrap,
body.page-template-template-bio .entry-content,
body.page-template-template-bio .wp-block-post-content,
body.page-template-template-bio article.page,
body.page-template-template-bio .site-main {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Hide Kadence auto title on bio page */
body.page-template-template-bio .entry-header {
  display: none !important;
}

/* ============================================================
   FULL WIDTH / DEFAULT TEMPLATE FIXES
   For all redesigned pages on Default or Full Width template
   ============================================================ */

/* Kadence color palette — defined globally so ALL pages get it */
:root {
  --wp--preset--color--base:            #ffffff;
  --wp--preset--color--contrast:        #0f2b44;
  --wp--preset--color--primary:         #5a99d2;
  --wp--preset--color--secondary:       #67c4b8;
  --wp--preset--color--tertiary:        #dce8f0;
  --wp--preset--color--theme-palette1:  #0f2b44;
  --wp--preset--color--theme-palette2:  #071d30;
  --wp--preset--color--theme-palette3:  #5a99d2;
  --wp--preset--color--theme-palette4:  #67c4b8;
  --wp--preset--color--theme-palette5:  #4da89c;
  --wp--preset--color--theme-palette6:  #dce8f0;
  --wp--preset--color--theme-palette7:  #67c4b8;
  --wp--preset--color--theme-palette8:  #f4f8fb;
  --wp--preset--color--theme-palette9:  rgba(255,255,255,.75);
  --wp--preset--font-size--small:       0.875rem;
  --wp--preset--font-size--medium:      1rem;
  --wp--preset--font-size--large:       1.5rem;
  --wp--preset--font-size--x-large:     2rem;
  --wp--preset--font-size--xx-large:    2.5rem;
}

/* Palette helper classes */
.has-base-background-color       { background-color: #ffffff !important; }
.has-base-color                  { color: #ffffff !important; }
.has-contrast-background-color   { background-color: #0f2b44 !important; }
.has-contrast-color              { color: #0f2b44 !important; }
.has-primary-background-color    { background-color: #5a99d2 !important; }
.has-secondary-background-color  { background-color: #67c4b8 !important; }
.has-tertiary-background-color   { background-color: #dce8f0 !important; }
.has-tertiary-color              { color: #dce8f0 !important; }
.has-theme-palette-1-background-color { background-color: #0f2b44 !important; }
.has-theme-palette-2-background-color { background-color: #071d30 !important; }
.has-theme-palette-7-color       { color: #67c4b8 !important; }
.has-theme-palette-8-background-color { background-color: #f4f8fb !important; }
.has-theme-palette-9-color       { color: rgba(255,255,255,.75) !important; }

/* Full width / default page wrappers */
.page-template-default .site-content,
.page-template-default #primary,
.page-template-default #content,
.page-template-default .content-container,
.page-template-default .inner-wrap,
.page-template-default #inner-wrap,
.page-template-default .entry-content,
.page-template-default .wp-block-post-content,
.page-template-default article.page,
.page-template-default .site-main,
.page-template-full-width .site-content,
.page-template-full-width #primary,
.page-template-full-width #content,
.page-template-full-width .content-container,
.page-template-full-width .inner-wrap,
.page-template-full-width #inner-wrap,
.page-template-full-width .entry-content,
.page-template-full-width .wp-block-post-content,
.page-template-full-width article.page,
.page-template-full-width .site-main {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Hide Kadence auto title on full width pages */
.page-template-default .entry-header,
.page-template-full-width .entry-header {
  display: none !important;
}

/* Fix alignfull blocks on full width pages */
.page-template-default .wp-block-group.alignfull,
.page-template-full-width .wp-block-group.alignfull {
  max-width: 100vw !important;
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  box-sizing: border-box !important;
}

/* Bio page responsive */
@media (max-width: 960px) {
  .kx-bio-hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .kx-bio-hero__photo-col {
    order: -1;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }
  .kx-bio-hero { padding: 48px 24px 40px; }
  .kx-bio-content { padding: 40px 20px; }
}

@media (max-width: 600px) {
  .kx-bio-stats { grid-template-columns: 1fr 1fr; }
  .kx-bio-hero { padding: 40px 20px; }
}

/* ============================================================
   HOMEPAGE TEMPLATE
   ============================================================ */

/* Remove all Kadence constraints on homepage */
body.page-template-template-homepage .site-content,
body.page-template-template-homepage #primary,
body.page-template-template-homepage #content,
body.page-template-template-homepage .content-container,
body.page-template-template-homepage #inner-wrap,
body.page-template-template-homepage .inner-wrap,
body.page-template-template-homepage .entry-content,
body.page-template-template-homepage .wp-block-post-content,
body.page-template-template-homepage article.page,
body.page-template-template-homepage .site-main,
body.page-template-template-homepage .entry-header {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  display: block !important;
}

body.page-template-template-homepage .entry-header {
  display: none !important;
}

/* Section base */
.kx-home-section {
  padding: 80px 24px;
  width: 100%;
  box-sizing: border-box;
}

.kx-home-section--light  { background: var(--kx-white); }
.kx-home-section--off    { background: var(--kx-bg-off); border-top: 1px solid var(--kx-border); }
.kx-home-section--dark   { background: var(--kx-navy); }
.kx-home-section--navy   { background: var(--kx-navy-deep); }

.kx-home-section__inner {
  max-width: var(--kx-max);
  margin: 0 auto;
  width: 100%;
}

.kx-home-section__header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.kx-home-section__header--light .kx-section-title { color: var(--kx-white); }

.kx-home-section__sub {
  font-size: 1.05rem;
  color: var(--kx-muted);
  line-height: 1.7;
  margin-top: 12px;
}

.kx-section-title em {
  font-style: italic;
  color: var(--kx-teal-dark);
}

/* ── VIDEO HERO ── */
.kx-home-hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--kx-navy-deep);
}

.kx-home-hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.kx-home-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kx-home-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(7,29,48,.85) 0%,
    rgba(15,43,68,.7) 60%,
    rgba(7,29,48,.5) 100%
  );
}

.kx-home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--kx-max-wide);
  margin: 0 auto;
  padding: 100px 24px 80px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  align-items: center;
  box-sizing: border-box;
}

.kx-home-hero__content { min-width: 0; }

.kx-home-hero__h1 {
  font-family: var(--kx-font-h);
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: var(--kx-white);
  line-height: 1.1;
  margin-bottom: 20px;
}

.kx-home-hero__h1 em {
  font-style: italic;
  color: var(--kx-teal);
}

.kx-home-hero__lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 620px;
  margin-bottom: 28px;
  line-height: 1.75;
}

/* Hero stat box */
.kx-home-hero__stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kx-home-stat {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--kx-radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kx-home-stat__val {
  font-family: var(--kx-font-h);
  font-size: 1.6rem;
  color: var(--kx-teal);
  line-height: 1;
}

.kx-home-stat__label {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  font-weight: 500;
  line-height: 1.4;
}

/* ── WHY GRID ── */
.kx-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.kx-why-card {
  background: var(--kx-bg-off);
  border: 1px solid var(--kx-border);
  border-radius: var(--kx-radius);
  padding: 28px 24px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.kx-why-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--kx-shadow-md);
  border-color: var(--kx-teal);
}

.kx-why-card__icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
  display: block;
}

.kx-why-card__title {
  font-family: var(--kx-font-h);
  font-size: 1.1rem;
  color: var(--kx-navy);
  margin-bottom: 10px;
  line-height: 1.25;
}

.kx-why-card__desc {
  font-size: .92rem;
  color: var(--kx-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── SERVICES GRID (dark) ── */
.kx-card-grid--services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.kx-service-card-dark {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--kx-radius);
  padding: 28px 24px;
  text-decoration: none;
  display: block;
  transition: background .15s, border-color .15s, transform .15s;
}

.kx-service-card-dark:hover {
  background: rgba(103,196,184,.1);
  border-color: rgba(103,196,184,.4);
  transform: translateY(-3px);
  text-decoration: none;
}

.kx-service-card-dark__icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 12px;
  color: var(--kx-teal);
}

.kx-service-card-dark__sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--kx-teal);
  margin-bottom: 8px;
}

.kx-service-card-dark__title {
  font-family: var(--kx-font-h);
  font-size: 1.1rem;
  color: var(--kx-white);
  margin-bottom: 10px;
  line-height: 1.25;
}

.kx-service-card-dark__desc {
  font-size: .88rem;
  color: rgba(255,255,255,.65);
  line-height: 1.6;
  margin-bottom: 16px;
}

.kx-service-card-dark__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.kx-service-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(103,196,184,.15);
  border: 1px solid rgba(103,196,184,.25);
  color: var(--kx-teal);
  padding: 3px 8px;
  border-radius: 4px;
}

.kx-service-card-dark__arrow {
  font-size: .85rem;
  font-weight: 700;
  color: var(--kx-teal);
}

/* ── CONDITIONS HUB ── */
.kx-conditions-hub {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.kx-condition-hub-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 18px;
  background: var(--kx-white);
  border: 1px solid var(--kx-border);
  border-radius: var(--kx-radius);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.kx-condition-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--kx-shadow-md);
  border-color: var(--kx-teal);
  text-decoration: none;
}

.kx-condition-hub-card__icon {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 6px;
}

.kx-condition-hub-card__title {
  font-family: var(--kx-font-h);
  font-size: 1rem;
  color: var(--kx-navy);
  font-weight: 700;
  line-height: 1.2;
}

.kx-condition-hub-card__desc {
  font-size: .82rem;
  color: var(--kx-muted);
  line-height: 1.4;
}

/* ── TESTIMONIALS ── */
.kx-testimonial-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.kx-testimonial-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--kx-radius);
  padding: 28px 24px;
}

.kx-testimonial-card--featured {
  background: rgba(103,196,184,.1);
  border-color: rgba(103,196,184,.3);
}

.kx-testimonial-card__stars {
  color: var(--kx-teal);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.kx-testimonial-card__quote {
  font-family: var(--kx-font-h);
  font-style: italic;
  font-size: 1rem;
  color: rgba(255,255,255,.85);
  line-height: 1.65;
  margin-bottom: 20px;
  border: none;
  padding: 0;
}

.kx-testimonial-card__attr {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kx-testimonial-card__attr strong {
  color: var(--kx-white);
  font-size: .9rem;
}

.kx-testimonial-card__attr span {
  color: rgba(255,255,255,.45);
  font-size: .8rem;
}

/* ── DR. MATT SNAPSHOT ── */
.kx-drm-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 64px;
  align-items: center;
}

.kx-drm-photo {
  border-radius: var(--kx-radius-lg);
  overflow: hidden;
  box-shadow: var(--kx-shadow-lg);
}

.kx-drm-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.kx-drm-creds {
  list-style: none !important;
  padding: 0 !important;
  margin: 20px 0 28px !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kx-drm-creds li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .92rem;
  color: var(--kx-mid);
  line-height: 1.5;
  list-style: none !important;
}

.kx-drm-creds li::before {
  content: '✓';
  color: var(--kx-teal);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── LOCAL AREAS ── */
.kx-local-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.kx-local-card {
  background: var(--kx-white);
  border: 1px solid var(--kx-border);
  border-radius: var(--kx-radius);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kx-local-card__name {
  font-family: var(--kx-font-h);
  font-size: 1.15rem;
  color: var(--kx-navy);
}

.kx-local-card__time {
  font-size: .85rem;
  font-weight: 700;
  color: var(--kx-teal-dark);
}

.kx-local-card__note {
  font-size: .82rem;
  color: var(--kx-muted);
  line-height: 1.5;
  margin-top: 4px;
}

/* Location info block */
.kx-location-block {
  background: var(--kx-navy);
  border-radius: var(--kx-radius);
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 32px;
  align-items: start;
}

.kx-location-block__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--kx-teal);
  margin-bottom: 10px;
}

.kx-location-block__info p {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
  line-height: 1.7;
  margin: 0;
}

.kx-location-block__info a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
}

.kx-location-block__info a:hover { color: var(--kx-teal); }

.kx-location-block__info em {
  color: rgba(255,255,255,.45);
  font-style: italic;
}

.kx-location-block__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

/* ── HOMEPAGE RESPONSIVE ── */
@media (max-width: 1060px) {
  .kx-why-grid { grid-template-columns: 1fr 1fr; }
  .kx-card-grid--services { grid-template-columns: 1fr 1fr; }
  .kx-testimonial-grid { grid-template-columns: 1fr 1fr; }
  .kx-testimonial-card--featured { grid-column: 1 / -1; }
  .kx-location-block { grid-template-columns: 1fr 1fr; }
  .kx-drm-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 840px) {
  .kx-home-hero__inner {
    grid-template-columns: 1fr;
    padding: 80px 20px 60px;
  }
  .kx-home-hero__stats { display: none; }
  .kx-home-hero { min-height: 70vh; }
  .kx-conditions-hub { grid-template-columns: 1fr 1fr; }
  .kx-local-grid { grid-template-columns: 1fr 1fr; }
  .kx-drm-grid { grid-template-columns: 1fr; }
  .kx-drm-photo { max-width: 400px; margin: 0 auto; }
  .kx-home-section { padding: 56px 20px; }
}

@media (max-width: 600px) {
  .kx-home-hero__h1 { font-size: 2.2rem; }
  .kx-why-grid { grid-template-columns: 1fr; }
  .kx-card-grid--services { grid-template-columns: 1fr; }
  .kx-testimonial-grid { grid-template-columns: 1fr; }
  .kx-conditions-hub { grid-template-columns: 1fr 1fr; }
  .kx-local-grid { grid-template-columns: 1fr; }
  .kx-location-block { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
}

/* ============================================================
   BLOG TEMPLATE — COMPREHENSIVE LAYOUT FIX  (v6)
   Covers:
   • template-blog.php applied to a Page  → body.page-template-template-blog
   • single.php / per-post plugin         → body.single-post, body.single
   • Any post type using the blog layout  → body.blog
   All selectors consolidated so the layout works regardless
   of how the template is invoked.
   ============================================================ */

/* 1 ── Body-level resets (same pattern as service/condition) */
body.page-template-template-blog,
body.single-post,
body.single {
  background: #ffffff;
}

body.page-template-template-blog .site,
body.page-template-template-blog .site-content,
body.page-template-template-blog #content,
body.page-template-template-blog #primary,
body.page-template-template-blog .content-container,
body.page-template-template-blog .inner-wrap,
body.page-template-template-blog #inner-wrap,
body.page-template-template-blog .kadence-content-wrap,
body.page-template-template-blog .singular-content-wrap,
body.page-template-template-blog .entry-content,
body.page-template-template-blog .wp-block-post-content,
body.single-post .site,
body.single-post .site-content,
body.single-post #content,
body.single-post #primary,
body.single-post .content-container,
body.single-post .inner-wrap,
body.single-post #inner-wrap,
body.single-post .kadence-content-wrap,
body.single-post .singular-content-wrap,
body.single-post .entry-content,
body.single-post .wp-block-post-content,
body.single .site,
body.single .site-content,
body.single #content,
body.single #primary,
body.single .content-container,
body.single .inner-wrap,
body.single #inner-wrap,
body.single .kadence-content-wrap,
body.single .singular-content-wrap,
body.single .entry-content,
body.single .wp-block-post-content {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* 2 ── Template wrapper itself */
body.single-post .kx-template-wrap,
body.single .kx-template-wrap {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

/* 3 ── Full-bleed sections (header, breadcrumb, hero, CTA) */
body.single-post .kx-post-header,
body.single-post .kx-breadcrumb,
body.single-post .kx-related-posts,
body.single-post .kx-bottom-cta,
body.single .kx-post-header,
body.single .kx-breadcrumb,
body.single .kx-related-posts,
body.single .kx-bottom-cta {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 4 ── The critical two-column body grid */
body.page-template-template-blog .kx-post-body,
body.single-post .kx-post-body,
body.single .kx-post-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px !important;
  gap: 56px !important;
  max-width: 1100px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 56px 24px !important;
  box-sizing: border-box !important;
  align-items: start !important;
  /* Prevent grid blowout */
  overflow: hidden !important;
}

/* 5 ── Main content column — prevent overflow blowout */
body.single-post .kx-post-body > main,
body.single .kx-post-body > main {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

/* 6 ── Sidebar column */
body.single-post .kx-post-body > .kx-sidebar,
body.single .kx-post-body > .kx-sidebar {
  min-width: 0 !important;
}

/* 7 ── Featured image — never exceed viewport */
body.single-post .kx-featured-img,
body.single .kx-featured-img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 480px !important;
  object-fit: cover !important;
  display: block !important;
}

/* 8 ── Article content width */
body.single-post .kx-article,
body.single .kx-article {
  max-width: 100% !important;
  overflow: hidden !important;
}

/* 9 ── Post header inner centering */
body.single-post .kx-post-header__inner,
body.single .kx-post-header__inner {
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  box-sizing: border-box !important;
}

/* 10 ── Related posts grid inner */
body.single-post .kx-related-posts__inner,
body.single .kx-related-posts__inner {
  max-width: 1100px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

/* 11 ── Mobile: stack to single column */
@media (max-width: 900px) {
  body.page-template-template-blog .kx-post-body,
  body.single-post .kx-post-body,
  body.single .kx-post-body {
    grid-template-columns: 1fr !important;
    padding: 40px 20px !important;
    gap: 32px !important;
  }

  body.single-post .kx-post-body > .kx-sidebar,
  body.single .kx-post-body > .kx-sidebar {
    order: -1 !important; /* Sidebar moves above content on mobile */
  }

  body.single-post .kx-book-card--sticky,
  body.single .kx-book-card--sticky {
    position: static !important;
  }

  body.single-post .kx-post-grid,
  body.single .kx-post-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 600px) {
  body.single-post .kx-post-header,
  body.single .kx-post-header {
    padding: 40px 20px 36px !important;
  }

  body.single-post .kx-post-grid,
  body.single .kx-post-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   BLOG ARCHIVE — home.php / archive.php  (v6)
   ============================================================ */

/* Archive wrapper — full width, no Kadence interference */
.kx-archive-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Strip Kadence constraints on archive pages */
body.blog .site,
body.blog .site-content,
body.blog #content,
body.blog #primary,
body.blog .content-container,
body.blog .inner-wrap,
body.blog #inner-wrap,
body.blog .kadence-content-wrap,
body.blog .singular-content-wrap,
body.blog .entry-content,
body.archive .site,
body.archive .site-content,
body.archive #content,
body.archive #primary,
body.archive .content-container,
body.archive .inner-wrap,
body.archive #inner-wrap,
body.archive .kadence-content-wrap,
body.archive .singular-content-wrap,
body.archive .entry-content {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* ── Archive Hero ── */
.kx-archive-hero {
  background: linear-gradient(135deg, var(--kx-navy-deep) 0%, var(--kx-navy) 60%, var(--kx-mid) 100%);
  padding: 64px 24px 56px;
  position: relative;
  overflow: hidden;
}

.kx-archive-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(90,153,210,0.1) 0%, transparent 65%);
  pointer-events: none;
}

.kx-archive-hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.kx-archive-eyebrow {
  display: inline-block;
  background: rgba(90,153,210,0.15);
  border: 1px solid rgba(90,153,210,0.3);
  color: var(--kx-teal);
  font-family: var(--kx-font-b);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 4px;
  margin-bottom: 18px;
}

.kx-archive-hero h1 {
  font-family: var(--kx-font-h);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--kx-white);
  line-height: 1.18;
  margin-bottom: 12px;
}

.kx-archive-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,.72);
  max-width: 560px;
  line-height: 1.7;
  margin: 0;
}

/* ── Archive Body — two-column layout ── */
.kx-archive-body {
  background: #f4f8fb;
  padding: 56px 24px;
  box-sizing: border-box;
}

.kx-archive-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
  box-sizing: border-box;
}

/* ── Post Grid ── */
.kx-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ── Individual Post Card ── */
.kx-arc-card {
  background: var(--kx-white);
  border: 1px solid var(--kx-border);
  border-radius: var(--kx-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.kx-arc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(15,43,68,.1);
  border-color: var(--kx-blue);
  text-decoration: none;
}

/* Thumbnail container */
.kx-arc-card__thumb {
  position: relative;
  overflow: hidden;
  background: var(--kx-navy);
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
}

.kx-arc-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.kx-arc-card:hover .kx-arc-card__img {
  transform: scale(1.03);
}

.kx-arc-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--kx-navy);
}

/* Category badge over thumbnail */
.kx-arc-card__cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(103,196,184,.9);
  color: var(--kx-navy-deep);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* Card body */
.kx-arc-card__body {
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.kx-arc-card__title {
  font-family: var(--kx-font-h);
  font-size: 1.05rem;
  color: var(--kx-navy-deep);
  line-height: 1.3;
  margin: 0 0 10px;
}

.kx-arc-card__excerpt {
  font-size: .88rem;
  color: #4a5568;
  line-height: 1.6;
  margin: 0 0 14px;
  flex: 1;
}

.kx-arc-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.kx-arc-card__date,
.kx-arc-card__read {
  font-size: .78rem;
  color: var(--kx-muted);
}

.kx-arc-card__read::before {
  content: '·';
  margin-right: 6px;
  color: var(--kx-border);
}

.kx-arc-card__link {
  font-size: .82rem;
  font-weight: 700;
  color: var(--kx-blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}

/* ── Pagination ── */
.kx-archive-pagination {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--kx-border);
}

.kx-archive-pagination .nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.kx-archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--kx-border);
  border-radius: 6px;
  font-family: var(--kx-font-b);
  font-size: .88rem;
  font-weight: 600;
  color: var(--kx-navy-deep);
  text-decoration: none;
  background: var(--kx-white);
  transition: background .15s, border-color .15s, color .15s;
}

.kx-archive-pagination .page-numbers.current {
  background: var(--kx-navy-deep);
  border-color: var(--kx-navy-deep);
  color: #fff;
}

.kx-archive-pagination .page-numbers:hover:not(.current) {
  background: var(--kx-bg-off);
  border-color: var(--kx-blue);
  color: var(--kx-blue);
}

/* ── Empty state ── */
.kx-archive-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--kx-muted);
  font-size: 1rem;
}

/* ── Archive Sidebar ── */
.kx-archive-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 100px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .kx-archive-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .kx-archive-sidebar {
    position: static;
    order: -1; /* sidebar above grid on tablet */
  }

  .kx-archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .kx-archive-body { padding: 40px 16px; }
  .kx-archive-hero { padding: 48px 20px 40px; }

  .kx-archive-grid {
    grid-template-columns: 1fr;
  }
}
