:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #555555;
  --brand: #3a86ff;
  --accent: #00b894;
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.114);
}

* {
  box-sizing: border-box;
}

h2 {
  color: rgb(255, 255, 255);
}

.lil-gui  {
  display: none !important;
}

 p{
    font-size: 15px;
  line-height: 1.5;
  margin: 0;
  color: rgb(255, 255, 255);
 }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'League Spartan', sans-serif;

  background: var(--bg);
  color: var(--text);
}

.popup-content a {
  color: white !important;
}

.mobile-coming-soon {
  position: fixed;
  inset: 0;
  background: white;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 9999999999999999999;
  padding: 40px;
}

.mobile-coming-soon img {
  width: 240px;
  height: auto;
  margin-bottom: 24px;
}

.mobile-coming-soon h1 {
  font-family: "Segoe UI", sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #464646;
  letter-spacing: 0.5px;
  margin: 0;
}

@media (max-width: 1024px) {
  .mobile-coming-soon {
    display: none !important;
  }



}


/* Dil Değiştirici */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 160px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.513);
    padding: 8px 16px;
    border-radius: 30px;

    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
    font-family: 'League Spartan', sans-serif;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    padding: 2px 5px;
    transition: all 0.3s ease;
}

.lang-btn.active {
    color: #C40D3C; /* Zorlu Kırmızısı */
    font-weight: 800;
}

.lang-btn:hover {
    color: #333;
}

.language-switcher .divider {
    color: #ccc;
    font-size: 12px;
}
.logo-annotation {
  background-color: white;
  border-radius: 10000px;
  padding: 4px;
  border: solid 2px #b3243eac;
  cursor: pointer;
  pointer-events: auto;
     transform-origin: center center;

  transition: opacity 1s ease, visibility 1s ease;



  
}

.logo-annotation:hover {
  border: solid 3px #b30f2d;




  
}

.logo-annotation img {
  -webkit-user-drag: none;

  width: 30px;
  height:auto
}



/* === VIEWER %100 EKRAN === */
#viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background: white;
  overflow: hidden;
}

/* === OVERLAY === */
#overlay {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  z-index: 3;
}

/* === HEADER (şeffaf üstte) === */

.actions {
  display: flex;
  gap: 10px;
  position: absolute;
  right: 20px;
  top: 20px;
}
.logo {

  position: absolute;
  top: 20px;
  left: 20px;
}

.logo img {

width: 260px;
}

.empty-space {
  width: 40px;
}



.btn {
  background: #b3243e;
  color: white;
  border: none;
  padding: .8rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}
.btn:hover {
  opacity: 0.9;
}
.btn-ghost {
  background: transparent;
  border: 1px solid #bbb;
  color: var(--muted);
}
.btn-primary {
  background: var(--brand);
  color: white;
  border: none;
}


/* === LOADING === */
.loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.6);
  z-index: 4;
}
.loading.hidden {
  opacity: 0;
  pointer-events: none;
}
.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #ddd;
  border-top-color: var(--brand);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === HOTSPOT === */
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  z-index: 5;
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}
.label {
  padding: 6px 9px;
  border-radius: 8px;
  background: white;
  border: 1px solid #ccc;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

/* === POPUP === */
.popup {
  position: absolute;
  top: 24px;
  right: 24px;
  width: min(360px, 80vw);
  background: white;
  border: 1px solid #ccc;
  border-radius:0.5rem;
  box-shadow: var(--shadow);
  z-index: 6;
}
.popup.hidden {
  display: none;
}
.popup-header, .popup-footer {
  padding: 0px 14px;
  border-bottom: 1px solid #85858565;
}
.popup-title {
  font-weight: bold;
}
.popup-body {
  padding: 12px 0px;
}
.icon-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
}




/* BACK BUTTON */
.back-btn {
  position: fixed;              /* ekrana sabit */
  top: calc(50% - 30% - 64px);  /* popup'ın üst hizası (60% yüksekliğin yarısı kadar yukarı) */
  left: 4%;                     /* sol popup ile aynı hizada */
  z-index: 60;
  background: #b3243e;
  backdrop-filter: blur(12px);
  border: 1px solid #ffffff16;
  padding: .8rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  display: none; /* başlangıçta gizli */
  font-size: 14px;
  color: white;
  font-weight: bold;
  transition: background 0.2s ease;
}
.back-btn:hover {
 opacity: 0.9;
}

