/* ============================================================
   MEGAPOL GROUP - PROJE SAYFALARI (projects.css)
   Tam ekran proje sayfalari. Kendi tasarim sistemi var; site.css YUKLENMEZ.
   OTOMATIK URETILDI - kaynak: sayfa ici <style> bloklari
   ============================================================ */


/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink:      #041A72;
  --ease:     cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.25, 0.1, 0.25, 1);
  --sans:     'DM Sans', sans-serif;
  --serif:    'DM Sans', Georgia, serif;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: var(--sans);
  background: #080a0f;
  -webkit-font-smoothing: antialiased;
  cursor: default;
  user-select: none;
}

a { text-decoration: none; color: inherit; }
button { font-family: var(--sans); cursor: pointer; border: none; background: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   CONTAINER  (matches homepage)
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* ============================================================
   HEADER — transparent, fixed  (matches homepage structure)
   ============================================================ */
header#header { margin-top: 0; }

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.15) 70%, transparent 100%);
  pointer-events: none;
  transition: background 0.4s var(--ease-soft), box-shadow 0.4s var(--ease-soft);
}
.header > * { pointer-events: auto; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding-top: 16px;
}

.logo {
  display: flex;
  align-items: center;
  max-width: 110px;
  margin-top: 16px;
  opacity: 0.92;
  transition: opacity 0.3s var(--ease-soft);
}
.logo:hover { opacity: 1; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.3s var(--ease-soft);
  position: relative;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1.5px;
  background: #fff;
  transition: width 0.3s var(--ease-soft);
}
.nav a:hover { color: #fff; }
.nav a:hover::after { width: 100%; }
.nav a.active { color: #fff; }
.nav a.active::after { width: 100%; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px; width: 28px;
  padding: 4px 0;
}
.hamburger span {
  display: block; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s var(--ease-soft);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: rgba(10,12,30,0.97);
  backdrop-filter: blur(20px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  transition: opacity 0.3s var(--ease-soft);
}
.mobile-nav.open { display: flex; opacity: 1; }
.mobile-nav a {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 500;
}

/* ============================================================
   EDGE NAV ARROWS — far left & far right
   ============================================================ */
.edge-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  width: 44px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s var(--ease-soft);
  pointer-events: auto;
}
/* Show when not at limits — controlled by JS via .visible class */
.edge-arrow.visible { opacity: 1; }
.edge-arrow.edge-left  { left: 0; }
.edge-arrow.edge-right { right: 0; }

.edge-arrow-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  color: rgba(255,255,255,0.68);
  transition: color 0.35s var(--ease-soft),
              transform 0.35s var(--ease-soft);
}
.edge-arrow:hover .edge-arrow-inner {
  color: rgba(255,255,255,0.85);
}
.edge-arrow.edge-left:hover  .edge-arrow-inner { transform: translateX(-3px); }
.edge-arrow.edge-right:hover .edge-arrow-inner { transform: translateX(3px); }

/* Hairline hint stripe on very edge */
.edge-arrow.edge-left::before,
.edge-arrow.edge-right::before {
  content: '';
  position: absolute;
  top: 20%; bottom: 20%;
  width: 1px;
  background: rgba(255,255,255,0.52);
  transition: background 0.35s var(--ease-soft);
}
.edge-arrow.edge-left::before  { right: 0; }
.edge-arrow.edge-right::before { left: 0; }
.edge-arrow:hover::before { background: rgba(255,255,255,0.3); }

/* ============================================================
   PROJECTS SLIDER
   ============================================================ */
.projects-view {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* TRACK */
.projects-track {
  display: flex;
  height: 100%;
  /* width set dynamically by JS */
  will-change: transform;
  transition: transform 0.9s var(--ease);
}

/* PANEL */
.project-panel {
  position: relative;
  flex: 0 0 calc(100vw / 3);
  height: 100%;
  overflow: hidden;
}

/* Thin separator */
.project-panel + .project-panel::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.1);
  z-index: 10;
}

/* Image — slight parallax via JS */
.panel-bg {
  position: absolute;
  inset: -4% -3%;       /* wider than panel for parallax room */
  z-index: 0;
  transition: transform 0.9s var(--ease);
}

/* Base overlay: dark */
.panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 20, 0.52);
  z-index: 1;
  transition: background 0.65s var(--ease-soft);
}

/* Bottom gradient — always present */
.panel-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(2, 4, 14, 0.85) 0%,
    rgba(2, 4, 14, 0.3) 38%,
    transparent 62%
  );
  pointer-events: none;
}

