/* ═══════════════════════════════════════════════════════════
   Elektrikçi Projesi | CKR TECH | css/layout.css
   Loader, Navbar, Mobil Menü, Footer, Çerez Banner
   ══════════════════════════════════════════════════════════ */

/* ── 1. LOADER ────────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #030305; /* Çok hafif derin bir siyah */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Cavcavlı Arka Plan Parlaması */
.loader__glow {
  position: absolute;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, transparent 75%);
  filter: blur(60px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  animation: loaderGlowPulse 3s ease-in-out infinite alternate;
}

/* Arka Plan Dijital Izgara Deseni */
.loader__grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center;
  z-index: 2;
  opacity: 0.8;
  pointer-events: none;
}

/* Sürekli Akan Sinematik Işık Çizgisi */
.loader__scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 240, 255, 0.04) 10%,
    transparent 20%
  );
  background-size: 100% 500%;
  z-index: 3;
  pointer-events: none;
  animation: loaderScan 5s linear infinite;
}

.loader__inner {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Şimşek Etrafında Dönen Enerji Halkası */
.loader__bolt-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
}

.loader__bolt-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-top-color: var(--accent-cyan);
  border-bottom-color: var(--accent-blue);
  border-radius: 50%;
  animation: loaderRotate 2s linear infinite;
}

/* Sürekli Parlayıp Sönen (Breathing) Şimşek */
.loader__bolt {
  width: 44px;
  height: 58px;
  filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.6));
  animation: loaderBoltPulse 1.5s ease-in-out infinite alternate 0.8s;
}

.bolt-path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: boltDraw 0.9s ease-out 0.1s forwards;
}

.bolt-fill {
  opacity: 0;
  animation: fadeIn 0.4s ease 0.8s forwards;
}

/* Yazı Alanı */
.loader__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  text-align: center;
}

/* Krom/Neon Geçişli Büyük Başlık */
.loader__brand {
  font-family: var(--font-display);
  font-size: 3.8rem;
  letter-spacing: 0.22em;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 25px rgba(0, 240, 255, 0.35));
  animation: loaderTextFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.loader__sub {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  opacity: 0.8;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.2));
  animation: loaderTextFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

/* Geliştirilmiş Yükleme Çubuğu */
.loader__bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 240, 255, 0.04);
  animation: fadeIn 0.4s ease 0.4s both;
}

.loader__progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 100px;
  box-shadow: 0 0 12px var(--accent-cyan);
  animation: loaderProgress 1.7s cubic-bezier(0.25, 1, 0.5, 1) 0.2s forwards;
}

/* Sitenin En Altındaki Küçük CKR TECH İmzası */
.loader__credit {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 0.8s ease 1s both;
}

.loader__credit strong {
  color: var(--accent-cyan);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* ── YENİ ÖZEL LOADER ANİMASYONLARI ──────────────────────── */
@keyframes loaderGlowPulse {
  0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.92); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes loaderScan {
  0% { background-position: 0 0; }
  100% { background-position: 0 500%; }
}

@keyframes loaderRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes loaderBoltPulse {
  0% { filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.45)) brightness(1); }
  100% { filter: drop-shadow(0 0 22px rgba(0, 240, 255, 0.85)) brightness(1.2); }
}

@keyframes loaderTextFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 2. NAVBAR ────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: background var(--duration-med) ease,
              backdrop-filter var(--duration-med) ease,
              border-color var(--duration-med) ease,
              padding var(--duration-med) ease;
  border-bottom: 1px solid transparent;
}

/* Scroll sonrası navbar */
.navbar.scrolled {
  background: rgba(5, 5, 7, 0.88);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border-color: var(--border-subtle);
  padding: 0.7rem 0;
}

.navbar__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Logo */
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.logo-bolt {
  width: 22px;
  height: 30px;
  filter: drop-shadow(0 0 6px var(--accent-cyan));
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.logo-text strong {
  color: var(--accent-cyan);
}

/* Navigasyon linkleri */
.navbar__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 0.5em 0.9em;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) ease,
              background var(--duration-fast) ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 100px;
  transition: width var(--duration-fast) ease;
}

.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 60%; }

/* Ara butonu */
.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 0.65em 1.4em;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: var(--bg-primary);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: all var(--duration-fast) ease;
  animation: pulseGlow 2.5s ease-in-out infinite;
}

.btn-call:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
  animation: none;
}

.btn-call__icon { font-size: 1rem; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  padding: 6px;
  background: rgba(0, 240, 255, 0.04);
  transition: border-color var(--duration-fast) ease;
  margin-left: auto;
}

.hamburger:hover { border-color: var(--accent-cyan); }

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 100px;
  transition: transform var(--duration-med) var(--ease-out),
              opacity var(--duration-fast) ease;
}

/* Hamburger açık hali */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 3. MOBİL MENÜ ────────────────────────────────────────── */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem var(--space-sm) 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 5, 7, 0.96);
  backdrop-filter: var(--blur-glass);
  animation: slideDown 0.3s var(--ease-out);
}

.mobile-menu.open { display: flex; }

.mobile-menu__link {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.8rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--duration-fast) ease;
}

.mobile-menu__link:last-of-type { border-bottom: none; }
.mobile-menu__link:hover { color: var(--accent-cyan); }

.mobile-menu .btn-call,
.mobile-menu__cta {
  margin-top: 1rem;
  text-align: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  padding: 0.9em 1.5em;
}

/* ── 4. FOOTER ────────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}

.footer__top { padding: var(--space-2xl) 0 var(--space-xl); }

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: var(--space-xl);
  align-items: start;
}

.footer-brand .navbar__logo {
  margin-bottom: var(--space-sm);
}

.footer-brand__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col__title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--duration-fast) ease;
}

.footer-col a:hover { color: var(--accent-cyan); }

.footer-contact li {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-contact a { color: var(--text-muted); }
.footer-contact a:hover { color: var(--accent-cyan); }

/* Footer alt şerit */
.footer__bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 1.4rem 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-copy {
  font-size: 0.83rem;
  color: var(--text-muted);
}

.footer-credit {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.83rem;
  color: var(--text-muted);
}

.footer-credit__link { color: var(--text-muted); transition: color var(--duration-fast); }
.footer-credit__link:hover { color: var(--accent-cyan); }

.footer-credit strong { color: var(--accent-cyan); }

/* ── 5. ÇEREZ BANNER ─────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 680px;
  margin: 0 auto;
  z-index: 999;
  background: rgba(10, 10, 14, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  backdrop-filter: var(--blur-glass);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
  transform: translateY(120px);
  opacity: 0;
  transition: transform 0.5s var(--ease-out), opacity 0.5s ease;
}

.cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner[aria-hidden="true"] {
  display: none;
}

.cookie-banner__content p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cookie-banner__content a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.cookie-btn {
  font-size: 0.85rem;
  padding: 0.7em 1.4em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── 6. RESPONSIVE LAYOUT ─────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .navbar__nav,
  .btn-call { display: none; }

  .hamburger { display: flex; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-brand__desc { max-width: none; }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .cookie-banner__actions { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; justify-content: center; }
}