/* POPUPS */
.side-popup {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 60%;
  background: #0000006d;
  backdrop-filter: blur(15px);
  border: 1px solid #ffffff16;
  border-radius:0.375rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 26px;
  z-index: 40;
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow-y: auto;           /* içerik scroll edilebilir */
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* IE/Edge */
}

.side-popup {
  scrollbar-width: thin;          /* Firefox */
  scrollbar-color: #c0c0c03c transparent;  /* ince gri çizgi, arka plan yok */
}

.side-popup::-webkit-scrollbar {
  width: 1px;                     /* dar scrollbar */
}

.side-popup::-webkit-scrollbar-track {
  background: transparent;        /* arka plan yok */
}

.side-popup::-webkit-scrollbar-thumb {
  background-color: #c0c0c0;      /* gri modern çizgi */
  border-radius: 6px;             /* yuvarlatılmış */
}

.side-popup::-webkit-scrollbar-thumb:hover {
  background-color: #a0a0a0;      /* hover’da biraz koyulaşsın */
}

.side-popup.left { left: 4%; }
.side-popup.right { right:4%; }

.popup-content {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.popup-content.active {
  opacity: 1;
}
.popup-content.hidden {
  display: none;
}



.popup-title-with-icon {
  display: flex;
  align-items: center;
  gap: 10px; /* ikon ile yazı arası boşluk */
  margin: 0px 0;
}

.popup-title-with-icon .title-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0; /* ikon küçülmesin */
  margin-bottom: 8px;
}


.popup-title-with-icon h2 {
  font-size: 20px;
  margin: 0;
}


.side-popup.hidden {
  opacity: 0;
  pointer-events: none;
}

/* HEADER */
.popup-header h2 {
  font-size: 20px;
  margin: 0 0 0px;
}

.side-popup h2 {
  font-size: 20px;
    gap: 10px; /* ikon ile yazı arası boşluk */
  margin: 12px 0;
  line-height: 24px;
}

/* BODY */
.popup-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.popup-img {
  width: 100%;
  border-radius: 0.5rem;
  margin-bottom: 10px;
}


.popup-body video {
  width: 100%;
  border-radius: 6px;
}


.sub-icons {
  display: flex;
  flex-direction: row;   /* yan yana sırala */
  gap: 12px;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  pointer-events: none;


}

.sub-icons.hidden {
  display: none;

}

.sub-icons.active {
  pointer-events: auto; /* görünür olduğunda tıklama bloklasın */
}

.sub-icons img {
  background-color: white;
  border-radius: 10000px;
  padding: 5px;

    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 3px solid white;
  width: 66px;
  cursor: pointer;

    transition: border 0.5s ease;

}

.sub-icons img.active {
  border: solid 3px #b3243e;
}



.sub-icons img:hover {
  border: solid 3px #b3243e;
}


/* === SWITCHER === */
.switcher {
  display: flex;
  gap: 20px;
  align-items: center;
  background-color: white;
  border: solid 1px #b3243e;
  padding: 16px;
  padding-right: 10px;
  margin-right: 6px;
  border-radius: 4px;
  position: absolute;
  right: 20px;
  bottom: 20px;


}

.switch {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
}

.switch input {
  display: none;
}

.switch .slider {
  width: 36px;
  height: 20px;
  background-color: #ccc;
  border-radius: 20px;
  position: relative;
  transition: background 0.3s;
}

.switch .slider::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.switch input:checked + .slider {
  background-color: #b3243e;
}

.switch input:checked + .slider::before {
  transform: translateX(16px);
}

.switch-label {
  font-size: 14px;
  color: var(--muted);
  user-select: none;
}

.switch-label:hover {
  opacitY: 0.9;
}

