.credentials-section{
  position:relative;
  padding:62px 0 68px;
  overflow:hidden;
  background:
    radial-gradient(circle at 12% 14%,rgba(199,152,66,.045),transparent 30%),
    linear-gradient(135deg,#f8f5ee 0%,#fbf9f4 54%,#f5f1e8 100%);
}
.credentials-section::before{
  content:"";
  position:absolute;
  top:0;
  right:clamp(20px,7vw,112px);
  width:1px;
  height:48px;
  background:linear-gradient(to bottom,rgba(199,152,66,0),rgba(199,152,66,.38));
}
.credentials-section__container{position:relative;z-index:1}
.credentials-section__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:40px;
  margin-bottom:28px;
}
.credentials-section__heading{display:grid;gap:8px;min-width:0}
.credentials-section__kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  width:max-content;
  color:#6f786e;
  font-size:10px;
  font-weight:500;
}
.credentials-section__kicker::after{
  content:"";
  width:32px;
  height:1px;
  background:#c79842;
  opacity:.78;
}
.credentials-section h2{
  margin:0;
  color:#161913;
  font-size:clamp(26px,1.95vw,29px);
  line-height:1.5;
  font-weight:600;
  letter-spacing:-.014em;
}
.credentials-section__head>p{
  width:min(420px,38vw);
  margin:0;
  color:#7b8279;
  font-size:12px;
  line-height:1.95;
  font-weight:400;
}

/* Stable gallery-viewer layout: large preview + ordered credential list. */
.credentials-showcase{
  display:grid;
  grid-template-columns:minmax(0,1.72fr) minmax(255px,.72fr);
  grid-template-areas:"preview nav";
  gap:24px;
  align-items:stretch;
  direction:ltr;
}
.credentials-showcase__preview{
  grid-area:preview;
  position:relative;
  min-width:0;
  height:390px;
  padding:0;
  border:0;
  background:transparent;
  text-align:right;
  cursor:pointer;
  direction:rtl;
  border-radius:18px;
  overflow:hidden;
  box-shadow:none;
}
.credentials-showcase__preview:focus-visible{outline:2px solid rgba(199,152,66,.68);outline-offset:4px}
.credentials-showcase__image-wrap{
  position:absolute;
  inset:0;
  display:block;
  overflow:hidden;
  border:1px solid rgba(22,28,21,.11);
  border-radius:18px;
  background:#ebe6da;
  transition:border-color .22s ease,background-color .22s ease;
}
.credentials-showcase__preview:hover .credentials-showcase__image-wrap,
.credentials-showcase__preview:focus-visible .credentials-showcase__image-wrap{
  border-color:rgba(199,152,66,.78);
  background:#f0eadf;
}
.credentials-showcase__image-wrap img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  transform:none!important;
  transition:opacity .22s ease!important;
}
.credentials-showcase__image-wrap.is-switching img{opacity:.38}
.credentials-showcase__image-overlay{
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(to top,rgba(9,12,9,.75) 0%,rgba(9,12,9,.19) 42%,transparent 68%);
}
.credentials-showcase__preview-copy{
  position:absolute;
  z-index:2;
  right:22px;
  bottom:20px;
  left:64px;
  display:grid;
  gap:4px;
  color:#fff;
}
.credentials-showcase__preview-copy small{
  color:#d6ad65;
  font-size:9px;
  line-height:1.6;
  font-weight:500;
}
.credentials-showcase__preview-copy strong{
  color:#fff;
  font-size:17px;
  line-height:1.6;
  font-weight:600;
}
.credentials-showcase__preview-copy span{
  color:rgba(255,255,255,.68);
  font-size:9.8px;
  line-height:1.7;
  font-weight:400;
}
.credentials-showcase__zoom{
  position:absolute;
  z-index:2;
  left:18px;
  bottom:18px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.3);
  border-radius:50%;
  background:rgba(14,17,13,.27);
  color:#fff;
  font-size:13px;
  backdrop-filter:blur(7px);
  transition:border-color .2s ease,background-color .2s ease,color .2s ease;
}
.credentials-showcase__preview:hover .credentials-showcase__zoom,
.credentials-showcase__preview:focus-visible .credentials-showcase__zoom{
  border-color:#d3a557;
  background:rgba(199,152,66,.18);
  color:#f0c879;
}

