/* ============================================================
   KNC SHARED STYLESHEET
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:     #4a90d9;
  --blue-dk:  #3a7bc8;
  --black:    #000000;
  --gray:     #333333;
  --light:    #f0f0f0;
  --white:    #ffffff;
  --font:     'Segoe UI', Arial, sans-serif;

  --nav-text: #595959;
  --gold:     #E3DB9A;
  --gold-dk:  #cfc47f;
  --sage:     #D3DAD2;
  --sage-dk:  #b8c2b7;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--gray); background: var(--white); line-height: 1.6; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   HEADER — redesigned 2026
   ============================================================ */
#knc-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--sage);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.knc-header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}

/* ── Brand / Logo ── */
.knc-brand {
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none; flex-shrink: 0;
}
.knc-brand img {
  height: 48px; width: auto; object-fit: contain;
}
.knc-brand-name {
  font-size: .88rem; font-weight: 700; color: var(--black);
  letter-spacing: .03em; line-height: 1.25;
  font-variant: small-caps;
}
.knc-branch-tag {
  font-size: .68rem; color: var(--nav-text); font-weight: 500;
  letter-spacing: .05em; opacity: .75;
}

/* ── Hamburger button ── */
#knc-menu-btn {
  display: none; background: none; border: none;
  cursor: pointer; padding: .45rem; color: var(--nav-text);
  flex-direction: column; justify-content: center; gap: 5px;
  width: 38px; height: 38px; border-radius: 6px;
  transition: background .15s;
}
#knc-menu-btn:hover { background: var(--sage); }
#knc-menu-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--nav-text); border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
#knc-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#knc-menu-btn.open span:nth-child(2) { opacity: 0; }
#knc-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Desktop nav ── */
#knc-nav {
  display: flex; align-items: center; gap: .1rem;
}

/* All top-level links */
#knc-nav > a,
.knc-dropdown-btn {
  font-size: .82rem; font-weight: 500;
  color: var(--nav-text);
  padding: .45rem .7rem;
  border-radius: 5px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, color .15s;
  display: flex; align-items: center;
  background: none; border: none;
  font-family: var(--font); cursor: pointer;
  letter-spacing: .01em;
}
#knc-nav > a:hover,
#knc-nav > a.active,
.knc-dropdown-btn:hover,
.knc-dropdown-btn.active {
  background: var(--sage);
  color: var(--black);
  text-decoration: none;
}
#knc-nav > a.active { font-weight: 700; }

/* Dropdown chevron */
.knc-dropdown-btn::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: .35rem;
  opacity: .6;
  transition: transform .2s;
}
.knc-dropdown:hover .knc-dropdown-btn::after { transform: rotate(180deg); }

/* Dropdown container */
.knc-dropdown { position: relative; }
.knc-dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--white);
  border: 1px solid var(--sage);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  min-width: 200px; z-index: 300; padding: .4rem 0;
}
.knc-dropdown:hover .knc-dropdown-menu,
.knc-dropdown:focus-within .knc-dropdown-menu { display: block; }
.knc-dropdown-menu a {
  font-size: .82rem; font-weight: 400;
  padding: .5rem 1.1rem;
  color: var(--nav-text);
  display: block; white-space: nowrap;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.knc-dropdown-menu a:hover {
  background: var(--sage);
  color: var(--black);
}

/* ── Donation / Tuition CTA button ── */
.knc-nav-cta {
  display: inline-flex !important;
  align-items: center;
  background: var(--gold) !important;
  color: var(--nav-text) !important;
  font-weight: 700 !important;
  font-size: .82rem !important;
  padding: .48rem 1.1rem !important;
  border-radius: 6px !important;
  margin-left: .4rem;
  transition: background .15s, box-shadow .15s !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  white-space: nowrap;
}
.knc-nav-cta:hover {
  background: var(--gold-dk) !important;
  color: var(--black) !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.15) !important;
}

/* ── Nav social icons ── */
.knc-nav-social {
  display: flex; align-items: center; gap: .15rem;
  margin-left: .6rem;
  padding-left: .7rem;
  border-left: 1px solid var(--sage);
}
.knc-nav-social a {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 5px;
  color: var(--nav-text);
  text-decoration: none;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.knc-nav-social a:hover { background: var(--sage); color: var(--black); }
.knc-nav-social svg { width: 16px; height: 16px; fill: currentColor; }

/* Mobile drawer social icons */
.knc-drawer-social {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 1rem 1.2rem .8rem;
  border-top: 1px solid var(--sage);
  margin-top: .5rem;
}
.knc-drawer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 6px;
  color: var(--nav-text);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.knc-drawer-social a:hover { background: var(--sage); color: var(--black); }
.knc-drawer-social svg { width: 18px; height: 18px; fill: currentColor; }

/* ── Mobile overlay drawer ── */
#knc-mobile-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 190;
  background: rgba(0,0,0,.35);
}
#knc-mobile-overlay.open { display: block; }

