/* 3D vitrin (SG-8 D ve Komple Tesis sayfaları). Renkler sitenin değişkenlerinden: styles.css :root */
.v3d {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 640px;                     /* açılmadan önce küçük önizleme kartı, ortada */
  margin-inline: auto;
  transition: max-width .55s cubic-bezier(.2,.8,.2,1), box-shadow .55s ease;
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(ellipse 60% 45% at 50% 62%, #2a3442 0%, #161d27 45%, var(--bg-main) 100%);
}
.v3d-poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.v3d.v3d-acik { max-width: none; aspect-ratio: 16 / 10; }  /* düğmeye basınca tam genişlik */
.v3d.v3d-acik { box-shadow: 0 0 0 1px rgba(255, 106, 0, 0.35), 0 18px 50px rgba(0, 0, 0, 0.55); }
.v3d-yukleniyor .v3d-poster { animation: v3d-yakinlas 2.4s ease-in-out infinite alternate; }
@keyframes v3d-yakinlas { from { transform: scale(1); filter: brightness(1); } to { transform: scale(1.06); filter: brightness(.8); } }
.v3d model-viewer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: transparent; --poster-color: transparent;
  opacity: 0; transition: opacity .4s ease;
}
.v3d.v3d-hazir model-viewer { opacity: 1; animation: v3d-gelis .8s cubic-bezier(.2,.8,.2,1); }
@keyframes v3d-gelis { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.v3d.v3d-hazir .v3d-poster { visibility: hidden; }
/* Ortalama transform'suz: sitenin .btn-primary:hover kuralı transform'u değiştiriyor, yoksa düğme kayıp titrer */
.v3d-btn { position: absolute; left: 0; right: 0; bottom: 22px; margin-inline: auto; width: max-content; white-space: nowrap; max-width: calc(100% - 24px); }
.v3d-yukleniyor .v3d-btn { opacity: .75; cursor: progress; }
.v3d-yukleniyor .v3d-btn i { animation: v3d-don 1s linear infinite; }
.v3d.v3d-hazir .v3d-btn { display: none; }
.v3d-kapat {
  position: absolute; top: 12px; inset-inline-end: 12px; z-index: 3; display: none;
  align-items: center; gap: 6px; padding: 7px 14px; cursor: pointer;
  border: 1px solid var(--steel-border-hover, rgba(255, 255, 255, 0.18)); border-radius: 999px;
  background: rgba(7, 9, 13, 0.8); color: var(--text-primary);
  font: 600 0.85rem/1 var(--font-heading); transition: border-color .2s, color .2s;
}
.v3d-kapat:hover, .v3d-kapat:focus-visible { border-color: var(--accent-orange); color: var(--accent-orange); }
.v3d.v3d-hazir .v3d-kapat { display: inline-flex; animation: v3d-gelis .5s ease; }
@keyframes v3d-don { to { transform: rotate(360deg); } }

/* Makinenin üstündeki marka etiketi: model ile birlikte döner, her mesafede okunur */
.v3d-etiket { display: none; }
.v3d model-viewer .v3d-etiket {
  display: block; pointer-events: none; white-space: nowrap; transform: translateY(-50%);
  padding: 6px 14px; border: 1px solid var(--accent-orange); border-radius: 999px;
  background: rgba(7, 9, 13, 0.85); color: var(--text-primary);
  font: 700 0.82rem/1.2 var(--font-heading); letter-spacing: .04em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.v3d-etiket b { color: var(--accent-orange); font-weight: 800; }

.v3d-alt {
  max-width: 640px;
  margin-inline: auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px;
  margin-top: 10px; font-size: 0.9rem; color: var(--text-secondary);
}
.v3d-alt b { color: var(--accent-orange); font-weight: 700; }
.v3d.v3d-acik + .v3d-alt { max-width: none; }

@media (max-width: 640px) {
  .v3d { aspect-ratio: 16 / 9; }
  .v3d.v3d-acik { aspect-ratio: 4 / 3; }
  .v3d-btn { bottom: 14px; padding: 10px 18px; font-size: 0.9rem; }
  .v3d model-viewer .v3d-etiket { font-size: 0.7rem; padding: 4px 10px; }
}

/* Derinlikli "3D" amblemi: sitenin turuncusu, katmanlı gölgeyle kabartma */
.v3d-amblem {
  position: absolute; top: 14px; inset-inline-end: 18px; z-index: 2; pointer-events: none;
  font: 900 3rem/1 var(--font-heading); letter-spacing: -0.02em; color: #ff8a1f;
  text-shadow: 1px 1px 0 #e86400, 2px 2px 0 #d65c00, 3px 3px 0 #c45400, 4px 4px 0 #b04b00, 5px 5px 0 #9c4200,
               6px 6px 0 #883a00, 8px 10px 14px rgba(0, 0, 0, 0.65), 0 0 18px rgba(255, 138, 31, 0.35);
  transform: perspective(500px) rotateY(-14deg) rotateX(8deg);
  animation: v3d-salla 4s ease-in-out infinite;
}
@keyframes v3d-salla { 0%, 100% { transform: perspective(500px) rotateY(-14deg) rotateX(8deg); } 50% { transform: perspective(500px) rotateY(14deg) rotateX(4deg); } }
.v3d-acik .v3d-amblem { animation: v3d-amblem-git .7s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes v3d-amblem-git { to { transform: perspective(500px) rotateY(360deg) scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .v3d, .v3d-amblem, .v3d-yukleniyor .v3d-poster, .v3d.v3d-hazir model-viewer { animation: none; transition: none; }
}
@media (max-width: 640px) { .v3d-amblem { font-size: 2.1rem; top: 10px; inset-inline-end: 12px; } }