.credentials-showcase__nav{
  grid-area:nav;
  direction:rtl;
  min-width:0;
  height:390px;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(199,152,66,.38) transparent;
  border-top:1px solid rgba(28,33,27,.1);
  border-bottom:1px solid rgba(28,33,27,.1);
}
.credential-nav-item{
  position:relative;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 18px;
  align-items:center;
  gap:11px;
  width:100%;
  min-height:76px;
  padding:12px 4px 12px 8px;
  border:0;
  border-bottom:1px solid rgba(28,33,27,.085);
  background:transparent;
  color:#20241e;
  text-align:right;
  cursor:pointer;
  box-shadow:none;
  transition:background-color .2s ease,color .2s ease,border-color .2s ease;
}
.credential-nav-item:last-child{border-bottom:0}
.credential-nav-item:hover,
.credential-nav-item:focus-visible{background:rgba(199,152,66,.055);outline:0}
.credential-nav-item.is-active{background:rgba(199,152,66,.075);border-color:rgba(199,152,66,.2)}
.credential-nav-item__number{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border:1px solid rgba(199,152,66,.34);
  border-radius:50%;
  color:#9a742f;
  font-size:9.5px;
  line-height:1;
  font-weight:500;
  transition:border-color .2s ease,background-color .2s ease,color .2s ease;
}
.credential-nav-item.is-active .credential-nav-item__number{
  border-color:#c79842;
  background:#c79842;
  color:#fff;
}
.credential-nav-item__copy{display:grid;gap:3px;min-width:0}
.credential-nav-item__copy strong{
  display:block;
  overflow:hidden;
  color:#22261f;
  font-size:12.5px;
  line-height:1.65;
  font-weight:500;
  text-overflow:ellipsis;
  white-space:nowrap;
  transition:color .2s ease;
}
.credential-nav-item__copy span{
  display:block;
  overflow:hidden;
  color:#8a9188;
  font-size:9.3px;
  line-height:1.55;
  font-weight:400;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.credential-nav-item:hover .credential-nav-item__copy strong,
.credential-nav-item.is-active .credential-nav-item__copy strong{color:#93691f}
.credential-nav-item__mark{
  justify-self:end;
  width:14px;
  height:1px;
  background:rgba(33,39,31,.18);
  transition:width .2s ease,background-color .2s ease;
}
.credential-nav-item.is-active .credential-nav-item__mark{width:18px;background:#c79842}

/* Existing full-screen credential viewer. */
.credentials-viewer{
  position:fixed;
  inset:0;
  z-index:99999;
  display:grid;
  place-items:center;
  padding:26px;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  transition:opacity .24s ease,visibility .24s ease;
}
.credentials-viewer.is-open{visibility:visible;opacity:1;pointer-events:auto}
.credentials-viewer__backdrop{position:absolute;inset:0;background:rgba(8,10,8,.82);backdrop-filter:blur(8px)}
.credentials-viewer__dialog{
  position:relative;
  z-index:1;
  width:min(860px,92vw);
  max-height:92vh;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  background:#11140f;
  box-shadow:0 30px 80px rgba(0,0,0,.26);
}
.credentials-viewer__topbar{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:0 14px;border-bottom:1px solid rgba(255,255,255,.08);color:#d8dbd5}
.credentials-viewer__counter{font-size:11px;font-weight:500}
.credentials-viewer__close{
  width:34px;height:34px;display:grid;place-items:center;padding:0;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:rgba(255,255,255,.04);color:#fff;font-size:23px;line-height:1;cursor:pointer;transition:border-color .2s ease,background-color .2s ease,color .2s ease;
}
.credentials-viewer__close:hover{border-color:#c79842;background:rgba(199,152,66,.12);color:#e7bd73;transform:none!important}
.credentials-viewer__stage{position:relative;min-height:420px;display:grid;place-items:center;padding:18px 64px;overflow:hidden;touch-action:pan-y}
.credentials-viewer__figure{width:100%;height:100%;max-height:68vh;margin:0;display:grid;place-items:center}
.credentials-viewer__figure img{display:block;max-width:100%;max-height:68vh;width:auto;height:auto;object-fit:contain;border-radius:8px;background:#f4f1e8}
.credentials-viewer__nav{
  position:absolute;top:50%;translate:0 -50%;width:40px;height:40px;display:grid;place-items:center;padding:0;border:1px solid rgba(255,255,255,.14);border-radius:50%;background:rgba(255,255,255,.05);color:#fff;font-size:17px;cursor:pointer;transition:border-color .2s ease,background-color .2s ease,color .2s ease;
}
.credentials-viewer__nav:hover{border-color:#c79842;background:rgba(199,152,66,.12);color:#e7bd73;transform:none!important}
.credentials-viewer__nav--prev{right:14px}.credentials-viewer__nav--next{left:14px}
.credentials-viewer__caption{display:grid;gap:5px;padding:14px 18px 17px;border-top:1px solid rgba(255,255,255,.08);color:#fff}
.credentials-viewer__caption h3{margin:0;font-size:15px;line-height:1.7;font-weight:600;color:#fff}
.credentials-viewer__caption p{margin:0;font-size:11px;line-height:1.7;font-weight:400;color:#aeb4ac}
body.credentials-viewer-open{overflow:hidden}

@media(max-width:1100px){
  .credentials-section{padding:54px 0 60px}
  .credentials-section__head{align-items:flex-start}
  .credentials-showcase{grid-template-columns:minmax(0,1.5fr) minmax(230px,.72fr);gap:18px}
  .credentials-showcase__preview,.credentials-showcase__nav{height:350px}
  .credential-nav-item{min-height:68px;padding-block:10px}
}

@media(max-width:767px){
  .credentials-section{padding:38px 0 44px}
  .credentials-section::before{display:none}
  .credentials-section__head{display:grid;gap:9px;margin-bottom:18px}
  .credentials-section__heading{gap:6px}
  .credentials-section__kicker{font-size:9.3px}
  .credentials-section h2{font-size:22px;line-height:1.55;font-weight:600}
  .credentials-section__head>p{width:auto;max-width:none;font-size:11.3px;line-height:1.8}

  .credentials-showcase{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"preview" "nav";
    gap:12px;
    direction:rtl;
  }
  .credentials-showcase__preview{height:238px;border-radius:14px}
  .credentials-showcase__image-wrap{border-radius:14px}
  .credentials-showcase__preview-copy{right:15px;bottom:13px;left:50px;gap:2px}
  .credentials-showcase__preview-copy small{font-size:8px}
  .credentials-showcase__preview-copy strong{font-size:14px;line-height:1.55}
  .credentials-showcase__preview-copy span{font-size:8.7px}
  .credentials-showcase__zoom{left:12px;bottom:12px;width:30px;height:30px;font-size:11px}

  .credentials-showcase__nav{
    display:flex;
    width:100%;
    height:auto;
    gap:7px;
    overflow-x:auto;
    overflow-y:hidden;
    padding:1px 0 7px;
    border:0;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
  }
  .credentials-showcase__nav::-webkit-scrollbar{display:none}
  .credential-nav-item{
    flex:0 0 auto;
    width:auto;
    min-width:112px;
    min-height:54px;
    grid-template-columns:25px minmax(0,1fr);
    gap:7px;
    padding:7px 9px;
    border:1px solid rgba(28,33,27,.09);
    border-radius:10px;
    background:rgba(255,255,255,.28);
    scroll-snap-align:start;
  }
  .credential-nav-item.is-active{border-color:rgba(199,152,66,.42);background:rgba(199,152,66,.075)}
  .credential-nav-item__number{width:23px;height:23px;font-size:8px}
  .credential-nav-item__copy{gap:1px}
  .credential-nav-item__copy strong{max-width:100px;font-size:10.5px;line-height:1.5}
  .credential-nav-item__copy span{max-width:100px;font-size:8px}
  .credential-nav-item__mark{display:none}

  .credentials-viewer{padding:0;align-items:stretch}
  .credentials-viewer__dialog{width:100%;height:100dvh;max-height:none;border:0;border-radius:0}
  .credentials-viewer__stage{min-height:0;padding:14px 45px}
  .credentials-viewer__figure,.credentials-viewer__figure img{max-height:calc(100dvh - 160px)}
  .credentials-viewer__nav{width:34px;height:34px;font-size:15px}
  .credentials-viewer__nav--prev{right:7px}.credentials-viewer__nav--next{left:7px}
  .credentials-viewer__caption{padding:12px 14px 18px}
  .credentials-viewer__caption h3{font-size:14px}
}

@media(prefers-reduced-motion:reduce){
  .credentials-viewer,.credentials-showcase__image-wrap img{transition:none!important}
}
