/* =====================================================================
   Kayakriti — Mega Menu styles  (prefix: .kn-)
   Desktop: hover-triggered with grouped columns
   Mobile : full-screen drawer with collapsible accordions
   ===================================================================== */

/* ===== TOP UTILITY BAR ===== */
.kn-top-bar {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}
.kn-top-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.kn-top-bar-meta a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 500;
}
.kn-top-bar-meta a:hover { color: #fff; }
.kn-top-bar-meta span { margin: 0 6px; opacity: 0.4; }
.kn-top-bar-links { display: flex; gap: 18px; }
.kn-top-bar-links a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.kn-top-bar-links a:hover,
.kn-top-bar-links a.active { color: #fff; }

/* ===== MAIN NAV ===== */
.kn-nav {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.kn-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.kn-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.kn-brand-dot {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--grad-blue, linear-gradient(135deg, #2D7DD2, #4A9EE8));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 16px;
}

.kn-primary {
  flex: 1;
  display: flex;
  justify-content: center;
}
.kn-primary-list {
  display: flex; align-items: center; gap: 4px;
  list-style: none; padding: 0; margin: 0;
}
.kn-li {
  position: relative;
}
.kn-l1 {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  border-radius: 10px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.kn-l1:hover,
.kn-l1.active {
  color: var(--ink);
  background: var(--surface);
}
/* Suppress the legacy styles.css::after text-chevron — mega menu uses SVG .kn-caret instead */
.kn-l1::after { display: none !important; }

.kn-caret {
  transition: transform 0.18s;
  opacity: 0.7;
}
.kn-li.has-menu:hover .kn-caret,
.kn-li.has-menu:focus-within .kn-caret {
  transform: rotate(180deg);
}

.kn-cta {
  background: var(--grad-blue, linear-gradient(135deg, #2D7DD2, #4A9EE8));
  color: #fff !important;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: filter 0.15s;
}
.kn-cta:hover { filter: brightness(0.92); }

.kn-burger {
  display: none;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}
.kn-burger span {
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: 0.2s;
}

/* ===== DESKTOP MEGA MENU (hover-triggered panels) ===== */
.kn-menu {
  position: absolute;
  top: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 48px -16px rgba(14, 30, 53, 0.18),
              0 4px 12px -4px rgba(14, 30, 53, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 100;
  pointer-events: none;
}
.kn-li.has-menu:hover > .kn-menu,
.kn-li.has-menu:focus-within > .kn-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Standard dropdown (small, single-column) */
.kn-menu-standard {
  left: 0;
  min-width: 280px;
  padding: 12px;
}
.kn-menu-standard ul {
  list-style: none; padding: 0; margin: 0;
}
.kn-menu-standard a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.kn-menu-standard a:hover {
  background: var(--surface);
  color: var(--ink);
}

/* Mega menu — 3-col (Cosmetic) */
.kn-menu-mega-3 {
  left: 50%;
  transform: translate(-50%, 8px);
  width: min(96vw, 1180px);
}
.kn-li.has-menu:hover > .kn-menu-mega-3,
.kn-li.has-menu:focus-within > .kn-menu-mega-3 {
  transform: translate(-50%, 0);
}

/* Mega menu — 1-col scrollable list (Reconstructive) */
.kn-menu-mega-1 {
  left: 50%;
  transform: translate(-50%, 8px);
  width: min(96vw, 760px);
}
.kn-li.has-menu:hover > .kn-menu-mega-1,
.kn-li.has-menu:focus-within > .kn-menu-mega-1 {
  transform: translate(-50%, 0);
}

.kn-mega-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  padding: 28px 32px;
}
.kn-mega-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-height: 70vh;
  overflow-y: auto;
}
.kn-mega-col {
  min-width: 0;
}
.kn-sec-title {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  transition: color 0.15s;
}
.kn-sec-title:hover { color: var(--blue); }
.kn-sec-arrow {
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  color: var(--blue);
}
.kn-sec-title:hover .kn-sec-arrow { opacity: 1; transform: translateX(2px); }

.kn-grp { margin-bottom: 14px; }
.kn-grp-h {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  text-decoration: none;
  transition: color 0.15s;
}
.kn-grp-h:hover { color: var(--blue); }
.kn-grp ul,
.kn-flat-items {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 2px;
}
.kn-grp ul a,
.kn-flat-items a {
  display: block;
  padding: 5px 0;
  font-size: 13.5px;
  color: var(--body);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.15s;
}
.kn-grp ul a:hover,
.kn-flat-items a:hover { color: var(--blue); }

/* Reconstructive: list rows with preview */
.kn-mega-list {
  max-height: 70vh;
  overflow-y: auto;
  display: grid;
  gap: 2px;
}
.kn-mega-row {
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.15s;
}
.kn-mega-row:hover { background: var(--surface); }
.kn-mega-row .kn-sec-title {
  border-bottom: 0;
  padding: 0;
  margin: 0 0 4px;
  font-size: 16px;
}
.kn-sec-preview {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Mega menu sidebar CTA card */
.kn-mega-aside {
  background: var(--surface);
  border-radius: 14px;
  padding: 24px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}
.kn-mega-aside h4 {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.kn-mega-aside p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 16px;
}
.kn-mega-cta {
  display: inline-block;
  background: var(--ink);
  color: #fff !important;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  align-self: flex-start;
}
.kn-mega-cta:hover { background: var(--ink-2, #1A2E4F); }

/* ===== MOBILE BREAKPOINT ===== */
@media (max-width: 1024px) {
  .kn-top-bar { display: none; }
  .kn-primary { display: none; }
  .kn-cta { display: none; }
  .kn-burger { display: flex; }
  /* Push burger to far right — brand stays left */
  .kn-nav-inner {
    padding: 0 16px; height: 64px;
    justify-content: space-between;
  }
}

/* ===== MOBILE DRAWER ===== */
.kn-drawer {
  position: fixed; top: 0; right: 0;
  width: min(420px, 92vw);
  height: 100vh;
  background: var(--white);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -16px 0 48px rgba(14, 30, 53, 0.12);
}
.kn-drawer.open { transform: translateX(0); }
.kn-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(14, 30, 53, 0.4);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s, visibility 0.32s;
}
.kn-drawer-backdrop.open { opacity: 1; visibility: visible; }

.kn-drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.kn-drawer-close {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 0;
  font-size: 28px; line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.kn-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px 96px;
  -webkit-overflow-scrolling: touch;
}
.kn-d-list {
  list-style: none; padding: 0; margin: 0;
}
.kn-d-item {
  border-bottom: 1px solid var(--line);
}
.kn-d-item > a,
.kn-d-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 16px 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.kn-d-toggle svg {
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}
.kn-d-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.kn-d-pane {
  padding: 0 0 14px;
}
.kn-d-pane[hidden] { display: none; }
.kn-d-overview {
  display: block;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  margin: 4px 0 12px;
}

.kn-d-pane > ul {
  list-style: none; padding: 0; margin: 0 0 8px;
}
.kn-d-pane > ul > li > a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--body);
  text-decoration: none;
  border-radius: 6px;
}
.kn-d-pane > ul > li > a:hover { background: var(--surface); }

.kn-d-section { margin: 4px 0; }
.kn-d-sub-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--page-bg);
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 4px;
}
.kn-d-sub-toggle svg { transition: transform 0.2s; flex-shrink: 0; }
.kn-d-sub-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.kn-d-sub {
  padding: 4px 0 8px 12px;
  border-left: 2px solid var(--tint);
  margin-left: 8px;
}
.kn-d-sub[hidden] { display: none; }
.kn-d-overview-mini {
  display: block;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  margin-bottom: 6px;
}
.kn-d-section-link {
  display: block;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.kn-d-group { padding: 6px 0 4px; }
.kn-d-group-h {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px;
  text-decoration: none;
}
.kn-d-group ul {
  list-style: none; padding: 0; margin: 0;
}
.kn-d-group ul a {
  display: block;
  padding: 7px 14px 7px 14px;
  font-size: 13.5px;
  color: var(--body);
  text-decoration: none;
}

.kn-d-utility {
  margin-top: 24px;
  padding: 16px 8px;
  border-top: 1px solid var(--line);
}
.kn-d-utility h5 {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 700;
}
.kn-d-utility ul { list-style: none; padding: 0; margin: 0; }
.kn-d-utility a {
  display: block;
  padding: 10px 6px;
  font-size: 14px;
  color: var(--body);
  text-decoration: none;
}

.kn-d-cta {
  display: block;
  margin: 24px 8px 16px;
  padding: 14px;
  background: var(--grad-blue, linear-gradient(135deg, #2D7DD2, #4A9EE8));
  color: #fff !important;
  text-align: center;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

/* ===========================================================================
   Splash homepage — hide the nav visually but keep it in the DOM so search
   crawlers can still follow every internal link from the homepage.
   This matches the static index-doctor.html reference (which has no nav at
   all on the splash). Once the user enters via "Skip to website →" or
   completes the funnel, they land on an interior page where the nav appears
   normally.
   =========================================================================== */
body.is-splash .kn-top-bar,
body.is-splash .kn-nav {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none !important;
}

/* ============================================================================
   TOP-BAR SEARCH (inline expander + dropdown results)
   ============================================================================*/
.kn-search { position: relative; display: inline-flex; align-items: center; }
.kn-search-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 0;
  font: inherit; color: var(--white, #fff);
  padding: 6px 8px;
  cursor: pointer;
  font-size: 13.5px; font-weight: 500;
  border-radius: 6px;
  opacity: 0.85;
  transition: opacity 150ms ease;
}
.kn-search-toggle:hover { opacity: 1; }
.kn-search-toggle-label { display: inline; }
@media (max-width: 720px) { .kn-search-toggle-label { display: none; } }

.kn-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(460px, 92vw);
  background: #fff;
  color: var(--ink, #0E1E35);
  border: 1px solid var(--line, #E3ECF5);
  border-radius: 14px;
  box-shadow: 0 24px 60px -16px rgba(14, 30, 53, 0.22);
  padding: 12px;
  z-index: 1000;
}
.kn-search-input {
  width: 100%;
  border: 1px solid var(--line, #E3ECF5);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
}
.kn-search-input:focus {
  outline: 2px solid var(--blue, #2D7DD2);
  outline-offset: 1px;
  border-color: var(--blue, #2D7DD2);
}
.kn-search-results { margin-top: 10px; max-height: 60vh; overflow-y: auto; }

.kn-search-result {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 120ms ease;
}
.kn-search-result:hover,
.kn-search-result:focus { background: var(--surface, #F5F8FD); outline: 0; }

.kn-search-result-kind {
  display: inline-block;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--blue, #2D7DD2); text-transform: uppercase;
  background: rgba(45, 125, 210, 0.08);
  padding: 4px 8px;
  border-radius: 999px;
  text-align: center;
}
.kn-search-result-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kn-search-result-label { font-weight: 600; color: var(--ink, #0E1E35); font-size: 14.5px; }
.kn-search-result-parent { font-size: 12.5px; color: var(--muted, #6A7A91); }

.kn-search-empty {
  padding: 14px 12px;
  font-size: 13.5px; color: var(--muted, #6A7A91);
}
.kn-search-empty a { color: var(--blue, #2D7DD2); font-weight: 600; }

/* ============================================================================
   /search/ RESULTS PAGE
   ============================================================================*/
.kn-search-page-input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--white, #fff);
  border: 1px solid var(--line, #E3ECF5);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 12px 32px -16px rgba(14, 30, 53, 0.08);
}
.kn-search-page-input-wrap svg { color: var(--blue, #2D7DD2); flex-shrink: 0; }
.kn-search-page-input {
  flex: 1; min-width: 0;
  border: 0; outline: 0;
  font-size: 17px; font-family: inherit;
  background: transparent;
}
.kn-search-page-count {
  margin: 8px 0 18px;
  font-size: 14px; color: var(--muted, #6A7A91); letter-spacing: 0.01em;
}
.kn-search-page-results {
  display: flex; flex-direction: column; gap: 6px;
}
.kn-search-page-results .kn-search-result {
  background: var(--white, #fff);
  border: 1px solid var(--line, #E3ECF5);
  padding: 14px 16px;
  grid-template-columns: 110px 1fr;
}
.kn-search-empty-page {
  padding: 30px;
  text-align: center;
  color: var(--muted, #6A7A91);
  background: var(--surface, #F5F8FD);
  border-radius: 14px;
}
