/* KDBK home page – all rules scoped under body.kdbk */
body.kdbk {
  --navy: #0f2350;
  --cyan: #08a9dc;
  --cyan-soft: #c5effc;
  --teal: #1b8f96;
  --mist: #f0f9fc;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, sans-serif;
  /* The blue strip under the hero is a fixed height, and the hero is exactly
	   "one screen minus that strip" — so the first screen shows header + slider +
	   the blue strip, like the Figma. Change --kdbk-strip-h in ONE place. */
  --kdbk-strip-h: 3.6rem;
  /* Header size — the two numbers to change if you want it thinner/thicker.
	   Header height = padding x 2 + logo height (the hero text is positioned from this). */
  --kdbk-logo-h: 72px;
  --kdbk-header-pad: 1rem;
  --kdbk-header-h: calc(var(--kdbk-header-pad) * 2 + var(--kdbk-logo-h));
  --kdbk-hero-h: calc(100vh - var(--kdbk-strip-h));
  font-family: var(--sans);
  color: #22304f;
  background: #fff;
}
/* color: inherit (not a fixed color) — each heading now naturally takes the
   color already set on its own section/parent. A dark section's headings
   turn white automatically; a light section's stay dark, with no need to
   override color on every single heading just to get its own look. */
/* ".kdbk h1" (not "body.kdbk h1"): one class lower in specificity, so a component
   rule like ".kdbk-program h3 { font-family: sans; font-weight: 700 }" can win. */
.kdbk h1,
.kdbk h2,
.kdbk h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: inherit;
  line-height: 1.1;
}
body.kdbk a {
  text-decoration: none;
}

.kdbk-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.04em;
}
.kdbk-h-lg {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin: 0.5rem 0 0;
}
.kdbk-h-sm {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

/* kdbk-top wraps the header + hero together so the header always overlaps
   the image directly below it, regardless of what else is on the page. */
.kdbk-top {
  position: relative;
}

/* Header + hero sit in a NARROWER container than the rest of the page — in the Figma
   the content is ~1036px wide, leaving roughly 200px of space either side on a 1440
   screen (the sections below use the normal, wider container). That space is also
   where the slider dots live. Change 1060px to widen/narrow both together. */
@media (min-width: 1200px) {
  .kdbk-header .navbar.container,
  .kdbk-hero .container {
    max-width: 1060px;
  }
}

/* Header — fully transparent, floats on top of the image, nothing of its own. */
.kdbk-header {
  position: fixed !important; /* always pinned to the top of the screen; transparent until the page scrolls */
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1030; /* above the page content, below the WordPress admin toolbar */
  background: transparent !important;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}
/* Logged-in admins: sit just under the WordPress toolbar (32px, or 46px on small screens;
   below 600px WordPress lets the toolbar scroll away, so no offset there) */
body.admin-bar .kdbk-header {
  top: 32px !important;
}
@media (max-width: 782px) {
  body.admin-bar .kdbk-header {
    top: 46px !important;
  }
}
@media (max-width: 600px) {
  body.admin-bar .kdbk-header {
    top: 0 !important;
  }
}
/* Bootstrap's .navbar resets its side padding to 0, which beats .container's own
   side padding — so the logo used to sit one gutter further left than the hero
   text under it. Restoring it puts logo, separator line and headline on one edge. */
.kdbk-header .navbar {
  background: transparent !important;
  padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
  padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
}
.kdbk-header .navbar-brand {
  padding: 0;
  margin-right: 0;
}
.kdbk-logo img {
  display: block;
  max-height: var(--kdbk-logo-h);
  width: auto;
  background: #fff;
  padding: 4px;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(255, 255, 255, 0.25);
}

/* Target every link inside the nav, not just ones with a "nav-link" class —
   WordPress's default menu walker only classes the <li>, not the <a> inside it,
   so a plain custom-link menu item was falling back to the browser's blue. */
.kdbk-header .navbar-nav a,
.kdbk-header .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.kdbk-header .navbar-nav a:hover,
.kdbk-header .nav-link:hover {
  color: #fff !important;
}
.kdbk-header .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

@media (min-width: 992px) {
  .kdbk-header .navbar {
    padding-top: var(--kdbk-header-pad) !important;
    padding-bottom: var(--kdbk-header-pad) !important;
  } /* beats .py-3 */
  .kdbk-header .navbar-nav {
    gap: 2rem !important;
    margin-right: 3rem !important;
  } /* beat .gap-lg-4 / .me-lg-4 */
  .kdbk-header .navbar-nav a {
    padding: 0.5rem 0;
  }
  .kdbk-header .btn-outline-light {
    padding: 0.6rem 1.5rem !important;
    font-size: 1rem;
    font-weight: 600;
  } /* beats .px-4 */

  /* The thin separator under the navigation — only as wide as the content, not the screen */
  .kdbk-header .navbar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    height: 1px;
    background: rgba(255, 255, 255, 0.35);
  }
}
@media (max-width: 991.98px) {
  .kdbk-header .navbar-collapse {
    background: rgba(15, 35, 80, 0.96);
    padding: 1rem;
    margin-top: 0.75rem;
    border-radius: 0.5rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto; /* scrolls instead of running off-screen on a short phone */
  }
  .kdbk-logo {
    flex-shrink: 0;
  } /* keeps the logo from squeezing when the toggler button sits right next to it */
  .kdbk-header .navbar-toggler {
    padding: 0.4rem 0.6rem;
  }
}