#knc-mobile-drawer {
  display: none;
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(320px, 88vw);
  background: var(--white);
  z-index: 195;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
#knc-mobile-drawer.open {
  display: flex;
  transform: translateX(0);
}
.knc-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--sage);
  flex-shrink: 0;
}
.knc-drawer-head .knc-brand-name { font-size: .9rem; }
#knc-drawer-close {
  background: none; border: none; cursor: pointer;
  color: var(--nav-text); font-size: 1.4rem; line-height: 1;
  padding: .2rem .4rem; border-radius: 4px;
  transition: background .15s;
}
#knc-drawer-close:hover { background: var(--sage); }
.knc-drawer-nav {
  display: flex; flex-direction: column;
  padding: .75rem 0 1.5rem;
  flex: 1;
}
.knc-drawer-nav a,
.knc-drawer-toggle {
  font-size: .92rem; font-weight: 500;
  color: var(--nav-text);
  padding: .7rem 1.5rem;
  text-decoration: none; display: block;
  border-bottom: 1px solid rgba(211,218,210,.5);
  transition: background .12s;
  background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; text-align: left; font-family: var(--font); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
}
.knc-drawer-nav a:hover,
.knc-drawer-toggle:hover { background: var(--sage); }
.knc-drawer-nav a.active { font-weight: 700; color: var(--black); }
.knc-drawer-toggle::after {
  content: '+'; font-size: 1.1rem; opacity: .5; transition: transform .2s;
}
.knc-drawer-toggle.open::after { content: '−'; }
.knc-drawer-sub {
  display: none; flex-direction: column;
  background: #fafafa;
}
.knc-drawer-sub.open { display: flex; }
.knc-drawer-sub a {
  font-size: .86rem; padding: .55rem 1.5rem .55rem 2.25rem;
  border-bottom: 1px solid rgba(211,218,210,.4);
  color: var(--nav-text);
}
.knc-drawer-cta {
  margin: 1rem 1.5rem 0;
  display: block;
  background: var(--gold);
  color: var(--nav-text) !important;
  font-weight: 700 !important;
  text-align: center;
  padding: .7rem 1rem;
  border-radius: 6px;
  font-size: .92rem;
  text-decoration: none;
  transition: background .15s;
  border-bottom: none !important;
}
.knc-drawer-cta:hover { background: var(--gold-dk) !important; }

/* ── FOOTER ── */
#knc-footer { background: var(--black); color: var(--white); margin-top: 0; }
.knc-footer-grid {
  max-width: 1280px; margin: 0 auto;
  padding: 2.5rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 2rem;
}
.knc-footer-col h4 {
  font-size: .8rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: .9rem; color: var(--white);
}
.knc-footer-col p, .knc-footer-col a {
  font-size: .82rem; color: rgba(255,255,255,.7);
  line-height: 1.8; display: block; text-decoration: none;
}
.knc-footer-col a:hover { color: var(--blue); }
.knc-footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .8rem; }
.knc-footer-social { display: flex; gap: .75rem; margin-top: .5rem; }
.knc-footer-social a { font-size: .82rem; color: rgba(255,255,255,.7); }
.knc-footer-social a:hover { color: var(--blue); }
.knc-footer-bar {
  background: #1a1a1a; text-align: center;
  padding: .75rem 1rem; font-size: .72rem; color: rgba(255,255,255,.5);
}

/* ── PAGE HERO BANNER ── */
.knc-page-banner {
  background: var(--black); padding: 2.5rem 1.25rem; text-align: center;
}
.knc-page-banner h1 {
  color: var(--white); font-size: clamp(1.5rem,4vw,2.2rem);
  font-weight: 700; margin-bottom: .35rem;
}
.knc-page-banner p { color: rgba(255,255,255,.7); font-size: .95rem; }

