/* ═══════════════════════════════════════════════════════════════
   ERDIL MEDIA — Modern Layer
   WhatsApp butonu, yeni nesil menü, animasyonlar, mobil iyileştirme
   ═══════════════════════════════════════════════════════════════ */

:root {
  --em-grad-1: #12c2e9;
  --em-grad-2: #c471ed;
  --em-grad-3: #f64f59;
  --wa-green: #25d366;
  --wa-dark: #128c7e;
}

/* ─────────────── WhatsApp Floating Button ─────────────── */

.wa-float {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 99990;
  display: flex;
  align-items: center;
  gap: 0;
  height: 60px;
  min-width: 60px;
  padding: 0;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--wa-green), var(--wa-dark));
  box-shadow: 0 8px 24px rgba(37, 211, 102, .35), 0 2px 8px rgba(0, 0, 0, .25);
  text-decoration: none;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease;
  -webkit-tap-highlight-color: transparent;
}

.wa-float:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 14px 34px rgba(37, 211, 102, .45), 0 4px 12px rgba(0, 0, 0, .3);
}

.wa-float:active { transform: scale(.96); }

.wa-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wa-icon svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .2));
}

.wa-label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  opacity: 0;
  transition: max-width .45s cubic-bezier(.22, 1, .36, 1), opacity .3s ease .1s, padding .45s cubic-bezier(.22, 1, .36, 1);
}

@media (hover: hover) {
  .wa-float:hover .wa-label {
    max-width: 140px;
    opacity: 1;
    padding-right: 22px;
  }
}

/* Nabız halkası */
.wa-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: var(--wa-green);
  opacity: .55;
  z-index: -1;
  animation: waPulse 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes waPulse {
  0%   { transform: scale(1);    opacity: .55; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* Buton giriş animasyonu */
.wa-float {
  animation: waEnter .7s cubic-bezier(.34, 1.56, .64, 1) .8s both;
}

@keyframes waEnter {
  from { transform: translateY(90px) scale(.5); opacity: 0; }
  to   { transform: translateY(0) scale(1);     opacity: 1; }
}

@media (max-width: 768px) {
  .wa-float {
    bottom: 18px;
    left: 18px;
    height: 54px;
    min-width: 54px;
  }
  .wa-icon { width: 54px; height: 54px; }
  .wa-icon svg { width: 27px; height: 27px; }
}

/* ─────────────── Üst Menü (topnav) — cam efekti ─────────────── */

.topnav.nav-scroll {
  background: rgba(10, 10, 12, .72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  padding: 14px 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.topnav .menu-icon .icon i {
  transition: width .35s cubic-bezier(.22, 1, .36, 1), transform .35s ease;
}

.topnav .menu-icon:hover .icon i:first-child { width: 100%; }
.topnav .menu-icon:hover .icon i:last-child  { width: 60%; }

/* ─────────────── Tam ekran menü (hamenu) polisajı ─────────────── */

.hamenu {
  will-change: left;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.hamenu .menu-links .main-menu > li {
  transition: opacity .35s ease, transform .35s ease;
}

.hamenu .menu-links .main-menu > li:hover {
  transform: translateX(8px);
}

.hamenu .menu-links .main-menu .link,
.hamenu .menu-links .main-menu .sub-link {
  position: relative;
  transition: color .3s ease, letter-spacing .3s ease;
}

.hamenu .menu-links .main-menu > li .link:hover {
  letter-spacing: 1px;
  background: linear-gradient(to right, var(--em-grad-1), var(--em-grad-2), var(--em-grad-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hamenu .cont-info .item {
  transition: transform .3s ease;
}

.hamenu .cont-info .item:hover { transform: translateX(6px); }

/* ─────────────── Alt sayfa menüsü (navbar) — modern cam bar ─────────────── */

.navbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  padding: 18px 0;
  background: transparent;
  transition: background .4s ease, padding .4s ease, box-shadow .4s ease;
}

.navbar.nav-scroll {
  background: rgba(10, 10, 12, .78) !important;
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  padding: 10px 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.navbar .navbar-nav .nav-link {
  position: relative;
  font-weight: 500;
  letter-spacing: .4px;
  padding: 8px 16px;
  transition: color .3s ease;
}

/* Gradient alt çizgi animasyonu */
.navbar .navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 100%;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--em-grad-1), var(--em-grad-2), var(--em-grad-3));
  transition: right .35s cubic-bezier(.22, 1, .36, 1);
}

.navbar .navbar-nav .nav-link:hover::after,
.navbar .navbar-nav .nav-link.active::after {
  right: 16px;
}

.navbar .navbar-toggler {
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 10px;
  padding: 8px 12px;
  transition: border-color .3s ease, background .3s ease;
}

.navbar .navbar-toggler:hover {
  border-color: rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .06);
}

/* Menüdeki WhatsApp CTA */
.navbar .navbar-nav .nav-wa-btn {
  margin-left: 12px;
  padding: 8px 20px !important;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--wa-green), var(--wa-dark));
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 211, 102, .3);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease;
}

.navbar .navbar-nav .nav-wa-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 22px rgba(37, 211, 102, .45);
}

