/* Buganda Heritage: scoped page repair + native Helix Ultimate menu styling.
   Does not affect the home slider or its JS. */
:root { --bha-blue:#003CC8; --bha-pink:#FF025A; --bha-sky:#0991DE; --bha-gold:#EFC823; }

/* 1. Existing Keynote offcanvas - all menu items retain their Joomla links. */
@media (max-width:991.98px) {
  body .offcanvas-menu {
    width:min(360px,90vw)!important;
    max-width:90vw!important;
    height:100dvh!important;
    min-height:100vh!important;
    overflow-y:auto!important;
    background:#fff!important;
    box-shadow:-12px 0 38px rgba(1,20,55,.18)!important;
    padding:0!important;
    z-index:99999!important;
  }
  body .offcanvas-menu:before {
    content:'BUGANDA HERITAGE';
    display:flex;
    align-items:center;
    min-height:94px;
    padding:24px 65px 18px 24px;
    box-sizing:border-box;
    background:linear-gradient(135deg,#f6f8ff,#fff);
    color:var(--bha-blue);
    font:800 17px/1.35 Arial,sans-serif;
    letter-spacing:.035em;
    border-bottom:4px solid var(--bha-gold);
  }
  body .offcanvas-menu .close-offcanvas {
    position:absolute!important;
    top:25px!important;
    right:18px!important;
    left:auto!important;
    width:42px!important;height:42px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    border-radius:12px!important;
    background:#eef3ff!important;
    color:var(--bha-blue)!important;
    font-size:20px!important;
    z-index:5!important;
  }
  body .offcanvas-menu .offcanvas-inner {
    padding:15px 18px 40px!important;
    overflow:visible!important;
  }
  body .offcanvas-menu .offcanvas-inner .sp-module,
  body .offcanvas-menu .offcanvas-inner .sp-module-content {margin:0!important;padding:0!important;}
  body .offcanvas-menu .offcanvas-inner ul {list-style:none!important;margin:0!important;padding:0!important;}
  body .offcanvas-menu .offcanvas-inner li {position:relative!important;list-style:none!important;margin:4px 0!important;}
  body .offcanvas-menu .offcanvas-inner a:not(.close-offcanvas) {
    display:flex!important;
    align-items:center!important;
    min-height:48px!important;
    padding:12px 15px!important;
    color:#102d5c!important;
    font:600 15px/1.35 Arial,sans-serif!important;
    background:transparent!important;
    border-radius:10px!important;
    text-decoration:none!important;
    white-space:normal!important;
  }
  body .offcanvas-menu .offcanvas-inner li.active > a,
  body .offcanvas-menu .offcanvas-inner li.current > a,
  body .offcanvas-menu .offcanvas-inner li.current-menu-item > a,
  body .offcanvas-menu .offcanvas-inner a[aria-current="page"] {
    background:#eff3ff!important;color:var(--bha-blue)!important;
    box-shadow:inset 4px 0 0 var(--bha-pink)!important;
  }
  body .offcanvas-menu .offcanvas-inner a:hover,
  body .offcanvas-menu .offcanvas-inner a:focus-visible {
    background:#f2f6ff!important;color:var(--bha-blue)!important;
    outline-offset:2px!important;
  }
  /* Keep existing Culture submenu and its native Helix expand/collapse controls. */
  body .offcanvas-menu .offcanvas-inner ul ul {
    padding:3px 0 5px 13px!important;
    margin-left:10px!important;
    border-left:2px solid #e4eaff!important;
  }
  body .offcanvas-menu .offcanvas-inner ul ul a {
    min-height:42px!important;
    padding:9px 12px!important;
    font-size:14px!important;
    font-weight:500!important;
  }
  body .offcanvas-menu .offcanvas-inner .offcanvas-menu-toggler,
  body .offcanvas-menu .offcanvas-inner .menu-toggler {
    position:absolute!important;right:4px!important;top:3px!important;
    z-index:3!important;min-width:42px!important;min-height:42px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    color:var(--bha-blue)!important;
  }
  body #sp-header #offcanvas-toggler,
  body #sp-header .offcanvas-toggler-right {color:var(--bha-blue)!important;min-width:44px!important;min-height:44px!important;align-items:center!important;justify-content:center!important;}
  body #sp-header #offcanvas-toggler i,
  body #sp-header #offcanvas-toggler .fa {font-size:26px!important;}
}

/* 2. Monument-fundraising page only - classes come from the URL guard in index.php. */
html.bha-fundraising-route body #sp-page-builder,
html.bha-fundraising-route body #sp-main-body {width:100%;min-width:0;}
html.bha-fundraising-route body #sp-page-builder .sppb-section {overflow:visible;}
html.bha-fundraising-route body #sp-page-builder img {max-width:100%!important;height:auto!important;object-fit:contain;}
html.bha-fundraising-route body #sp-page-builder .sppb-addon-text-block,
html.bha-fundraising-route body #sp-page-builder .sppb-addon-content {overflow-wrap:break-word;min-width:0;}
html.bha-fundraising-route body #sp-page-builder .sppb-addon-content p {line-height:1.65;}

@media (max-width:767.98px) {
  html.bha-fundraising-route body #sp-main-body {padding:0!important;}
  html.bha-fundraising-route body #sp-page-builder .sppb-section {
    padding:25px 0!important;
    margin:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
  }
  html.bha-fundraising-route body #sp-page-builder .sppb-container,
  html.bha-fundraising-route body #sp-page-builder .sppb-container-inner {
    width:100%!important;max-width:100%!important;
    padding-left:16px!important;padding-right:16px!important;
    box-sizing:border-box!important;
  }
  html.bha-fundraising-route body #sp-page-builder .sppb-row {
    display:flex!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;margin-right:0!important;
    gap:14px!important;
    height:auto!important;
  }
  html.bha-fundraising-route body #sp-page-builder .sppb-row > [class*="sppb-col"],
  html.bha-fundraising-route body #sp-page-builder .sppb-row > .row-column {
    display:block!important;
    flex:0 0 100%!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:0!important;
    margin:0!important;
    height:auto!important;
  }
  html.bha-fundraising-route body #sp-page-builder .sppb-addon-wrapper,
  html.bha-fundraising-route body #sp-page-builder .sppb-addon {min-width:0!important;max-width:100%!important;}
  html.bha-fundraising-route body #sp-page-builder h1,
  html.bha-fundraising-route body #sp-page-builder .sppb-addon-title:is(h1,h2) {
    font-size:clamp(24px,6.3vw,32px)!important;line-height:1.2!important;
    margin:0 0 16px!important;
  }
  html.bha-fundraising-route body #sp-page-builder h2 {font-size:clamp(21px,5.5vw,27px)!important;line-height:1.25!important;}
  html.bha-fundraising-route body #sp-page-builder h3 {font-size:20px!important;line-height:1.3!important;}
  html.bha-fundraising-route body #sp-page-builder h4 {font-size:17px!important;line-height:1.35!important;}
  html.bha-fundraising-route body #sp-page-builder p,
  html.bha-fundraising-route body #sp-page-builder li {
    font-size:15px!important;line-height:1.7!important;letter-spacing:0!important;
  }
  html.bha-fundraising-route body #sp-page-builder .sppb-addon-wrapper {margin-top:0!important;margin-left:0!important;margin-right:0!important;}
  html.bha-fundraising-route body #sp-page-builder img {width:auto!important;max-width:100%!important;max-height:none!important;margin-inline:auto;}
  html.bha-fundraising-route body #sp-page-builder .sppb-btn {min-height:44px!important;padding:12px 18px!important;font-size:15px!important;}
  html.bha-fundraising-route body #sp-page-builder iframe {max-width:100%!important;}
}

@media(min-width:768px) and (max-width:1100px) {
  html.bha-fundraising-route body #sp-page-builder .sppb-container {width:100%!important;max-width:100%!important;padding-inline:24px!important;}
  html.bha-fundraising-route body #sp-page-builder .sppb-row > [class*="sppb-col"] {min-width:0!important;}
}