.info-icon {
  width: 44px;              /* buton boyutu */
  height: 44px;
  background-image: url("assets/icons/icon-info.png");
  background-size: 34px;     /* ikonun kaplama oranı */
  background-repeat: no-repeat;
  background-position: center;
  border: none;             /* varsayılan buton kenarlığını kaldır */
  border-radius: 50%;       /* istersen yuvarlak buton */
  background-color: #ffffff; /* arka plan */
  padding: 5px;
  border: solid 1px #b3243e;
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: absolute;
  left: 20px;
  bottom: 20px;
}


.info-icon:hover {
  opacity: 0.9;

}


.species-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.species-card {
  background: #00000000;

  border: 1px solid #ffffff16;
  border-radius:0.375rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s;
  cursor: pointer;
}

.species-card:hover {
  border: 1px solid #ffffff33;
}

.species-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.species-info {
  padding: 8px 10px;
  display: flex;
  justify-content: space-between; /* isim sola, ok sağa */
  align-items: center;
}

.species-info span {
  font-weight: 600;
  color: #ffffffc4;
  text-align: left;
}

.discover-link {
  font-size: 18px;
  color: #ffffffc4;
  font-weight: 700;
  text-decoration: none;
}


.species-hidden { display: none; }

.species-popup {
  padding: 0px;
}

.species-panel { display: none; }
.species-panel.is-active { display: block; }

.species-back {
  background: none;
  border: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
}

.species-panel img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
}

.species-title { color: #fff; margin: 6px 0 4px; }
.species-text { color: #ddd; line-height: 1.5; }


@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@300;400;700&display=swap');

:root {
  --brand-red: #C40D3C;
  --brand-gray: #5B6670;
  --text: #111111;
  --bg: #ffffff;
}
.preloader-screen {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: 'League Spartan', sans-serif;
  transition: opacity 1.4s ease-in-out;
  opacity: 1;

}

.preloader-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}
.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: opacity 0.3s ease;
  width: 500px;             /* genişlik sabitlendi */
  max-width: 100vw;         /* taşma koruması */
  text-align: center;       /* yazılar ortalı */

}

.loader-content.hidden {
  opacity: 0;
}

.loader-wrapper {
  position: relative;
  width: 240px;             /* çember için geniş alan */
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-circle {
  transform: rotate(-90deg);
  width: 80px;
  height: 80px;
}



.circle-bg {
  fill: none;
  stroke: #e0e0e0;
  stroke-width: 6;
}

.circle {
  fill: none;
  stroke: #C40D3C;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 339;
  stroke-dashoffset: 339;
  transition: stroke-dashoffset 0.4s ease;
}
.loader-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  font-size: 20px;
  color: #333;
}

.loader-title {
  font-size: 18px;
  font-weight: bold;
  color: #111;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 15px;
}

.loader-subtitle {
  font-size: 15px;
  color: #5B6670;
  text-align: center;
  max-width: 500px;
  line-height: 1.4;
}

.loader-tip {
  margin-top: 24px;
  font-size: 15px;
  color: #5B6670;
  text-align: center;
  max-width: 500px;
  line-height: 1.4;
  opacity: 1;
  transition: opacity 0.3s ease;
}



.info-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #00000018;
  backdrop-filter: blur(15px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease-in-out;
}

.info-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.info-modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 32px 24px;
  width: 480px;
  max-width: 90vw;

  text-align: center;
  font-family: 'League Spartan', sans-serif;
  position: relative;
  transform: translateY(20px);
  animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
  to {
    transform: translateY(0);
  }
}

.info-logo {
  width: 220px;
  margin-bottom: 20px;
}

.info-modal h2 {
  font-weight: 600;
  font-size: 22px;
  margin-bottom: 16px;
  color: #222;
}

.info-text {
  font-size: 16px;
  color: #444;
  line-height: 1.6;
  margin-bottom: 28px;
}



.close-btn:hover {
  background: #9e0a2e;
}

.start-button {
  margin-top: 20px;
  padding: 16px 28px;
  font-size: 15px;
  background-color: #C40D3C;
  color: white;
  border: none;
  border-radius: 4px;
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.4s ease;
  font-family: 'League Spartan', sans-serif;
  cursor: pointer;
}
.start-button:enabled {
  opacity: 1;
  pointer-events: auto;
}

