/* ===== v28 : hover text fix, sticky-bar gap fix, smooth gallery ===== */

/* ---------- 1. Buttons: text must stay readable on hover ---------- */
/* light sections keep the dark-green hover (gold text). On dark green areas
   (navbar, CTA bands, hero, dark sections) a dark hover would vanish, so those flip to white. */
.navbar .btn-cu:hover,
.cta-band .btn-cu:hover,
.sec-ink .btn-cu:hover,
.hs .btn-cu:hover,
.pf-hero .btn-cu:hover,
.hero .btn-cu:hover,
.stats .btn-cu:hover,
footer .btn-cu:hover{
  background:#ffffff;
  color:var(--navy,#001e13);
  border-color:#ffffff;
}
.navbar .btn-cu:hover i,.cta-band .btn-cu:hover i,.sec-ink .btn-cu:hover i,
.hs .btn-cu:hover i,.pf-hero .btn-cu:hover i{color:inherit}

/* gold button inside a dark section: link colour must not override the button text */
.sec-ink a.btn-cu,.cta-band a.btn-cu,footer a.btn-cu{color:var(--navy,#001e13)}
.sec-ink a.btn-cu:hover,.cta-band a.btn-cu:hover,footer a.btn-cu:hover{color:var(--navy,#001e13)}

/* outline buttons on dark backgrounds: white text -> white fill on hover needs dark text */
.cta-band .btn-line:hover,
.sec-ink .btn-line:hover,
.pf-hero .btn-line:hover,
.hero .btn-line:hover,
.hs .btn-line:hover,
.navbar .btn-line:hover,
footer .btn-line:hover{
  background:#ffffff;
  color:var(--navy,#001e13);
  border-color:#ffffff;
}
.cta-band .btn-line:hover i,.sec-ink .btn-line:hover i,.pf-hero .btn-line:hover i,.hs .btn-line:hover i{color:inherit}
/* outline button on light background */
.btn-line.dark:hover{background:var(--navy,#001e13);color:#ffffff}

/* ---------- 2. No gap between the header and the sticky menu bars ---------- */
/* --nbh = live height of the header (set in v28.js); it follows the header while it shrinks on scroll */
.sv-jump,.pf-subnav,.subnav{top:var(--nbh,var(--hh,70px))}
.sv-jump{margin-top:-1px;border-top:0;box-shadow:0 -1px 0 0 var(--navy,#001e13)}

/* ---------- 3. Gallery: smooth transitions ---------- */
/* one clean entrance animation per tile (no blur filter, no clashing second animation) */
@keyframes pgIn{from{opacity:0;transform:translate3d(0,26px,0) scale(.97)}to{opacity:1;transform:none}}
@keyframes pgImg{from{transform:scale(1.07)}to{transform:scale(1)}}
.gal.pg a.pg-in{animation:pgIn .85s var(--d,0s) cubic-bezier(.22,.7,.2,1) backwards}
.gal.pg a.pg-in img{animation:pgImg 1.3s var(--d,0s) cubic-bezier(.22,.7,.2,1) backwards}
/* the filter "pop" from pro.js fought with pgIn -> disabled on gallery tiles */
.gal.pg a.pro-pop{animation:none}
.gal.pg a.pro-pop.pg-in{animation:pgIn .85s var(--d,0s) cubic-bezier(.22,.7,.2,1) backwards}

/* tiles */
.gal.pg a{
  transform:translateZ(0);backface-visibility:hidden;
  transition:transform .6s cubic-bezier(.22,.7,.2,1),box-shadow .6s cubic-bezier(.22,.7,.2,1);
}
.gal.pg a:hover{transform:translate3d(0,-4px,0);box-shadow:0 28px 44px -24px rgba(0,30,19,.75)}
.gal.pg a img{
  will-change:transform;
  transition:transform 1.1s cubic-bezier(.22,.7,.2,1),opacity .7s ease;
}
.gal.pg a:hover img{transform:scale(1.06)}

/* no grey/blur "develop" effect on the gallery (this was the jerky part) */
.gal.pg .fxs:not(.seen) img,.gal.pg a.fxs:not(.seen) img{filter:none;transform:none}
.gal.pg a.fxs img{transition:transform 1.1s cubic-bezier(.22,.7,.2,1),opacity .7s ease}

/* images fade in when they finish loading (class added by v28.js) */
.js .gal.pg a img:not(.ld){opacity:0}
.js .gal.pg a img.ld{opacity:1}

/* caption + zoom icon glide instead of snapping */
.gal.pg .pg-cap{transition:transform .5s cubic-bezier(.22,.7,.2,1),opacity .5s ease}
.gal.pg .pg-zoom{transition:opacity .45s ease,transform .5s cubic-bezier(.22,.7,.2,1)}

/* filter switch: grid fades out/in */
.gal.pg{transition:opacity .28s ease}
.gal.pg.pg-swap{opacity:0}

/* lightbox */
#lb.modal.fade .modal-dialog{transition:transform .45s cubic-bezier(.22,.7,.2,1),opacity .35s ease;transform:translateY(18px) scale(.985)}
#lb.modal.show .modal-dialog{transform:none}
#lb .lb img{opacity:0;transition:opacity .45s ease,transform .6s cubic-bezier(.22,.7,.2,1);transform:scale(.99)}
#lb .lb img.lb-ready{opacity:1;transform:none}
#lb .nv{transition:background .3s ease,color .3s ease,transform .3s ease}

@media(prefers-reduced-motion:reduce){
  .gal.pg a,.gal.pg a img,.gal.pg,#lb .lb img{transition:none!important;animation:none!important}
  .js .gal.pg a img:not(.ld){opacity:1}
}

/* ===== v29: mobile hero slider - portrait photo fills the slide, text sits on the photo ===== */
@media(max-width:767.98px){
  .hs .hs-sw{height:auto}
  .hs .hs-slide{position:relative;height:clamp(540px,calc(100svh - var(--hh,75px) - 3rem),780px);display:block;overflow:hidden;background:#001e13}
  .hs .hs-slide::before{display:none}
  .hs picture{display:contents}
  .hs .hs-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;transform:none;animation:none!important}
  .hs .hs-shade{position:absolute;inset:0;height:auto;z-index:2;background:linear-gradient(180deg,rgba(0,15,9,.35) 0,rgba(0,15,9,0) 90px,rgba(0,15,9,0) 38%,rgba(0,15,9,.78) 70%,rgba(0,15,9,.94) 100%)}
  .hs .hs-in{position:absolute;left:0;right:0;bottom:0;z-index:3;height:auto;display:block;margin:0;padding:0 1.1rem 1.6rem}
  .hs .hs-cap{max-width:none}
  .hs .hs-t{font-size:clamp(1.55rem,7vw,2rem);line-height:1.12;margin-bottom:.6rem;text-shadow:0 2px 14px rgba(0,0,0,.8)}
  .hs .hs-p{font-size:.95rem;line-height:1.5;margin-bottom:1.1rem;-webkit-line-clamp:3;text-shadow:0 1px 8px rgba(0,0,0,.75)}
  .hs .hs-cta .btn{flex:1 1 140px;justify-content:center;text-align:center;padding:.7rem 1rem}
  .hs .hs-loc{z-index:4}
}
