/* Karayiğit Mimarlık - Üretim Atölyesi Elite Gallery Mobile V3
   Mobil galeri kartlarını premium, okunabilir ve taşmasız hale getirir.
   V2'nin dar/pill görsel görünümünü geçersiz kılar. */

@media (max-width: 760px){
  html,
  body,
  .kg-workshop-page{
    overflow-x:hidden!important;
  }

  .kg-workshop-page *,
  .kg-workshop-page *::before,
  .kg-workshop-page *::after{
    box-sizing:border-box!important;
  }

  .kg-workshop-gallery-wrap{
    padding-left:18px!important;
    padding-right:18px!important;
    overflow:hidden!important;
  }

  .kg-workshop-gallery-wrap .kg-workshop-section-head{
    display:block!important;
    margin-bottom:24px!important;
  }

  .kg-workshop-gallery-wrap .kg-workshop-section-head p{
    font-size:15px!important;
    line-height:1.72!important;
    max-width:100%!important;
    color:#75685d!important;
  }

  .kg-workshop-gallery{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:28px!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
  }

  .kg-workshop-gallery-item,
  .kg-workshop-gallery-item.large,
  .kg-workshop-gallery-item.landscape,
  .kg-workshop-gallery-item.portrait{
    position:relative!important;
    grid-column:auto!important;
    grid-row:auto!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    margin:0!important;
    padding:10px!important;
    border:1px solid rgba(201,151,97,.34)!important;
    border-radius:30px!important;
    overflow:hidden!important;
    background:
      linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,0)),
      #2b2019!important;
    box-shadow:0 22px 58px rgba(48,32,23,.22)!important;
    isolation:isolate!important;
    transform:none!important;
    text-align:left!important;
  }

  .kg-workshop-gallery-item::before,
  .kg-workshop-gallery-item::after{
    content:none!important;
    display:none!important;
  }

  .kg-workshop-gallery-item img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    object-fit:cover!important;
    object-position:center!important;
    border-radius:23px!important;
    transform:none!important;
    filter:saturate(1.03) contrast(1.03)!important;
    transition:transform .6s cubic-bezier(.16,1,.3,1), filter .35s ease!important;
    box-shadow:0 14px 36px rgba(0,0,0,.22)!important;
  }

  .kg-workshop-gallery-item.landscape img,
  .kg-workshop-gallery-item.large img{
    aspect-ratio:16/10!important;
  }

  .kg-workshop-gallery-item.portrait img{
    aspect-ratio:4/5!important;
  }

  .kg-workshop-gallery-item:active img{
    transform:scale(.985)!important;
  }

  .kg-workshop-gallery-caption{
    position:relative!important;
    inset:auto!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    top:auto!important;
    z-index:5!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    margin:0!important;
    padding:18px 16px 16px!important;
    border-radius:0!important;
    background:transparent!important;
    color:#fff!important;
    overflow:visible!important;
    transform:none!important;
    text-align:left!important;
  }

  .kg-workshop-gallery-caption strong{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 8px!important;
    padding:0!important;
    color:#fff4e8!important;
    font-family:var(--kgw-serif, Georgia, "Times New Roman", serif)!important;
    font-size:clamp(26px,7.7vw,34px)!important;
    line-height:1.08!important;
    font-weight:400!important;
    letter-spacing:-.035em!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    hyphens:none!important;
  }

  .kg-workshop-gallery-caption span{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    color:#ead9c5!important;
    font-size:12px!important;
    line-height:1.62!important;
    letter-spacing:.07em!important;
    text-transform:uppercase!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    hyphens:none!important;
  }

  .kg-workshop-gallery-caption::before,
  .kg-workshop-gallery-caption::after{
    content:none!important;
    display:none!important;
  }

  /* Eski v2'nin uzun ince görsel görünümünü kesin olarak iptal eder. */
  .kg-workshop-gallery-item img[style],
  .kg-workshop-gallery-item img{
    max-width:100%!important;
  }

  /* Başlık üstü dekoratif çizgi mobilde harflerle çakışmasın. */
  .kg-workshop-kicker{
    display:inline-flex!important;
    width:auto!important;
    max-width:100%!important;
    gap:0!important;
    margin-left:0!important;
    padding-left:0!important;
    white-space:normal!important;
    overflow:visible!important;
  }

  .kg-workshop-kicker::before,
  .kg-workshop-kicker::after{
    content:none!important;
    display:none!important;
  }

  .kg-workshop-section-head h2,
  .kg-workshop-intro-card h2{
    max-width:100%!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
    hyphens:none!important;
  }

  /* WhatsApp butonu galeri son görselini tamamen kapatmasın. */
  .whatsapp,
  .whatsapp-float{
    right:14px!important;
    bottom:14px!important;
    max-width:calc(100vw - 28px)!important;
    z-index:80!important;
  }
}