.navbar .navbar-nav .nav-wa-btn::after { display: none; }

.navbar .navbar-nav .nav-wa-btn .fab {
  margin-right: 5px;
  font-size: 15px;
}

/* Mobil açılır menü — cam panel */
@media (max-width: 991px) {
  .navbar .navbar-collapse {
    background: rgba(12, 12, 15, .96);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    margin-top: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    padding: 12px 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  }
  .navbar .navbar-nav .nav-link {
    padding: 13px 18px;
    font-size: 15px;
    border-radius: 10px;
  }
  .navbar .navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, .06);
  }
  .navbar .navbar-nav .nav-link::after { display: none; }
  .navbar .navbar-nav .nav-wa-btn {
    margin: 10px 10px 6px;
    text-align: center;
    justify-content: center;
  }
}

/* ─────────────── Scroll-reveal animasyonları ─────────────── */

[data-em-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--em-delay, 0s);
  will-change: opacity, transform;
}

[data-em-reveal].em-in {
  opacity: 1;
  transform: none;
}

/* ─────────────── Genel modern dokunuşlar ─────────────── */

::selection {
  background: var(--em-grad-2);
  color: #fff;
}

html { scroll-behavior: smooth; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0c0c0f; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--em-grad-1), var(--em-grad-2));
  border-radius: 6px;
}

a:focus-visible,
button:focus-visible,
.butn:focus-visible {
  outline: 2px solid var(--em-grad-1);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Butonlara mikro-etkileşim */
.butn {
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease, background .3s ease !important;
}

.butn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(18, 194, 233, .25);
}

/* Galeri kartları */
.gallery .items .item-img {
  overflow: hidden;
  border-radius: 10px;
}

.gallery .items .item-img img {
  transition: transform .8s cubic-bezier(.22, 1, .36, 1);
}

.gallery .items:hover .item-img img {
  transform: scale(1.06);
}

/* Servis kutuları */
.services .item-box {
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .45s ease, border-color .45s ease;
  border-radius: 14px;
}

.services .item-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .35);
}

/* Video bölümü (reklam sayfası) */
.video-section .video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
  border: 1px solid rgba(255, 255, 255, .07);
}

.video-section .video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─────────────── Mobil üst düzey iyileştirme ─────────────── */

@media (max-width: 768px) {
  /* Dokunmatik cihazda özel imleç tamamen kapalı */
  .mouse-cursor { display: none !important; }

  /* iOS input zoom engelle: form yazıları en az 16px */
  .contact .form input,
  .contact .form textarea,
  .contact .form select {
    font-size: 16px !important;
  }

  /* Dokunma hedefleri */
  .navbar .navbar-toggler,
  .progress-wrap,
  .social a, .social .icon {
    min-width: 44px;
    min-height: 44px;
  }

  /* Akıcı başlık ölçekleme */
  .slider .caption h1,
  .showcase-full .caption h1 {
    font-size: clamp(30px, 9vw, 44px) !important;
    line-height: 1.15 !important;
  }

  .pages-header h1 {
    font-size: clamp(24px, 7vw, 34px) !important;
    line-height: 1.25 !important;
  }

  /* Harita ve iframe taşmaları */
  .mapouter, .gmap_canvas, .gmap_canvas iframe {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Footer ortala */
  footer .item { text-align: center; }
  footer .social { justify-content: center; display: flex; gap: 10px; }
}

@media (hover: none) and (pointer: coarse) {
  .mouse-cursor { display: none !important; }
}

/* ─────────────── Erişilebilirlik: azaltılmış hareket ─────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .wa-pulse { display: none; }
  [data-em-reveal] { opacity: 1; transform: none; }
}
