/* Masttech Hero Dönüşümlü Mühendislik Vitrin Modülü V2 — 3'lü Optik Triptik (Port 8502, 2026-11-19)
   - Sayfa yapısını değiştirmez: yalnız body.home sağ hero kartı (.elementor-element-7a65116) içinde çalışır.
   - 13 yatay 16:9 görsel tam çerçeve (Ken Burns) + 14 dikey 9:16 görsel 5 adet 3'lü tam dolgu optik mühendislik
     şeridi (Triptych + teleskopik dikey kaydırma + hover odak genişlemesi) olarak sunulur.
   - Kartta sıfır boş siyah alan; tüm 27 kök görsel tam ekran inceleyicide bireysel olarak açılır. */

.mt-hvit {
  --hv-red: #E3010F;
  --hv-red-glow: rgba(227, 1, 15, .55);
  --hv-bg: #11151B;
  --hv-glass: rgba(15, 19, 25, .76);
  --hv-glass-hover: rgba(24, 30, 39, .94);
  --hv-border: rgba(255, 255, 255, .18);
  --hv-tick: rgba(255, 255, 255, .44);
  --hv-text: #F4F6F9;
  --hv-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --hv-sans: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;

  position: relative;
  width: 100%;
  height: 100%;
  min-height: 256px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--hv-bg);
  color: var(--hv-text);
  font-family: var(--hv-sans);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), 0 10px 28px rgba(10, 14, 20, .24);
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
}

html[data-theme="dark"] .mt-hvit {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 14px 36px rgba(0, 0, 0, .46);
}

@media (max-width: 767px) {
  .mt-hvit {
    height: auto;
    min-height: 230px;
    aspect-ratio: 16 / 10;
  }
}

/* ---- Ana Sahne ve Geçişler ---- */
.mt-hvit__stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0B0E13;
}

.mt-hvit__slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  background: #0B0E13;
}

.mt-hvit__slide.is-prev { z-index: 1; }
.mt-hvit__slide.is-curr { z-index: 2; }

.mt-hvit__slide.is-enter-next {
  animation: mt-hvit-scan-next .62s cubic-bezier(.22, .8, .24, 1) both;
}
.mt-hvit__slide.is-enter-prev {
  animation: mt-hvit-scan-prev .62s cubic-bezier(.22, .8, .24, 1) both;
}

@keyframes mt-hvit-scan-next {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes mt-hvit-scan-prev {
  from { clip-path: inset(0 0 0 100%); }
  to   { clip-path: inset(0 0 0 0); }
}

/* Kırmızı optik lazer tarama çizgisi */
.mt-hvit__beam {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  left: -4px;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, var(--hv-red) 18%, #FF4D58 50%, var(--hv-red) 82%, transparent 100%);
  box-shadow: 0 0 14px 2px var(--hv-red-glow), 0 0 28px 4px rgba(227, 1, 15, .28);
  opacity: 0;
}

.mt-hvit__beam.is-run-next { animation: mt-hvit-beam-next .62s cubic-bezier(.22, .8, .24, 1) both; }
.mt-hvit__beam.is-run-prev { animation: mt-hvit-beam-prev .62s cubic-bezier(.22, .8, .24, 1) both; }

@keyframes mt-hvit-beam-next {
  0%   { left: 0%; opacity: .95; }
  85%  { opacity: .9; }
  100% { left: 100%; opacity: 0; }
}
@keyframes mt-hvit-beam-prev {
  0%   { left: 100%; opacity: .95; }
  85%  { opacity: .9; }
  100% { left: 0%; opacity: 0; }
}

/* ---- Yatay (16:9) Tam Dolgu Sahne ---- */
.mt-hvit__slide[data-mode="landscape"] {
  cursor: pointer;
}

.mt-hvit__slide[data-mode="landscape"] .mt-hvit__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transform: scale(1.0);
  will-change: transform;
}

.mt-hvit__slide[data-mode="landscape"].is-curr .mt-hvit__img {
  animation: mt-hvit-kb 6.8s ease-out forwards;
}