/* Top gradient for number readability */
.panel-gradient-top {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(2, 4, 14, 0.45) 0%,
    transparent 30%
  );
  pointer-events: none;
}

/* Hover: lighter overlay */
.project-panel:hover .panel-overlay {
  background: rgba(5, 8, 20, 0.18);
}
/* Hover: subtle image scale */
.project-panel:hover .panel-bg {
  transform: scale(1.03);
}

/* Panel number — top right */
.panel-num {
  position: absolute;
  top: 36px; right: 28px;
  z-index: 5;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.3);
  transition: color 0.4s var(--ease-soft);
}
.project-panel:hover .panel-num {
  color: rgba(255,255,255,0.55);
}

/* Panel info — bottom left */
.panel-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 5;
  padding: 0 28px 100px;  /* leave room for bottom bar */
}

.panel-category {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 10px;
  transform: translateY(6px);
  opacity: 0.5;
  transition: opacity 0.5s var(--ease-soft) 0.05s,
              transform 0.5s var(--ease-soft) 0.05s;
}
.project-panel:hover .panel-category {
  opacity: 1;
  transform: translateY(0);
}

.panel-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
  transition: letter-spacing 0.5s var(--ease-soft),
              opacity 0.5s var(--ease-soft);
}
.project-panel:hover .panel-title {
  letter-spacing: 0.005em;
}

.panel-desc {
  font-size: 0.92rem;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-top: 10px;
  max-width: 280px;
  transform: translateY(8px);
  transition: color 0.5s var(--ease-soft) 0.05s,
              transform 0.5s var(--ease-soft) 0.05s;
}
.project-panel:hover .panel-desc {
  color: rgba(255,255,255,0.85);
  transform: translateY(0);
}

/* ============================================================
   BOTTOM NAVIGATION BAR — more prominent
   ============================================================ */
.bottom-bar {
  position: fixed;
  bottom: 2px; left: 0; right: 0;   /* sit above the 2px progress line */
  height: 64px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 52px);
  background: rgba(3, 5, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,0.08);
  pointer-events: none;
}
.bottom-bar > * { pointer-events: auto; }

/* Left side */
.bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-arrow-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: all 0.3s var(--ease-soft);
  cursor: pointer;
}
.nav-arrow-btn:hover {
  border-color: rgba(255,255,255,0.65);
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.nav-arrow-btn:disabled {
  opacity: 0.22;
  cursor: default;
  pointer-events: none;
}
.nav-arrow-btn svg { transition: transform 0.3s var(--ease-soft); }
.nav-arrow-btn.prev:hover svg { transform: translateX(-2px); }
.nav-arrow-btn.next:hover svg { transform: translateX(2px); }

.bar-divider {
  width: 24px; height: 1px;
  background: rgba(255,255,255,0.18);
}

.bar-counter-small {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
}

/* Right side */
.bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.bar-counter-big {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
}
.bar-counter-big strong {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
}

.bar-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  transition: color 0.3s var(--ease-soft);
  cursor: pointer;
}
.bar-action:hover { color: rgba(255,255,255,0.85); }

.bar-sep {
  width: 1px; height: 14px;
  background: rgba(255,255,255,0.15);
}

/* Progress line — at absolute bottom */
.progress-track {
  position: fixed;
  bottom: 0; left: 0;
  height: 2px;
  background: rgba(255,255,255,0.06);
  z-index: 55;
  width: 100%;
}
.progress-fill {
  height: 100%;
  background: rgba(255,255,255,0.45);
  transition: width 0.9s var(--ease);
}

/* ============================================================
   DRAG CURSOR
   ============================================================ */
.projects-view.grabbing { cursor: grabbing !important; }
.projects-view.grabbing * { cursor: grabbing !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .project-panel { flex: 0 0 50vw; }
  .nav { display: none; }
  .hamburger { display: flex; }
  .edge-arrow { width: 36px; height: 64px; }
}
@media (max-width: 600px) {
  .project-panel { flex: 0 0 100vw; }
  .panel-info { padding-bottom: 80px; }
  .bar-action { display: none; }
  .edge-arrow { display: none; }
}

/* Yalnizca ekran okuyuculari icin: gorsel olarak gizli, erisilebilir baslik */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobil menudeki dil degistirici: diger baglantilardan ayirt edilsin */
.mobile-nav a.mobile-nav-lang {
  font-size: 1rem;
  letter-spacing: 0.12em;
  opacity: 0.75;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  padding: 6px 18px;
  margin-top: 8px;
}
