/* ============================================================
   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: 1rem;
  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: 84px;
  height: 120px;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-soft);
}
/* Show when not at limits — controlled by JS via .visible class */
.edge-arrow.visible { opacity: 0.75; pointer-events: auto; }
.edge-arrow.visible:hover,
.edge-arrow.visible:focus-visible { opacity: 1; }
.edge-arrow.edge-left  { left: 0; }
.edge-arrow.edge-right { right: 0; }

/* Belirgin, parlak kare ok; yonu gostermek icin surekli hafif "itme" animasyonu */
.edge-arrow-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 0;
  color: #fff;
  background: rgba(4,26,114,0.55);
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: 0 0 0 0 rgba(255,255,255,0.55),
              0 6px 22px rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.3s var(--ease-soft),
              color 0.3s var(--ease-soft),
              transform 0.3s var(--ease-soft);
}
.edge-arrow-inner svg {
  width: 10.5px; height: 18px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
.edge-arrow-inner svg path { stroke-width: 2.6; }

.edge-arrow.edge-right .edge-arrow-inner { animation: edgeNudgeRight 2.7s ease-in-out infinite, edgeGlow 2.7s ease-out infinite; }
.edge-arrow.edge-left  .edge-arrow-inner { animation: edgeNudgeLeft  2.7s ease-in-out infinite, edgeGlow 2.7s ease-out infinite; }

.edge-arrow:hover .edge-arrow-inner,
.edge-arrow:focus-visible .edge-arrow-inner {
  animation-play-state: paused;
  background: #fff;
  color: var(--ink);
}
.edge-arrow:focus-visible { outline: none; }

@keyframes edgeNudgeRight {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(7px); }
}
@keyframes edgeNudgeLeft {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-7px); }
}
@keyframes edgeGlow {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.55), 0 6px 22px rgba(0,0,0,0.45); }
  70%  { box-shadow: 0 0 0 14px rgba(255,255,255,0),  0 6px 22px rgba(0,0,0,0.45); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0),     0 6px 22px rgba(0,0,0,0.45); }
}
@media (prefers-reduced-motion: reduce) {
  .edge-arrow .edge-arrow-inner { animation: none !important; }
}

/* ============================================================
   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);
}

/* Cross-fade: sade gorsel <-> "PROJE ALANI" isaretli gorsel, yumusak dongu */
.panel-bg--xfade img {
  position: absolute;
  inset: 0;
}
.panel-bg--xfade .xfade-top {
  opacity: 0;
  animation: panelXfade 11s var(--ease-soft) infinite;
  will-change: opacity;
}
@keyframes panelXfade {
  0%,  20%  { opacity: 0; }
  38%, 62%  { opacity: 1; }
  80%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .panel-bg--xfade .xfade-top { animation: none; opacity: 1; }
}

/* 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: 64px; height: 96px; }
  .edge-arrow-inner { width: 38px; height: 38px; }
}
@media (max-width: 600px) {
  .project-panel { flex: 0 0 100vw; }
  .panel-info { padding-bottom: 80px; }
  .bar-action { display: none; }
  .edge-arrow { width: 52px; height: 80px; }
  .edge-arrow-inner { width: 32px; height: 32px; background: rgba(4,26,114,0.6); }
  .edge-arrow-inner svg { width: 8px; height: 14px; }
}

/* 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;
}

/* ============================================================
   HEADER ACILIR MENU (Kurumsal > Faaliyet Alanlari)
   Ust baslik tiklanmaz; alt basliklar sayfa icinde asagi kaydirir.
   ============================================================ */
.nav-group { position: relative; display: flex; align-items: center; }

.nav .nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: inherit;
  transition: color 0.3s cubic-bezier(0.25,0.1,0.25,1);
}
.nav .nav-toggle:hover,
.nav-group.open > .nav-toggle { color: #fff; }
.nav .nav-caret {
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.25,0.1,0.25,1);
}
.nav-group.open > .nav-toggle > .nav-caret:not(.nav-caret--right) { transform: rotate(180deg); }

/* Acilir panel */
.nav .nav-menu {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 258px;
  margin-top: 14px;
  padding: 10px 0;
  background: rgba(4,26,114,0.97);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.30);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.26s cubic-bezier(0.25,0.1,0.25,1),
              transform 0.26s cubic-bezier(0.25,0.1,0.25,1),
              visibility 0.26s;
  z-index: 10;
}
/* Baslik ile panel arasindaki bosluga fare gelince panel kapanmasin */
.nav .nav-menu::before {
  content: '';
  position: absolute;
  top: -14px; left: 0; right: 0;
  height: 14px;
}
.nav-group.open > .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav .nav-menu a,
.nav .nav-menu .nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 9px 20px;
  color: rgba(255,255,255,0.72);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: left;
  transition: color 0.25s cubic-bezier(0.25,0.1,0.25,1),
              background 0.25s cubic-bezier(0.25,0.1,0.25,1);
}
.nav .nav-menu a::after { display: none; }
.nav .nav-menu a:hover,
.nav .nav-menu .nav-toggle:hover,
.nav .nav-menu .nav-group.open > .nav-toggle {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* Ikinci seviye (Faaliyet Alanlari) */
.nav .nav-group--sub { display: block; width: 100%; }
.nav .nav-menu--sub {
  top: -10px;
  left: 100%;
  margin-top: 0;
  margin-left: 6px;
  min-width: 212px;
}
.nav .nav-menu--sub::before {
  top: 0; left: -8px; right: auto;
  width: 8px; height: 100%;
}
.nav .nav-menu--sub a { padding-left: 20px; }

@media (max-width: 1180px) {
  .nav .nav-menu--sub { left: auto; right: 100%; margin-left: 0; margin-right: 6px; }
  .nav .nav-menu--sub::before { left: auto; right: -8px; }
}

/* ===== MOBIL ACILIR MENU ===== */
.mobile-nav-group { width: 100%; max-width: 320px; }
.mobile-nav .mobile-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.3;
}
.mobile-nav .mobile-nav-caret { transition: transform 0.3s cubic-bezier(0.25,0.1,0.25,1); }
.mobile-nav-group.open > .mobile-nav-toggle > .mobile-nav-caret { transform: rotate(180deg); }

.mobile-nav-sub {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.35s cubic-bezier(0.25,0.1,0.25,1);
}
.mobile-nav-group.open > .mobile-nav-sub { grid-template-rows: 1fr; }
.mobile-nav-sub > .mobile-nav-sub-inner {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
}
.mobile-nav-sub .mobile-nav-toggle,
.mobile-nav-sub a {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
}
.mobile-nav-sub .mobile-nav-sub a { font-size: 0.95rem; }

@media (max-width: 768px) {
  .mobile-nav {
    justify-content: flex-start;
    padding: 40px 24px 56px;
    overflow-y: auto;
    gap: 22px;
  }
}