/* STICKY HEADER — a small script (inc/kdbk-setup.php) adds .is-scrolled once the page has scrolled a
   little. The header then turns solid navy (#0f2350 = --navy) and slims down. */
.kdbk-header .navbar {
  transition: padding 0.3s ease;
}
.kdbk-logo img {
  transition: max-height 0.3s ease;
}
.kdbk-header.is-scrolled {
  background: #0f2350 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
.kdbk-header.is-scrolled .navbar {
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
}
.kdbk-header.is-scrolled .kdbk-logo img {
  max-height: 52px;
}
.kdbk-header .navbar::after {
  transition: opacity 0.3s ease;
}
.kdbk-header.is-scrolled .navbar::after {
  opacity: 0;
} /* the thin line isn't needed on a solid bar */
html {
  scroll-padding-top: 5.5rem;
} /* in-page links (#about, #team…) stop BELOW the sticky bar, not behind it */
@media (prefers-reduced-motion: reduce) {
  .kdbk-header,
  .kdbk-header .navbar,
  .kdbk-logo img,
  .kdbk-header .navbar::after {
    transition: none;
  }
}

/* Hero — the photo IS the background. Its height is one screen minus the blue
   strip (see --kdbk-hero-h), so header + slider + blue strip fit in the first screen. */
.kdbk-hero {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--kdbk-hero-h);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
}
/* Logged-in admins have the 32px (46px on small screens) WordPress toolbar eating the top of the screen */
@media (min-width: 768px) {
  body.admin-bar.kdbk {
    --kdbk-hero-h: calc(100vh - var(--kdbk-strip-h) - 32px);
  }
}
@media (min-width: 768px) and (max-width: 782px) {
  body.admin-bar.kdbk {
    --kdbk-hero-h: calc(100vh - var(--kdbk-strip-h) - 46px);
  }
}

/* Text sits centred in the space UNDER the header, not behind it */
.kdbk-hero:not(.kdbk-hero--slider),
.kdbk-hero__slide {
  padding: var(--kdbk-header-h) 0 2rem;
}

.kdbk-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(10, 25, 55, 0.78),
    rgba(10, 25, 55, 0.15)
  );
}
.kdbk-hero--slider::before {
  content: none;
} /* the slider's overlay lives on each slide instead */
.kdbk-hero > .container {
  position: relative;
  z-index: 1;
}
.kdbk-hero__inner {
  max-width: 52rem;
}
/* Headline: Fraunces 68px, as in the Figma. If it looks lighter/heavier than the design,
   change the weight below (400 regular … 900 black) — everything else stays. */
