.kff-pillars{
  --kff-teal:#10605A;
  --kff-teal-dark:#0A4842;
  --kff-teal-deep:#083935;
  --kff-sage:#9FB7A7;
  --kff-gold:#C2A36B;
  --kff-gold-light:#D8C29A;
  --kff-charcoal:#3A3A3A;
  --kff-serif:'Playfair Display', Georgia, serif;
  --kff-sans:'Alegreya Sans', 'Helvetica Neue', Arial, sans-serif;
  --kff-pillars-row-height:460px;
  --kff-pillars-mobile-card:120px;
  --kff-pillars-mobile-collapsed:74px;
  --kff-pillars-mobile-expanded:560px;
  font-family:var(--kff-sans);
  color:var(--kff-charcoal);
  line-height:1.6;
  box-sizing:border-box;
  width:100%;
}
.kff-pillars *,
.kff-pillars *::before,
.kff-pillars *::after{box-sizing:border-box;}

.kff-pillars__row{
  display:flex;
  gap:26px;
  height:var(--kff-pillars-row-height);
  align-items:stretch;
  width:100%;
}
.kff-pillars__card{
  position:relative;
  display:block;
  border-radius:0;
  overflow:hidden;
  cursor:pointer;
  flex:1;
  min-width:0;
  box-shadow:0 14px 32px rgba(58,58,58,0.10);
  transition:flex-grow .7s cubic-bezier(.2,.7,.3,1), height .55s cubic-bezier(.2,.7,.3,1), transform .5s cubic-bezier(.2,.7,.3,1), box-shadow .5s ease;
  outline:none;
}
.kff-pillars__card:hover{
  transform:translateY(-8px);
  box-shadow:0 22px 44px rgba(58,58,58,0.16);
}
.kff-pillars__card:focus-visible{
  outline:2px solid var(--kff-gold);
  outline-offset:3px;
}
.kff-pillars__row.is-active .kff-pillars__card{flex-grow:0.55;}
.kff-pillars__row.is-active .kff-pillars__card.is-selected{flex-grow:4.4;}
.kff-pillars__row.is-active .kff-pillars__card:hover{
  transform:none;
  box-shadow:0 14px 32px rgba(58,58,58,0.10);
}

.kff-pillars__img{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center center;
  background-color:#1c3d39;
  transition:transform 1.2s cubic-bezier(.2,.7,.3,1);
  filter:grayscale(10%) saturate(1.05) contrast(1.04) brightness(.85);
}
.kff-pillars__card:hover .kff-pillars__img{transform:scale(1.08);}
.kff-pillars__card::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(8,57,53,0.05) 0%, rgba(8,57,53,0.84) 100%);
  pointer-events:none;
}

.kff-pillars__body{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:26px 24px;
  z-index:2;
  color:#FFFFFF;
  opacity:1;
  visibility:visible;
  transition:opacity .35s ease, visibility 0s linear 0s;
}
.kff-pillars__title{
  font-family:var(--kff-serif);
  color:#FFFFFF;
  font-weight:400;
  font-size:17px;
  margin:0 0 7px;
  line-height:1.3;
  opacity:1;
  transition:opacity .3s ease;
}
.kff-pillars__descriptor{
  font-family:var(--kff-sans);
  font-size:13px;
  color:rgba(255,255,255,0.8);
  max-width:230px;
  text-align:left;
  margin:0 0 16px;
  line-height:1.5;
  opacity:1;
  transition:opacity .25s ease, visibility .25s ease;
}
.kff-pillars__gold-line{
  width:0;
  height:1px;
  background:var(--kff-gold);
  margin:14px 0;
  transition:width .5s ease, opacity .25s ease, visibility .25s ease;
  opacity:1;
}
.kff-pillars__card:hover .kff-pillars__gold-line{width:36px;}