@keyframes mt-hvit-kb {
  from { transform: scale(1.0); }
  to   { transform: scale(1.055); }
}

/* ---- Dikey (9:16) 3'lü Optik Mühendislik Şeridi (Triptych) ---- */
.mt-hvit__triptych {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 2px;
  background: #0B0E13;
}

.mt-hvit__col {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
  background: #12161E;
  transition: flex .38s cubic-bezier(.22, .8, .24, 1), filter .26s ease;
}

/* Hover odak akordeonu: üzerine gelinen dikey panel genişler ve öne çıkar */
.mt-hvit__triptych.has-hover .mt-hvit__col {
  flex: 0.78 1 0;
  filter: brightness(.72) saturate(.88);
}

.mt-hvit__triptych.has-hover .mt-hvit__col.is-hot {
  flex: 1.72 1 0;
  filter: brightness(1.04) saturate(1.05);
}

/* Aktif / odak panel üst kenarında ince Masttech kırmızı optik şerit */
.mt-hvit__col::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--hv-red);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .26s ease;
  z-index: 3;
  pointer-events: none;
}

.mt-hvit__col.is-hot::after,
.mt-hvit__triptych:not(.has-hover) .mt-hvit__col:nth-child(2)::after {
  transform: scaleX(1);
}

.mt-hvit__col-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: object-position, transform;
}

/* Teleskopik dikey tarama hareketi: uzun mastların hem tabanını hem tepesini gezdirir */
.mt-hvit__slide.is-curr .mt-hvit__col:nth-child(1) .mt-hvit__col-img {
  animation: mt-hvit-pan-up 7.2s ease-in-out forwards;
}
.mt-hvit__slide.is-curr .mt-hvit__col:nth-child(2) .mt-hvit__col-img {
  animation: mt-hvit-pan-down 7.2s ease-in-out forwards;
}
.mt-hvit__slide.is-curr .mt-hvit__col:nth-child(3) .mt-hvit__col-img {
  animation: mt-hvit-pan-up 7.2s ease-in-out forwards;
}

@keyframes mt-hvit-pan-up {
  0%   { object-position: 50% 82%; transform: scale(1.02); }
  100% { object-position: 50% 18%; transform: scale(1.05); }
}

@keyframes mt-hvit-pan-down {
  0%   { object-position: 50% 18%; transform: scale(1.02); }
  100% { object-position: 50% 82%; transform: scale(1.05); }
}

.mt-hvit.is-paused .mt-hvit__slide.is-curr .mt-hvit__img,
.mt-hvit.is-paused .mt-hvit__slide.is-curr .mt-hvit__col-img {
  animation-play-state: paused;
}

/* Her dikey panelin içinde hafif ince numara kodu (CH-01 / CH-02 / CH-03) */
.mt-hvit__col-code {
  position: absolute;
  bottom: 12px;
  inset-inline-start: 10px;
  z-index: 3;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(12, 16, 22, .68);
  border: 1px solid rgba(255, 255, 255, .14);
  font-family: var(--hv-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .82);
  pointer-events: none;
  opacity: .72;
  transition: opacity .2s ease, border-color .2s ease, background-color .2s ease;
}

.mt-hvit__col.is-hot .mt-hvit__col-code {
  opacity: 1;
  border-color: rgba(227, 1, 15, .7);
  background: rgba(227, 1, 15, .86);
  color: #fff;
}

/* ---- Optik Vizör Köşe İşaretleri ---- */
.mt-hvit__hud-corners {
  position: absolute;
  inset: 10px;
  z-index: 7;
  pointer-events: none;
}

.mt-hvit__corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--hv-tick);
  border-style: solid;
  border-width: 0;
}