.kdbk-hero h1 {
  color: #fff;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.25rem); /* 4.25rem = 68px */
  line-height: 1.2;
  margin-bottom: 1.75rem;
}
.kdbk-hero .lead {
  max-width: 40rem;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.85;
  margin-bottom: 3rem;
  opacity: 0.95;
}

/* "Explore our work" — outlined pill in the brand cyan */
.kdbk-hero__btn {
  display: inline-block;
  padding: 0.85rem 2.8rem;
  line-height: 1.5;
  font-size: 1.2rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  color: var(--cyan);
  background: transparent;
  border: 1px solid var(--cyan);
  border-radius: 999px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.kdbk-hero__btn:hover,
.kdbk-hero__btn:focus-visible {
  background: var(--cyan);
  color: #fff;
}

/* "Registered nonprofit · Lalitpur, Nepal" — navy tab in the bottom-right corner of the photo */
.kdbk-hero__badge {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: var(--navy);
  color: var(--cyan-soft);
  padding: 1.5rem 5rem 1.5rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
}
.kdbk-hero__badge i {
  font-size: 1.4rem;
  vertical-align: -0.2rem;
}
@media (max-width: 575.98px) {
  .kdbk-hero__badge {
    left: 0;
    text-align: center;
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
  }
}

/* Hero slider: every layer gets the exact same height, so the photo always fills it with no gap */
.kdbk-hero--slider {
  padding: 0;
  width: 100%;
  overflow: hidden;
}
.kdbk-hero--slider #kdbkHeroCarousel,
.kdbk-hero--slider .carousel-inner,
.kdbk-hero--slider .carousel-item,
.kdbk-hero--slider .carousel-item .kdbk-hero__slide {
  width: 100%;
  height: 100%;
}
.kdbk-hero__slide {
  position: relative;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
  box-sizing: border-box;
}
.kdbk-hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(10, 25, 55, 0.78),
    rgba(10, 25, 55, 0.15)
  );
}
.kdbk-hero__slide > .container {
  position: relative;
  z-index: 1;
}

/* Slider dots — a vertical stack to the LEFT of the text, lined up with the content edge.
   The wrapper is a .container laid over the slider (so it shares the text's left edge);
   the dots hang a little way outside it, but never off the screen on narrower windows. */
.kdbk-hero__dots-wrap {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
}
.kdbk-hero__dots {
  position: absolute;
  top: 50%;
  right: auto;
  bottom: auto;
  left: max(-4.25rem, calc((100% - 100vw) / 2 + 0.5rem));
  transform: translateY(-50%);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
  pointer-events: auto;
}
/* !important needed on every property here: Bootstrap's own carousel CSS targets
   [data-bs-target], an attribute selector with higher specificity than a plain
   "button" element selector, so its 30px x 3px bar shape otherwise wins. */
.kdbk-hero__dots button {
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 2px solid transparent !important;
  border-radius: 50% !important;
  background-color: rgba(255, 255, 255, 0.3) !important;
  background-clip: border-box !important;
  text-indent: 0 !important;
  opacity: 1 !important;
}
/* Active dot = white ring with a white centre (like a radio button), a touch larger */
.kdbk-hero__dots button.active {
  width: 16px !important;
  height: 16px !important;
  border-color: #fff !important;
  background: radial-gradient(
    circle at center,
    #fff 0,
    #fff 3px,
    transparent 3.5px
  ) !important;
}

@media (max-width: 991.98px) {
  .kdbk-hero:not(.kdbk-hero--slider),
  .kdbk-hero__slide {
    padding-top: 5.5rem;
  } /* mobile header is shorter */
}
@media (max-width: 767.98px) {
  body.kdbk {
    --kdbk-hero-h: 70vh;
  }
  .kdbk-hero__dots-wrap {
    display: none;
  }
}
@media (max-width: 575.98px) {
  /* clamp()'s own minimum (2.4rem) is still large on a ~360px-wide phone —
	   shrink it further here rather than lowering the clamp for every screen */
  .kdbk-hero h1 {
    font-size: 1.85rem;
    margin-bottom: 1.25rem;
  }
  .kdbk-hero .lead {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
  }
  .kdbk-hero__btn {
    padding: 0.7rem 1.8rem;
    font-size: 1rem;
  }
}
/* Landscape / short-height phones: 70vh of a ~360px-tall screen leaves almost
   no room, crushing the header and hero text together. Switch to a fixed
   minimum height instead of a viewport-height percentage in that case. */
