/* ============================================
   MAIN.CSS — Karaman Anadolu Lisesi
   Dark Tema: Derin Siyah + Elektrik Mavisi
   v3 — Premium Edition
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Inter:wght@300;400;500&display=swap');

/* ---- RENK PALETİ ---- */
:root {
  --bg:           #080c10;
  --bg-2:         #0d1117;
  --bg-3:         #131920;
  --blue:         #00a8ff;
  --blue-dim:     #0077cc;
  --blue-glow:    rgba(0, 168, 255, 0.12);
  --blue-glow-md: rgba(0, 168, 255, 0.22);
  --cyan:         #00e5ff;
  --purple:       #7b61ff;
  --white:        #eef2f6;
  --gray:         #8899aa;
  --gray-dim:     #334455;
  --border:       rgba(0, 168, 255, 0.12);
  --border-active:rgba(0, 168, 255, 0.38);
  --gradient-accent: linear-gradient(135deg, #00a8ff, #00e5ff);
  --gradient-glow: linear-gradient(135deg, rgba(0,168,255,0.15), rgba(0,229,255,0.08));
}

/* ---- RESET ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- SAYFA YÜKLEME BARI ---- */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
}
.page-loader::after {
  content: '';
  display: block;
  height: 100%;
  background: var(--gradient-accent);
  box-shadow: 0 0 16px rgba(0,168,255,0.5);
  animation: loadingBar 0.8s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes loadingBar {
  from { width: 0; }
  to   { width: 100%; }
}
.page-loader.done {
  opacity: 0;
  transition: opacity 0.3s 0.2s ease;
}

/* ---- HEADER ---- */
header {
  background: rgba(8, 12, 16, 0.82);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-badge {
  width: 38px;
  height: 38px;
  background: var(--gradient-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: #000;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--blue-glow-md), 0 0 60px rgba(0,168,255,0.08);
  animation: logoPulse 4s ease infinite;
  position: relative;
}

.logo-badge::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 11px;
  background: var(--gradient-accent);
  z-index: -1;
  opacity: 0.4;
  filter: blur(8px);
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,168,255,0.22), 0 0 60px rgba(0,168,255,0.05); }
  50%      { box-shadow: 0 0 28px rgba(0,168,255,0.4), 0 0 80px rgba(0,168,255,0.12); }
}

.logo-text { display: flex; flex-direction: column; line-height: 1; }

.logo-text .school {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
}

.logo-text .city {
  font-size: 9px;
  color: var(--blue);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Nav */
header nav { display: flex; align-items: center; gap: 4px; }

header nav a {
  color: var(--gray);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.22s cubic-bezier(0.22,1,0.36,1);
  position: relative;
}

header nav a:hover {
  color: var(--white);
  background: rgba(0,168,255,0.06);
  border-color: var(--border);
}

header nav a.active {
  color: var(--blue);
  background: var(--blue-glow);
  border-color: var(--border-active);
  box-shadow: 0 0 16px rgba(0,168,255,0.08);
}

/* ---- FOOTER ---- */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 48px 28px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.6s 0.3s cubic-bezier(0.22,1,0.36,1) both;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: var(--gradient-accent);
  box-shadow: 0 0 20px rgba(0,168,255,0.3);
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-badge {
  width: 32px;
  height: 32px;
  background: var(--gradient-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 11px;
  color: #000;
}

footer .footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: color 0.18s;
  letter-spacing: 0.3px;
}

.footer-links a:hover { color: var(--blue); }

.footer-divider {
  width: 60px;
  height: 1px;
  background: var(--border);
  margin: 0 auto 16px;
}

footer p {
  font-size: 11px;
  color: var(--gray-dim);
  letter-spacing: 0.5px;
}

.footer-tech {
  margin-top: 8px;
  font-size: 10px;
  color: var(--gray-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- PAYLAŞILAN BİLEŞENLER ---- */
.divider {
  height: 1px;
  background: linear-gradient(to right, var(--blue-dim), transparent);
  margin: 28px 0;
  opacity: 0.3;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blue);
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeRight 0.6s 0.5s cubic-bezier(0.22,1,0.36,1) both;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

@keyframes fadeRight {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- SCROLL TO TOP ---- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(13,17,23,0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  color: var(--blue);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
  z-index: 150;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  border-color: var(--border-active);
  background: rgba(0,168,255,0.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,168,255,0.15);
}

.scroll-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- HAMBURGER BUTONU ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  transition: border-color 0.18s;
}

.nav-toggle:hover { border-color: var(--border-active); }

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

/* Açıkken X'e dönüşür */
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---- PARALLAX SCROLL ---- */
.parallax-layer {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ---- MOBİL ---- */
@media (max-width: 600px) {
  header { padding: 0 16px; height: 56px; position: relative; }

  .nav-toggle { display: flex; }

  header nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0; right: 0;
    background: rgba(8, 12, 16, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px 14px;
    gap: 4px;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 199;
  }

  header nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }

  header nav a {
    padding: 11px 14px;
    font-size: 14px;
    border-radius: 8px;
  }

  footer { padding: 36px 20px 28px; }
  .footer-links { gap: 16px; }
  .scroll-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}