/* ── MAIN CONTENT WRAPPER ── */
.knc-main {
  max-width: 900px; margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
}
.knc-main h2 {
  font-size: 1.35rem; font-weight: 700; color: var(--black);
  margin: 1.75rem 0 .6rem; border-left: 4px solid var(--blue);
  padding-left: .65rem;
}
.knc-main h3 { font-size: 1.05rem; font-weight: 700; color: var(--black); margin: 1.2rem 0 .4rem; }
.knc-main p  { margin-bottom: .9rem; }
.knc-main ul { padding-left: 1.4rem; margin-bottom: .9rem; }
.knc-main ul li { margin-bottom: .3rem; }

/* ── PRAYER TIME TABLES ── */

/* ── Home promotional carousel ── */
.knc-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.knc-program-carousel {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  align-self: center;
}
.knc-carousel-viewport {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  background: #ffffff;
}
/* Programs carousel — no border or shadow */
.knc-programs-carousel .knc-carousel-viewport {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
/* All carousels use square aspect ratio for visual consistency */
.knc-carousel-track { position: relative; aspect-ratio: 1 / 1; }
/* Programs carousel — portrait images, let height follow natural ratio */
.knc-programs-carousel .knc-carousel-track {
  aspect-ratio: unset;
  height: auto;
}
.knc-programs-carousel .knc-carousel-slide {
  position: relative;
  inset: unset;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease-in-out;
  display: none;
}
.knc-programs-carousel .knc-carousel-slide.is-active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
.knc-programs-carousel .knc-carousel-slide img {
  width: auto;
  max-width: 100%;
  max-height: 460px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
/* Community carousel — landscape images, natural ratio */
.knc-community-carousel .knc-carousel-track {
  aspect-ratio: unset;
  height: auto;
}
.knc-community-carousel .knc-carousel-slide {
  position: relative;
  inset: unset;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease-in-out;
  display: none;
}
.knc-community-carousel .knc-carousel-slide.is-active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
.knc-community-carousel .knc-carousel-slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  margin: 0 auto;
}
@media (min-width: 641px) {
  .knc-community-carousel .knc-carousel-slide img {
    width: auto;
    max-width: 100%;
  }
}
/* ── Inner slider wrapper — arrows flank the image left and right ── */
.knc-inner-slider {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
}
.knc-inner-slider .knc-program-carousel,
.knc-inner-slider .knc-wa-card-carousel {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.knc-inner-prev,
.knc-inner-next {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: none;
  background: rgba(89,89,89,.80);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .18s;
  z-index: 10;
}
.knc-inner-prev:hover,
.knc-inner-next:hover { background: rgba(89,89,89,1); }

/* ── Hero Panel Slider ── */
.knc-hero-slider {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0.5rem auto 2rem;
  padding-bottom: 0; /* tabs replace dots — no extra bottom padding needed */
}
/* Panel tab bar — replaces per-panel ‹ heading › arrows */
.knc-panel-tabs {
  display: flex;
  width: 100%;
  gap: .35rem;
  margin-bottom: .6rem;
  padding: 0 .1rem;
  box-sizing: border-box;
}
.knc-panel-tab {
  flex: 1 1 0;
  padding: .6rem .2rem;
  font-size: clamp(.72rem, 2.3vw, .85rem);
  font-weight: 700;
  font-family: inherit;
  color: #595959;
  background: #fff;
  border: 2px solid #B8C2B7;
  border-radius: 8px;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .12s;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
  position: relative;
}
/* Subtle "tap me" underline hint on inactive tabs */
.knc-panel-tab::after {
  content: '';
  display: block;
  height: 3px;
  border-radius: 2px;
  background: #D3DAD2;
  margin: .3rem auto 0;
  width: 60%;
  transition: background .18s, width .18s;
}
.knc-panel-tab:hover {
  background: #eef2ee;
  border-color: #8fa88e;
  color: #333;
  box-shadow: 0 3px 8px rgba(0,0,0,.13);
  transform: translateY(-1px);
}
.knc-panel-tab:hover::after {
  background: #8fa88e;
  width: 80%;
}
.knc-panel-tab.is-active {
  background: #595959;
  color: #E3DB9A;
  border-color: #595959;
  cursor: default;
  box-shadow: 0 3px 10px rgba(89,89,89,.28);
  transform: none;
}
.knc-panel-tab.is-active::after {
  background: #E3DB9A;
  width: 70%;
}
.knc-hero-panel {
  display: none;
  flex-direction: column;
  align-items: center;
}
.knc-hero-panel.is-active {
  display: flex;
}
/* Panel heading: prev arrow | title | next arrow */
.knc-panel-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: .4rem;
  margin-bottom: .1rem;
}
.knc-panel-heading .knc-subsection-title {
  flex: 0 1 auto;
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Hero prev/next — inline in the heading row */
.knc-hero-prev,
.knc-hero-next {
  flex: 0 0 auto;
  background: rgba(89,89,89,.82);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  padding: 0;
}
.knc-hero-prev:hover, .knc-hero-next:hover { background: rgba(89,89,89,1); }
/* Hero dots */
.knc-hero-dots {
  position: absolute;
  bottom: .6rem;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: .45rem;
}
.knc-hero-dots button {
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}
.knc-hero-dots button.is-active {
  background: var(--gold, #E3DB9A);
  transform: scale(1.25);
}
/* Events empty state */
.knc-events-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 2rem 1.5rem;
  background: #f9f7f2;
  border-radius: 12px;
  text-align: center;
  color: #595959;
  width: 100%;
}
.knc-events-empty-icon { font-size: 3rem; margin-bottom: .75rem; }
.knc-events-empty p { font-size: 1.1rem; font-weight: 600; margin: 0 0 .35rem; }
.knc-events-empty span { font-size: .88rem; color: #888; font-style: italic; }
/* Events carousel slides (when events are added) */
.knc-events-carousel .knc-carousel-slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Community 3-column row */
.knc-community-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: center;
  margin: 1rem 0 2rem;
}
.knc-community-col {
  flex: 1 1 200px;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.knc-community-col .knc-subsection-title {
  width: 100%;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  margin-bottom: .6rem;
}
/* All carousels and Halal card — fluid width */
.knc-community-col .knc-program-carousel,
.knc-whatsapp-carousel,
.knc-halal-card-col {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0;
}
/* WhatsApp carousel cards — large original size */
.knc-wa-card,
.knc-wa-card-carousel {
  width: 100% !important;
  max-width: 500px !important;
}

/* Halal Foods card */
.knc-halal-card {
  max-width: 340px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.13);
}
.knc-halal-card-accent { display: none; }
.knc-halal-card-img-wrap {
  aspect-ratio: 720 / 1080;
  overflow: hidden;
}
.knc-halal-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.knc-halal-card-body { display: block; padding: .65rem .75rem .75rem; background: #fff; }
.knc-halal-card-tagline {
  margin: 0;
  font-size: .88rem;
  color: #595959;
  text-align: center;
  font-style: italic;
  letter-spacing: .01em;
}

@media (max-width: 600px) {
  .knc-community-col { flex: 0 0 90vw; }
  .knc-community-row { justify-content: center; }
}

/* WhatsApp card carousel */
.knc-wa-card-carousel {
  width: 100%;
  position: relative;
}
/* Override default square aspect-ratio — match Programs carousel behaviour */
.knc-wa-card-carousel .knc-carousel-track {
  aspect-ratio: unset;
  height: auto;
}
.knc-wa-card-carousel .knc-carousel-slide {
  position: relative;
  inset: unset;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease-in-out;
  display: none;
}
.knc-wa-card-carousel .knc-carousel-slide.is-active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
.knc-wa-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0,0,0,.13);
  padding: 8px 16px 12px;
  gap: 4px;
  width: 100%;
  max-width: 340px;
  /* Hard-clamp total card height to match Programs slide */
  max-height: 460px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}
.knc-wa-card-logo {
  display: block;
  width: 22px;
  height: 22px;
  max-width: 22px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 0;
  flex-shrink: 0;
}
.knc-wa-card-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #333;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.2;
}
.knc-wa-card-qr {
  width: auto;
  max-width: 100%;
  /* QR fills remaining card height after logo + label + padding */
  max-height: 400px;
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 6px;
  flex-shrink: 1;
}
.knc-wa-card-carousel .knc-carousel-dots {
  margin-top: 8px;
}
/* Community subsection titles — same style as the Community h2 */
.knc-subsection-title {
  text-align: center;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--black);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #D3DAD2;
}