@media (max-width: 991.98px) and (max-height: 500px) and (orientation: landscape) {
  .kdbk-hero {
    height: auto;
    min-height: 440px;
  }
  .kdbk-hero__slide {
    min-height: 440px;
  }
}

/* Blue strip under the hero — fixed height so the hero maths above is exact */
.kdbk-strip {
  background: var(--cyan);
  color: #fff;
  padding: 1.1rem 0;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: var(--kdbk-strip-h);
  display: flex;
  align-items: center;
}

/* Page header (About, and any other inner page) — a short version of the
   homepage hero: same gradient-over-photo idea, centered title, no slider. */
.kdbk-page-hero {
  position: relative;
  height: 45vh;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--navy);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
}
.kdbk-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 55, 0.55);
}
.kdbk-page-hero > .container {
  position: relative;
  z-index: 1;
}
.kdbk-page-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin: 0;
}

/* Intro section (About page): left panel reuses .kdbk-support__panel's teal
   overlay look, right column is plain text */
.kdbk-intro__text-col {
  padding: 2.5rem;
}
.kdbk-intro__body p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #44546b;
}

/* "What We Do" feature cards — sits on .kdbk-stories' fixed-photo overlay */
.kdbk-feature {
  text-align: left;
}
.kdbk-feature__icon {
  display: block;
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}
.kdbk-feature__icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}
.kdbk-feature h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.kdbk-feature p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #5a6a86;
  margin: 0;
}

@media (max-width: 767.98px) {
  .kdbk-page-hero {
    height: 35vh;
    min-height: 220px;
  }
  .kdbk-intro__text-col {
    padding: 2rem 1.5rem;
  }
}

/* Process steps (Impact page): 01 / 02 / 03 / 04 with a thin line beside the number */
.kdbk-step__num {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 1rem;
}
.kdbk-step__num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #cfd8ea;
  min-width: 2rem;
}
.kdbk-step {
  display: flex;
  flex-direction: column;
}
.kdbk-step h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}
.kdbk-step p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #5a6a86;
  margin: 0;
}

/* Impact gallery: first 4 photos as equal squares (2x2), 5th photo a big
   square on the right, no gaps between any of them.
   Add exactly 5 photos under "Impact Gallery", ordered via Page Attributes.
   aspect-ratio (not a fixed row height) is what guarantees true squares at
   any screen width — the 5th tile spans 2 columns + 2 rows, which are each
   as wide/tall as a small square, so it comes out square too without needing
   its own aspect-ratio rule. */
.kdbk-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.kdbk-gallery__item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.kdbk-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.kdbk-gallery__item:nth-child(5) {
  grid-column: 3 / span 2;
  grid-row: 1 / span 2;
  aspect-ratio: auto;
}

/* Hover caption — only rendered for a photo whose Excerpt is filled in.
   Not a link, just a plain div: nothing to click, it only reveals text. */
.kdbk-gallery__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
  background: linear-gradient(
    160deg,
    rgba(27, 143, 150, 0.92),
    rgba(15, 35, 80, 0.92)
  );
  color: #fff;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none; /* confirms it's never clickable, even if a browser extension tabs into it */
}
.kdbk-gallery__item:hover .kdbk-gallery__overlay {
  opacity: 1;
}
.kdbk-gallery__item:hover img {
  transform: scale(1.05);
}
.kdbk-gallery__overlay h3 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}
.kdbk-gallery__overlay p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
  max-width: 22rem;
}
@media (max-width: 767.98px) {
  .kdbk-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .kdbk-gallery__item:nth-child(5) {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 1 / 1;
  }
}

