:root {
  --bg: #0d0f1b;
  --radius: 0.85rem;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg) url(mtal.png) center/cover no-repeat;
  font-family: Georgia, 'Times New Roman', Times, serif;
  color: #eaeff3;
  min-height: 100vh;
  padding: 1.5rem;
  /* display:flex ve align-justify kaldırıldı */
}

.page-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 4.5rem; /* navbar boşluğu */
}

.gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.model-card {
  display: block;
  width: 100%;
  max-width: 350px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  margin: 50px auto;
}

.model-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

model-viewer {
  width: 100%;
  height: 420px;
  --poster-color: transparent;
  --progress-bar-color: #4ade80;
  background: linear-gradient(to top, #808080, #000);
}

.caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
  padding: 0.55rem 0.7rem 0.4rem;
  font-size: 1rem;
  text-align: center;
  pointer-events: none;
}

/* ===== NAVBAR ===== */
.site-nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  background: #141622;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.45);
}

.site-nav .logo {
  color: #4ade80;
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
}

.site-nav .menu {
  list-style: none;
  display: flex;
  gap: 1.3rem;
}

.site-nav .menu a {
  color: #eaeff3;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.35rem 0.2rem;
  position: relative;
}

.site-nav .menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%; height: 2px;
  background: #4ade80;
  transition: width 0.3s ease;
}

.site-nav .menu a:hover::after {
  width: 100%;
}

#nav-toggle { display: none; }

.yer {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.yer span {
  width: 26px; height: 3px;
  background: #eaeff3;
  border-radius: 3px;
}

/* ==== TABLET & KÜÇÜK EKRAN ==== */
@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
  }
  model-viewer {
    height: 360px;
  }
  .caption {
    font-size: 0.95rem;
  }
}

/* ==== MOBİL ==== */
@media (max-width: 768px) {
  body {
    padding: 1.2rem;
  }
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  .model-card {
    max-width: 100%;
  }
  model-viewer {
    height: 320px;
  }
  .caption {
    font-size: 0.9rem;
    padding: 0.5rem 0.6rem 0.3rem;
  }
}

/* ==== DAHA KÜÇÜK MOBİL ==== */
@media (max-width: 550px) {
  .gallery {
    /* en dar ekranda bile iki sütun */
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  model-viewer {
    height: 280px;
  }
  .caption {
    font-size: 0.85rem;
  }
}

/* ==== MOBİL NAV ==== */
@media (max-width: 700px) {
  .yer { display: flex; }
  .site-nav .menu {
    position: absolute;
    top: 100%; left: 0;
    width: 100%;
    background: #141622;
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.45);
    transition: max-height 0.35s ease;
  }
  #nav-toggle:checked + label + .menu {
    max-height: 260px;
  }
}
