/* KFF Card Wrap — pixel match What We Do_v7A #cardWrap / .init-card */
.kff-card-wrap{
  --kff-teal:#10605A;
  --kff-teal-dark:#0A4842;
  --kff-sage:#9FB7A7;
  --kff-gold:#C2A36B;
  --kff-charcoal:#3A3A3A;
  --kff-warm-white:#F5F5F3;
  --kff-serif:'Playfair Display', Georgia, serif;
  --kff-sans:'Alegreya Sans', 'Helvetica Neue', Arial, sans-serif;
  --kff-card-radius:0;
  --kff-card-shadow:0 14px 32px rgba(58,58,58,0.10);
  --kff-card-shadow-hover:0 22px 44px rgba(58,58,58,0.16);

  width:100%;
  box-sizing:border-box;
  font-family:var(--kff-sans);
  color:var(--kff-charcoal);
}
.kff-card-wrap *,
.kff-card-wrap *::before,
.kff-card-wrap *::after{box-sizing:border-box;}

/* ---------- Filters ---------- */
.kff-card-wrap .explorer{
  padding:2.2rem 0 .5rem;
}
.kff-card-wrap .filters{
  display:flex;
  flex-wrap:wrap;
  gap:2.2rem;
  border-bottom:1px solid rgba(16,96,90,0.14);
  padding-bottom:0;
}
.kff-card-wrap .filter-tab{
  font-family:var(--kff-sans);
  font-size:.82rem;
  letter-spacing:.05em;
  text-transform:uppercase;
  font-weight:500;
  color:#3A3A3A;
  background:none;
  border:none;
  cursor:pointer;
  padding:0 0 1rem;
  position:relative;
  transition:color .3s ease;
  line-height:1.2;
}
.kff-card-wrap .filter-tab::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:2px;
  background:var(--kff-gold);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .4s ease;
}
.kff-card-wrap .filter-tab.active{color:var(--kff-teal);}
.kff-card-wrap .filter-tab.active::after{transform:scaleX(1);}
.kff-card-wrap .filter-tab:hover{color:var(--kff-teal);}

/* ---------- Portfolio / cardWrap ---------- */
.kff-card-wrap .portfolio{
  padding:1.5rem 0 0;
  display:flex;
  flex-direction:column;
}

.kff-card-wrap .init-card{
  display:grid;
  grid-template-columns:1fr 1.1fr;
  background:#fff;
  border-radius:var(--kff-card-radius);
  overflow:hidden;
  box-shadow:var(--kff-card-shadow);
  transition:transform .5s cubic-bezier(.2,.7,.3,1), box-shadow .5s ease, opacity .5s ease, max-height .5s ease, margin .5s ease;
  margin-bottom:1.8rem;
  cursor:pointer;
  position:relative;
}
.kff-card-wrap .init-card:hover{
  transform:translateY(-8px);
  box-shadow:var(--kff-card-shadow-hover);
}
.kff-card-wrap .init-card:hover .btn-sm,
.kff-card-wrap .init-card:hover .btn-sm.learn-more{
  background:#C2A36B !important;
  background-color:#C2A36B !important;
  color:#3A3A3A !important;
  transform:translateY(-2px) !important;
  box-shadow:0 8px 18px rgba(58,58,58,0.14) !important;
  border:none !important;
  outline:none !important;
}
.kff-card-wrap .init-card.reverse{
  grid-template-columns:1.1fr 1fr;
}
.kff-card-wrap .init-card.reverse .init-img-wrap{order:2;}
.kff-card-wrap .init-card.reverse .init-body{order:1;}
.kff-card-wrap .init-card.hide{
  opacity:0;
  max-height:0;
  margin:0;
  pointer-events:none;
  overflow:hidden;
}

.kff-card-wrap .init-card.kff-card-highlight{
  box-shadow:0 0 0 2px #C2A36B, 0 22px 44px rgba(58,58,58,0.16);
}

.kff-card-wrap .init-img-wrap{
  position:relative;
  overflow:hidden;
  aspect-ratio:4/3;
  background:#9FB7A7;
}
.kff-card-wrap .init-img,
.elementor-widget-kff_card_wrap .init-img{
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  object-fit:cover !important;
  display:block;
  transition:transform 1s ease;
  filter:grayscale(8%) saturate(1.05) contrast(1.03) brightness(0.94);
}
.kff-card-wrap .init-card:hover .init-img{
  transform:scale(1.07);
}