/* WhatsApp placeholder */
.knc-whatsapp-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: #f5f7f5;
  border: 2px dashed #D3DAD2;
  border-radius: 8px;
  color: #888;
  font-size: 0.95rem;
  padding: 1.5rem;
  text-align: center;
}

.knc-carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease-in-out;
}
.knc-carousel-slide.is-active { opacity: 1; pointer-events: auto; }
.knc-carousel-slide img { width: 100%; height: 100%; object-fit: contain; }
/* Halal carousel — identical layout to programs carousel */
.knc-halal-carousel .knc-carousel-viewport {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.knc-halal-carousel .knc-carousel-track {
  aspect-ratio: unset;
  height: auto;
}
.knc-halal-carousel .knc-carousel-slide {
  position: relative;
  inset: unset;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease-in-out;
  display: none;
}
.knc-halal-carousel .knc-carousel-slide.is-active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
.knc-halal-carousel .knc-carousel-slide img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: transparent;
  max-height: 450px; /* slightly larger while tagline + image ≈ original total height */
}

/* Halal panel: tagline above shrunken carousel */
.knc-halal-panel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.knc-halal-tagline {
  font-size: 1rem;
  font-weight: 700;
  color: #595959;
  text-align: center;
  background: #f5f3ec;
  border-left: 4px solid #E3DB9A;
  border-radius: 4px;
  padding: .55rem 1rem;
  margin: 0 0 .6rem;
  max-width: 340px;
  width: 100%;
  box-sizing: border-box;
  letter-spacing: .01em;
}
.knc-carousel-dots {
  display: flex;
  justify-content: center;
  gap: .55rem;
  margin-top: 1rem;
}
.knc-carousel-dots button {
  width: .7rem;
  height: .7rem;
  padding: 0;
  border: 1px solid var(--nav-text);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
}

