/* ================================================================
   ST. CHARLES LWANGA KAKIRI — HOMEPAGE FINAL LAYOUT
   Explicit Bootstrap-compatible rows/columns + isolated marquee lanes.
   ================================================================ */

/* ---------------- ANNOUNCEMENT ---------------- */
.notice{background:#13b8e5;color:#fff;overflow:hidden}
.notice .ticker{height:40px!important;display:flex!important;align-items:center!important;gap:0!important;width:100%!important;overflow:hidden!important;white-space:nowrap!important}
.notice .ticker>strong{flex:0 0 155px!important;width:155px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;background:#0b3470!important;color:#fff!important;border-radius:0 24px 24px 0!important;font-size:.76rem!important;font-weight:900!important;letter-spacing:.1em!important;z-index:20!important;position:relative!important;white-space:nowrap!important}
.notice .ticker-window{flex:1 1 auto!important;min-width:0!important;height:40px!important;overflow:hidden!important;position:relative!important;display:flex!important;align-items:center!important;background:rgba(0,0,0,.04)!important}
.notice .ticker-track{display:flex!important;align-items:center!important;flex:0 0 auto!important;width:max-content!important;height:40px!important;animation:scAnnouncement 32s linear infinite!important;will-change:transform!important}
.notice .ticker-track span{display:block!important;flex:0 0 auto!important;width:auto!important;min-width:max-content!important;padding:0 7rem 0 0!important;margin:0!important;line-height:40px!important;color:#fff!important;font-weight:700!important;white-space:nowrap!important;animation:none!important}
.notice .ticker:hover .ticker-track{animation-play-state:paused!important}
@keyframes scAnnouncement{from{transform:translate3d(0,0,0)}to{transform:translate3d(-50%,0,0)}}

/* ---------------- VISION / MISSION / CORE VALUES — FINAL: ONE ROW / THREE COLUMNS ---------------- */
.home-principles-final{background:#fff!important;padding:3.35rem 0 3.65rem!important}
.home-principles-final-heading{margin-bottom:1.55rem!important}
.home-principles-final-heading .section-title{margin:.25rem 0 .45rem!important}
.home-principles-final-heading p{max-width:760px!important}
.home-principles-final-row{align-items:stretch!important}
.home-principles-final-row>[class*="col-"]{display:flex!important}
.principle-final-card{position:relative!important;width:100%!important;height:390px!important;min-height:390px!important;overflow:hidden!important;border:1px solid #dbe5ec!important;border-radius:14px!important;background:#0b3470!important;box-shadow:0 12px 30px rgba(5,43,82,.12)!important;display:flex!important;align-items:stretch!important}
.principle-final-image{position:absolute!important;inset:0!important;background-size:cover!important;background-position:center!important;transform:scale(1.01)!important}
.principle-final-vision .principle-final-image{background-image:url('../images/principles/vision.jpg')!important}
.principle-final-mission .principle-final-image{background-image:url('../images/principles/mission.jpg')!important}
.principle-final-values .principle-final-image{background-image:url('../images/principles/core-values.jpg')!important}
.principle-final-overlay{position:absolute!important;inset:0!important;background:linear-gradient(180deg,rgba(5,39,87,.18) 0%,rgba(5,28,61,.45) 35%,rgba(2,17,37,.92) 100%)!important}
.principle-final-content{position:relative!important;z-index:2!important;width:100%!important;display:flex!important;flex-direction:column!important;padding:0 1.55rem 1.4rem!important;color:#fff!important}
.principle-final-title{margin:0 -1.55rem 0!important;min-height:78px!important;padding:.8rem 1.25rem!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:.65rem!important;background:#3047d2!important;color:#fff!important;text-align:center!important}
.principle-final-title h3{margin:0!important;font-size:1.8rem!important;line-height:1.1!important;font-weight:950!important;letter-spacing:-.02em!important;color:#fff!important}
.principle-final-icon{width:35px!important;height:35px!important;display:grid!important;place-items:center!important;border-radius:50%!important;background:rgba(255,255,255,.13)!important;border:1px solid rgba(255,255,255,.34)!important;color:#fff!important;font-size:1rem!important;flex:0 0 auto!important}
.principle-final-rule{width:58px!important;height:4px!important;border-radius:99px!important;background:#13b8e5!important;margin:1.45rem 0 1.05rem!important}
.principle-final-content p{margin:0 0 1rem!important;color:#fff!important;font-size:1.06rem!important;line-height:1.62!important;font-weight:650!important;text-shadow:0 2px 5px rgba(0,0,0,.72)!important;max-width:100%!important}
.principle-final-content>a{margin-top:auto!important;align-self:flex-start!important;display:inline-flex!important;align-items:center!important;gap:.5rem!important;padding:.58rem .9rem!important;border:1px solid rgba(255,255,255,.55)!important;border-radius:8px!important;background:rgba(7,50,94,.72)!important;color:#fff!important;text-decoration:none!important;font-size:.76rem!important;font-weight:900!important;letter-spacing:.03em!important;transition:background .2s ease,transform .2s ease,border-color .2s ease!important}
.principle-final-content>a:hover{background:#13b8e5!important;border-color:#13b8e5!important;color:#062d54!important;transform:translateY(-2px)!important}
.principle-final-values-list{list-style:none!important;padding:0!important;margin:0 0 1rem!important;display:flex!important;flex-direction:column!important;gap:.62rem!important}
.principle-final-values-list li{margin:0!important;color:#fff!important;font-size:.92rem!important;line-height:1.42!important;font-weight:600!important;text-shadow:0 2px 5px rgba(0,0,0,.8)!important}
.principle-final-values-list strong{font-weight:950!important;color:#fff!important}

/* ---------------- DIGITAL LEARNING & SCHOOL RESOURCES ---------------- */
.digital-resources-v38{background:linear-gradient(135deg,#f1f9ff 0%,#fff 50%,#f4fbf7 100%)!important;border-top:1px solid #e2edf4;border-bottom:1px solid #e2edf4;padding:4rem 0 4.2rem!important}
.resources-v38-heading{display:flex!important;align-items:end!important;justify-content:space-between!important;gap:2rem!important;margin-bottom:1.8rem!important}
.resources-v38-heading>div:first-child{max-width:760px}
.resource-kicker-v38{display:inline-flex;align-items:center;gap:.5rem;color:#0b72ae;font-size:.78rem;font-weight:900;letter-spacing:.11em;text-transform:uppercase}
.resources-v38-heading .section-title{margin:.55rem 0 .6rem!important}
.resources-v38-heading p{color:#62778a;max-width:720px;margin:0!important}
.resources-v38-badge{display:inline-flex;align-items:center;gap:.6rem;padding:.7rem .9rem;border-radius:999px;background:#fff;border:1px solid #dceaf2;box-shadow:0 8px 20px rgba(9,60,100,.07);font-size:.72rem;font-weight:900;color:#0b3470;white-space:nowrap}
.resources-v38-badge i{color:#0bb8df;font-size:1.15rem}
.resources-v38-row{align-items:stretch}
.resources-v38-row>[class*="col-"]{display:flex}
.resource-v38-card{position:relative;width:100%!important;height:365px!important;min-height:365px!important;padding:1.45rem!important;display:flex!important;flex-direction:column!important;text-decoration:none!important;border:1px solid #dbe8ef!important;border-radius:20px!important;overflow:hidden!important;box-shadow:0 12px 30px rgba(7,55,92,.08)!important;transition:transform .25s ease,box-shadow .25s ease!important}
.resource-v38-card:hover{transform:translateY(-6px)!important;box-shadow:0 20px 42px rgba(7,55,92,.15)!important}
.resource-v38-blue{background:linear-gradient(150deg,#edf8ff,#fff)!important}
.resource-v38-green{background:linear-gradient(150deg,#effbf5,#fff)!important}
.resource-v38-gold{background:linear-gradient(150deg,#fff9e9,#fff)!important}
.resource-v38-top{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:68px!important}
.resource-v38-number{font-size:2.25rem!important;line-height:1!important;font-weight:950!important;color:rgba(11,52,112,.13)!important}
.resource-v38-icon{width:58px!important;height:58px!important;display:grid!important;place-items:center!important;border-radius:16px!important;font-size:1.55rem!important}
.resource-v38-blue .resource-v38-icon{background:#dff5ff!important;color:#0a72ae!important}
.resource-v38-green .resource-v38-icon{background:#def6e8!important;color:#16834b!important}
.resource-v38-gold .resource-v38-icon{background:#fff0bf!important;color:#9b6a00!important}
.resource-v38-body{padding-top:1rem!important;flex:1 1 auto!important;min-height:0!important}
.resource-v38-label{display:block!important;font-size:.7rem!important;font-weight:900!important;letter-spacing:.12em!important;color:#537084!important;margin-bottom:.4rem!important}
.resource-v38-body h3{font-size:1.4rem!important;line-height:1.2!important;font-weight:950!important;color:#0b3470!important;margin:.25rem 0 .75rem!important}
.resource-v38-body p{font-size:.93rem!important;line-height:1.58!important;color:#526b7d!important;margin:0!important;max-width:none!important}
.resource-v38-action{margin-top:auto!important;display:flex!important;align-items:center!important;justify-content:space-between!important;padding-top:1rem!important;border-top:1px solid rgba(12,59,122,.1)!important;color:#0b5f98!important;font-size:.86rem!important;font-weight:900!important}
.resource-v38-green .resource-v38-action{color:#177446!important}
.resource-v38-gold .resource-v38-action{color:#8b6200!important}
.resource-v38-action i{font-size:1rem!important}

/* ---------------- VIDEOS: 1 ROW / 3 COLUMNS ---------------- */
.home-videos-section{background:#fff!important;padding:4rem 0 4.1rem!important}
.home-videos-heading{display:flex!important;align-items:end!important;justify-content:space-between!important;gap:1.5rem!important;margin-bottom:1.7rem!important}
.home-videos-heading p{margin:.45rem 0 0!important;color:#66798c!important}
.home-videos-row>[class*="col-"]{display:flex!important}
.home-video-card{width:100%!important;height:100%!important;background:#fff!important;border:1px solid #d9e8f0!important;border-radius:18px!important;overflow:hidden!important;box-shadow:0 12px 30px rgba(7,55,92,.09)!important;transition:transform .25s ease,box-shadow .25s ease!important}
.home-video-card:hover{transform:translateY(-5px)!important;box-shadow:0 18px 38px rgba(7,55,92,.14)!important}
.home-video-frame{width:100%!important;aspect-ratio:16/9!important;position:relative!important;overflow:hidden!important;background:#062d54!important}
.home-video-frame video{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important}
.home-video-slot{position:absolute!important;left:.75rem!important;top:.75rem!important;padding:.35rem .6rem!important;border-radius:999px!important;background:rgba(5,40,75,.82)!important;color:#fff!important;font-size:.65rem!important;font-weight:900!important;letter-spacing:.1em!important}
.home-video-body{padding:1rem 1.1rem 1.15rem!important}
.home-video-body h3{font-size:1.08rem!important;font-weight:900!important;color:#0b3470!important;margin:0 0 .4rem!important}
.home-video-body p{font-size:.86rem!important;line-height:1.5!important;color:#65798a!important;margin:0!important}
.home-video-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;color:#dff6ff;text-align:center;padding:1rem}
.home-video-empty i{font-size:2.2rem;color:#16bde8}
.home-video-empty strong{font-size:1rem}
.home-video-empty span{font-size:.75rem;color:#b7d4e4}

/* ---------------- EVENTS / NEWS ---------------- */
.events-section{background:#f8fbfd!important}
.events-section .row>[class*="col-"]{display:flex}
.event-feature{width:100%!important;overflow:hidden!important;border-radius:18px!important;border:1px solid #dce9f0!important;background:#fff!important;box-shadow:0 10px 28px rgba(8,58,100,.07)!important}
.event-image{height:190px!important;position:relative!important;overflow:hidden!important}
.event-image img{width:100%!important;height:100%!important;object-fit:cover!important}
.event-date{position:absolute!important;left:.85rem!important;top:.85rem!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;width:55px!important;height:58px!important;background:#0b3470!important;color:#fff!important;border-radius:12px!important;box-shadow:0 8px 20px rgba(0,0,0,.18)!important}
.event-date strong{font-size:1.2rem!important;line-height:1!important}.event-date span{font-size:.65rem!important;text-transform:uppercase!important;font-weight:800!important}
.event-body{padding:1rem 1.05rem 1.15rem!important;display:flex!important;flex-direction:column!important;flex:1!important}
.event-location{font-size:.7rem!important;color:#0b72ae!important;font-weight:850!important;text-transform:uppercase!important;letter-spacing:.04em!important}
.event-body h3{font-size:1.05rem!important;color:#0b3470!important;font-weight:900!important;margin:.45rem 0 .4rem!important}
.event-body p{font-size:.82rem!important;line-height:1.5!important;color:#617689!important;margin:0!important}
.latest-section{background:#fff!important}
.latest-section .row>[class*="col-"]{display:flex}
.latest-card{width:100%!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border:1px solid #dce9f0!important;border-radius:18px!important;background:#fff!important;box-shadow:0 10px 28px rgba(8,58,100,.07)!important}
.latest-image{height:190px!important;overflow:hidden!important;background:#eaf5fa!important}.latest-image img{width:100%!important;height:100%!important;object-fit:cover!important}
.latest-card-body{padding:1rem 1.05rem 1.15rem!important;display:flex!important;flex-direction:column!important;flex:1!important}
.latest-card-body>span{font-size:.68rem!important;color:#08a4d0!important;text-transform:uppercase!important;font-weight:900!important;letter-spacing:.08em!important}.latest-card-body small{color:#7b8d9b!important;margin:.2rem 0 .35rem!important}
.latest-card-body h3{font-size:1.03rem!important;line-height:1.3!important;color:#0b3470!important;font-weight:900!important;margin:.2rem 0 .45rem!important}.latest-card-body p{font-size:.82rem!important;line-height:1.5!important;color:#617689!important;margin:0!important}
.latest-card-body a{margin-top:auto!important;padding-top:.8rem!important;color:#0b72ae!important;font-weight:900!important;text-decoration:none!important;font-size:.82rem!important}

/* ---------------- RESPONSIVE ---------------- */
@media(max-width:991px){
  .resources-v38-heading,.home-videos-heading{align-items:flex-start!important;flex-direction:column!important}
  .resources-v38-badge{align-self:flex-start!important}
  .principle-final-card{height:370px!important;min-height:370px!important}
  .resource-v38-card{height:345px!important;min-height:345px!important}
}
@media(max-width:767px){
  .notice .ticker>strong{flex-basis:115px!important;width:115px!important;font-size:.62rem!important}
  .home-principles-final{padding:2.55rem 0 2.9rem!important}
  .principle-final-card{height:350px!important;min-height:350px!important}
  .principle-final-title{min-height:68px!important}
  .principle-final-title h3{font-size:1.42rem!important}
  .principle-final-content{padding-left:1.15rem!important;padding-right:1.15rem!important}
  .principle-final-title{margin-left:-1.15rem!important;margin-right:-1.15rem!important}
  .principle-final-content p{font-size:.94rem!important;line-height:1.5!important}
  .principle-final-values-list li{font-size:.82rem!important}
  .resource-v38-card{height:340px!important;min-height:340px!important}
  .home-videos-section,.digital-resources-v38{padding-top:3rem!important;padding-bottom:3.2rem!important}
}

/* FINAL V4.1 refinements */
@media (min-width:1200px){
  .nav-hover-dropdown:hover > .dropdown-menu{display:block;opacity:1;visibility:visible;transform:translateY(0);}
  .nav-hover-dropdown > .dropdown-menu{margin-top:0;transition:opacity .15s ease,transform .15s ease;}
}
.main-nav-v37 .navbar-nav .nav-link{font-family:var(--primary-menu-font-family,var(--page-font-family));font-size:var(--primary-menu-font-size,16px);font-weight:700;}
.home-principles-final{padding-top:3.5rem;padding-bottom:3.5rem;}
.home-principles-final-row{align-items:stretch;}
.principle-final-card{position:relative;min-height:430px;overflow:hidden;border-radius:18px;background:#063b66;box-shadow:0 12px 30px rgba(0,30,60,.14);}
.principle-final-image{position:absolute;inset:0;background-position:center;background-size:cover;}
.principle-final-overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,35,65,.25),rgba(0,22,42,.88));}
.principle-final-content{position:relative;z-index:2;height:100%;min-height:430px;padding:2rem;display:flex;flex-direction:column;justify-content:flex-end;color:#fff;}
.principle-final-title{display:flex;align-items:center;gap:.8rem}.principle-final-title h3{margin:0;font-size:1.55rem;color:#fff}.principle-final-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.16);color:#fff}
.principle-final-rule{width:55px;height:3px;background:#58c8f5;margin:.85rem 0 1rem}.principle-final-content p,.principle-final-values-list{color:#fff;font-size:1rem;line-height:1.65}.principle-final-values-list{padding-left:1.2rem;margin-bottom:1rem}.principle-final-content a{color:#fff;font-weight:800;text-decoration:none;margin-top:.5rem}
.events-section .event-image{position:relative;overflow:visible}.events-section .event-date{z-index:5;background:#fff!important;color:#073b67!important;border:3px solid #073b67!important;box-shadow:0 8px 18px rgba(0,0,0,.2)!important;min-width:78px!important;min-height:78px!important}.events-section .event-date strong{color:#073b67!important;font-size:2rem!important;line-height:1}.events-section .event-date span{color:#0b86c9!important;font-weight:800!important;background:#fff!important}
.digital-resources-v38 .resource-v38-card{min-height:390px;border:2px solid rgba(6,75,128,.18);display:flex;flex-direction:column;overflow:hidden;text-decoration:none;}
.digital-resources-v38 .resource-v38-body{flex:1;padding-bottom:1.5rem}.digital-resources-v38 .resource-v38-body h3{font-size:1.35rem;line-height:1.25}.digital-resources-v38 .resource-v38-body p{font-size:1rem;line-height:1.55}.digital-resources-v38 .resource-v38-action{min-height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 1.25rem;font-size:.95rem;font-weight:900;letter-spacing:.03em;border-top:2px solid rgba(255,255,255,.28);background:#063b66!important;color:#fff!important}.digital-resources-v38 .resource-v38-green .resource-v38-action{background:#087f5b!important}.digital-resources-v38 .resource-v38-gold .resource-v38-action{background:#063b66!important}
.leadership-grid,.media-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.5rem;margin-top:2rem}.leadership-card{overflow:hidden;border-radius:16px;background:#fff;box-shadow:0 10px 28px rgba(0,0,0,.1);border:1px solid #e7edf3}.leadership-photo{height:300px;background:#edf3f7}.leadership-photo img{width:100%;height:100%;object-fit:cover}.leadership-placeholder{height:100%;display:grid;place-items:center;font-size:4rem;color:#7b8b99}.leadership-body{padding:1.35rem}.leadership-role{font-size:.82rem;font-weight:800;color:#0b76b5;text-transform:uppercase;letter-spacing:.05em}.leadership-body h3{margin:.35rem 0 .65rem;font-size:1.25rem}.leadership-body p{margin:0;line-height:1.6;color:#4b5b68}.media-photo-grid figure{margin:0;overflow:hidden;border-radius:15px;background:#eef3f6;box-shadow:0 8px 22px rgba(0,0,0,.08);aspect-ratio:4/3}.media-photo-grid img{width:100%;height:100%;object-fit:cover}.media-intro{margin-top:1.5rem}.media-intro h2{margin:.3rem 0 .5rem}
@media(max-width:991.98px){.leadership-grid,.media-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.principle-final-card,.principle-final-content{min-height:390px}}
@media(max-width:575.98px){.leadership-grid,.media-photo-grid{grid-template-columns:1fr}.principle-final-card,.principle-final-content{min-height:360px}.principle-final-content{padding:1.4rem}.main-nav-v37 .navbar-nav .nav-link{font-size:16px}}

.digital-resources-v38 .resource-v38-gold{background:linear-gradient(150deg,#eef6fb,#fff)!important}.digital-resources-v38 .resource-v38-gold .resource-v38-label{color:#075a8f!important}

/* FINAL FULL-BUILD PHOTO FIT + POSTER + MOBILE REFINEMENTS */
img{max-width:100%;}
.staff-img,.leadership-photo img,.board-director-photo img,.gallery-tile img,.media-photo-grid img,.news-list-card>img,.latest-image img,.event-image img,.facility-card img,.card-img{object-fit:contain!important;object-position:center center!important;background:#eef4f8!important;}
.staff-img{height:320px!important;padding:.35rem!important;}
.leadership-photo{height:320px!important;padding:.5rem!important;display:flex;align-items:center;justify-content:center;}
.leadership-photo img{width:100%;height:100%;}
.board-director-photo{height:300px!important;padding:.5rem!important;display:flex;align-items:center;justify-content:center;}
.gallery-tile{background:#f7fafc!important;}
.gallery-tile img{height:280px!important;padding:.35rem!important;}
.media-photo-grid{align-items:stretch;}
.media-photo-grid figure{background:#f7fafc!important;display:flex;flex-direction:column;overflow:hidden;}
.media-photo-grid figure img{width:100%;height:100%;min-height:0;padding:.45rem!important;}
.media-photo-grid figure figcaption{flex:0 0 auto;background:#fff;color:#123f61;font-size:.9rem;line-height:1.3;}
/* Academic Top Performers is intentionally poster-like; this rule applies only on that page. */
.media-photo-grid.top-performer-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:1.5rem;}
.top-performer-poster{aspect-ratio:2/3!important;border:1px solid #d9e7ef!important;border-radius:16px!important;box-shadow:0 12px 28px rgba(5,54,91,.1)!important;background:#f4f8fa!important;}
.top-performer-poster img{object-fit:contain!important;padding:.65rem!important;background:#f4f8fa!important;}
.top-performer-poster figcaption{padding:.7rem .8rem!important;text-align:center;font-weight:900;color:#0b3470;background:#fff;}
.class-photo-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
.class-photo-poster{aspect-ratio:4/3!important;}
.class-photo-poster img{object-fit:contain!important;background:#edf4f7!important;}
.photo-placeholder{flex:1;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.45rem;color:#6d8493;background:#edf4f7;text-align:center;padding:1rem;}
.photo-placeholder i{font-size:2rem;color:#0b72ae;}
.photo-placeholder span{font-size:.8rem;font-weight:800;}
.supplied-photo-section{margin-top:2.5rem;}
.supplied-photo-grid figure{aspect-ratio:4/3!important;}
.supplied-photo-grid figure img{object-fit:contain!important;}
.home-principles-final-row{align-items:stretch!important;}
.principle-final-card{height:auto!important;min-height:0!important;}
.principle-final-content{min-height:460px!important;justify-content:flex-start!important;padding:2rem!important;}
.principle-final-title{margin-bottom:.25rem!important;}
.principle-final-content p{max-width:none!important;}
.principle-final-values-list{margin-top:.15rem!important;}
@media(max-width:991.98px){
  .media-photo-grid.top-performer-grid,.class-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .staff-img{height:300px!important;}
  .principle-final-content{min-height:390px!important;}
}
@media(max-width:575.98px){
  .media-photo-grid.top-performer-grid,.class-photo-grid{grid-template-columns:1fr;}
  .staff-img{height:280px!important;}
  .leadership-photo{height:290px!important;}
  .gallery-tile img{height:240px!important;}
  .principle-final-content{min-height:auto!important;padding:1.4rem!important;}
}
