/**
 * Kulwatha Center — layout polish v1.2.0
 * Purpose: stronger institutional header, tighter vertical rhythm and
 * consistent top alignment across homepage sections.
 */

/* Header: dark / light / dark / light visual rhythm */
.kwd-topbar {
  background: #1b2023;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.kwd-topbar-inner { min-height: 32px; }

.kwd-brand {
  background: #fff;
  border-bottom: 1px solid #ece8df;
}
.kwd-brand-inner {
  min-height: 82px;
  gap: 30px;
}
.kwd-logo img { width: 250px; }
.kwd-site-info { max-width: 500px; }
.kwd-site-kicker { font-size: 14px !important; }
.kwd-site-info strong { font-size: 14px; }

.kwd-nav-wrap {
  background: #242a2e;
  border-top: 0;
  border-bottom: 1px solid #171b1e;
  box-shadow: 0 5px 18px rgba(20,24,26,.08);
}
.kwd-nav-inner { min-height: 54px; }
.kwd-nav-list > li > a {
  min-height: 54px;
  color: rgba(255,255,255,.84);
  font-size: 14px;
  font-weight: 650;
}
.kwd-nav-list > li:hover > a,
.kwd-nav-list > .current-menu-item > a,
.kwd-nav-list > .current-menu-ancestor > a { color: #fff; }
.kwd-nav-list > li > a::after { bottom: 0; }
.kwd-nav-list .sub-menu { border-color: #e4dfd5; }
.kwd-nav-list .sub-menu a { color: #30363a; }

.kwd-menu-btn,
.kwd-search-btn { color: #fff; }
.kwd-search-btn {
  min-height: 36px;
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.055);
}
.kwd-search-btn:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.28);
}
.kwd-survey-cta {
  min-height: 36px;
  border-color: #e4b92a;
  box-shadow: none;
}

.kwd-search-panel {
  background: #faf8f2;
  border-bottom: 1px solid #e5dfd3;
}

.kwd-updates {
  background: #f7f4eb;
  border-bottom: 1px solid #e7e1d7;
}
.kwd-updates-inner { min-height: 38px; }
.kwd-updates-title {
  position: relative;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding-inline: 14px 16px;
  background: transparent;
  color: #272d31;
  border-inline-start: 3px solid #e4b92a;
}
.kwd-ticker-group a { color: #555d62; }

/* Consistent homepage rhythm */
.khn-home,
.kwsv2-section,
.kwr-section,
.kwres-section,
.kwa-section,
.kwn-section,
.kwsvc-section,
.kwabout-section {
  padding: 58px 0;
}
.khn-home { padding-top: 38px; padding-bottom: 58px; }
.kwcta2-section { padding: 26px 0 20px; }

.khn-head,
.kwsv2-header,
.kwr-head,
.kwres-head,
.kwa-head,
.kwn-head {
  align-items: center;
  gap: 30px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--kwd-line);
}
.kwres-head { border-bottom-color: rgba(255,255,255,.10); }

.khn-head h1,
.kwsv2-title h2,
.kwr-head h2,
.kwres-head h2,
.kwa-head h2,
.kwn-head h2 {
  font-size: clamp(28px, 2.6vw, 36px);
}
.khn-head p,
.kwsv2-title p,
.kwr-head p,
.kwres-head p,
.kwa-head p,
.kwn-head p {
  margin-top: 7px;
  line-height: 1.72;
}

/* Hero: slightly denser, same editorial feel */
.khn-layout { gap: 16px; }
.khn-featured { min-height: 480px; }
.khn-side { gap: 16px; }
.khn-side-card { min-height: 232px; }
.khn-featured-overlay { padding: 30px 32px; }
.khn-featured h2 { font-size: clamp(28px, 3vw, 40px); }
.khn-bottom-head { margin-top: 22px; padding-top: 16px; }
.khn-bottom-grid { gap: 14px; margin-top: 14px; }
.khn-card-content { padding: 15px; }

/* All homepage columns begin on the same baseline. */
.kwsv2-layout,
.kwr-layout,
.kwres-layout,
.kwa-layout,
.kwn-layout,
.kwsvc-layout,
.kwabout-layout { align-items: stretch; }

/* Surveys: remove the visually staggered sticky card and line up the archive. */
.kwsv2-layout {
  grid-template-columns: minmax(310px,.70fr) minmax(0,1.55fr);
  gap: 18px;
}
.kwsv2-feature-card {
  position: static !important;
  top: auto !important;
  height: 100%;
  padding: 25px;
  border-radius: 16px;
}
.kwsv2-feature-card h3 { font-size: 24px; }
.kwsv2-feature-facts { margin-top: 18px; }
.kwsv2-feature-action { margin-top: 18px; }
.kwsv2-archive { display: flex; flex-direction: column; }
.kwsv2-archive-head {
  min-height: 0;
  margin: 0 0 10px;
  padding: 0;
}
.kwsv2-archive-head strong { font-size: 15px; }
.kwsv2-archive-head span,
.kwsv2-archive-head small { font-size: 14px; }
.kwsv2-grid { gap: 10px; flex: 1; }
.kwsv2-card-link { padding: 15px 16px; }
.kwsv2-card h3 { margin-top: 7px; font-size: 15px; }
.kwsv2-card p { font-size: 14px; }
.kwsv2-latest { margin-top: 9px; padding-top: 8px; }
.kwsv2-more { margin-top: 7px; }

/* Research publications: balanced two-column block. */
.kwr-layout { gap: 18px; }
.kwr-main,
.kwr-list { height: 100%; }
.kwr-main-image { aspect-ratio: 16 / 7.6; }
.kwr-main-content { padding: 23px 25px 25px; }
.kwr-main h3 { font-size: 25px; }
.kwr-publication-meta { margin-top: 16px; }
.kwr-actions { margin-top: 16px; }
.kwr-list-head { padding: 15px 17px; }
.kwr-item { padding: 12px 14px; }

/* Results: keep dashboard and content flush at the top. */
.kwres-layout { gap: 22px; }
.kwres-dashboard {
  position: static !important;
  top: auto !important;
  height: 100%;
  padding: 24px;
}
.kwres-feature { height: auto; }
.kwres-feature-content { padding: 24px 26px; }
.kwres-latest { margin-top: 14px; }

/* Analysis / News: equal top edge, slightly denser feeds. */
.kwa-layout,
.kwn-layout { gap: 18px; }
.kwa-feature,
.kwa-editorial-list,
.kwn-main-area,
.kwn-sidebar { align-self: stretch; }
.kwa-feature-content { padding: 25px; }
.kwa-editorial-list { padding: 18px; }
.kwn-main-content { padding: 22px 24px; }
.kwn-news-feed { gap: 10px; }
.kwn-feed-item { min-height: 100%; }
.kwn-sidebar { padding: 18px; }

/* Services: one aligned heading row + equal-height cards. */
.kwsvc-layout { gap: 22px; }
.kwsvc-intro {
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px 38px;
  padding-bottom: 18px;
}
.kwsvc-intro h2 { margin: 0; font-size: 28px; }
.kwsvc-intro p { line-height: 1.72; }
.kwsvc-grid { gap: 11px; }
.kwsvc-card { height: 100%; }
.kwsvc-card-link { height: 100%; padding: 17px; }
.kwsvc-content h3 { margin-top: 0; }

/* About: tighter institutional block. */
.kwabout-layout { gap: 30px; }
.kwabout-content,
.kwabout-panel { align-self: stretch; }
.kwabout-panel { padding: 24px; }

/* Footer spacing and editable social links */
.kwf-footer { margin-top: 30px; }
.kwf-main { padding: 44px 0 32px; }
.kwf-grid { gap: 34px; }
.kwf-social {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.kwf-social a {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  color: rgba(255,255,255,.65);
  font-size: 14px;
}
.kwf-social a:hover { color: #fff; border-color: rgba(228,185,42,.45); }

/* Editable page content can join the contact layout without duplicate whitespace. */
.kw-section--compact-bottom { padding-bottom: 18px !important; }
.kw-section--compact-top { padding-top: 18px !important; }

@media (max-width: 980px) {
  .kwd-brand-inner { min-height: 76px; }
  .kwd-logo img { width: 220px; }

  .kwd-nav-wrap { position: relative; }
  .kwd-main-nav {
    background: #242a2e;
    border-color: #343b40;
  }
  .kwd-nav-list > li > a {
    color: rgba(255,255,255,.88);
    border-bottom-color: rgba(255,255,255,.08);
  }
  .kwd-nav-list .sub-menu {
    background: #2d3438;
    border-right-color: #e4b92a;
  }
  .kwd-nav-list .sub-menu a { color: rgba(255,255,255,.78); }
  .kwd-nav-list .sub-menu a:hover { background: rgba(255,255,255,.06); color: #fff; }

  .kwsv2-feature-card,
  .kwres-dashboard { height: auto; }
}

@media (max-width: 700px) {
  .khn-home,
  .kwsv2-section,
  .kwr-section,
  .kwres-section,
  .kwa-section,
  .kwn-section,
  .kwsvc-section,
  .kwabout-section { padding: 44px 0; }
  .khn-home { padding-top: 28px; }
  .kwcta2-section { padding: 18px 0; }

  .khn-head,
  .kwsv2-header,
  .kwr-head,
  .kwres-head,
  .kwa-head,
  .kwn-head {
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
  }

  .khn-head h1,
  .kwsv2-title h2,
  .kwr-head h2,
  .kwres-head h2,
  .kwa-head h2,
  .kwn-head h2 { font-size: 26px; }

  .khn-featured { min-height: 410px; }
  .khn-featured-overlay { padding: 22px; }
  .khn-side { gap: 10px; }
  .khn-side-card { min-height: 190px; }

  .kwsv2-archive-head { margin-top: 4px; }
  .kwsvc-intro h2 { font-size: 24px; }
  .kwf-footer { margin-top: 18px; }
}

@media (max-width: 480px) {
  .kwd-brand-inner { min-height: 70px; }
  .kwd-logo img { width: 195px; }
  .kwd-survey-cta { padding-inline: 9px; font-size: 14px; }
  .kwd-updates-inner { min-height: 34px; }
  .kwd-updates-title { min-height: 34px; }
}

@media (min-width: 701px) {
  .kwsv2-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kwsv2-card:last-child:nth-child(odd) .kwsv2-card-link {
    display: grid;
    grid-template-columns: 76px minmax(0,1fr) minmax(200px,.75fr) auto;
    align-items: center;
    gap: 14px;
  }
  .kwsv2-card:last-child:nth-child(odd) .kwsv2-card-top { justify-content: flex-start; gap: 8px; }
  .kwsv2-card:last-child:nth-child(odd) h3,
  .kwsv2-card:last-child:nth-child(odd) p,
  .kwsv2-card:last-child:nth-child(odd) .kwsv2-latest,
  .kwsv2-card:last-child:nth-child(odd) .kwsv2-more { margin: 0; padding-top: 0; border-top: 0; }
}
