/* =====================================================================
   SITE 2026 — Kalwar Samaj premium bright redesign
   Loaded AFTER main.css and the active theme file, so everything here
   wins. Purely presentational: no markup here depends on a module, so
   every existing feature/page keeps working untouched.
   ===================================================================== */

:root {
  --kp-red: #b01c2e;
  --kp-red-dark: #8c1322;
  --kp-red-soft: #fdecee;
  --kp-navy: #1b3a6b;
  --kp-navy-dark: #12294c;
  --kp-gold: #d4a12a;
  --kp-gold-soft: #fdf4e0;
  --kp-green: #1a7a4c;
  --kp-purple: #5b3fb5;
  --kp-ink: #1d2433;
  --kp-muted: #66708a;
  --kp-line: #e9e2da;
  --kp-paper: #ffffff;
  --kp-cream: #fffaf5;
  --kp-shadow-sm: 0 2px 10px rgba(25, 30, 45, 0.06);
  --kp-shadow: 0 8px 26px rgba(25, 30, 45, 0.09);
  --kp-shadow-lg: 0 18px 46px rgba(25, 30, 45, 0.14);
  --kp-header-h: 78px;
  --font-deva: 'Noto Sans Devanagari', 'Noto Serif Devanagari', 'Nirmala UI', 'Mangal', sans-serif;
}

body {
  background:
    radial-gradient(1100px 620px at 88% -8%, #fff3e6 0%, rgba(255, 243, 230, 0) 62%),
    radial-gradient(900px 560px at -6% 6%, #eef4ff 0%, rgba(238, 244, 255, 0) 60%),
    #ffffff;
  color: var(--kp-ink);
  font-family: 'Inter', var(--font-deva), 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}

h1, h2, h3, h4, h5 { color: var(--kp-ink); letter-spacing: -0.01em; }
a { color: var(--kp-red); }

/* =====================================================================
   1. TOP UTILITY BAR — mantra strip
   ===================================================================== */
.top-utility-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(90deg, #8c1322 0%, #b01c2e 50%, #8c1322 100%);
  color: #ffeef0;
  font-size: 0.78rem;
  padding: 0.42rem 1.25rem;
  line-height: 1.4;
  border-bottom: 2px solid var(--kp-gold);
}
.top-utility-mantra,
.top-utility-center,
.top-utility-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.top-utility-center { justify-content: center; font-weight: 700; color: #fff; letter-spacing: 0.01em; }
.top-utility-right { justify-content: flex-end; }
.top-utility-mantra span,
.top-utility-right .top-utility-pill { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-utility-pill { opacity: 0.94; }
.top-utility-pill + .top-utility-pill::before { content: "•"; margin: 0 0.45rem; color: var(--kp-gold); }
.top-utility-social { display: inline-flex; gap: 0.35rem; margin-left: 0.6rem; }
.top-utility-social a {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transition: background 0.16s ease, transform 0.16s ease;
}
.top-utility-social a:hover { background: #fff; color: var(--kp-red); transform: translateY(-1px); }
.top-utility-social .icon { width: 14px; height: 14px; }
@media (max-width: 1100px) {
  .top-utility-bar { grid-template-columns: 1fr auto; font-size: 0.72rem; }
  .top-utility-right { display: none; }
}
@media (max-width: 700px) {
  .top-utility-bar { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 0.35rem 0.75rem; }
  .top-utility-mantra { display: none; }
}

/* =====================================================================
   2. HEADER — white, premium, sticky
   ===================================================================== */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  color: var(--kp-ink);
  border-bottom: 1px solid var(--kp-line);
  box-shadow: 0 6px 22px rgba(25, 30, 45, 0.07);
  padding: 0.55rem 1.4rem;
  gap: 1rem;
}
.site-header .brand { flex-shrink: 0; }
.site-header .brand a {
  color: var(--kp-ink);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  white-space: normal;
  font-size: 1rem;
}
.brand-logo {
  height: 58px;
  width: auto;
  border-radius: 0;
  filter: drop-shadow(0 4px 10px rgba(176, 28, 46, 0.22));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-title {
  font-family: var(--font-deva), var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--kp-red);
  letter-spacing: 0.005em;
}
.brand-sub {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kp-navy);
  margin-top: 2px;
}
.brand-motto {
  font-family: var(--font-deva);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--kp-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.brand-motto i { font-style: normal; color: var(--kp-gold); }

/* --- primary nav: icon-over-label pills (matches reference) --------- */
.site-header nav.primary-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.1rem;
  margin-left: auto;
}
.site-header nav.primary-nav > a,
.site-header nav.primary-nav .nav-dropdown > summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  color: var(--kp-ink);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.5rem 0.7rem;
  margin: 0;
  border-radius: 12px;
  white-space: nowrap;
  background: transparent;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.site-header nav.primary-nav > a .nav-icon,
.site-header nav.primary-nav .nav-dropdown > summary .nav-icon {
  width: 19px;
  height: 19px;
  color: var(--kp-navy);
  transition: color 0.16s ease;
}
.site-header nav.primary-nav > a:hover,
.site-header nav.primary-nav .nav-dropdown > summary:hover {
  background: var(--kp-red-soft);
  color: var(--kp-red);
  transform: translateY(-1px);
}
.site-header nav.primary-nav > a:hover .nav-icon,
.site-header nav.primary-nav .nav-dropdown > summary:hover .nav-icon { color: var(--kp-red); }
.site-header nav.primary-nav > a.active,
.site-header nav.primary-nav > a[aria-current="page"] {
  background: var(--kp-red-soft);
  color: var(--kp-red);
  box-shadow: inset 0 -2px 0 var(--kp-red);
}
.site-header nav.primary-nav > a.active .nav-icon { color: var(--kp-red); }
.site-header nav.primary-nav .nav-dropdown > summary::after {
  content: none;
}
.site-header .nav-dropdown .dropdown-menu {
  background: #fff;
  border: 1px solid var(--kp-line);
  box-shadow: var(--kp-shadow-lg);
  border-radius: 14px;
  padding: 0.45rem;
  left: 50%;
  transform: translate(-50%, -6px);
  min-width: 230px;
}
.site-header .nav-dropdown:hover .dropdown-menu,
.site-header .nav-dropdown:focus-within .dropdown-menu { transform: translate(-50%, 0); }
.site-header .nav-dropdown .dropdown-menu a {
  color: var(--kp-ink);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.52rem 0.7rem;
  border-radius: 9px;
}
.site-header .nav-dropdown .dropdown-menu a:hover { background: var(--kp-red-soft); color: var(--kp-red); }

/* --- header right cluster ------------------------------------------- */
.header-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.header-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: #f4f6fb;
  color: var(--kp-navy);
  text-decoration: none;
  transition: background 0.16s ease, transform 0.16s ease;
}
.header-icon-btn:hover { background: var(--kp-red-soft); color: var(--kp-red); transform: translateY(-1px); }
.header-icon-btn .icon { width: 18px; height: 18px; }
.header-icon-btn .nav-icon-badge,
.header-icon-btn .badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--kp-red); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  min-width: 17px; height: 17px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  padding: 0 3px;
}
/* Phase 2 (2026-09-19): notify-bell.js sets/clears the `hidden`
   attribute on these live-polled badges. Without this, the explicit
   `display: inline-flex`/`flex` above (both here and in main.css) beats
   the browser's default `[hidden]{display:none}` at equal specificity,
   so a "0 unread" badge kept showing a visible red "0" — same class of
   bug as the chat typing/photo-preview fix in messaging.css. */