/* Impact cards on the Impact page now link to their detail page */
.kdbk-card-link {
  display: block;
  color: inherit;
}
.kdbk-card-link:hover h3 {
  color: var(--cyan);
}
.kdbk-readmore {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan);
}
.kdbk-readmore:hover {
  color: var(--navy);
}

/* Impact detail page */
.kdbk-back {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan);
}
.kdbk-back:hover {
  color: var(--navy);
}
.kdbk-detail__img img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin-bottom: 1.75rem;
  border-radius: 4px;
}
.kdbk-detail__body {
  font-size: 1rem;
  line-height: 1.8;
  color: #44546b;
}
.kdbk-detail__body h2,
.kdbk-detail__body h3,
.kdbk-detail__body h4 {
  color: var(--navy);
  margin: 1.75rem 0 0.75rem;
}
.kdbk-detail__body img {
  max-width: 100%;
  height: auto;
}
.kdbk-detail__body ul,
.kdbk-detail__body ol {
  padding-left: 1.25rem;
}
.kdbk-detail__side {
  background: var(--mist);
  padding: 1.75rem;
  position: sticky;
  top: 6rem;
}
.kdbk-detail__side h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.kdbk-detail__list li {
  border-bottom: 1px solid #dfe6ee;
}
.kdbk-detail__list li:last-child {
  border-bottom: 0;
}
.kdbk-detail__list a {
  display: block;
  padding: 0.7rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}
.kdbk-detail__list a:hover,
.kdbk-detail__list .is-current a {
  color: var(--cyan);
}

/* Footer "Programs" column: a title too long for the column is cut off with "…" (hover shows it in full) */
.kdbk-footer__programs a {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Previous / Next links at the bottom of an Impact detail page */
.kdbk-detail__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid #dfe6ee;
}
.kdbk-detail__nav a {
  display: block;
  max-width: 48%;
}
.kdbk-detail__nav small {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
}
.kdbk-detail__nav strong {
  font-size: 1rem;
  color: var(--navy);
}
.kdbk-detail__nav a:hover strong {
  color: var(--cyan);
}
.kdbk-detail__nav .is-next {
  margin-left: auto;
  text-align: right;
}
@media (max-width: 575.98px) {
  .kdbk-detail__nav {
    flex-direction: column;
  }
  .kdbk-detail__nav a {
    max-width: 100%;
  }
  .kdbk-detail__nav .is-next {
    margin-left: 0;
    text-align: left;
  }
}

/* GALLERY — album cards, the photos inside an album, and the photo viewer */
.kdbk-gallery-intro {
  max-width: 36rem;
  margin: 1rem auto 0;
  color: #5a6a86;
  line-height: 1.7;
}
.kdbk-gallery-empty {
  color: #5a6a86;
  text-align: center;
  padding: 2rem 0;
}

.kdbk-album {
  display: block;
  height: 100%;
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  overflow: hidden;
  color: inherit;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.kdbk-album:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(15, 35, 80, 0.12);
  color: inherit;
}
.kdbk-album__cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--mist);
}
.kdbk-album__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.kdbk-album:hover .kdbk-album__cover img {
  transform: scale(1.06);
}
.kdbk-album__empty {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 2.5rem;
  color: #b8c6d9;
}
.kdbk-album__count {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 35, 80, 0.82);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.kdbk-album__body {
  padding: 1.25rem 1.35rem 1.4rem;
}
.kdbk-album__body h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--navy);
  margin: 0 0 0.5rem;
}
.kdbk-album__body p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #5a6a86;
  margin: 0 0 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kdbk-album__more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan);
}
.kdbk-album:hover .kdbk-album__more {
  color: var(--navy);
}
.kdbk-album__more i {
  display: inline-block;
  transition: transform 0.25s ease;
}
.kdbk-album:hover .kdbk-album__more i {
  transform: translateX(4px);
}

.kdbk-album-head {
  max-width: 42rem;
  margin-bottom: 2rem;
}
.kdbk-album-head__text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #44546b;
  margin: 0;
}