.start-button:hover {
  font-weight: bold;
}


.powered-by {
  margin-top: 38px;
  opacity: 0.7;
    transition: opacity 0.5s ease;
}


.powered-by:hover {

  opacity: 1;
}

.powered-by img {
  height: 20px;
  opacity: 0.8;
}
.close-btn {
  margin-top: 24px;
  padding: .8rem 2rem;
  background: #C40D3C;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.close-btn:hover {
opacity: 0.8;
}




.hover-popup {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  padding: 8px;
  width: 180px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

.hover-popup img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 6px;
}

.hover-popup p {
  font-size: 15px;
  color: #111;
  margin: 0;
}

.hover-popup.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -10px);
}


/* Zoom Kontrolleri için Temel Stil */
.zoom-controls {
    position:absolute;
    bottom: 24px; /* Alttan boşluk */
    right: 496px; /* Sağdan boşluk (switcher'ın yanına konumlanacak) */
    
    /* 🚀 Güncellenen kısım: Butonları yatay hizala */
    display: flex; 
    flex-direction: row; /* Düzeltildi: column -> row */
    gap: 8px;
    
    z-index: 100; /* Diğer her şeyin üstünde olması için */
    opacity: 1;
    transition: opacity 0.3s ease;
}

.zoom-controls.hidden {
    opacity: 0;
    pointer-events: none;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    background-color: white; /* Zorlu Enerji Kırmızısı */
    color: #C40D3C;
    border: solid 1px #C40D3C;
    border-radius: 50%; /* Yuvarlak butonlar */
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    /* box-shadow kaldırıldı, sadece transition bırakıldı. */
    transition: background-color 0.2s, transform 0.1s;
}

.zoom-btn:hover {
    opacity: 0.7;
}

.zoom-btn:active {
    transform: scale(0.95);
}













@media (max-width: 768px) {
  /* --- GENEL MOBİL AYARLAR (Aynen Korundu) --- */
 .popup.side-popup.right {
    position: fixed;
    bottom: 5px;          /* 👈 alttan 5px boşluk */
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    height: 28vh;         /* ihtiyaca göre 24–32vh oynatabilirsin */
    border-radius: 12px;
    z-index: 80;
  }

  .popup.side-popup.left {
    height: 26vh;
    top: 20vh;
    width: 90%;
  }

  .logo { top: 10px; }
  .logo img { width: 180px; top: 0px; }

  .language-switcher {
    position: absolute;
    top: 6px; right: 19px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.513);
    padding: 6px 16px;
    border-radius: 30px;
    display: flex; align-items: center; gap: 8px;
    backdrop-filter: blur(5px);
    font-family: 'League Spartan', sans-serif;
  }

  /* --- SOL POPUP DÜZENİ --- */
  .popup.side-popup.left {
    display: grid;


    gap: 10px;

    overflow: hidden;
    align-items: start;
  }

  .popup.side-popup.left .popup-img {
    grid-column: 1; grid-row: 1 / span 2;
    width: 100%; height: 100%; object-fit: cover;
    margin: 0; border-radius: 6px;
  }

  .popup.side-popup.left .popup-title-with-icon {
    grid-column: 2; grid-row: 1;
    margin: 0; padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex; align-items: center; gap: 6px;
  }

  .popup.side-popup.left .popup-title-with-icon h2 {
    font-size: 18px; margin: 0; line-height: 1.2;
  }

  .popup.side-popup.left .title-icon {
    width: 24px; height: 24px; margin: 0;
  }

  .popup.side-popup.left .popup-body {
    grid-column: 2; grid-row: 2;
    overflow-y: auto; display: block; height: 100%;
    margin: 0; padding-top: 0px;
  }

  .popup.side-popup.left .popup-body p {
    font-size: 13px; line-height: 1.3; margin: 0;
  }

  .popup.side-popup.left .popup-body .btn {
    width: 100%; margin-top: 6px; padding: 6px; font-size: 11px;
  }

  #btnHome {
    background: white;
        color: #b3243e;
        font-weight: bold;
        box-shadow: none;
  }
  /* --- GERİ DÖN BUTONU --- */
  .back-btn {
    top: auto; bottom: 30vh; left: 16px;
    font-size: 15px;
    color: white;
    font-weighT: bold !important;
    width: max-content; z-index: 9999;
    padding: .6rem 1rem;
    background: rgba(0, 0, 0, 0.246);
  }

  /* ========================================================= */
  /* 🔥 SAĞ POPUP İÇERİK YÖNETİMİ 🔥 */
  /* ========================================================= */

  /* 1. GİZLİLİK KONTROLÜ (ÇAKIŞMAYI ÖNLEYEN KOD) */
  /* JS 'display: none' verdiyse veya .hidden sınıfı varsa, CSS bunu EZMELİDİR */
  .popup.side-popup.right .popup-content.hidden,
  .popup.side-popup.right div[id$="Main"].hidden,
  .popup.side-popup.right .species-popup.species-hidden,
  .popup.side-popup.right div[id$="biyoMain"][style*="none"] { /* 🔥 KRİTİK DÜZELTME */
      display: none !important;
  }

  /* 2. STANDART SEKMELER (Karbon, Döngü, İnsan) -> GRID */
