.ac-gallery-wrap{position:relative;display:flex;align-items:center;gap:36px;}
.ac-gallery{
  flex:1;min-width:0;overflow:hidden;
}
.ac-gallery__track{
  display:flex;
  transition:transform .5s cubic-bezier(.22,.61,.36,1);
  will-change:transform;
}
.ac-gallery__page{
  flex:0 0 100%;min-width:0;
  display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:1fr;gap:22px;
}
.ac-gallery-arrow{
  flex-shrink:0;width:46px;height:46px;display:flex;align-items:center;justify-content:center;
  border:1px solid rgba(232,190,115,.3);border-radius:3px;background:rgba(255,255,255,.03);
  color:var(--gold-bright,#F2CB6E);font-size:28px;line-height:1;cursor:pointer;
  transition:border-color .2s,color .2s,background .2s;
}
.ac-gallery-arrow:hover{border-color:var(--gold-bright,#F2CB6E);color:var(--white,#fff);background:rgba(232,190,115,.08);}
.ac-gallery-arrow:disabled{opacity:.3;cursor:default;}
.ac-gallery-arrow:disabled:hover{border-color:rgba(232,190,115,.3);color:var(--gold-bright,#F2CB6E);background:rgba(255,255,255,.03);}
.ac-gallery__card{
  position:relative;display:block;aspect-ratio:4/3;border-radius:2px;overflow:hidden;
  border:1px solid var(--line,rgba(227,176,75,.16));background:none;padding:0;cursor:pointer;
  font:inherit;text-align:left;width:100%;
}
.ac-gallery__card img{
  width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s ease;
}
.ac-gallery__card:hover img{transform:scale(1.06);}
.ac-gallery__card::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg, transparent 50%, rgba(0,0,0,.78) 100%);
  pointer-events:none;
}
.ac-gallery__label{
  position:absolute;left:16px;right:16px;bottom:14px;z-index:1;
  color:var(--ivory,#F7F0DF);font-family:var(--font-display,serif);font-size:15px;
  text-shadow:0 2px 10px rgba(0,0,0,.6);
}

.ac-gallery-modal{
  position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;
  padding:24px;opacity:0;pointer-events:none;transition:opacity .25s ease;
}
.ac-gallery-modal.is-open{opacity:1;pointer-events:auto;}
.ac-gallery-modal__backdrop{
  position:absolute;inset:0;background:rgba(5,5,5,.88);backdrop-filter:blur(3px);
}
.ac-gallery-modal__inner{
  position:relative;z-index:1;max-width:min(1000px,92vw);max-height:88vh;
  background:var(--charcoal,#171512);border:1px solid rgba(232,190,115,.3);border-radius:3px;
  overflow:hidden auto;display:flex;flex-direction:column;
  transform:translateY(16px);transition:transform .25s ease;
}
.ac-gallery-modal.is-open .ac-gallery-modal__inner{transform:translateY(0);}
.ac-gallery-modal__img{width:100%;max-height:60vh;object-fit:cover;display:block;}
.ac-gallery-modal__text{padding:24px 28px 28px;}
.ac-gallery-modal__title{
  margin:0 0 8px;font-family:var(--font-display,serif);font-weight:400;font-size:22px;
  color:var(--white,#fff);
}
.ac-gallery-modal__desc{margin:0;font-size:14.5px;line-height:1.6;color:var(--text-soft,#D9D3C7);}
.ac-gallery-modal__close{
  position:absolute;top:14px;right:14px;z-index:2;width:36px;height:36px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid rgba(232,190,115,.35);border-radius:3px;background:rgba(0,0,0,.4);
  color:var(--gold-bright,#F2CB6E);font-size:20px;line-height:1;cursor:pointer;
  transition:border-color .2s,color .2s;
}
.ac-gallery-modal__close:hover{border-color:var(--gold-bright,#F2CB6E);color:var(--white,#fff);}

.ac-gallery-modal__nav{
  position:absolute;top:50%;z-index:2;transform:translateY(-50%);
  width:48px;height:48px;display:flex;align-items:center;justify-content:center;
  border:1px solid rgba(232,190,115,.3);border-radius:3px;background:rgba(5,5,5,.55);
  color:var(--gold-bright,#F2CB6E);font-size:30px;line-height:1;cursor:pointer;
  transition:border-color .2s,color .2s,background .2s;
}
.ac-gallery-modal__nav:hover{border-color:var(--gold-bright,#F2CB6E);color:var(--white,#fff);background:rgba(5,5,5,.8);}
.ac-gallery-modal__nav--prev{left:16px;}
.ac-gallery-modal__nav--next{right:16px;}

@media (max-width:900px){
  .ac-gallery-wrap{gap:16px;}
  .ac-gallery__page{grid-template-columns:repeat(2,1fr);gap:12px;}
}
@media (max-width:560px){
  .ac-gallery-wrap{gap:10px;}
  .ac-gallery__page{grid-template-columns:1fr;gap:12px;}
  .ac-gallery-arrow{width:38px;height:38px;font-size:22px;}
  .ac-gallery-modal__img{max-height:44vh;}
  .ac-gallery-modal__nav{width:40px;height:40px;font-size:24px;}
  .ac-gallery-modal__nav--prev{left:6px;}
  .ac-gallery-modal__nav--next{right:6px;}
}


/* Real portfolio: unified 16:9 cards and modal */
.ac-gallery__card{aspect-ratio:16/9;}
.ac-gallery__card::after{display:none;}
.ac-gallery__label{display:none;}
.ac-gallery-modal__inner{width:min(1100px,92vw,calc(88vh * 16 / 9));max-width:none;max-height:88vh;overflow:hidden;}
.ac-gallery-modal__img{width:100%;aspect-ratio:16/9;max-height:none;object-fit:cover;display:block;}
.ac-gallery-modal__text{display:none;}
@media(max-width:560px){.ac-gallery-modal__img{max-height:none;}}