/* Photos inside an album: every tile is the SAME size. Each photo is centre-cropped to fit its
   tile (the viewer still shows the whole, uncropped photo). To change the tile shape, edit
   --kdbk-photo-ratio: "1 / 1" = square, "4 / 3" = landscape, "3 / 2" = wider landscape. */
.kdbk-photos {
  --kdbk-photo-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.kdbk-photo {
  display: block;
  position: relative;
  aspect-ratio: var(--kdbk-photo-ratio);
  overflow: hidden;
  border-radius: 8px;
  background: var(--mist);
  cursor: zoom-in;
}
.kdbk-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.kdbk-photo:hover img {
  transform: scale(1.04);
}
.kdbk-photo::after {
  content: "\F52A";
  font-family: "bootstrap-icons";
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(15, 35, 80, 0.8);
  color: #fff;
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}
.kdbk-photo:hover::after {
  opacity: 1;
  transform: scale(1);
}
.kdbk-more-albums {
  background: var(--mist);
}
@media (max-width: 991.98px) {
  .kdbk-photos {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575.98px) {
  .kdbk-photos {
    gap: 0.6rem;
  }
  .kdbk-photo {
    border-radius: 6px;
  }
}

/* Photo viewer */
.kdbk-lock {
  overflow: hidden;
}
.kdbk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem;
  background: rgba(8, 16, 38, 0.93);
}
.kdbk-lightbox[hidden] {
  display: none !important;
}
.kdbk-lightbox figure {
  margin: 0;
  max-width: min(1100px, 100%);
  text-align: center;
}
.kdbk-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: 4px;
}
.kdbk-lightbox figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #dfe6ee;
}
.kdbk-lightbox__close,
.kdbk-lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.kdbk-lightbox__close:hover,
.kdbk-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.28);
}
.kdbk-lightbox__close {
  top: 1rem;
  right: 1rem;
}
.kdbk-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}
.kdbk-lightbox__nav.is-prev {
  left: 1rem;
}
.kdbk-lightbox__nav.is-next {
  right: 1rem;
}
.kdbk-lightbox.is-single .kdbk-lightbox__nav {
  display: none;
}

/* Contact page */
.kdbk-contact-panel {
  min-height: 100%;
}
.kdbk-contact-list {
  margin: 1.75rem 0 0;
}
.kdbk-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
  font-size: 0.9rem;
}
.kdbk-contact-list i {
  font-size: 1.1rem;
  margin-top: 0.15rem;
  color: #c5effc;
}
.kdbk-contact-list a {
  color: #fff;
}
.kdbk-contact-list a:hover {
  color: #c5effc;
}

.kdbk-contact-form {
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 4px;
  padding: 2.25rem;
  height: 100%;
  box-sizing: border-box;
}
.kdbk-contact-form .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.kdbk-contact-form .form-control {
  border-color: #d9e0ea;
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
}
.kdbk-contact-form .form-control:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 0.2rem rgba(8, 169, 220, 0.15);
}
.btn-send {
  background: var(--cyan);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}
.btn-send:hover {
  background: var(--teal);
  color: #fff;
}

.kdbk-map-section {
  width: 100%;
  line-height: 0;
}
.kdbk-map-embed {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
}
@media (max-width: 575.98px) {
  .kdbk-contact-form {
    padding: 1.5rem;
  }
  .kdbk-map-embed {
    height: 300px;
  }
}

/* About */
/* Left card and right aims list stretch to the SAME height (the row no
   longer uses align-items-center, so Bootstrap's default "stretch" makes
   both side columns match each other), each centering its own content
   inside that shared height. The middle photo is then deliberately raised
   above both, matching the Figma's "photo floats higher" look. */