.mt-hvit__corner--tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; border-color: var(--hv-red); }
.mt-hvit__corner--tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
html[dir="rtl"] .mt-hvit__corner--tl { border-color: var(--hv-tick); }
html[dir="rtl"] .mt-hvit__corner--tr { border-color: var(--hv-red); }
.mt-hvit__corner--bl { bottom: 10px; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.mt-hvit__corner--br { bottom: 38px; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
html[dir="rtl"] .mt-hvit__corner--bl { bottom: 38px; }
html[dir="rtl"] .mt-hvit__corner--br { bottom: 10px; }

/* Üst ve alt okunabilirlik perdeleri */
.mt-hvit__scrim-top {
  position: absolute;
  inset: 0 0 auto 0;
  height: 62px;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 14, 20, .64) 0%, rgba(10, 14, 20, 0) 100%);
}

.mt-hvit__scrim-bot {
  position: absolute;
  inset: auto 0 0 0;
  height: 54px;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(10, 14, 20, .52) 0%, rgba(10, 14, 20, 0) 100%);
}

/* ---- Üst Telemetri & Kontrol Çubuğu ---- */
.mt-hvit__top {
  position: absolute;
  top: 14px;
  inset-inline: 14px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.mt-hvit__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 6px;
  background: var(--hv-glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--hv-border);
  font-family: var(--hv-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  line-height: 1.2;
  color: var(--hv-text);
  pointer-events: auto;
  white-space: nowrap;
}

.mt-hvit__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hv-red);
  box-shadow: 0 0 8px var(--hv-red);
  flex: none;
  animation: mt-hvit-pulse 2.2s ease-in-out infinite;
}

.mt-hvit.is-paused .mt-hvit__dot {
  background: #9AA4B2;
  box-shadow: none;
  animation: none;
}

@keyframes mt-hvit-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .45; transform: scale(.82); }
}

.mt-hvit__sep {
  width: 1px;
  height: 11px;
  background: rgba(255, 255, 255, .26);
  flex: none;
}

.mt-hvit__cat {
  color: rgba(255, 255, 255, .88);
  text-transform: uppercase;
}

.mt-hvit__idx {
  direction: ltr;
  unicode-bidi: isolate;
  color: #fff;
}

.mt-hvit__mode-pill {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(227, 1, 15, .24);
  border: 1px solid rgba(227, 1, 15, .52);
  color: #FFD5D8;
  font-size: 9.5px;
  letter-spacing: .08em;
}
.mt-hvit__mode-pill[hidden] { display: none; }

.mt-hvit__tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.mt-hvit__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid var(--hv-border) !important;
  background: var(--hv-glass) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff !important;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .15s ease;
}

.mt-hvit__btn:hover {
  background: var(--hv-glass-hover) !important;
  border-color: rgba(255, 255, 255, .44) !important;
}

.mt-hvit__btn:active { transform: scale(.94); }
.mt-hvit__btn:focus-visible { outline: 2px solid var(--hv-red) !important; outline-offset: 2px; }
.mt-hvit__btn svg { width: 14px; height: 14px; display: block; }

/* ---- Alt Başlık & Gezinme Çubuğu ---- */
.mt-hvit__bar {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 14px 11px;
  pointer-events: none;
}

.mt-hvit__cap-wrap,
.mt-hvit-modal__title {
  display: none !important;
}

.mt-hvit__cap-bar {
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--hv-red);
  flex: none;
}

.mt-hvit__caption {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .01em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .65);
}

html[lang^="ar"] .mt-hvit__caption {
  font-family: "IBM Plex Sans Arabic", "Roboto", Arial, sans-serif;
}

.mt-hvit__nav {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  pointer-events: auto;
}

.mt-hvit__nav .mt-hvit__btn { width: 30px; height: 30px; }
html[dir="rtl"] .mt-hvit__nav svg { transform: scaleX(-1); }

/* Hassas Alt İlerleme Rayı */
.mt-hvit__rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 9;
  background: rgba(255, 255, 255, .16);
  overflow: hidden;
}

.mt-hvit__rail-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #B8000B 0%, var(--hv-red) 75%, #FF4754 100%);
  box-shadow: 0 0 8px var(--hv-red-glow);
  transform-origin: left center;
}

html[dir="rtl"] .mt-hvit__rail-fill {
  margin-left: auto;
  transform-origin: right center;
}