.knc-carousel-dots button.is-active { background: var(--blue); border-color: var(--blue); }
.knc-carousel-dots button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.knc-times-section { background: var(--light); padding: 1rem 1.25rem 3rem; }
.knc-times-inner { max-width: 1100px; margin: 0 auto; }
/* Dynamic date display above Prayer Times */
/* ── DATE BAR — top of page, directly below header ── */
.knc-date-bar {
  background: var(--black);
  padding: .55rem 1.25rem;
  text-align: center;
}
.knc-prayer-date {
  font-size: .92rem;
  letter-spacing: .01em;
  line-height: 1.7;
}
.knc-date-greg, .knc-date-hijri {
  display: block;
  padding: .22rem .9rem;
  line-height: 1.5;
  border: 1px solid rgba(255,255,255,0.18);
  width: fit-content;
  margin: 0 auto;
}
.knc-date-greg  { font-weight: 600; color: #fff; border-color: rgba(255,255,255,0.25); }
.knc-date-hijri { color: var(--gold, #E3DB9A); font-style: italic; border-color: rgba(227,219,154,0.35); margin-bottom: .2rem; }
.knc-prayer-title {
  text-align: center; font-size: clamp(1.3rem,3vw,1.8rem);
  font-weight: 700; color: var(--black);
  margin-top: 1.5rem; margin-bottom: 2.5rem;
}
.knc-times-inner h2 {
  text-align: center; font-size: clamp(1.3rem,3vw,1.8rem);
  font-weight: 700; color: var(--black); margin-bottom: 2rem;
}
.knc-times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 1.5rem;
}

/* ── Widget iframe layout ── */
.knc-widget-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
}
.knc-widget-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--white);
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  min-width: 200px;
}
.knc-widget-col .knc-times-card-head {
  width: 100%;
  text-align: center;
}
.knc-widget-wrap {
  padding: .75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Our Hijri date bar — sits as a plain block directly above the iframe */
.knc-iframe-date-bar {
  width: 182px;
  height: 28px;
  background: #595959;
  color: #E3DB9A;
  font-size: .72rem;
  font-style: italic;
  font-family: Georgia, serif;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .02em;
  box-sizing: border-box;
}
/* Clip container — hides IslamicFinder's blue title + city + their date row.
   78px covers: ~38px blue bar + ~20px city line + ~20px date line.
   iframe shifts up by the same amount so prayer rows stay in view. */
.knc-iframe-clip {
  overflow: hidden;
  width: 182px;
  height: 280px; /* 358px - 78px */
  line-height: 0;
}
.knc-iframe-clip iframe {
  margin-top: -78px;
  display: block;
}
.knc-widget-col .knc-times-note {
  width: 100%;
  text-align: center;
}
/* Front Royal: iframe + iqamah side by side */
.knc-fr-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
}
.knc-iqamah-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  border-left: 1px solid #e0e0e0;
}
.knc-iqamah-col::before {
  content: "";
  display: block;
  height: 28px; /* matches .knc-iframe-date-bar height so Iqamah header lines up with iframe top */
}
.knc-iqamah-head {
  background: #2c6fad; color: #fff;
  font-size: .82rem; font-weight: 700; letter-spacing: .04em;
  text-align: center; padding: .55rem .75rem;
  text-transform: uppercase; white-space: nowrap;
}
.knc-iqamah-col .knc-times-row {
  width: 100%;
  padding: .55rem .75rem;
  font-size: .82rem;
}
.knc-widget-col .knc-times-row { width: 100%; }
.knc-times-card {
  background: var(--white); border: 1px solid #ccc; border-radius: 8px; overflow: hidden;
}
.knc-times-card-head {
  background: var(--blue); padding: .9rem 1.1rem;
}
.knc-times-card-head h3 { color: var(--white); font-size: 1rem; font-weight: 700; }
.knc-times-card-head p  { color: rgba(255,255,255,.8); font-size: .75rem; margin-top: .2rem; }
.knc-times-row {
  display: flex; justify-content: space-between;
  padding: .55rem 1.1rem; font-size: .88rem;
  background: var(--white);
}
.knc-times-row.alt { background: var(--light); }
.knc-times-row span:last-child { font-weight: 700; color: var(--black); }
.knc-times-note {
  padding: .7rem 1.1rem; font-size: .78rem; color: #555;
  background: #f8f8f8; border-top: 1px solid #e0e0e0;
  text-align: center;
}