.kff-pillars__arrow{
  display:inline-flex;
  align-items:center;
  gap:7px;
  background:var(--kff-sage);
  color:var(--kff-charcoal);
  padding:8px 16px;
  font-family:var(--kff-sans);
  font-size:11px;
  letter-spacing:0.07em;
  text-transform:uppercase;
  font-weight:500;
  opacity:1;
  transition:background .3s ease, transform .3s ease, opacity .25s ease, visibility .25s ease;
}
.kff-pillars__arrow svg{transition:transform .32s ease;flex-shrink:0;}
.kff-pillars__card:hover .kff-pillars__arrow{
  background:var(--kff-gold);
  transform:translateY(-2px);
}
.kff-pillars__card:hover .kff-pillars__arrow svg{transform:translateX(6px);}

/*
 * During flex settle: only hide selected detail/close.
 * Collapsed sibling titles stay visible when switching cards.
 */
.kff-pillars__row.is-settling .kff-pillars__detail,
.kff-pillars__row.is-settling .kff-pillars__close{
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
  transition:none !important;
  animation:none !important;
}

/* Collapsed siblings: vertical title stays on */
.kff-pillars__row.is-active .kff-pillars__card:not(.is-selected) .kff-pillars__body{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  height:100%;
  padding:22px 10px;
  opacity:1;
  visibility:visible;
}
.kff-pillars__row.is-active .kff-pillars__card:not(.is-selected) .kff-pillars__descriptor,
.kff-pillars__row.is-active .kff-pillars__card:not(.is-selected) .kff-pillars__gold-line,
.kff-pillars__row.is-active .kff-pillars__card:not(.is-selected) .kff-pillars__arrow{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  height:0;
  max-height:0;
  margin:0;
  padding:0;
  overflow:hidden;
  transition:opacity .15s ease, visibility 0s linear .15s;
}
.kff-pillars__row.is-active .kff-pillars__card:not(.is-selected) .kff-pillars__title{
  writing-mode:vertical-rl;
  text-orientation:mixed;
  white-space:nowrap;
  font-size:16px;
  margin:0;
  opacity:1;
}

.kff-pillars__detail{
  position:absolute;
  inset:0;
  z-index:3;
  display:flex;
  align-items:flex-end;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .12s ease, visibility 0s linear .12s;
}
.kff-pillars__row.is-active:not(.is-settling) .kff-pillars__card.is-selected .kff-pillars__detail{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition:opacity .4s ease, visibility 0s linear 0s;
}
.kff-pillars__card.is-selected .kff-pillars__body{
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}
.kff-pillars__row.is-active .kff-pillars__card:not(.is-selected) .kff-pillars__detail{
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}
.kff-pillars__detail-inner{
  width:100%;
  max-height:100%;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  padding:45px 45px 38px;
  background:linear-gradient(0deg, rgba(8,57,53,0.97) 0%, rgba(8,57,53,0.7) 60%, rgba(8,57,53,0.05) 100%);
  scrollbar-width:thin;
  scrollbar-color:var(--kff-gold-light) transparent;
}
.kff-pillars__detail-inner::-webkit-scrollbar{width:5px;}
.kff-pillars__detail-inner::-webkit-scrollbar-thumb{background:var(--kff-gold-light);}
.kff-pillars__detail-inner::-webkit-scrollbar-track{background:transparent;}
.kff-pillars__detail-eyebrow{
  display:block;
  margin:0 0 11px;
  font-family:var(--kff-sans);
  font-size:12px;
  font-weight:500;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:var(--kff-gold-light);
}
.kff-pillars__detail-title{
  font-family:var(--kff-serif);
  color:#FFFFFF;
  font-size:30px;
  font-weight:400;
  margin:0 0 14px;
  line-height:1.25;
}
.kff-pillars__detail-desc{
  max-width:520px;
  color:rgba(255,255,255,0.85);
  font-family:var(--kff-sans);
  font-size:15px;
  margin:0 0 24px;
  text-align:justify;
  line-height:1.6;
}