/* ---- Tam Ekran Mühendislik İnceleyici (Lightbox Portal) ---- */
.mt-hvit-modal {
  position: fixed;
  inset: 0;
  z-index: 120000;
  display: flex;
  flex-direction: column;
  background: rgba(13, 16, 22, .95);
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #F4F6F9;
  font-family: "Roboto", system-ui, sans-serif;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.mt-hvit-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mt-hvit-modal__head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
  background: rgba(16, 20, 27, .85);
}

.mt-hvit-modal__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mt-hvit-modal__code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #fff;
  padding: 4px 9px;
  border-radius: 5px;
  background: rgba(227, 1, 15, .18);
  border: 1px solid rgba(227, 1, 15, .48);
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.mt-hvit-modal__title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mt-hvit-modal__filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mt-hvit-modal__pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18) !important;
  background: rgba(255, 255, 255, .05) !important;
  color: rgba(255, 255, 255, .82) !important;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.mt-hvit-modal__pill:hover { background: rgba(255, 255, 255, .12) !important; color: #fff !important; }
.mt-hvit-modal__pill[aria-pressed="true"] { background: #E3010F !important; border-color: #E3010F !important; color: #fff !important; }

.mt-hvit-modal__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.mt-hvit-modal__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 68px;
  overflow: hidden;
}

.mt-hvit-modal__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .14);
  cursor: zoom-in;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}

.mt-hvit-modal__img.is-zoomed { transform: scale(1.65); cursor: zoom-out; }

.mt-hvit-modal__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .20) !important;
  background: rgba(16, 20, 27, .78) !important;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background-color .16s ease, border-color .16s ease;
}

.mt-hvit-modal__arrow:hover { background: #E3010F !important; border-color: #E3010F !important; }
.mt-hvit-modal__arrow--prev { inset-inline-start: 16px; }
.mt-hvit-modal__arrow--next { inset-inline-end: 16px; }
html[dir="rtl"] .mt-hvit-modal__arrow svg { transform: scaleX(-1); }

.mt-hvit-modal__strip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 14px;
  border-top: 1px solid rgba(255, 255, 255, .10);
  background: rgba(14, 18, 24, .92);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .28) transparent;
}

.mt-hvit-modal__thumb {
  flex: none;
  position: relative;
  width: 76px;
  height: 50px;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent !important;
  background: #1A2029 !important;
  cursor: pointer;
  opacity: .58;
  transition: opacity .16s ease, border-color .16s ease, transform .16s ease;
}

.mt-hvit-modal__thumb:hover { opacity: .92; }
.mt-hvit-modal__thumb.is-active { opacity: 1; border-color: #E3010F !important; transform: translateY(-2px); }
.mt-hvit-modal__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.mt-hvit-modal__thumb-n {
  position: absolute;
  bottom: 2px;
  right: 3px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(10, 14, 20, .78);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 9px;
  color: #fff;
  line-height: 1.2;
}

@media (max-width: 767px) {
  .mt-hvit-modal__head { flex-wrap: wrap; padding: 10px 14px; }
  .mt-hvit-modal__filters { order: 3; width: 100%; }
  .mt-hvit-modal__body { padding: 12px 14px; }
  .mt-hvit-modal__arrow { width: 36px; height: 36px; }
  .mt-hvit-modal__thumb { width: 62px; height: 42px; }
  .mt-hvit__col-code,
  .mt-hvit__mode-pill { display: none !important; }
  .mt-hvit__badge { padding: 4px 8px; gap: 6px; font-size: 10px; max-width: calc(100% - 76px); overflow: hidden; }
  .mt-hvit__cat { overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  .mt-hvit__slide.is-enter-next,
  .mt-hvit__slide.is-enter-prev,
  .mt-hvit__beam.is-run-next,
  .mt-hvit__beam.is-run-prev,
  .mt-hvit__slide.is-curr .mt-hvit__img,
  .mt-hvit__slide.is-curr .mt-hvit__col-img,
  .mt-hvit__dot {
    animation: none !important;
  }
  .mt-hvit__beam { display: none; }
}