.kff-card-wrap .init-tag{
  position:absolute;
  top:1rem;
  left:1rem;
  z-index:2;
  background:var(--kff-gold);
  color:var(--kff-charcoal);
  padding:.38rem .9rem;
  font-size:.66rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:500;
  border-radius:0;
  box-shadow:0 6px 14px rgba(58,58,58,0.22);
  font-family:var(--kff-sans);
  line-height:1.2;
}

.kff-card-wrap .init-body{
  padding:2.4rem 2.8rem;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.kff-card-wrap .init-body h3{
  font-family:var(--kff-serif);
  font-weight:400;
  font-size:1.32rem;
  margin:0 0 .85rem;
  line-height:1.25;
  color:var(--kff-teal-dark);
}
.kff-card-wrap .init-body p.summary{
  font-family:var(--kff-sans);
  font-size:.9rem;
  line-height:1.7;
  color:#3A3A3A;
  margin:0 0 1.3rem;
  max-width:none;
  text-align:justify;
  text-justify:inter-word;
}

/* btn-sm learn-more — scoped + !important to beat Astra / Elementor .btn */
.elementor-widget-kff_card_wrap .kff-card-wrap .btn-sm,
.elementor-widget-kff_card_wrap .kff-card-wrap .btn-sm.learn-more,
.kff-card-wrap .btn-sm,
.kff-card-wrap .btn-sm.learn-more{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:.45rem !important;
  align-self:flex-start !important;
  width:auto !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  background:#9FB7A7 !important;
  background-color:#9FB7A7 !important;
  color:#3A3A3A !important;
  padding:.85rem 1.5rem !important;
  font-family:var(--kff-sans) !important;
  font-size:.72rem !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
  font-weight:500 !important;
  border-radius:0 !important;
  border:none !important;
  outline:none !important;
  box-shadow:none !important;
  text-decoration:none !important;
  line-height:1.4 !important;
  cursor:pointer !important;
  margin:0;
  -webkit-appearance:none;
  appearance:none;
  transition:background .3s ease, background-color .3s ease, color .3s ease, transform .3s ease, box-shadow .3s ease !important;
}

.elementor-widget-kff_card_wrap .kff-card-wrap .btn-sm:hover,
.elementor-widget-kff_card_wrap .kff-card-wrap .btn-sm:focus,
.elementor-widget-kff_card_wrap .kff-card-wrap .btn-sm.learn-more:hover,
.elementor-widget-kff_card_wrap .kff-card-wrap .btn-sm.learn-more:focus,
.elementor-widget-kff_card_wrap .kff-card-wrap .init-card:hover .btn-sm,
.elementor-widget-kff_card_wrap .kff-card-wrap .init-card:hover .btn-sm.learn-more,
.kff-card-wrap .btn-sm:hover,
.kff-card-wrap .btn-sm:focus,
.kff-card-wrap .btn-sm.learn-more:hover,
.kff-card-wrap .btn-sm.learn-more:focus,
.kff-card-wrap .init-card:hover .btn-sm,
.kff-card-wrap .init-card:hover .btn-sm.learn-more{
  background:#C2A36B !important;
  background-color:#C2A36B !important;
  color:#3A3A3A !important;
  transform:translateY(-2px) !important;
  box-shadow:0 8px 18px rgba(58,58,58,0.14) !important;
  border:none !important;
  outline:none !important;
}

.elementor-widget-kff_card_wrap .kff-card-wrap .btn-sm svg,
.elementor-widget-kff_card_wrap .kff-card-wrap .btn-sm.learn-more svg,
.kff-card-wrap .btn-sm svg,
.kff-card-wrap .btn-sm.learn-more svg{
  width:14px;
  height:10px;
  flex-shrink:0;
  display:block;
  transition:transform .3s ease;
}

.elementor-widget-kff_card_wrap .kff-card-wrap .btn-sm:hover svg,
.elementor-widget-kff_card_wrap .kff-card-wrap .btn-sm:focus svg,
.elementor-widget-kff_card_wrap .kff-card-wrap .btn-sm.learn-more:hover svg,
.elementor-widget-kff_card_wrap .kff-card-wrap .btn-sm.learn-more:focus svg,
.elementor-widget-kff_card_wrap .kff-card-wrap .init-card:hover .btn-sm svg,
.elementor-widget-kff_card_wrap .kff-card-wrap .init-card:hover .btn-sm.learn-more svg,
.kff-card-wrap .btn-sm:hover svg,
.kff-card-wrap .btn-sm:focus svg,
.kff-card-wrap .btn-sm.learn-more:hover svg,
.kff-card-wrap .btn-sm.learn-more:focus svg,
.kff-card-wrap .init-card:hover .btn-sm svg,
.kff-card-wrap .init-card:hover .btn-sm.learn-more svg{
  transform:translateX(4px);
}

.kff-card-wrap .kff-card-data{
  display:none !important;
}

/* ---------- Modal ---------- */
.kff-card-wrap .modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(8,57,53,0.5);
  opacity:0;
  visibility:hidden;
  pointer-events:none !important;
  transition:opacity .45s ease, visibility .45s ease;
  z-index:2000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:5vh 3vw;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.kff-card-wrap .modal-overlay.open{
  opacity:1;
  visibility:visible;
  pointer-events:auto !important;
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
}
.kff-card-wrap .modal-panel{
  position:relative;
  width:78vw;
  max-width:1040px;
  height:min(78vh,660px);
  display:grid;
  grid-template-columns:1fr 1.15fr;
  grid-template-rows:1fr;
  background:var(--kff-warm-white);
  z-index:2001;
  overflow:hidden;
  border-radius:var(--kff-card-radius);
  box-shadow:0 30px 80px rgba(0,0,0,0.28);
  opacity:0;
  transform:translateY(24px) scale(.98);
  transition:opacity .45s cubic-bezier(.16,.8,.32,1), transform .45s cubic-bezier(.16,.8,.32,1);
  pointer-events:none;
}
.kff-card-wrap .modal-panel.open{
  opacity:1;
  transform:translateY(0) scale(1);
  pointer-events:auto;
}
.kff-card-wrap .modal-close{
  position:absolute;
  top:1.6rem;
  right:1.6rem;
  z-index:5;
  width:44px;
  height:44px;
  border-radius:50%;
  border:none;
  cursor:pointer;
  background:rgba(245,245,243,0.92);
  color:var(--kff-teal);
  font-size:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .3s ease;
  line-height:1;
  padding:0;
}
.kff-card-wrap .modal-close:hover{background:var(--kff-gold);}
.kff-card-wrap .modal-media{
  position:relative;
  overflow:hidden;
  height:100%;
  background:#1c3d39;
}
.kff-card-wrap .modal-slider{
  position:absolute;
  inset:0;
}
.kff-card-wrap .modal-slide{
  position:absolute;
  inset:0;
  opacity:0;
  visibility:hidden;
  transition:opacity 0.45s ease, visibility 0.45s ease;
  pointer-events:none;
}
.kff-card-wrap .modal-slide.is-active{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.kff-card-wrap .modal-slide::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:42%;
  z-index:2;
  pointer-events:none;
  background:linear-gradient(180deg, rgba(8,57,53,0) 0%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.78) 100%);
}
.kff-card-wrap .modal-media img,
.elementor-widget-kff_card_wrap .modal-media img,
.kff-card-wrap .modal-slide img,
.elementor-widget-kff_card_wrap .modal-slide img{
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  object-fit:cover !important;
  display:block;
  filter:grayscale(8%) saturate(1.05) contrast(1.03) brightness(0.94);
}
.kff-card-wrap .modal-dots{
  position:absolute;
  left:50%;
  bottom:1rem;
  transform:translateX(-50%);
  z-index:4;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0;
  margin:0;
}
.kff-card-wrap .modal-dots[hidden]{
  display:none !important;
}
.kff-card-wrap .modal-dot{
  width:8px;
  height:8px;
  padding:0;
  margin:0;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,0.4);
  cursor:pointer;
  transition:background 0.25s ease, transform 0.25s ease;
}
.kff-card-wrap .modal-dot:hover,
.kff-card-wrap .modal-dot:focus-visible{
  background:rgba(255,255,255,0.75);
  outline:none;
}
.kff-card-wrap .modal-dot.is-active{
  background:var(--kff-gold, #C2A36B);
  transform:scale(1.15);
}
.kff-card-wrap .modal-credit{
  position:absolute;
  bottom:2.4rem;
  right:.9rem;
  z-index:3;
  font-family:var(--kff-sans);
  font-weight:400;
  font-size:10.5px;
  letter-spacing:.02em;
  color:rgba(255,255,255,0.92);
  text-shadow:0 1px 4px rgba(0,0,0,0.65);
  pointer-events:none;
  display:none;
}
.kff-card-wrap .modal-body{
  padding:2.6rem 2.8rem 3rem;
  overflow-y:auto;
  height:100%;
}
.kff-card-wrap .init-tag-static{
  display:inline-block;
  position:static;
  background:var(--kff-gold);
  color:var(--kff-charcoal);
  padding:.38rem .9rem;
  font-size:.66rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:500;
  border-radius:0;
  box-shadow:0 6px 14px rgba(58,58,58,0.22);
  margin-bottom:1.2rem;
  font-family:var(--kff-sans);
  line-height:1.2;
}
.kff-card-wrap .modal-body h2{
  font-family:var(--kff-serif);
  font-weight:400;
  font-size:clamp(1.4rem,2.2vw,1.9rem);
  margin:0 0 .9rem;
  line-height:1.2;
  color:var(--kff-teal-dark);
}
.kff-card-wrap .modal-body .highlight{
  font-family:var(--kff-serif);
  font-style:italic;
  font-weight:400;
  color:var(--kff-gold);
  font-size:1.02rem;
  margin:0 0 1.4rem;
  line-height:1.5;
}
.kff-card-wrap .modal-body .full-desc{
  font-family:var(--kff-sans);
  font-size:.9rem;
  line-height:1.8;
  color:#3A3A3A;
  max-width:56ch;
  text-align:justify;
  text-justify:inter-word;
  margin:0;
}

@media(max-width:900px){
  /* Filter tabs: horizontal swipe instead of wrap */
  .kff-card-wrap .explorer{
    padding:1.6rem 0 .35rem;
  }
  .kff-card-wrap .filters{
    flex-wrap:nowrap;
    gap:1.6rem;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none; /* Firefox */
    overscroll-behavior-x:contain;
    padding-bottom:0;
  }
  .kff-card-wrap .filters::-webkit-scrollbar{
    display:none; /* Chrome/Safari */
  }
  .kff-card-wrap .filter-tab{
    flex:0 0 auto;
    white-space:nowrap;
  }

  .kff-card-wrap .init-card,
  .kff-card-wrap .init-card.reverse{
    grid-template-columns:1fr;
  }
  .kff-card-wrap .init-card.reverse .init-img-wrap{order:0;}
  .kff-card-wrap .init-card.reverse .init-body{order:1;}
  .kff-card-wrap .init-body{padding:1.8rem 1.5rem;}

  .kff-card-wrap .modal-panel{
    width:92vw;
    height:auto;
    max-height:90vh;
    grid-template-columns:1fr;
    grid-template-rows:auto auto;
    overflow-y:auto;
  }
  .kff-card-wrap .modal-media{height:220px;}
  .kff-card-wrap .modal-body{
    padding:2rem 1.6rem 3rem;
    height:auto;
    overflow-y:visible;
  }
  .kff-card-wrap .modal-close{
    width:20px;
    height:20px;
    top:1rem;
    right:1rem;
    font-size:14px;
  }
  .kff-card-wrap .modal-credit{
    left:20px;
    right:auto;
  }
}

@media (prefers-reduced-motion: reduce){
  .kff-card-wrap .init-card,
  .kff-card-wrap .init-img,
  .kff-card-wrap .btn-sm,
  .kff-card-wrap .filter-tab,
  .kff-card-wrap .filter-tab::after,
  .kff-card-wrap .modal-overlay,
  .kff-card-wrap .modal-panel{
    transition-duration:0.001ms !important;
  }
}