.kff-pillars__drawer-toggle{
  display:inline-flex !important;
  align-items:center !important;
  gap:10px !important;
  background:transparent !important;
  background-color:transparent !important;
  border:none !important;
  border-bottom:1px solid rgba(255,255,255,0.35) !important;
  border-radius:0 !important;
  outline:none !important;
  box-shadow:none !important;
  color:var(--kff-gold-light) !important;
  font-family:var(--kff-sans) !important;
  font-size:12px !important;
  letter-spacing:0.1em !important;
  text-transform:uppercase !important;
  font-weight:500 !important;
  padding:0 0 8px !important;
  margin:0 !important;
  cursor:pointer !important;
  line-height:1.4 !important;
  text-decoration:none !important;
  -webkit-appearance:none;
  appearance:none;
  transition:border-color .3s ease, color .3s ease, background .3s ease, background-color .3s ease !important;
}
.kff-pillars__drawer-toggle:hover,
.kff-pillars__drawer-toggle:focus,
.kff-pillars__drawer-toggle:focus-visible,
.kff-pillars__drawer-toggle:active{
  background:transparent !important;
  background-color:transparent !important;
  border:none !important;
  border-bottom:1px solid var(--kff-gold-light) !important;
  border-radius:0 !important;
  outline:none !important;
  box-shadow:none !important;
  color:#FFFFFF !important;
}
.kff-pillars__drawer-icon{
  width:11px;
  height:11px;
  position:relative;
  flex-shrink:0;
}
.kff-pillars__drawer-icon::before,
.kff-pillars__drawer-icon::after{
  content:'';
  position:absolute;
  background:currentColor;
  transition:transform .4s cubic-bezier(.2,.7,.3,1);
}
.kff-pillars__drawer-icon::before{
  left:0;top:50%;width:100%;height:1px;transform:translateY(-50%);
}
.kff-pillars__drawer-icon::after{
  top:0;left:50%;width:1px;height:100%;transform:translateX(-50%);
}
.kff-pillars__drawer-toggle.is-open .kff-pillars__drawer-icon::after{
  transform:translateX(-50%) scaleY(0);
}
.kff-pillars__drawer{
  max-height:0;
  overflow:hidden;
  transition:max-height .6s cubic-bezier(.2,.7,.3,1);
}
.kff-pillars__drawer-inner{
  padding-top:19px;
  display:flex;
  flex-direction:column;
  gap:1px;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .5s ease .1s, transform .5s ease .1s;
}
.kff-pillars__drawer-toggle.is-open + .kff-pillars__drawer .kff-pillars__drawer-inner{
  opacity:1;
  transform:translateY(0);
}
.kff-pillars__initiative-link{
  display:block;
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,0.14);
  font-family:var(--kff-serif);
  font-size:16px;
  color:rgba(255,255,255,0.88) !important;
  text-decoration:none !important;
  text-decoration-line:none !important;
  text-underline-offset:0 !important;
  box-shadow:none !important;
  background:none !important;
  transition:color .3s ease, padding-left .3s ease;
}
.kff-pillars__initiative-link:hover,
.kff-pillars__initiative-link:focus,
.kff-pillars__initiative-link:focus-visible,
.kff-pillars__initiative-link:active,
.kff-pillars__initiative-link:visited{
  color:var(--kff-gold-light) !important;
  padding-left:8px;
  text-decoration:none !important;
  text-decoration-line:none !important;
  box-shadow:none !important;
  background:none !important;
  outline:none !important;
}
.kff-pillars__initiative-link::after,
.kff-pillars__initiative-link::before{
  display:none !important;
  content:none !important;
}
.kff-pillars__initiative-link:last-child{border-bottom:none;}

.kff-pillars__close{
  position:absolute;
  top:22px;
  right:22px;
  z-index:4;
  width:32px;
  height:32px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,0.4) !important;
  background:transparent !important;
  background-color:transparent !important;
  color:#FFFFFF !important;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
  padding:0 !important;
  margin:0;
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  outline:none !important;
  box-shadow:none !important;
  -webkit-appearance:none;
  appearance:none;
  transition:opacity .12s ease, visibility 0s linear .12s, background .3s ease, background-color .3s ease, border-color .3s ease;
}
.kff-pillars__row.is-active:not(.is-settling) .kff-pillars__card.is-selected .kff-pillars__close{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition:opacity .3s ease, visibility 0s linear 0s, background .3s ease, background-color .3s ease, border-color .3s ease;
}
.kff-pillars__close:hover,
.kff-pillars__close:focus,
.kff-pillars__close:focus-visible,
.kff-pillars__close:active{
  background:rgba(194,163,107,0.3) !important;
  background-color:rgba(194,163,107,0.3) !important;
  border:1px solid rgba(255,255,255,0.4) !important;
  color:#FFFFFF !important;
  outline:none !important;
  box-shadow:none !important;
}