/* 2. STANDART SEKMELER (Karbon, Döngü, İnsan) -> GRID */
  /* NOT: Kart içeren "biyoMain" VE "oedas-insanMain" buraya DAHİL EDİLMEZ */
  
/* 2. STANDART SEKMELER (Döngüsellik vb.) -> GRID */
  /* NOT: Kart listesi içeren alanları (:not ile) HARİÇ TUTUYORUZ */
  
  .popup.side-popup.right .popup-content.active:not(:has(div[id$="biyoMain"])):not(:has(div[id$="Main"])),
  .popup.side-popup.right .popup-content.active div[id$="Main"]:not([id$="biyoMain"]):not(#oedas-insanMain):not(#istanbul-insanMain):not(#istanbul-finansmanMain):not(#istanbul-karbonMain) { 
    display: grid !important;
    grid-template-columns: 110px 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    height: 100%;
    overflow: hidden;
    padding: 0;
    align-items: start;
  }
  /* Sağ Popup Resim ve Başlık */
  .popup.side-popup.right .popup-img {
    grid-column: 1; grid-row: 1 / span 2;
    width: 100%; height: 100%; object-fit: cover;
    margin: 0; border-radius: 6px;
  }

  .popup.side-popup.right .popup-title-with-icon {
    grid-column: 2; grid-row: 1;
    margin: 0; padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex; align-items: center; gap: 6px; min-height: 28px;
  }
  
  .popup.side-popup.right .popup-title-with-icon h2 {
    font-size: 18px; margin: 0; line-height: 1.2; color: #fff;
  }
  
  .popup.side-popup.right .title-icon {
    width: 30px; height: 30px; margin: 0;
  }

  /* Metin Alanı Scroll */
  .popup.side-popup.right p, 
  .popup.side-popup.right .popup-body,
  .popup.side-popup.right .species-grid {
    grid-column: 2; grid-row: 2;
    overflow-y: auto; height: 100%; margin: 0; padding-right: 2px;
    font-size: 13px; line-height: 1.4; color: #eee;
  }

  /* İnsan & Kültür Kartları (Listeye Çevir) */
  .popup.side-popup.right .species-grid {
    display: flex !important; flex-direction: column; gap: 8px; padding-bottom: 10px;
  }

  .popup.side-popup.right .species-card {
    display: flex; flex-direction: row; align-items: center;
    height: auto; min-height: 40px;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1);
  }
  
  .popup.side-popup.right .species-card img {
    width: 40px !important; height: 40px !important;
    aspect-ratio: 1/1; object-fit: cover; margin: 0; border-radius: 4px 0 0 4px;
  }
  
  .popup.side-popup.right .species-info {
    padding: 0 8px; flex: 1; display: flex; justify-content: space-between; align-items: center;
  }
  
  .popup.side-popup.right .species-info span { font-size: 16px; }

  /* ========================================================= */
  /* 🔥 3. BİYOÇEŞİTLİLİK LİSTE GÖRÜNÜMÜ (Flex Column) 🔥 */
  /* ========================================================= */
  /* Sadece JS tarafından gizlenmediyse göster */
  .popup.side-popup.right div[id$="biyoMain"]:not([style*="none"]) {
      display: flex !important; flex-direction: column;
      height: 100%; overflow-y: auto; padding: 0; gap: 10px;
  }

  /* Biyo Kartları */
  .popup.side-popup.right div[id$="biyoMain"] .species-card {
      display: flex; flex-direction: row; align-items: center;
      min-height: 50px; background: rgba(255,255,255,0.1);
  }
  
  .popup.side-popup.right div[id$="biyoMain"] .species-card img {
      width: 70px !important; height: 100% !important;
      aspect-ratio: 1/1; object-fit: cover; margin: 0;
  }

  /* ========================================================= */
  /* 🔥 4. BİYOÇEŞİTLİLİK DETAY (SPECIES POPUP) - OVERLAY 🔥 */
  /* ========================================================= */
  

  /* --- SENİN BUTON KONUMLARIN (Aynen Korundu) --- */
  .switcher {
    position: absolute; bottom: 10px; left: 50%;
    transform: translateX(-50%); width: 98%; max-width: auto;
    z-index: 90; padding: 6px; gap: 10px; justify-content: center;
  }

  .actions {
    position: absolute; top: auto; right: auto; left: 8px; bottom: 50px;
    flex-direction: column; align-items: flex-start; gap: 0; z-index: 100;
  }
  
  .actions .btn { box-shadow: 0 4px 12px rgba(0,0,0,0.25); }

  .info-icon {
    position: absolute; left: auto; right: 16px; bottom: 60px;
    width: 44px; height: 44px; z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); background-color: white;
  }

  .zoom-controls {
    position: absolute; right: 16px; left: auto; bottom: 120px;
    flex-direction: column; gap: 12px; z-index: 100;
  }

  .zoom-btn {
    width: 44px; height: 44px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); background-color: white;
  }

  .switch .slider::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}





}