/* ── PRAYER LAYOUT WRAPPER (controls Locations position relative to prayer widgets) ── */
.knc-prayer-layout {
  display: flex;
  flex-direction: column;
}
/* Desktop/tablet: widget grid is a normal row; locations sits below with extra breathing room */
.knc-prayer-layout .knc-widget-grid { order: 1; }
.knc-prayer-layout .knc-locations-inset { order: 2; }

/* Extra gap above Locations on desktop/tablet (641px and up) */
@media (min-width: 641px) {
  .knc-prayer-layout .knc-locations-inset {
    padding-top: 3.5rem;
  }
}

/* ── LOCATIONS INSET (shared card/grid styles) ── */
.knc-locations-inset {
  background: var(--white);
  padding: 2.5rem 0 1rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.knc-locations-inset h2 {
  text-align: center; font-size: clamp(1.3rem,3vw,1.8rem);
  font-weight: 700; color: var(--black); margin-bottom: 2rem;
}
.knc-locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.knc-loc-card {
  background: var(--light); border-left: 4px solid var(--blue);
  border-radius: 4px; padding: 1rem 1rem 1rem .9rem;
}
.knc-loc-card strong { display: block; font-size: .82rem; color: var(--black); margin-bottom: .2rem; }
.knc-loc-card span   { display: block; font-size: .95rem; color: var(--gray); }
.knc-loc-card .knc-loc-addr { font-size: .8rem; color: var(--gray); margin-top: .15rem; }
.knc-loc-info { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin-top: 1rem; font-size: .88rem; color: var(--gray); padding: .6rem .2rem 0; border-top: 1px solid #e5e5e5; }

/* ── CTA BAND ── */
.knc-cta-band {
  background: var(--black); color: var(--white);
  text-align: center; padding: 1.1rem 1.5rem;
  border-radius: 6px; font-size: .95rem;
}
.knc-cta-band a { color: var(--blue); font-weight: 700; }

/* ── MIXLR STRIP ── */
.knc-mixlr { background: var(--light); padding: 2rem 1.25rem; text-align: center; }
.knc-mixlr a {
  display: inline-block; background: var(--black); color: var(--white);
  padding: .65rem 1.8rem; border-radius: 9999px;
  font-weight: 600; font-size: .95rem; text-decoration: none;
  transition: background .2s;
}
.knc-mixlr a:hover { background: #333; }

/* ── HERO (home) ── */
.knc-hero {
  position: relative; min-height: 420px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.knc-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.knc-hero-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.72);
}
.knc-hero-content {
  position: relative; z-index: 1; text-align: center;
  padding: 3rem 1.25rem; max-width: 680px;
}
.knc-hero-eyebrow {
  color: var(--blue); font-size: .75rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase; margin-bottom: .6rem;
}
.knc-hero-content h1 {
  color: var(--white); font-size: clamp(1.6rem,4vw,2.6rem);
  font-weight: 700; line-height: 1.2; margin-bottom: .9rem;
}
.knc-hero-content p { color: rgba(255,255,255,.85); font-size: 1.05rem; margin-bottom: 1.75rem; }
.knc-hero-btn {
  display: inline-block; background: var(--blue); color: var(--white);
  padding: .7rem 1.9rem; border-radius: 6px; font-weight: 600;
  font-size: .95rem; text-decoration: none; transition: background .2s;
}
.knc-hero-btn:hover { background: var(--blue-dk); text-decoration: none; }

/* ── BUTTONS ── */
.knc-btn {
  display: inline-block; background: var(--blue); color: var(--white);
  padding: .65rem 1.6rem; border-radius: 6px; font-weight: 600;
  font-size: .9rem; text-decoration: none; transition: background .2s;
  border: none; cursor: pointer;
}
.knc-btn:hover { background: var(--blue-dk); text-decoration: none; }
.knc-btn-outline {
  background: transparent; border: 2px solid var(--blue); color: var(--blue);
}
.knc-btn-outline:hover { background: var(--blue); color: var(--white); }

/* ── SERVICE CARDS ── */
.knc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 1.25rem; margin: 1.5rem 0;
}
.knc-card {
  background: var(--white); border: 1px solid #e0e0e0;
  border-radius: 8px; padding: 1.4rem 1.25rem;
  border-top: 4px solid var(--blue);
}
.knc-card h3 { font-size: 1rem; color: var(--black); margin-bottom: .5rem; }
.knc-card p  { font-size: .88rem; color: var(--gray); margin: 0; }

/* ── INFO BOX ── */
.knc-info-box {
  background: var(--light); border-left: 4px solid var(--blue);
  border-radius: 4px; padding: 1.1rem 1.25rem; margin: 1.25rem 0;
}
.knc-info-box p { margin: 0; font-size: .9rem; }

/* ── ADDRESS BLOCK ── */
.knc-address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 1.5rem; margin: 1.5rem 0;
}
.knc-address-card {
  background: var(--light); border-radius: 8px; padding: 1.4rem 1.25rem;
  border-top: 4px solid var(--blue);
}
.knc-address-card h3 { font-size: 1rem; color: var(--black); margin-bottom: .6rem; }
.knc-address-card p  { font-size: .88rem; margin-bottom: .3rem; }