/* V3 özel cinematic lightbox */
.kgw3-lightbox{
  position:fixed;
  inset:0;
  z-index:99999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(226,185,137,.18), transparent 28%),
    rgba(18,12,8,.84);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

.kgw3-lightbox.is-open{
  display:flex;
  animation:kgw3Fade .24s ease both;
}

@keyframes kgw3Fade{
  from{opacity:0}
  to{opacity:1}
}

.kgw3-lightbox-inner{
  position:relative;
  width:min(1180px,94vw);
  max-height:90vh;
  display:grid;
  place-items:center;
  perspective:1400px;
}

.kgw3-lightbox-frame{
  position:relative;
  max-width:100%;
  max-height:86vh;
  padding:10px;
  border-radius:30px;
  border:1px solid rgba(226,185,137,.42);
  background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.02));
  box-shadow:0 40px 120px rgba(0,0,0,.55);
  overflow:hidden;
  transform-origin:center;
  animation:kgw3ImageIn .48s cubic-bezier(.16,1,.3,1) both;
}

@keyframes kgw3ImageIn{
  0%{opacity:0;transform:translateY(18px) scale(.94) rotateX(7deg)}
  100%{opacity:1;transform:none}
}

.kgw3-lightbox-frame::after{
  content:"";
  position:absolute;
  inset:10px;
  pointer-events:none;
  border-radius:22px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);
}

.kgw3-lightbox img{
  display:block;
  max-width:100%;
  max-height:82vh;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:22px;
}

.kgw3-close,
.kgw3-nav{
  position:absolute;
  z-index:4;
  display:grid;
  place-items:center;
  border:1px solid rgba(226,185,137,.45);
  background:rgba(43,32,25,.78);
  color:#fff4e8;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  cursor:pointer;
  transition:.25s;
}

.kgw3-close{
  top:-18px;
  right:-18px;
  width:48px;
  height:48px;
  border-radius:50%;
  font-size:28px;
  line-height:1;
}

.kgw3-nav{
  top:50%;
  transform:translateY(-50%);
  width:48px;
  height:70px;
  border-radius:999px;
  font-size:34px;
}

.kgw3-prev{left:-64px}
.kgw3-next{right:-64px}

.kgw3-close:hover,
.kgw3-nav:hover{
  background:#c99761;
  color:#24160f;
  transform:translateY(-50%) scale(1.04);
}

.kgw3-close:hover{
  transform:scale(1.04);
}

@media(max-width:760px){
  .kgw3-lightbox{
    padding:14px;
  }

  .kgw3-lightbox-inner{
    width:100%;
    max-height:100dvh;
  }

  .kgw3-lightbox-frame{
    width:100%;
    max-height:82dvh;
    padding:7px;
    border-radius:24px;
  }

  .kgw3-lightbox img{
    width:100%;
    max-height:78dvh;
    object-fit:contain;
    border-radius:18px;
  }

  .kgw3-close{
    top:10px;
    right:10px;
    width:46px;
    height:46px;
    background:rgba(43,32,25,.88);
  }

  .kgw3-nav{
    width:42px;
    height:58px;
    font-size:28px;
    background:rgba(43,32,25,.72);
  }

  .kgw3-prev{left:8px}
  .kgw3-next{right:8px}
}