.nav-icon-badge[hidden] { display: none !important; }
.btn-login {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: linear-gradient(135deg, #b01c2e, #8c1322);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.66rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(176, 28, 46, 0.3);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  white-space: nowrap;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(176, 28, 46, 0.38); filter: brightness(1.05); }
.btn-login .icon { width: 17px; height: 17px; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 44px;
  padding: 0 0.7rem;
  margin: 0;
  background: #f4f6fb;
  color: var(--kp-navy);
  border: 1px solid var(--kp-line);
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
}
.lang-switch:hover { background: var(--kp-red-soft); color: var(--kp-red); }

/* Nav gets tighter before it is replaced by the bottom bar */
@media (max-width: 1280px) {
  .site-header nav.primary-nav > a,
  .site-header nav.primary-nav .nav-dropdown > summary { padding: 0.5rem 0.5rem; font-size: 0.7rem; }
  .brand-title { font-size: 1.3rem; }
  .brand-logo { height: 50px; }
}
@media (max-width: 1080px) {
  .brand-motto { display: none; }
  .btn-login { padding: 0.55rem 0.95rem; font-size: 0.8rem; }
}
@media (max-width: 900px) {
  .site-header { padding: 0.5rem 0.9rem; }
  .brand-logo { height: 44px; }
  .brand-title { font-size: 1.22rem; }
  .brand-sub { font-size: 0.52rem; letter-spacing: 0.14em; }
}
@media (max-width: 420px) {
  .brand-title { font-size: 1.05rem; }
  .brand-sub { display: none; }
  .btn-login span { display: none; }
  .btn-login { padding: 0.55rem 0.7rem; }
}

/* =====================================================================
   3. HERO — mirrors the approved reference layout
   ===================================================================== */
.kp-hero {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  padding: 2.6rem 1.5rem 2rem;
  background:
    radial-gradient(760px 420px at 50% 18%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #fff6ea 0%, #fdf1f2 42%, #f3f7ff 100%);
  border-bottom: 1px solid var(--kp-line);
}
.kp-hero::before,
.kp-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.kp-hero::before {
  width: 420px; height: 420px;
  top: -160px; left: -140px;
  background: radial-gradient(circle, rgba(212, 161, 42, 0.22), transparent 66%);
}
.kp-hero::after {
  width: 460px; height: 460px;
  bottom: -220px; right: -120px;
  background: radial-gradient(circle, rgba(27, 58, 107, 0.16), transparent 66%);
}
.kp-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr 0.75fr;
  align-items: center;
  gap: 1.8rem;
}

/* --- left copy ------------------------------------------------------ */
.kp-hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--kp-muted);
  margin-bottom: 0.5rem;
}
.kp-hero-title {
  font-family: var(--font-deva), var(--font-heading);
  font-size: clamp(2.3rem, 4.6vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  margin: 0 0 0.55rem;
  letter-spacing: -0.015em;
}
.kp-hero-title .t-red { color: var(--kp-red); }
.kp-hero-title .t-navy { color: var(--kp-navy); }
.kp-hero-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kp-muted);
  margin: 0 0 1rem;
}
.kp-hero-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.05rem;
}
.kp-hero-pills span {
  font-family: var(--font-deva);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--kp-navy);
}
.kp-hero-pills i { font-style: normal; color: var(--kp-line); font-weight: 400; }
.kp-hero-lead {
  font-family: var(--font-deva);
  font-size: 1.02rem;
  color: #46506b;
  max-width: 34rem;
  margin: 0 0 1.5rem;
  line-height: 1.75;
}
.kp-hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.kp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-deva);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.kp-btn .icon { width: 18px; height: 18px; }
.kp-btn-solid {
  background: linear-gradient(135deg, #b01c2e, #8c1322);
  color: #fff;
  box-shadow: 0 10px 26px rgba(176, 28, 46, 0.32);
}
.kp-btn-solid:hover { transform: translateY(-2px); box-shadow: 0 15px 32px rgba(176, 28, 46, 0.4); }
.kp-btn-ghost {
  background: #fff;
  color: var(--kp-red);
  border-color: rgba(176, 28, 46, 0.35);
  box-shadow: var(--kp-shadow-sm);
}
.kp-btn-ghost:hover { background: var(--kp-red-soft); transform: translateY(-2px); border-color: var(--kp-red); }
.kp-btn-gold {
  background: linear-gradient(135deg, #d4a12a, #b0801a);
  color: #fff;
  box-shadow: 0 10px 26px rgba(212, 161, 42, 0.34);
}
.kp-btn-gold:hover { transform: translateY(-2px); box-shadow: 0 15px 32px rgba(212, 161, 42, 0.42); }
.kp-btn-outline {
  background: #fff;
  color: var(--kp-navy);
  border-color: rgba(27, 58, 107, 0.3);
  box-shadow: var(--kp-shadow-sm);
}
.kp-btn-outline:hover { background: #eef1fb; transform: translateY(-2px); border-color: var(--kp-navy); }
button.kp-btn { cursor: pointer; font-family: inherit; }

/* --- shared "about us" video modal -----------------------------------
   Pure CSS shows/hides via [hidden]; assets/js/site-effects.js sets and
   clears the iframe src on open/close so the YouTube player is never
   fetched until the visitor actually asks to watch it. */
.kp-video-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
  background: rgba(17, 20, 30, 0.86);
  backdrop-filter: blur(4px);
}
.kp-video-modal[hidden] { display: none; }
.kp-video-modal-frame {
  width: min(960px, 100%);
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  background: #000;
}
.kp-video-modal-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.kp-video-modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.3rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}
.kp-video-modal-close:hover { background: rgba(255, 255, 255, 0.28); transform: scale(1.06); }
@media (max-width: 600px) {
  .kp-video-modal { padding: 1.25rem 0.75rem; }
  .kp-video-modal-close { top: 0.6rem; right: 0.6rem; width: 38px; height: 38px; }
}

/* --- centre emblem --------------------------------------------------- */
.kp-hero-emblem { display: flex; justify-content: center; align-items: center; }
.kp-hero-emblem img {
  width: 100%;
  max-width: 400px;
  height: auto;
  filter: drop-shadow(0 22px 42px rgba(140, 19, 34, 0.26));
  animation: kp-float 7s ease-in-out infinite;
}
@keyframes kp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* --- right panel ----------------------------------------------------- */
.kp-hero-side { display: grid; gap: 1.1rem; }
.kp-hero-quote {
  font-family: var(--font-deva);
  font-size: 1.28rem;
  font-weight: 700;
  font-style: italic;
  color: var(--kp-red);
  line-height: 1.5;
  text-align: center;
  position: relative;
  padding-bottom: 0.7rem;
}
.kp-hero-quote::after {
  content: "";
  position: absolute;
  left: 22%; right: 22%; bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--kp-red), transparent);
}
.kp-hero-features {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--kp-line);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.2rem;
  box-shadow: var(--kp-shadow);
  backdrop-filter: blur(6px);
}
.kp-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-deva);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--kp-ink);
  text-decoration: none;
  padding: 0.5rem 0.4rem;
  border-radius: 12px;
  transition: background 0.16s ease, transform 0.16s ease;
}
.kp-feature:hover { background: var(--kp-red-soft); transform: translateX(3px); }
.kp-feature-icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
.kp-feature-icon .icon { width: 18px; height: 18px; }
.kp-fi-1 { background: var(--kp-red-soft); color: var(--kp-red); }
.kp-fi-2 { background: #eaf0fb; color: var(--kp-navy); }
.kp-fi-3 { background: #fdeef0; color: #c62b45; }
.kp-fi-4 { background: var(--kp-gold-soft); color: #a8791a; }

@media (max-width: 1150px) {
  .kp-hero-inner { grid-template-columns: 1fr 1fr; }
  .kp-hero-side { grid-column: 1 / -1; }
  .kp-hero-features { grid-template-columns: repeat(2, 1fr); display: grid; }
}
@media (max-width: 820px) {
  .kp-hero { padding: 1.8rem 1.1rem 1.6rem; }
  .kp-hero-inner { grid-template-columns: 1fr; text-align: center; gap: 1.4rem; }
  .kp-hero-lead { margin-left: auto; margin-right: auto; }
  .kp-hero-cta, .kp-hero-pills { justify-content: center; }
  .kp-hero-emblem { order: -1; }
  .kp-hero-emblem img { max-width: 260px; }
  /* Two-up on tablets, single column only once it genuinely stops
     fitting — a 4-row full-width list looks stretched at 700-820px. */
  .kp-hero-features { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); text-align: left; }
}

/* =====================================================================
   4. STAT STRIP — five pastel plaques
   ===================================================================== */
.kp-stats {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.6rem 1.25rem;
}
.kp-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.kp-stat {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--kp-shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.kp-stat { text-decoration: none; color: inherit; }
.kp-stat:hover { transform: translateY(-4px); box-shadow: var(--kp-shadow); text-decoration: none; }
.kp-stat > span:last-child { display: block; min-width: 0; }
.kp-stat .kp-stat-icon { width: 30px; height: 30px; flex-shrink: 0; display: inline-flex; }
.kp-stat .kp-stat-icon .icon { width: 30px; height: 30px; }
.kp-stat-value { display: block; font-size: 1.75rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.kp-stat-label { display: block; font-family: var(--font-deva); font-size: 0.85rem; color: var(--kp-muted); font-weight: 600; margin-top: 2px; }
.kp-stat-1 { background: #fdeef0; } .kp-stat-1 .kp-stat-value, .kp-stat-1 .kp-stat-icon { color: var(--kp-red); }
.kp-stat-2 { background: #eaf1fd; } .kp-stat-2 .kp-stat-value, .kp-stat-2 .kp-stat-icon { color: #2457c5; }
.kp-stat-3 { background: #e9f7ef; } .kp-stat-3 .kp-stat-value, .kp-stat-3 .kp-stat-icon { color: var(--kp-green); }
.kp-stat-4 { background: #fdf4e0; } .kp-stat-4 .kp-stat-value, .kp-stat-4 .kp-stat-icon { color: #a8791a; }
.kp-stat-5 { background: #f1ecfd; } .kp-stat-5 .kp-stat-value, .kp-stat-5 .kp-stat-icon { color: var(--kp-purple); }
@media (max-width: 1050px) { .kp-stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .kp-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .kp-stat { padding: 0.85rem 0.8rem; gap: 0.6rem; }
  .kp-stat-value { font-size: 1.35rem; }
  .kp-stat-label { font-size: 0.74rem; }
  .kp-stat .kp-stat-icon, .kp-stat .kp-stat-icon .icon { width: 24px; height: 24px; }
}
@media (max-width: 380px) { .kp-stat-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   5. NAVY RIBBON
   ===================================================================== */
.kp-ribbon {
  background: linear-gradient(90deg, #12294c 0%, #1b3a6b 50%, #12294c 100%);
  color: #fff;
  padding: 0.95rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  text-align: center;
  border-top: 2px solid var(--kp-gold);
  border-bottom: 2px solid var(--kp-gold);
}
.kp-ribbon-quote {
  font-family: var(--font-deva);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.kp-ribbon-brand {
  font-family: var(--font-deva);
  font-size: 0.92rem;
  font-weight: 600;
  color: #dbe6f7;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.9;
}
.kp-ribbon-brand::before, .kp-ribbon-brand::after {
  content: "";
  width: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--kp-gold), transparent);
}
@media (max-width: 700px) { .kp-ribbon-quote { font-size: 0.9rem; } .kp-ribbon-brand { display: none; } }

/* =====================================================================
   6. GENERAL PAGE POLISH — bright premium surfaces everywhere
   ===================================================================== */
main { max-width: 1240px; padding: 1.75rem 1.25rem 2.5rem; }
main.home { max-width: none; padding: 0 0 2.5rem; }
main.home > .content-block,
main.home > section:not(.kp-hero):not(.kp-ribbon):not(.kp-stats) {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.content-block { border-top: none; padding: 2.4rem 0; }
main.home > .content-block + .content-block { border-top: 1px solid var(--kp-line); }

.section-heading { margin-bottom: 1.8rem; }
.section-heading h2 {
  font-family: var(--font-deva), var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--kp-ink);
}
.section-heading::before { content: none; }
.section-heading::after {
  background: linear-gradient(90deg, var(--kp-red), var(--kp-gold));
  height: 4px;
  width: 64px;
  border-radius: 999px;
}
.section-heading p { color: var(--kp-muted); font-family: var(--font-deva); }

.card {
  background: #fff;
  border: 1px solid var(--kp-line);
  border-top: 3px solid var(--kp-gold);
  border-radius: 16px;
  box-shadow: var(--kp-shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--kp-shadow); border-color: rgba(176, 28, 46, 0.3); }
.card h3 { color: var(--kp-ink); }
.card-icon { background: var(--kp-red-soft); color: var(--kp-red); border-radius: 12px; }

.btn, button:not(.link-button):not(.kp-btn) {
  background: linear-gradient(135deg, #b01c2e, #8c1322);
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(176, 28, 46, 0.24);
  border: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.btn:hover, button:not(.link-button):not(.kp-btn):hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(176, 28, 46, 0.32); filter: brightness(1.05); }
.btn-accent { background: linear-gradient(135deg, #d4a12a, #b0801a); box-shadow: 0 6px 18px rgba(212, 161, 42, 0.3); }
.btn-outline { border: 2px solid var(--kp-red); color: var(--kp-red); background: #fff; box-shadow: none; border-radius: 999px; }
.btn-outline:hover { background: var(--kp-red); color: #fff; }

.badge { background: var(--kp-red); border-radius: 999px; }
.stat-block { border-radius: 16px; border-bottom: 3px solid var(--kp-gold); }
.empty-state { background: var(--kp-cream); border: 1px dashed var(--kp-line); border-radius: 16px; }

.cta-final {
  background: linear-gradient(135deg, #b01c2e 0%, #8c1322 55%, #12294c 100%);
  border-radius: 22px;
  border: 2px solid rgba(212, 161, 42, 0.5);
}

input, select, textarea { border-radius: 11px !important; }
input:focus, select:focus, textarea:focus { border-color: var(--kp-red) !important; outline: none; box-shadow: 0 0 0 3px rgba(176, 28, 46, 0.12); }

/* Footer */
.site-footer {
  background: linear-gradient(180deg, #fffaf5 0%, #fdf2f3 100%);
  border-top: 3px solid var(--kp-gold);
  color: var(--kp-muted);
}
.footer-col h4 { color: var(--kp-red); font-family: var(--font-deva), var(--font-heading); }
.footer-col a:hover { color: var(--kp-red); }

/* =====================================================================
   7. MODERN BOTTOM NAVIGATION (mobile + tablet, public AND admin)
   Floating pill bar with a frosted surface and a raised centre action.
   ===================================================================== */
@media (max-width: 1100px) {
  .site-header nav.primary-nav { display: none; }
  .bottom-nav { display: flex !important; }
  body { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 1100px) {
  .bottom-nav {
    position: fixed;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: min(560px, calc(100% - 20px));
    z-index: 300;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border: 1px solid rgba(233, 226, 218, 0.9);
    border-top: 1px solid rgba(233, 226, 218, 0.9);
    border-radius: 22px;
    box-shadow: 0 12px 34px rgba(25, 30, 45, 0.18);
    padding: 0.4rem 0.35rem;
    gap: 0.15rem;
  }
  .bottom-nav-item {
    position: relative;
    flex: 1;
    gap: 0.18rem;
    color: var(--kp-muted);
    font-size: 0.64rem;
    font-weight: 700;
    padding: 0.4rem 0.15rem;
    border-radius: 15px;
    min-height: 52px;
    justify-content: center;
  }
  .bottom-nav-item .icon { width: 21px; height: 21px; }
  .bottom-nav-item.active { color: var(--kp-red); background: var(--kp-red-soft); }
  .bottom-nav-item.active .icon { filter: none; }
  .bottom-nav-item.active::before {
    content: "";
    position: absolute;
    top: 3px; left: 50%;
    transform: translateX(-50%);
    width: 20px; height: 3px;
    border-radius: 999px;
    background: var(--kp-red);
  }
  .bottom-nav-item .nav-icon-badge, .bottom-nav-item .badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 20px);
    background: var(--kp-red);
    color: #fff;
    font-size: 0.55rem;
    min-width: 16px; height: 16px;
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
    padding: 0 3px;
  }
  .bottom-nav-more {
    background: linear-gradient(135deg, #b01c2e, #8c1322);
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(176, 28, 46, 0.35);
  }
  .bottom-nav-more .icon { color: #fff; }

  .bottom-sheet {
    border-radius: 26px 26px 0 0;
    background: #fff;
    padding: 0.5rem 1.15rem calc(2rem + env(safe-area-inset-bottom, 0px));
    max-height: 86vh;
  }
  .bottom-sheet-handle { background: var(--kp-line); }
  .sheet-quicklink { background: #f5f7fc; border: 1px solid var(--kp-line); border-radius: 14px; }
  .sheet-quicklink .icon { color: var(--kp-red); }
  .sheet-lang { background: linear-gradient(135deg, #b01c2e, #8c1322); border-color: transparent; }
  .sheet-lang .icon, .sheet-lang { color: #fff; }
  .sheet-group h4 { color: var(--kp-red); font-family: var(--font-deva), var(--font-heading); }
  .sheet-group a { border-bottom: 1px solid #f2eeea; }
  .bottom-sheet-groups { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
}
/* Tablet: two-up sheet columns read better than one long list */
@media (min-width: 640px) and (max-width: 1100px) {
  .bottom-nav { width: min(620px, calc(100% - 28px)); }
  .bottom-nav-item { font-size: 0.7rem; }
}

/* Never let the floating bar cover a fixed page action */
@media (max-width: 1100px) {
  .whatsapp-share-btn { margin-bottom: 0.5rem; }
}

/* =====================================================================
   8. ACCESSIBILITY / MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  .kp-hero-emblem img { animation: none; }
  .kp-btn, .card, .kp-stat, .bottom-nav-item, .header-icon-btn, .btn-login { transition: none; }
  .kp-btn:hover, .card:hover, .kp-stat:hover { transform: none; }
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--kp-red); color: #fff;
  padding: 0.6rem 1rem; border-radius: 0 0 10px 0;
  z-index: 999;
}
.skip-link:focus { left: 0; top: 0; }

/* =====================================================================
   9. AUTH PAGES — Member Registration is the site's most important
   page (it's the front door to everything else: directory, jobs,
   matrimonial, business, events), so it gets the full premium
   treatment — a branded card, clear field grouping, and a
   mobile-first responsive layout.
   ===================================================================== */
.auth-page {
  max-width: 640px;
  margin: 2.2rem auto 3rem;
  padding: 0 1.1rem;
}
.auth-page h1 {
  text-align: center;
  font-size: 1.85rem;
  margin-bottom: 0.35rem;
}
.auth-page > p {
  text-align: center;
  color: var(--kp-muted);
  max-width: 46ch;
  margin: 0 auto 1.6rem;
}
.auth-card {
  background: var(--kp-paper);
  border: 1px solid var(--kp-line);
  border-radius: 22px;
  box-shadow: var(--kp-shadow-lg);
  padding: 2rem 1.9rem 1.7rem;
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--kp-gold) 0%, var(--kp-red) 50%, var(--kp-gold) 100%);
}
.auth-page form { display: grid; gap: 1.1rem; max-width: 100%; }
.auth-fieldset {
  border: 1px solid var(--kp-line);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.15rem;
  display: grid;
  gap: 0.85rem;
  background: #fcfbf9;
}
.auth-fieldset legend {
  font-family: var(--font-deva);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--kp-red);
  padding: 0 0.4rem;
}
.auth-page label {
  display: grid;
  gap: 0.32rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--kp-ink);
}
.auth-page input:not([type="checkbox"]):not([type="radio"]),
.auth-page select,
.auth-page textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.68rem 0.85rem;
  border: 1.5px solid var(--kp-line);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-page input[type="checkbox"],
.auth-page input[type="radio"] {
  width: auto;
  flex-shrink: 0;
}
.auth-page input:focus,
.auth-page select:focus,
.auth-page textarea:focus {
  outline: none;
  border-color: var(--kp-red);
  box-shadow: 0 0 0 3px rgba(176, 28, 46, 0.12);
}
.auth-page small { color: var(--kp-muted); font-size: 0.78rem; font-weight: 400; }
.auth-page small.error { color: var(--kp-red); font-weight: 600; }
.auth-page button[type="submit"] {
  margin-top: 0.3rem;
  padding: 0.85rem 1.4rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--kp-red), var(--kp-red-dark));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(176, 28, 46, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.auth-page button[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 15px 32px rgba(176, 28, 46, 0.4); }
.auth-page > p:last-child { text-align: center; margin-top: 1.1rem; font-size: 0.92rem; }
.auth-member-gate {
  background: var(--kp-gold-soft);
  border: 1px solid var(--kp-gold);
  border-radius: 16px;
  padding: 1.4rem 1.3rem;
  text-align: center;
  margin: 1.5rem auto;
  max-width: 520px;
}
.auth-member-gate p { color: var(--kp-ink); margin: 0 0 1rem; }
.auth-member-gate .kp-btn { display: inline-flex; }

@media (max-width: 480px) {
  .auth-card { padding: 1.5rem 1.1rem 1.3rem; border-radius: 16px; }
  .auth-page h1 { font-size: 1.5rem; }
}

/* =====================================================================
   10. MEMBER DASHBOARD — premium upgrade (video walkthrough request:
   the dashboard looked flat/generic next to the rest of the site).
   Reuses the same kp-* design language as the homepage/auth pages —
   gradient hero, floating blob decoration, accent-underlined section
   headings, and a horizontally-scrollable quick-actions strip.
   ===================================================================== */
.dash-hero-premium {
  position: relative;
  background: linear-gradient(135deg, var(--kp-red) 0%, var(--kp-red-dark) 55%, var(--kp-navy-dark) 140%);
  border-radius: 0 0 26px 26px;
  padding: 2.1rem 1.5rem 1.9rem;
  overflow: hidden;
  box-shadow: var(--kp-shadow-lg);
}
.dash-hero-premium::before,
.dash-hero-premium::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.dash-hero-premium::before { width: 240px; height: 240px; top: -110px; right: -60px; background: rgba(255,255,255,0.08); }
.dash-hero-premium::after { width: 150px; height: 150px; bottom: -80px; left: 6%; background: rgba(212, 161, 42, 0.18); }
.dash-hero-premium .dash-hero-photo {
  position: relative;
  z-index: 1;
  border: 3px solid var(--kp-gold);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}
.dash-hero-premium .dash-hero-info { position: relative; z-index: 1; min-width: 0; }
.dash-hero-premium h1 { color: #fff; font-family: var(--font-deva); font-size: 1.4rem; margin: 0 0 0.2rem; }
.dash-hero-premium .dash-subtitle { color: rgba(255, 255, 255, 0.85); margin: 0; }
.dash-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.dash-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  backdrop-filter: blur(2px);
}
.dash-hero-pill .icon { width: 14px; height: 14px; }

.dash-quick-actions-wrap { padding: 0 1.25rem; max-width: 1100px; margin: 0 auto; }
.dash-quick-actions {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.9rem 0 0.3rem;
  margin-top: -1.1rem;
  position: relative;
  z-index: 2;
  /* BUG FIX (video): this row scrolls sideways when the pills don't
     all fit on a narrow screen — that's intentional — but the
     scrollbar track itself was rendering as a visible bar under the
     row, which read as a layout bug. Swipeable chip rows like this
     are meant to scroll with no visible scrollbar (the same pattern
     the "More" sheet and category chips use elsewhere); hide it in
     both engines while keeping the scrolling itself fully working. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.dash-quick-actions::-webkit-scrollbar { display: none; }
.dash-quick-action {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: var(--kp-paper);
  border: 1px solid var(--kp-line);
  border-radius: 16px;
  box-shadow: var(--kp-shadow);
  padding: 0.8rem 1rem;
  min-width: 80px;
  text-decoration: none;
  color: var(--kp-ink);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  word-break: keep-all;
  overflow-wrap: normal;
}
.dash-quick-action:hover { transform: translateY(-3px); box-shadow: var(--kp-shadow-lg); border-color: var(--kp-gold); }
.dash-quick-action .icon { width: 21px; height: 21px; color: var(--kp-red); }
.dash-quick-action-badge {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  background: var(--kp-red);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  border-radius: 999px;
  padding: 0 4px;
}

.dash-section-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 2rem 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--kp-line);
}
.dash-section-heading .icon { width: 19px; height: 19px; color: var(--kp-red); flex-shrink: 0; }
.dash-section-heading h2 { margin: 0; font-size: 1.12rem; }

.stat-tile { border: 1px solid var(--kp-line); }
.stat-tile:hover { border-color: var(--kp-gold); }
.account-summary-card { border: 1px solid var(--kp-line); }

@media (max-width: 480px) {
  .dash-hero-premium { padding: 1.7rem 1.15rem 1.6rem; border-radius: 0 0 20px 20px; }
  .dash-hero-premium h1 { font-size: 1.2rem; }
  .dash-quick-actions-wrap { padding: 0 0.9rem; }
}

/* =====================================================================
   11. DIRECTORY PROFILE CARD — premium header for a member's public
   directory page (modules/directory/views/show.php), reusing the same
   gradient hero language as the dashboard.
   ===================================================================== */
.profile-card-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: linear-gradient(135deg, var(--kp-red) 0%, var(--kp-red-dark) 55%, var(--kp-navy-dark) 140%);
  border-radius: 0 0 26px 26px;
  padding: 2.1rem 1.5rem 1.9rem;
  overflow: hidden;
  box-shadow: var(--kp-shadow-lg);
}
.profile-card-hero::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  top: -100px;
  right: -50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.profile-card-photo {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid var(--kp-gold);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.profile-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-card-info { position: relative; z-index: 1; min-width: 0; }
.profile-card-info h1 { color: #fff; font-family: var(--font-deva); font-size: 1.35rem; margin: 0 0 0.25rem; }
.profile-card-info .dash-subtitle { color: rgba(255, 255, 255, 0.85); margin: 0 0 0.75rem; }

@media (max-width: 480px) {
  .profile-card-hero { flex-direction: column; text-align: center; padding: 1.8rem 1.2rem; }
  .profile-card-info .dash-subtitle { justify-content: center; }
}

/* =====================================================================
   12. MEMBER DIRECTORY — premium people-directory cards (was reusing
   the generic rectangular content card meant for events/gallery items;
   people get a centered circular avatar instead).
   ===================================================================== */
.directory-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.directory-card-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--kp-gold);
  box-shadow: var(--kp-shadow);
  margin-bottom: 0.85rem;
  background: var(--kp-gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--kp-red);
}
.directory-card-avatar .icon { width: 34px; height: 34px; }
.directory-card h3 { margin: 0 0 0.15rem; }
.directory-card .directory-card-meta { color: var(--kp-muted); font-size: 0.85rem; margin: 0 0 0.2rem; }
.directory-card .directory-card-loc { color: var(--kp-muted); font-size: 0.8rem; margin: 0 0 0.9rem; display: flex; align-items: center; gap: 0.3rem; }
.directory-card .directory-card-loc .icon { width: 14px; height: 14px; }
.directory-card .kp-btn { margin-top: auto; }

/* ============================================================
   PHASE 1 (2026-09-19) — profession taxonomy, sangathan,
   directory filters, password reset. Uses the existing kp-*
   tokens only, so every theme keeps working unchanged.
   ============================================================ */

/* ---- Dynamic profession question block ---- */
.profession-fields {
  min-width: 0;
  max-width: 100%;
  margin-top: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--kp-line);
  border-radius: 14px;
  background: var(--kp-cream);
  animation: profFadeIn 0.22s ease;
  box-sizing: border-box;
}
.profession-fields[hidden] { display: none; }

@keyframes profFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.prof-fields-head {
  font-family: var(--font-deva);
  font-weight: 700;
  color: var(--kp-navy);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--kp-gold);
}

.prof-field { min-width: 0; max-width: 100%; margin-bottom: 0.9rem; }
.prof-field:last-child { margin-bottom: 0; }

.prof-field > label,
.prof-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--kp-ink);
  margin-bottom: 0.3rem;
}
.prof-field .req { color: var(--kp-red); }

.prof-checkgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.prof-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--kp-line);
  border-radius: 10px;
  background: var(--kp-paper);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.prof-check span { min-width: 0; overflow-wrap: break-word; }
.prof-check:hover { border-color: var(--kp-gold); }
.prof-check input { margin: 0; flex-shrink: 0; }
.prof-check input:checked + span { font-weight: 700; color: var(--kp-red); }

/* ---- Password strength meter ---- */
.pw-meter { margin: -0.4rem 0 0.9rem; }
.pw-meter-track {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: var(--kp-line);
  overflow: hidden;
}
.pw-meter-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition: width 0.25s ease, background 0.25s ease;
  background: var(--kp-red);
}
.pw-meter-bar.pw-ok { background: var(--kp-gold); }
.pw-meter-bar.pw-strong { background: var(--kp-green); }
.pw-meter-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--kp-muted);
}

/* ---- Forgot-password step indicator ---- */
.pw-steps {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}
.pw-steps li {
  flex: 1 1 auto;
  min-width: 90px;
  text-align: center;
  padding: 0.5rem 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--kp-muted);
  background: var(--kp-paper);
  border: 1px solid var(--kp-line);
  border-radius: 10px;
}
.pw-steps li.current {
  color: var(--kp-paper);
  background: linear-gradient(135deg, var(--kp-red), var(--kp-red-dark));
  border-color: transparent;
}
.pw-steps li.done { color: var(--kp-green); border-color: var(--kp-green); }

/* ---- New-sangathan inline block ---- */
.new-org-block {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px dashed var(--kp-gold);
  border-radius: 14px;
  background: var(--kp-gold-soft);
}
.new-org-block[hidden] { display: none; }

.suggest-org {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 1.5rem;
  border: 1px solid var(--kp-line);
  border-radius: 14px;
  background: var(--kp-cream);
  padding: 0.85rem 1rem;
}

/* The Sangathan dropdown mixes Hindi + English + short-name text and can
   run 80-100 characters for one option. A <select> without an explicit
   width sizes itself (and, inside a CSS Grid label, can size its whole
   grid track) to fit the widest OPTION text, not the visible box — this
   was overflowing the entire registration page horizontally. text-overflow
   keeps the closed box readable; the fix above (width:100% on .auth-page
   select) is what actually stops the page-wide overflow. */
#organization-select,
.dir-filter-form select {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.suggest-org > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--kp-navy);
}
.suggest-org[open] > summary { margin-bottom: 0.85rem; }

/* ---- Directory category strip ---- */
.dir-cat-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.9rem;
  scrollbar-width: none;
}
.dir-cat-strip::-webkit-scrollbar { display: none; }

.dir-cat-chip {
  flex: 0 0 auto;
  min-width: 104px;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--kp-line);
  background: var(--kp-paper);
  box-shadow: var(--kp-shadow-sm);
  text-align: center;
  text-decoration: none;
  color: var(--kp-ink);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.dir-cat-chip:hover { transform: translateY(-2px); border-color: var(--kp-gold); box-shadow: var(--kp-shadow); }
.dir-cat-chip.active {
  border-color: var(--kp-red);
  background: var(--kp-red-soft);
}
.dir-cat-count {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--kp-red);
}
.dir-cat-label {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-deva);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
}
.dir-cat-label small {
  display: block;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--kp-muted);
}

.dir-filter-form { flex-wrap: wrap; gap: 0.5rem; }
.dir-filter-form select { min-width: 150px; max-width: 260px; }

.dir-badge {
  display: inline-block;
  margin: 0.15rem 0 0.35rem;
  padding: 0.18rem 0.6rem;
  border-radius: 99px;
  font-family: var(--font-deva);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--kp-navy);
  background: var(--kp-gold-soft);
  border: 1px solid var(--kp-gold);
}

.dir-org {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--kp-muted);
  margin: 0.2rem 0 0.5rem;
}
.dir-org svg { width: 14px; height: 14px; }

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.75rem 0 0.5rem;
  flex-wrap: wrap;
}
.pagination-info { font-size: 0.88rem; color: var(--kp-muted); font-weight: 600; }

/* ---- Sangathan public cards ---- */
.org-card { text-align: center; }
.org-card-alt { font-size: 0.85rem; color: var(--kp-muted); margin: 0.15rem 0; }
.org-card-short {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 99px;
  background: var(--kp-navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.org-card-count { margin: 0.6rem 0; font-size: 0.9rem; color: var(--kp-ink); }
.org-card-count strong { font-size: 1.35rem; color: var(--kp-red); }

/* ---- Admin: attention card + nav badge ---- */
.admin-card-attention {
  border-left: 4px solid var(--kp-gold);
  background: var(--kp-gold-soft);
}
.nav-badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 99px;
  background: var(--kp-red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
}
.admin-form-grid button { grid-column: 1 / -1; justify-self: start; }
.inline-form { display: inline; }

/* ---- Every screen size, no exceptions ---- */
@media (max-width: 720px) {
  .prof-checkgrid { grid-template-columns: 1fr 1fr; }
  .dir-filter-form select { min-width: 0; flex: 1 1 46%; }
  .admin-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .prof-checkgrid { grid-template-columns: 1fr; }
  .dir-cat-chip { min-width: 92px; }
  .pw-steps li { min-width: 72px; font-size: 0.75rem; }
}

/* =====================================================================
   MEMBER DASHBOARD — icon badge + entrance motion, same "2026" system
   as the admin panel, so Home / dashboard feels like the same product
   rather than a plainer cousin of it. Purely additive re-declarations
   of existing selectors — no markup changes needed.
   ===================================================================== */
.dash-quick-action .icon {
  width: 22px;
  height: 22px;
  padding: 9px;
  box-sizing: content-box;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--kp-red) 0%, #8c1322 100%);
  color: #fff;
  box-shadow: 0 6px 14px -5px rgba(176, 28, 46, 0.5);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dash-quick-action:hover .icon { transform: scale(1.1) rotate(-6deg); }
.dash-quick-action:active .icon { transform: scale(0.92) rotate(0deg); }

@keyframes kp-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes kp-pop-in  { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.dash-hero-premium,
.profile-progress-card,
.dash-section-heading {
  animation: kp-fade-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.dash-quick-action, .stat-tile { animation: kp-pop-in 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
.dash-quick-actions .dash-quick-action:nth-child(1) { animation-delay: 0.03s; }
.dash-quick-actions .dash-quick-action:nth-child(2) { animation-delay: 0.08s; }
.dash-quick-actions .dash-quick-action:nth-child(3) { animation-delay: 0.13s; }
.dash-quick-actions .dash-quick-action:nth-child(4) { animation-delay: 0.18s; }
.dash-quick-actions .dash-quick-action:nth-child(5) { animation-delay: 0.23s; }
.dash-quick-actions .dash-quick-action:nth-child(6) { animation-delay: 0.28s; }
.stat-grid-icon .stat-tile:nth-child(1) { animation-delay: 0.05s; }
.stat-grid-icon .stat-tile:nth-child(2) { animation-delay: 0.11s; }
.stat-grid-icon .stat-tile:nth-child(3) { animation-delay: 0.17s; }
.stat-grid-icon .stat-tile:nth-child(4) { animation-delay: 0.23s; }

/* Hero banner shine sweep — a slow, one-time light streak across the
   gradient banner on load, the kind of subtle flourish that reads as
   "premium product" rather than a static colored rectangle. */
.dash-hero-premium { position: relative; overflow: hidden; }
.dash-hero-premium::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.16) 50%, transparent 100%);
  transform: translateX(-160%);
  animation: kp-hero-shine 2.2s 0.5s ease-out 1;
  pointer-events: none;
}
@keyframes kp-hero-shine { to { transform: translateX(320%); } }

@media (prefers-reduced-motion: reduce) {
  .dash-hero-premium, .profile-progress-card, .dash-section-heading,
  .dash-quick-action, .stat-tile, .dash-quick-action .icon {
    animation: none !important;
    transition: none !important;
  }
  .dash-hero-premium::after { display: none; }
}

/* =====================================================================
   MEMBER DIRECTORY — clean uniform cards (2026-10-03)
   Root bug: main.css ".card img {width:100%; aspect-ratio:4/3}" beat the
   avatar rule, so members WITH a photo got a wide rectangle while members
   without one got a circle. These selectors are more specific, so every
   avatar is the same round size. Scoped to .dir-member only — the
   Organizations page (which also uses .directory-card) is untouched.
   ===================================================================== */
.card-grid:has(.dir-member) { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.directory-card.dir-member {
  padding: 1.5rem 1.1rem 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-top: 3px solid var(--kp-gold);
  border-radius: 18px;
  gap: 0;
  min-width: 0;
}
.dir-member-top { display: flex; flex-direction: column; align-items: center; width: 100%; text-decoration: none; color: inherit; }
.directory-card.dir-member img.directory-card-avatar,
.directory-card.dir-member .directory-card-avatar {
  width: 96px; height: 96px; min-width: 96px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;      /* keeps faces in frame */
  border: 3px solid var(--kp-gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  margin: 0 0 0.8rem;
  flex-shrink: 0;
}
.directory-card.dir-member .dir-initial {
  font-size: 2.2rem; font-weight: 700; line-height: 1;
  color: var(--kp-red); background: var(--kp-gold-soft);
}
.directory-card.dir-member h3.dir-member-name {
  font-size: 1.05rem; line-height: 1.3; margin: 0 0 0.35rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere; min-height: 2.6em; text-align: center;
}
.directory-card.dir-member .dir-badge { margin: 0 0 0.55rem; }
.dir-member-info { width: 100%; flex: 1 1 auto; min-height: 4.6rem; }
.directory-card.dir-member .directory-card-meta {
  font-size: 0.85rem; line-height: 1.35; margin: 0 0 0.35rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.directory-card.dir-member .directory-card-loc,
.directory-card.dir-member .dir-org {
  display: flex; align-items: flex-start; justify-content: center; gap: 0.3rem;
  font-size: 0.8rem; line-height: 1.35; margin: 0 0 0.3rem; color: var(--kp-muted); text-align: left;
}
.directory-card.dir-member .directory-card-loc span,
.directory-card.dir-member .dir-org span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; text-align: center; }
.directory-card.dir-member .directory-card-loc svg,
.directory-card.dir-member .dir-org svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }
.directory-card.dir-member .dir-member-btn {
  margin-top: 0.9rem; width: 100%; max-width: 190px; box-sizing: border-box;
  padding: 0.55rem 1rem; font-size: 0.9rem; border-radius: 99px; text-align: center;
}
@media (max-width: 480px) {
  .card-grid:has(.dir-member) { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .directory-card.dir-member { padding: 1.1rem 0.6rem 1rem; }
  .directory-card.dir-member .directory-card-avatar { width: 76px; height: 76px; min-width: 76px; }
  .directory-card.dir-member h3.dir-member-name { font-size: 0.92rem; }
  .directory-card.dir-member .dir-member-btn { font-size: 0.8rem; padding: 0.45rem 0.6rem; }
}

/* =====================================================================
   PHOTO ZOOM / LIGHTBOX (2026-10-03) — tap a member photo to view it
   full-screen like Facebook / Instagram. Script: assets/js/photo-zoom.js
   ===================================================================== */
img[data-zoom], .directory-card-avatar:is(img), .profile-card-photo img, .dash-hero-photo img, .dp-hero-photo img, .profile-photo-preview, .chat-thread-header .chat-avatar-photo { cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
html.kp-zoom-lock, html.kp-zoom-lock body { overflow: hidden !important; }
.kp-zoom {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
  touch-action: none; overscroll-behavior: contain;
}
.kp-zoom.is-open { opacity: 1; visibility: visible; }
.kp-zoom-stage { flex: 1 1 auto; width: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 0; }
.kp-zoom-img {
  max-width: 100vw; max-height: 100vh; max-height: 100dvh;
  width: auto; height: auto; object-fit: contain;
  aspect-ratio: auto !important; border-radius: 0 !important; margin: 0 !important; box-shadow: none !important; border: 0 !important;
  user-select: none; -webkit-user-drag: none; touch-action: none; cursor: zoom-in;
  transform-origin: center center; will-change: transform;
  transform: scale(.94); transition: transform .2s ease;
}
.kp-zoom.is-open .kp-zoom-img { transform: none; }
.kp-zoom.is-zoomed .kp-zoom-img { cursor: grab; }
.kp-zoom-close {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: 14px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.kp-zoom-close:hover { background: rgba(255, 255, 255, 0.3); }
.kp-zoom-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1rem max(14px, env(safe-area-inset-bottom));
  color: #fff; text-align: center; font-weight: 600; font-size: 1rem; pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}
.kp-zoom.is-zoomed .kp-zoom-cap { opacity: 0; }
.dir-member-namelink { text-decoration: none; color: inherit; width: 100%; }
.directory-card.dir-member a.dir-initial { text-decoration: none; }

/* keep the info block aligned across cards even when a member has no category badge */
.directory-card.dir-member .dir-badge-row { min-height: 1.9rem; display: flex; align-items: center; justify-content: center; width: 100%; margin-bottom: 0.3rem; }
.directory-card.dir-member .dir-badge-row .dir-badge { margin: 0; }
