/* Buganda Heritage Association — polished responsive homepage 2026.
   Activated only by .bha-home-design class on the homepage. */
body.bha-home-design {
  --bha-blue:#0035bd; --bha-violet:#a01cce; --bha-pink:#f50075;
  --bha-gold:#ffbb1b; --bha-ink:#182345; --bha-radius:19px;
  background:#f8faff;
}
body.bha-home-design,body.bha-home-design * {box-sizing:border-box}
body.bha-home-design .bha-feature-card {
  background:#fff!important;
  border:1px solid #e6e9f2!important;
  border-radius:var(--bha-radius)!important;
  padding:19px 20px 17px!important;
  box-shadow:0 5px 18px rgba(23,41,90,.10)!important;
  overflow:hidden;
  min-width:0;
}
body.bha-home-design .bha-feature-card h1,
body.bha-home-design .bha-feature-card h2,
body.bha-home-design .bha-feature-card h3 {
  color:var(--bha-blue)!important;
  font-weight:700!important;
  line-height:1.2!important;
  font-size:clamp(20px,2vw,29px)!important;
  text-align:center!important;
  margin:0 0 14px!important;
}
body.bha-home-design .bha-feature-card p {line-height:1.52!important;color:var(--bha-ink)!important}
body.bha-home-design .bha-feature-card img {
  max-width:100%!important;height:auto!important;
  border-radius:13px;object-fit:cover;
}
body.bha-home-design .bha-feature-card iframe {max-width:100%!important;border-radius:13px}
body.bha-home-design .bha-feature-card a.sppb-btn,
body.bha-home-design .bha-feature-card a.btn,
body.bha-home-design .bha-feature-card .sppb-btn,
body.bha-home-design .bha-feature-card .btn {
  border-radius:12px!important;font-weight:700!important;
}
body.bha-home-design .bha-feature-card a[href*="donat"] {background:var(--bha-pink)!important;color:white!important;border-color:var(--bha-pink)!important}
body.bha-home-design .bha-feature-card a[href*="fundrais"] {background:var(--bha-blue)!important;color:white!important}
body.bha-home-design .bha-slider {
  border-radius:17px!important;overflow:hidden!important;
  box-shadow:0 3px 13px rgba(20,37,64,.13)!important;
}
body.bha-home-design .bha-slider img {max-width:100%!important;object-fit:cover}
body.bha-home-design .bha-gallery-title,
body.bha-home-design .bha-article-title,
body.bha-home-design .bha-welcome-title {
  color:var(--bha-violet)!important;
  font-weight:700!important;line-height:1.2!important;
}
body.bha-home-design .bha-gallery-title {border-left:5px solid var(--bha-pink);padding-left:14px!important}
body.bha-home-design .bha-gallery img {border-radius:8px;max-width:100%;height:auto}
body.bha-home-design .bha-gallery img:hover {filter:brightness(1.04)}
body.bha-home-design .bha-article-title {border-left:5px solid var(--bha-pink);padding-left:14px!important}
body.bha-home-design .bha-article-block a:not(.btn):not(.sppb-btn) {color:var(--bha-pink)}
body.bha-home-design .bha-welcome-block {background:#f2f3f7;border-radius:17px;padding:18px!important}
body.bha-home-design #sp-bottom,
body.bha-home-design #sp-footer-top,
body.bha-home-design .bha-footer-primary {background:#079be2!important;color:#fff!important}
body.bha-home-design #sp-bottom a,
body.bha-home-design #sp-footer-top a {color:#fff!important}
body.bha-home-design #sp-footer,
body.bha-home-design .bha-footer-secondary {background:#090909!important;color:#fff!important}
body.bha-home-design #sp-footer a {color:#fff}
body.bha-home-design #sp-header {box-shadow:0 2px 10px rgba(2,25,96,.08)}
body.bha-home-design .bha-gallery-row img {width:100%!important;object-fit:cover!important}
@media (max-width:991px) {
  body.bha-home-design .bha-feature-card {padding:15px!important;border-radius:16px!important}
  body.bha-home-design .bha-feature-card h1,
  body.bha-home-design .bha-feature-card h2,
  body.bha-home-design .bha-feature-card h3 {font-size:clamp(18px,3vw,24px)!important}
  body.bha-home-design .bha-gallery-row img {border-radius:6px}
}
@media (max-width:767px) {
  body.bha-home-design .bha-feature-card {margin-bottom:14px!important}
  body.bha-home-design .bha-feature-card h1,
  body.bha-home-design .bha-feature-card h2,
  body.bha-home-design .bha-feature-card h3 {font-size:clamp(18px,5vw,23px)!important}
  body.bha-home-design .bha-feature-card img {width:100%;object-fit:cover}
  body.bha-home-design .bha-article-title,
  body.bha-home-design .bha-gallery-title,
  body.bha-home-design .bha-welcome-title {font-size:clamp(21px,5.5vw,27px)!important}
  body.bha-home-design #sp-bottom .container,
  body.bha-home-design #sp-footer .container {padding-left:18px;padding-right:18px}
}
@media (prefers-reduced-motion:reduce){body.bha-home-design *{scroll-behavior:auto!important}}
/* BHA-CARD-ALIGN-V2 START */
/* Target the FIRST SP Page Builder homepage row only; do not change the galleries. */
body.bha-home-design .bha-top-row {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:18px!important;
  align-items:stretch!important;
  margin:0!important;
  width:100%!important;
}
body.bha-home-design .bha-top-row > .bha-top-col {
  float:none!important;
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  max-width:none!important;
  width:auto!important;
  flex:auto!important;
  margin:0!important;
  padding:20px!important;
  border-radius:18px!important;
  background:#fff!important;
  border:1px solid #e5eaf5!important;
  box-shadow:0 5px 16px rgba(25,43,89,.11)!important;
  overflow:visible!important;
}
body.bha-home-design .bha-top-row .bha-top-col .sppb-addon,
body.bha-home-design .bha-top-row .bha-top-col .sppb-addon-wrapper,
body.bha-home-design .bha-top-row .bha-top-col [class*="sppb-addon-"],
body.bha-home-design .bha-top-row .bha-top-col .sppb-img-container {
  position:relative!important;
  top:auto!important;
  left:auto!important;
  transform:none!important;
  margin-top:0!important;
  margin-bottom:0!important;
  max-width:100%!important;
}
body.bha-home-design .bha-top-row > .bha-top-col h1,
body.bha-home-design .bha-top-row > .bha-top-col h2,
body.bha-home-design .bha-top-row > .bha-top-col h3,
body.bha-home-design .bha-top-row > .bha-top-col .sppb-addon-title {
  margin:0 0 14px!important;
  padding:0!important;
  font-family:Arial,sans-serif!important;
  font-size:clamp(18px,1.6vw,24px)!important;
  line-height:1.25!important;
  font-weight:700!important;
  color:#003cc8!important;
  overflow:visible!important;
  height:auto!important;
  text-align:center!important;
}
body.bha-home-design .bha-top-row > .bha-top-col h1 a,
body.bha-home-design .bha-top-row > .bha-top-col h2 a,
body.bha-home-design .bha-top-row > .bha-top-col h3 a {color:#003cc8!important}
body.bha-home-design .bha-top-row > .bha-top-col p {
  margin:0 0 12px!important;
  font-size:clamp(14px,1.15vw,17px)!important;
  line-height:1.55!important;
}
body.bha-home-design .bha-top-row > .bha-top-col img {
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:240px!important;
  object-fit:cover!important;
  border-radius:12px!important;
}
body.bha-home-design .bha-top-row > .bha-top-col .sppb-embed-responsive,
body.bha-home-design .bha-top-row > .bha-top-col .sppb-video-wrap,
body.bha-home-design .bha-top-row > .bha-top-col iframe {
  max-width:100%!important;
  border-radius:12px!important;
}
body.bha-home-design .bha-top-row .sppb-btn-group,
body.bha-home-design .bha-top-row .sppb-button-group,
body.bha-home-design .bha-top-row .sppb-btn-wrapper {margin-top:14px!important}
body.bha-home-design .bha-top-row .bha-top-col .sppb-btn {border-radius:12px!important}
@media(max-width:991px){
 body.bha-home-design .bha-top-row{gap:12px!important}
 body.bha-home-design .bha-top-row>.bha-top-col{padding:15px!important}
 body.bha-home-design .bha-top-row>.bha-top-col h3,
 body.bha-home-design .bha-top-row>.bha-top-col .sppb-addon-title{font-size:19px!important}
}
@media(max-width:767px){
 body.bha-home-design .bha-top-row{grid-template-columns:1fr!important;gap:14px!important}
 body.bha-home-design .bha-top-row>.bha-top-col{padding:18px!important}
 body.bha-home-design .bha-top-row>.bha-top-col h3,
 body.bha-home-design .bha-top-row>.bha-top-col .sppb-addon-title{font-size:21px!important}
 body.bha-home-design .bha-top-row>.bha-top-col img{max-height:none!important}
}
/* BHA-CARD-ALIGN-V2 END */

/* ===== BHA V4 CORRECTED START ===== */
/* Scoped to the Joomla homepage. V3 remains responsible for its core card styling. */
body.bha-home-design { --bha-blue:#003CC8; --bha-pink:#FF025A; --bha-gold:#EFC823; --bha-purple:#8925A6; }
body.bha-home-design .bha-premium-top-row {
  display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:20px!important; align-items:stretch!important;
}
body.bha-home-design .bha-premium-top-row>.bha-premium-top-card {
  width:100%!important; min-width:0!important; max-width:none!important;
  height:auto!important; align-self:stretch!important;
}
body.bha-home-design .bha-premium-top-card h3,
body.bha-home-design .bha-premium-top-card .sppb-addon-title {
  overflow:visible!important; text-overflow:clip!important; white-space:normal!important;
  line-height:1.26!important; height:auto!important; max-height:none!important;
  color:var(--bha-blue)!important;
}
body.bha-home-design .bha-premium-top-card .sppb-addon,
body.bha-home-design .bha-premium-top-card .sppb-addon-wrapper {
  margin-top:0!important; margin-bottom:0!important; top:auto!important;
}
body.bha-home-design .bha-premium-top-card img {
  max-width:100%!important; height:auto!important; object-fit:contain!important;
}
/* Slideshow: don't apply a blanket overflow rule to the SPPB slideshow inner viewport.
   Keep native slides, images, arrows and pagination working. */
body.bha-home-design .bha-premium-slider-section .sppb-addon-js_slideshow,
body.bha-home-design .bha-premium-slider-section .sppb-addon-slideshow,
body.bha-home-design .bha-premium-slider-section .sppb-carousel {
  overflow:visible!important; background-color:transparent!important;
}
body.bha-home-design .bha-premium-slider-section .sppb-addon-js_slideshow {
  border-radius:14px!important; box-shadow:none!important;
}
body.bha-home-design .bha-premium-slider-section img {max-width:100%;}
/* A fallback is applied only by JS after detecting an empty slideshow.
   The image path is drawn from the user's actual SP Page Builder slideshow JSON. */
body.bha-home-design .bha-premium-slider-section.bha-slider-fallback {
  background-image:url('/images/carousel-images/muteesa-3.jpg')!important;
  background-size:cover!important; background-position:center!important;
  border-radius:14px!important; min-height:250px!important;
}
body.bha-home-design .bha-premium-slider-section.bha-slider-fallback .sppb-container {
  min-height:250px!important;
}
body.bha-home-design .bha-premium-gallery-section {background:#EAEAEA!important;}
body.bha-home-design .bha-premium-gallery-section .sppb-addon-module {
  background:#fff!important; border-radius:14px!important;
}
body.bha-home-design .bha-premium-gallery-section .sppb-addon-module h2,
body.bha-home-design .bha-premium-gallery-section .sppb-addon-module h3,
body.bha-home-design .bha-premium-gallery-section .sppb-addon-module .sppb-addon-title {
  font-size:clamp(21px,2vw,26px)!important; color:var(--bha-purple)!important;
  line-height:1.25!important;
}
body.bha-home-design .bha-premium-articles-section a {color:var(--bha-pink)!important;}
body.bha-home-design .bha-premium-welcome-section h2 {color:var(--bha-purple)!important;}
body.bha-home-design .bha-premium-welcome-section iframe {aspect-ratio:16/9; height:auto;}
/* Use the real Keynote/Helix mobile navigation; never create a second menu. */
@media(max-width:991px) {
  body.bha-home-design.bha-existing-mobile-toggler #sp-header .sp-megamenu-parent {display:none!important;}
  body.bha-home-design.bha-existing-mobile-toggler #offcanvas-toggler {display:flex!important;align-items:center!important;justify-content:center!important;}
  body.bha-home-design #sp-header {min-height:76px!important;}
  body.bha-home-design #sp-header .logo img {max-height:65px!important;width:auto!important;}
}
@media(min-width:768px) and (max-width:1100px) {
  body.bha-home-design .bha-premium-top-row {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;}
  body.bha-home-design .bha-premium-top-row>.bha-premium-top-card:nth-child(3) {grid-column:1/-1!important;}
}
@media(max-width:767px) {
  body.bha-home-design .bha-premium-top-section {padding:22px 0!important;}
  body.bha-home-design .bha-premium-top-row {grid-template-columns:minmax(0,1fr)!important;gap:16px!important;}
  body.bha-home-design .bha-premium-top-row>.bha-premium-top-card {
    grid-column:auto!important; padding:18px 16px!important;
    border-radius:14px!important; min-width:0!important;
  }
  body.bha-home-design .bha-premium-top-card h1,
  body.bha-home-design .bha-premium-top-card h2,
  body.bha-home-design .bha-premium-top-card h3,
  body.bha-home-design .bha-premium-top-card .sppb-addon-title {
    font-size:clamp(20px,5vw,23px)!important;
    line-height:1.25!important; margin:6px 0 12px!important;
  }
  body.bha-home-design .bha-premium-top-card p {font-size:15px!important;line-height:1.6!important;}
  body.bha-home-design .bha-premium-top-card img {max-height:none!important;max-width:100%!important;object-fit:contain!important;}
  body.bha-home-design .bha-premium-top-card .sppb-btn {font-size:14px!important;min-height:42px!important;}
  body.bha-home-design .bha-premium-slider-section {padding:10px 0 22px!important;}
  body.bha-home-design .bha-premium-slider-section.bha-slider-fallback,
  body.bha-home-design .bha-premium-slider-section.bha-slider-fallback .sppb-container {min-height:230px!important;}
  body.bha-home-design .bha-premium-gallery-section {padding:22px 0!important;}
  body.bha-home-design .bha-premium-gallery-section .sppb-addon-module {padding:12px!important;margin-bottom:14px!important;}
  body.bha-home-design .bha-premium-articles-section .sppb-row>[class*="sppb-col"] {width:100%!important;max-width:100%!important;}
  body.bha-home-design .bha-premium-welcome-section .sppb-row>[class*="sppb-col"] {width:100%!important;max-width:100%!important;}
  body.bha-home-design .bha-premium-welcome-section .sppb-row {padding:16px!important;}
  body.bha-home-design .bha-premium-welcome-section h2 {font-size:23px!important;}
  body.bha-home-design #sp-bottom {padding:24px 0!important;}
  body.bha-home-design #sp-bottom .row>[class*="col-"] {margin-bottom:16px!important;}
  body.bha-home-design #sp-footer {padding:18px 16px!important;}
}
/* ===== BHA V4 CORRECTED END ===== */