/* =========================================================
   TÜM BİYO MAIN ALANLARI — ORTAK DÜZEN
   ========================================================= */
@media (max-width: 768px) {

  /* --- BİYOÇEŞİTLİLİK İÇERİK SIRALAMASI --- */

  /* Kapsayıcıyı Flex yapıyoruz */
  div[id$="-biyoMain"],
  div#biyoMain {
    display: flex;
    flex-direction: column;
  }

  /* 1. EN ÜST: Ana Başlık (İkonlu olan) - Varsa en tepede kalsın (Order 0 default) */
  div[id$="-biyoMain"] .popup-title-with-icon,
  div#biyoMain .popup-title-with-icon {
    order: 0;
    margin-bottom: 10px;
  }

  /* 2. ORTA: Kartlar (Grid) - Başlığın hemen altına, metnin üstüne gelsin */
  div[id$="-biyoMain"] .species-grid,
  div#biyoMain .species-grid {
    order: 1;
    margin-bottom: 16px; /* Kartlar ile alttaki yazı arasına boşluk */
  }

  /* 3. ALT: Ara Başlıklar (h2 - Tarımsal Etki vb.) */
  div[id$="-biyoMain"] h2,
  div#biyoMain h2 {
    order: 2;
    margin-top: 0;
    margin-bottom: 8px;
  }

  /* 4. EN ALT: Metinler (p) */
  div[id$="-biyoMain"] p,
  div[id$="-biyoMain"] .biyo-text,
  div#biyoMain p,
  div#biyoMain .biyo-text {
    order: 3;
  }

  div[id$="orman-biyoMain"] {
    display: flex;
    flex-direction: column;
  }

  /* 2. Resmi EN ALTA Gönder (Order: 10) */
  div[id$="orman-biyoMain"] img.popup-img {
    order: 10;           /* En sona git */
    margin-top: 15px;    /* Metinle arasına boşluk koy */
    margin-bottom: 0;
    width: 100%;
    height: auto;        /* Oranını koru */
  }

  /* 3. Diğer elemanların sırasını koru (Opsiyonel ama garanti olsun) */
  div[id$="orman-biyoMain"] .popup-title-with-icon { order: 1; }
  div[id$="orman-biyoMain"] h2 { order: 2; }
  div[id$="orman-biyoMain"] p { order: 3; }

  div#saribambul-biyoMain {
    display: flex;
    flex-direction: column;
  }

  /* 2. Resmi EN ALTA Gönder (Order: 10) */
  div#saribambul-biyoMain img.popup-img {
    order: 10;           /* En sona git */
    margin-top: 15px;    /* Metinle arasına boşluk */
    margin-bottom: 0;
    width: 100%;
    height: auto;
  }

  /* 3. Diğer içeriklerin sırasını garantiye al */
  div#saribambul-biyoMain .popup-title-with-icon { order: 1; }
  div#saribambul-biyoMain .popup-body { order: 2; }


  

}