/* ── CONTACT FORM ── */
.knc-form { max-width: 600px; }
.knc-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; color: var(--black); }
.knc-form input,
.knc-form textarea,
.knc-form select {
  width: 100%; padding: .6rem .8rem; border: 1px solid #ccc;
  border-radius: 5px; font-size: .9rem; font-family: var(--font);
  margin-bottom: 1rem; background: var(--white);
}
.knc-form textarea { min-height: 120px; resize: vertical; }
.knc-form input:focus,
.knc-form textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }

/* ── DONATION BUTTONS ── */
.knc-donate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 1.25rem; margin: 1.5rem 0;
}
.knc-donate-card {
  background: var(--white); border: 1px solid #e0e0e0;
  border-radius: 8px; padding: 1.5rem 1.25rem; text-align: center;
  border-top: 4px solid var(--blue);
}
.knc-donate-card h3 { font-size: 1rem; color: var(--black); margin-bottom: .5rem; }
.knc-donate-card p  { font-size: .82rem; color: var(--gray); margin-bottom: 1rem; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  #knc-menu-btn { display: flex; }
  #knc-nav { display: none; }
  .knc-brand-name { font-size: .82rem; }
}
@media (max-width: 480px) {
  .knc-hero { min-height: 340px; }
  .knc-page-banner { padding: 1.75rem 1rem; }
  .knc-main { padding: 1.75rem 1rem 2.5rem; }
  .knc-header-inner { padding: 0 1rem; }
  .knc-brand-name { display: none; }
}