/* ========== TABLET / MOBILE ========== */
@media(max-width:1024px){
  .kff-pillars__row{gap:16px;}
  .kff-pillars__body{padding:20px 18px;}
  .kff-pillars__detail-inner{padding:36px 28px 28px;}
}

@media(max-width:900px){
  .kff-pillars__row{
    flex-direction:column;
    height:auto !important;
    gap:12px;
  }

  .kff-pillars__card{
    flex:none !important;
    flex-grow:0 !important;
    width:100%;
    height:var(--kff-pillars-mobile-card);
  }

  .kff-pillars__card:hover,
  .kff-pillars__row.is-active .kff-pillars__card:hover{
    transform:none;
    box-shadow:0 14px 32px rgba(58,58,58,0.10);
  }

  .kff-pillars__card:hover .kff-pillars__img{
    transform:none;
  }

  /* Collapsed mobile card: title + arrow only */
  .kff-pillars__body{
    display:flex;
    flex-direction:row;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
    height:100%;
    padding:16px 18px;
  }

  .kff-pillars__title{
    font-size:16px;
    margin:0;
  }

  .kff-pillars__gold-line,
  .kff-pillars__descriptor{
    display:none;
  }

  .kff-pillars__arrow{
    flex-shrink:0;
    padding:7px 12px;
    font-size:10px;
  }

  .kff-pillars__card:hover .kff-pillars__arrow{
    transform:none;
  }

  /* When one card is expanded */
  .kff-pillars__row.is-active .kff-pillars__card{
    height:var(--kff-pillars-mobile-collapsed);
  }

  .kff-pillars__row.is-active .kff-pillars__card.is-selected{
    height:var(--kff-pillars-mobile-expanded);
  }

  .kff-pillars__row.is-active .kff-pillars__card:not(.is-selected) .kff-pillars__body{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    height:100%;
    padding:14px 18px;
  }

  .kff-pillars__row.is-active .kff-pillars__card:not(.is-selected) .kff-pillars__title{
    writing-mode:horizontal-tb;
    text-orientation:initial;
    white-space:nowrap;
    font-size:15px;
    margin:0;
  }

  .kff-pillars__row.is-active .kff-pillars__card:not(.is-selected) .kff-pillars__arrow{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    height:0;
    max-height:0;
    margin:0;
    padding:0;
    overflow:hidden;
  }

  .kff-pillars__detail-inner{
    padding:72px 20px 24px;
  }

  .kff-pillars__detail-title{
    font-size:26px;
  }

  .kff-pillars__detail-desc{
    font-size:14px;
    margin-bottom:20px;
  }

  .kff-pillars__initiative-link{
    font-size:15px;
    padding:12px 0;
  }

  .kff-pillars__close{
    top:14px;
    right:14px;
    width:36px;
    height:36px;
  }
}

@media(max-width:480px){
  .kff-pillars__row{gap:10px;}
  .kff-pillars__body{padding:14px 14px;}
  .kff-pillars__title{font-size:15px;}
  .kff-pillars__detail-inner{padding:64px 16px 20px;}
  .kff-pillars__detail-title{font-size:24px;}
}

@media (prefers-reduced-motion: reduce){
  .kff-pillars *,
  .kff-pillars *::before,
  .kff-pillars *::after{
    animation-duration:0.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.001ms !important;
  }
}

@media (hover: none){
  .kff-pillars__card:hover{
    transform:none;
  }
  .kff-pillars__card:hover .kff-pillars__img{
    transform:none;
  }
  .kff-pillars__card:hover .kff-pillars__gold-line{
    width:36px;
  }
}