/* =========================================================
   MOBİL İÇİN DÜZELTME (styles.css EN ALT KISIM)
   ========================================================= */
/* =========================================================
   MOBİL İÇİN DÜZELTME - SABİT RESİM / KAYDIRILABİLİR METİN
   ========================================================= */
/* =========================================================
   MOBİL İÇİN SON VE KESİN DÜZELTME (FLEX + WRAPPER)
   ========================================================= */

@media (max-width: 768px) {

  /* 1. Panel Varsayılan Gizli */
  .species-popup .species-panel {
    display: none !important;
  }

  /* 2. Aktif Panel: FLEXBOX Kullanıyoruz */
  .species-popup .species-panel.is-active {
    display: flex !important;
    flex-direction: row;       /* Yan yana */
    align-items: flex-start;   /* Yukarı hizala */
    gap: 12px;
    height: 100%;              /* Popup boyu kadar */
    overflow: hidden;          /* Dışarı taşma yok */
    padding: 0;
  }



  /* --- SOL: RESİM (SABİT BOYUT) --- */
  .species-popup .species-panel.is-active img {
    /* Genişlik ve Yükseklik SABİT */
    width: 100px;
    height: 100px; 
    
    flex-shrink: 0;     /* Asla sıkışma/küçülme */
    object-fit: cover;  /* Resmi kareye sığdır */
    border-radius: 6px;
    margin: 0;
  }


  /* Wrapper içindeki Başlık */
  .species-popup .species-panel.is-active .species-title {
    margin: 0 0 6px 0;  /* Alta biraz boşluk */
    font-size: 15px;
    line-height: 1.2;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;     /* Başlık kaybolmasın */
  }

  /* Wrapper içindeki Metin */
  .species-popup .species-panel.is-active .species-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #eee;
    overflow-y: auto;
    max-height: 14vh;
    /* Overflow burada değil, wrapper'da hallediliyor */
  }
}

@media (max-width: 768px) {

  /* =========================================================
     İSTANBUL FİNANSMAN - LİSTE VE DETAY DÜZENİ
     ========================================================= */

  /* 1. LİSTE GÖRÜNÜMÜ (Flex Column + Scroll) */
  #viewer .side-popup #istanbul-finansmanMain {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding-bottom: 20px;
  }

  /* Liste içindeki Grid'i esnek yap */
  #viewer .side-popup #istanbul-finansmanMain .species-grid {
    display: flex;
    flex-direction: column;
    flex: 1;                  /* Kalan boşluğu doldur */
    overflow-y: auto;         /* Scroll sadece burada çıksın */
    gap: 12px;
    margin-top: 10px;
    padding-right: 4px;
  }

  /* Kartların görünümü */
  #viewer .side-popup #istanbul-finansmanMain .species-card {
    min-height: 70px;         /* Tıklama alanı geniş olsun */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  /* 2. DETAY GÖRÜNÜMÜ (Resimsiz Panel) */
  
  /* Finansman popup'ı içindeki aktif panel */
  #viewer .side-popup #istanbul-finans-projects-popup .species-panel.is-active {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  /* JavaScript ile oluşturulan scroll alanı tam genişlik olsun */
  #viewer .side-popup #istanbul-finans-projects-popup .species-panel.is-active .species-scroll {
    width: 100%;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
  }

  /* Başlık ayarı */
  #viewer .side-popup #istanbul-finans-projects-popup .species-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #fff;
  }
}