.kdbk-about__card {
  background: var(--navy);
  color: #fff;
  padding: 2.5rem;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.kdbk-about__card h2 {
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1.5rem;
}
.kdbk-about__card p {
  font-size: 0.9rem;
  opacity: 0.92;
}
.kdbk-about__aims-wrap {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.kdbk-about__img-col {
  position: relative;
}
.kdbk-about__img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-top: -2.5rem;
}
@media (max-width: 767.98px) {
  .kdbk-about__img {
    margin-top: 0;
  }
}
.kdbk-aims {
  margin: 0;
  padding: 0;
}
.kdbk-aims li {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid #dfe6ee;
  font-weight: 600;
  color: var(--navy);
}
.kdbk-aims li:last-child {
  border-bottom: 0;
}
.kdbk-aims__num {
  font-family: var(--serif);
  font-size: 2.6rem;
  color: var(--cyan);
  line-height: 1;
  min-width: 3.4rem;
}

/* Vision & mission */
.kdbk-vm {
  background: var(--mist);
}
.kdbk-vm__box {
  padding: 2.5rem;
}
.kdbk-vm__box--dark {
  background: var(--navy);
  color: #fff;
}
.kdbk-vm__box--light {
  background: var(--cyan-soft);
  color: var(--navy);
}
.kdbk-vm__box h3 {
  color: var(--cyan);
  font-size: 1.9rem;
  margin: 1.25rem 0 1rem;
}
.kdbk-vm__box--light h3 {
  color: var(--teal);
}
.kdbk-vm__box p {
  font-size: 1.05rem;
  margin: 0;
}
.kdbk-vm__icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: #fff;
  color: var(--cyan);
  border-radius: 4px;
  font-size: 1.2rem;
}

/* Support */
.kdbk-support__panel {
  height: 100%;
  min-height: 380px;
  display: flex;
  align-items: center;
  padding: 3rem 2.5rem;
  color: #fff;
  background: var(--teal) center / cover no-repeat;
  position: relative;
}
.kdbk-support__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(27, 143, 150, 0.88);
}
.kdbk-support__panel > div {
  position: relative;
}
.kdbk-support__panel h2 {
  color: #fff;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}
.kdbk-support__link {
  color: #ffd93b;
  font-weight: 600;
  font-size: 0.9rem;
}
.kdbk-support__cards {
  padding: 2.5rem;
  overflow: hidden;
}

/* Program carousel (Owl Carousel) */
.kdbk-program-carousel {
  width: 100%;
  overflow: hidden;
}
.kdbk-program {
  padding: 0 8px;
  height: 100%;
}
.kdbk-program img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  margin-bottom: 1rem;
}
.kdbk-program h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0.65rem;
}
.kdbk-program p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #5a6a86;
  margin: 0;
}
.kdbk-program-carousel .owl-item {
  transition: opacity 0.3s ease;
}
.kdbk-program-carousel .owl-dots {
  text-align: center;
  margin-top: 1.5rem;
  line-height: 1;
}
.kdbk-program-carousel .owl-dot {
  border: 0;
  background: transparent;
  padding: 4px;
  margin: 0 2px;
}
.kdbk-program-carousel .owl-dot span {
  display: block;
  width: 7px;
  height: 7px;
  background: #d7d7d7;
  border-radius: 50%;
  transition: all 0.3s ease;
}
.kdbk-program-carousel .owl-dot.active span {
  width: 8px;
  height: 8px;
  background: var(--teal);
}
@media (max-width: 767.98px) {
  .kdbk-support__cards {
    padding: 2rem 1.25rem;
  }
  .kdbk-program {
    padding: 0 4px;
  }
}

/* Team */
.kdbk-team {
  background: var(--mist);
}
.kdbk-member {
  margin: 0;
}
.kdbk-member img {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  object-fit: cover;
}
.kdbk-member figcaption {
  padding-top: 0.9rem;
}
.kdbk-member strong {
  display: block;
  color: var(--navy);
  font-size: 0.95rem;
}
.kdbk-member span {
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 600;
}
.kdbk-member__phone {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #5a6a86;
}
.kdbk-member__phone:hover {
  color: var(--navy);
}

