/* Biologiya bölməsi (/biologiya, js/pages/biologiya.html, js/biology.js) — insan anatomiyası: solda sistemlər, sağda şəkil və izah. */

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }

.bio-body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #eef2f7;
  color: #17283f;
}

/* ------------------------------------------------------------------ giriş qapısı */

.bio-gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, #16345f, #0e2442);
}

.bio-gate-card {
  max-width: 380px;
  padding: 32px 28px;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.bio-gate-card h1 { margin: 12px 0 8px; font-size: 22px; color: #16345f; }
.bio-gate-card p { margin: 0 0 20px; color: #4d5f78; line-height: 1.5; }

.bio-gate-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  background: #16345f;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

/* ------------------------------------------------------------------ başlıq */

.bio-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: #16345f;
  border-bottom: 3px solid #a18025;
  color: #fff;
}

.bio-header img { display: block; height: 34px; width: auto; }
.bio-header-title { display: grid; line-height: 1.2; }
.bio-header-title strong { font-size: 18px; }
.bio-header-title span { font-size: 13px; color: #c9d6e8; }

.bio-back {
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.bio-back:hover { background: rgba(255, 255, 255, 0.18); }

/* ------------------------------------------------------------------ düzülüş */

.bio-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

.bio-nav {
  position: sticky;
  top: 80px;
  align-self: start;
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 35, 65, 0.06);
}

.bio-nav-title {
  margin: 4px 8px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8090a8;
}

.bio-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #17283f;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.bio-nav-item:hover { background: #eef3fa; }
.bio-nav-item:focus-visible { outline: 2px solid #a18025; outline-offset: 1px; }
.bio-nav-item.is-active { background: #16345f; color: #fff; }

.bio-nav-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot, #a18025);
}

/* ------------------------------------------------------------------ mövzu */

.bio-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}

.bio-figure {
  margin: 0;
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 35, 65, 0.06);
}

.bio-figure-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  border-radius: 10px;
  background: #f8fafc;
  cursor: zoom-in;
}

.bio-figure-frame img {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
}

.bio-figure-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(22, 52, 95, 0.85);
  color: #fff;
  font-size: 12px;
}

.bio-figure figcaption {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #6a7a91;
}

.bio-figure figcaption a { color: #2e5c9a; }

.bio-info {
  padding: 22px 24px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 35, 65, 0.06);
}

.bio-info h1 { margin: 0 0 4px; font-size: 26px; color: #16345f; }
.bio-info .bio-sub { margin: 0 0 14px; color: #a18025; font-weight: 600; font-size: 14px; }
.bio-info p { margin: 0 0 12px; line-height: 1.65; color: #33445c; }
.bio-info h2 { margin: 18px 0 8px; font-size: 16px; color: #16345f; }

.bio-parts {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bio-parts li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f8fc;
  font-size: 14px;
  line-height: 1.45;
}

.bio-parts b { color: #16345f; }
.bio-parts span { grid-column: 2; color: #4d5f78; font-size: 13px; }
.bio-parts i {
  grid-row: span 2;
  align-self: start;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--dot, #a18025);
}

.bio-facts {
  margin: 0;
  padding-left: 18px;
  color: #33445c;
  line-height: 1.6;
}

/* ------------------------------------------------------------------ böyük baxış */

.bio-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(10, 22, 40, 0.92);
}

.bio-lightbox-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: #fff;
}

.bio-lightbox-bar strong { margin-right: auto; font-size: 16px; }

.bio-lb-btn {
  min-width: 40px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.bio-lb-btn:hover { background: rgba(255, 255, 255, 0.22); }

.bio-lightbox-stage {
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.bio-lightbox-stage.is-dragging { cursor: grabbing; }

.bio-lightbox-stage img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  background: #fff;
  border-radius: 6px;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 980px) {
  .bio-layout { grid-template-columns: 1fr; }
  .bio-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .bio-nav-title { grid-column: 1 / -1; }
  .bio-main { grid-template-columns: 1fr; }
}

/* Səhifələr arası keçid animasiyası — css/style.css-dəki «keçid animasiyaları» bloku ilə eyni (hər iki səhifə qaydanı daşımalıdır). */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out 0.2s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: page-in 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes page-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