/* Prayer times mobile: stack widgets + inject Locations between them */
@media (max-width: 640px) {
  /* Make the prayer layout a single flex column so order works across widget-grid and locations */
  .knc-prayer-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .knc-prayer-layout .knc-widget-grid {
    display: contents; /* dissolve the grid so its children participate in the parent flex order */
  }
  .knc-widget-col--annandale    { order: 1; width: 100%; max-width: 360px; }
  .knc-prayer-layout .knc-locations-inset { order: 2; width: 100%; padding: 0.5rem 1.25rem 1rem; }
  .knc-widget-col--frontroyalal { order: 3; width: 100%; max-width: 360px; }
  .knc-fr-row { flex-direction: column; align-items: center; }
  .knc-iqamah-col { border-left: none; border-top: 2px solid #2c6fad; width: 100%; }
  .knc-widget-wrap iframe { width: 100% !important; min-width: 0 !important; }
  .knc-iframe-date-bar { width: 100%; }

  /* Hero slider — full width on mobile, centered */
  .knc-hero-slider { max-width: 100%; margin-left: auto; margin-right: auto; }
  .knc-program-carousel { max-width: 100%; }

  /* On mobile, shrink the card so arrows still fit beside it */
  .knc-inner-slider .knc-program-carousel,
  .knc-inner-slider .knc-wa-card-carousel {
    max-width: calc(100% - 5.5rem);
  }

  /* Remove community-col width cap that was shrinking below 360px */
  .knc-community-col { max-width: 100%; }
}

/* ── WHERE TO FIND US ── */
/* ══════════════════════════════════════════════════
   HERO IMAGE SLIDER  — 16:9, full-width, no stretch
   ══════════════════════════════════════════════════ */
.knc-hero-banner {
  position: relative;
  width: 100%;
  background: #0B1F3A;
  overflow: hidden;
}

/* Slide track — height driven by the active image */
.knc-hero-track {
  position: relative;
  width: 100%;
}

/* All slides stacked; inactive hidden, active shown — no fixed height box */
.knc-hero-slide {
  display: none;
  opacity: 0;
  transition: opacity .6s ease-in-out;
  pointer-events: none;
}
.knc-hero-slide.is-active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* ── Hero Banner ── full-viewport-width strip, no overflow clip so arrows stay visible */
.knc-hero-banner {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  padding: 0;
  background: #fff;
  /* NO overflow:hidden here — arrows must not be clipped */
}

/* Inner clip wrapper clips only the image area, not the arrows */
.knc-hero-track {
  width: 90vw;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  /* Height is driven by the stacked slides — set by the active image */
}

/* Spacer: always in flow, sets track height via aspect ratio (1672:940 ≈ 56.22%) */
.knc-hero-spacer {
  display: block;
  width: 100%;
  padding-bottom: 56.22%;
  pointer-events: none;
}

/* All slides always absolutely stacked — opacity-only transitions, no position toggling */
.knc-hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease-in-out;
}
.knc-hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Image: fills the track exactly, same size every slide */
.knc-hero-slide img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none !important;
  margin: 0;
}

/* Mobile: full edge-to-edge */
@media (max-width: 640px) {
  .knc-hero-track {
    width: 100vw;
  }
}

/* ── Arrows ── sit outside the clip wrapper, centred on the image height */
.knc-hero-prev,
.knc-hero-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(11,59,133,.6);
  color: #C8963E;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity .35s ease, background .2s, transform .2s;
}
.knc-hero-banner:hover .knc-hero-prev,
.knc-hero-banner:hover .knc-hero-next { opacity: 1; }
.knc-hero-prev svg,
.knc-hero-next svg {
  width: 22px;
  height: 22px;
  stroke: #C8963E;
  transition: stroke .2s;
}
/* Arrows sit just outside the 90vw image track (5vw gap on each side) */
.knc-hero-prev { left: calc(5vw - 28px); }
.knc-hero-next { right: calc(5vw - 28px); }
.knc-hero-prev:hover,
.knc-hero-next:hover {
  background: #0B3B85;
  transform: translateY(-50%) scale(1.08);
  opacity: 1;
}
.knc-hero-prev:hover svg,
.knc-hero-next:hover svg { stroke: #E8B455; }
.knc-hero-prev:active,
.knc-hero-next:active { transform: translateY(-50%) scale(0.95); }

/* ── Dots ── */
.knc-hero-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: .5rem;
}
.knc-hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .25s, border-color .25s;
}
.knc-hero-dots button.is-active {
  background: #C8963E;
  border-color: #C8963E;
}

/* Mobile: shrink arrows */
/* Sermon 2: inline with bullet on desktop, hidden on mobile */
.knc-sermon2-inline { display: inline; }
.knc-sermon2-mobile { display: none; }

/* Venue line: name+colon on one line, address on next line */
.knc-venue-line { display: inline; }
.knc-venue-name::after { content: ""; }
.knc-venue-addr { display: inline; }

@media (max-width: 640px) {
  .knc-hero-prev,
  .knc-hero-next { width: 36px; height: 36px; }
  .knc-hero-prev svg,
  .knc-hero-next svg { width: 17px; height: 17px; }
  .knc-hero-prev { left: .5rem; }
  .knc-hero-next { right: .5rem; }
  .knc-hide-mobile { display: none; }
  /* Sermon note: centered on mobile */
  .knc-sermon2-inline { display: inline; }
  .knc-sermon2-mobile { display: none; }
  .knc-widget-col .knc-times-note { text-align: center; padding: .55rem .75rem; }
  .knc-venue-line { display: block; }
  .knc-venue-name { text-align: center; }
  .knc-venue-name::after { content: ""; }
  .knc-venue-addr { display: block; text-align: center; }
}

/* Hide old carousel section */
.knc-locations-banner-section { display: none; }