/* Testimonials */
.kdbk-stories {
  background-color: #8fb0c9;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed; /* keeps the photo still while the page scrolls over it */
  padding: 6rem 0 11rem;
  position: relative;
}
/* background-attachment: fixed is unreliable on iOS Safari — it falls back to scrolling there instead of breaking */
@supports (-webkit-touch-callout: none) {
  .kdbk-stories {
    background-attachment: scroll;
  }
}
.kdbk-stories::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.45);
}
.kdbk-stories > .container {
  position: relative;
}

/* Testimonials carousel (Owl Carousel) — shows 3, autoplays one at a time, pauses on hover */
.kdbk-stories-carousel {
  width: 100%;
  overflow: hidden;
}
.kdbk-quote-slide {
  padding: 0 12px;
}
.kdbk-stories-carousel .owl-dots {
  text-align: center;
  margin-top: 2.5rem;
  line-height: 1;
}
.kdbk-stories-carousel .owl-dot {
  border: 0;
  background: transparent;
  padding: 4px;
  margin: 0 3px;
}
.kdbk-stories-carousel .owl-dot span {
  display: block;
  width: 8px;
  height: 8px;
  background: rgba(42, 58, 90, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
}
.kdbk-stories-carousel .owl-dot.active span {
  width: 9px;
  height: 9px;
  background: var(--navy);
}

.kdbk-quote {
  margin: 0;
}
.kdbk-quote__text {
  font-style: italic;
  font-size: 0.9rem;
  color: #2a3a5a;
}
.kdbk-quote footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
/* !important is needed here: Owl Carousel's own CSS (.owl-carousel .owl-stage .owl-item img { width: 100% })
   is more specific than a plain descendant selector and would otherwise stretch this avatar into an oval. */
.kdbk-stories-carousel .kdbk-quote footer img {
  width: 44px !important;
  height: 44px !important;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
}
.kdbk-quote strong {
  display: block;
  color: var(--navy);
  font-size: 0.9rem;
}
.kdbk-quote small {
  color: var(--cyan);
  font-weight: 600;
}

/* CTA */
.kdbk-cta {
  background: var(--cyan);
  color: #fff;
  padding: 3.5rem 0;
}
.kdbk-cta h2 {
  color: #fff;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  margin: 0.4rem 0 0.75rem;
}

/* Footer */
.kdbk-footer {
  background: var(--navy);
  color: #cfd8ea;
  padding: 4rem 0 1.5rem;
  font-size: 0.85rem;
}
.kdbk-footer h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}
.kdbk-footer h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}
.kdbk-footer a {
  color: #cfd8ea;
}
.kdbk-footer a:hover {
  color: #fff;
}
.kdbk-footer li {
  margin-bottom: 0.6rem;
}
.kdbk-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 3rem;
  padding-top: 1.25rem;
  font-size: 0.75rem;
  opacity: 0.8;
}
.kdbk-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.kdbk-footer__credit a {
  color: #fff;
  font-weight: 600;
}
.kdbk-footer__credit a:hover {
  color: var(--cyan-soft);
}

/* Keyboard focus */
body.kdbk a:focus-visible,
body.kdbk button:focus-visible {
  outline: 3px solid #ffd93b;
  outline-offset: 2px;
}

/* =========================================================
   MOBILE REFINEMENTS
   Nothing here changes desktop behaviour or colours — these
   rules only trim spacing that was sized for large screens
   and would look too cramped, or too tall/empty, on a phone.
========================================================= */
@media (max-width: 767.98px) {
  .kdbk-support__panel {
    min-height: 280px;
    padding: 2.25rem 1.75rem;
  }
  .kdbk-stories {
    padding: 4rem 0 7rem;
  }
  .kdbk-about__card {
    padding: 2rem;
  }
  .kdbk-vm__box {
    padding: 2rem;
  }
}
@media (max-width: 575.98px) {
  .kdbk-footer {
    padding: 3rem 0 1.25rem;
  }
  .kdbk-cta {
    padding: 2.5rem 0;
    text-align: center;
  }
  .kdbk-cta .col-lg-4 {
    text-align: center !important;
    margin-top: 1.25rem;
  }
}
