/* ===== Header (modern) ===== */
.header {
  flex-shrink: 0;
  background: var(--site-gradient);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: min(1200px, 96vw);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}

.header__logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s ease;
  z-index: 102;
}

.header__logo:hover {
  opacity: 0.9;
}

.header__logo img {
  display: block;
  max-height: 44px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

/* Hamburger menu button */
.header__menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 102;
  position: relative;
  /* Dönüşen X’in kesilmemesi için ekstra tıklanabilir alan (görsel taşma) */
}

.header__menu-toggle span {
  width: 100%;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header__close-btn {
  display: none;
}

.nav {
  display: flex;
  gap: 0.15rem;
  flex-shrink: 0;
}

.nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  transition: all 0.25s ease;
}

.nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.18);
}

/* Header WhatsApp butonu */
.header-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(37, 211, 102, 0.35);
  transition: all 0.25s ease;
}

.header-wa:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
}

.header-wa__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-wa__icon svg {
  width: 20px;
  height: 20px;
}

.header-wa__text {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}

/* Floating WhatsApp button for mobile */
.floating-wa {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #25d366 0%, #20bd5a 100%);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5), 0 0 0 0 rgba(37, 211, 102, 0.6);
  z-index: 999;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: pulse-wa 2.5s infinite;
  cursor: pointer;
}

.floating-wa:hover,
.floating-wa:active {
  background: linear-gradient(135deg, #20bd5a 0%, #1da851 100%);
  transform: scale(1.15);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.6);
  animation: none;
}

.floating-wa svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@keyframes pulse-wa {
  0% { box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5), 0 0 0 0 rgba(37, 211, 102, 0.6); }
  50% { box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5), 0 0 0 12px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5), 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 768px) {
  .floating-wa { display: flex; }
  @media (max-width: 360px) {
    .floating-wa { bottom: 16px; right: 16px; width: 56px; height: 56px; }
    .floating-wa svg { width: 32px; height: 32px; }
  }
}

body.menu-open .floating-wa {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

/* Scroll to top button */
@keyframes scrollBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-6px);
  }
}

.scroll-to-top {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--site-primary) 0%, var(--site-primary-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 998;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.3);
  align-items: center;
  justify-content: center;
}

.scroll-to-top.show {
  display: flex;
  opacity: 1;
  visibility: visible;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-to-top:hover {
  background: linear-gradient(135deg, var(--site-primary-dark) 0%, var(--site-primary) 100%);
  transform: translateX(-50%) translateY(-4px);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.4);
}

.scroll-to-top:active { transform: translateX(-50%) translateY(-2px); }

.scroll-to-top svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

@media (max-width: 768px) {
  .scroll-to-top { display: flex; bottom: 24px; }
}

@media (max-width: 480px) {
  .scroll-to-top { bottom: 20px; width: 52px; height: 52px; }
  .scroll-to-top svg { width: 26px; height: 26px; }
}

body.menu-open .scroll-to-top {
  opacity: 0;
  pointer-events: none;
}

@supports (padding: max(0px)) {
  .floating-wa {
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
    right: max(20px, calc(env(safe-area-inset-right) + 12px));
  }
  .scroll-to-top { bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px)); }
  @media (max-width: 360px) {
    .floating-wa {
      bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
      right: max(16px, calc(env(safe-area-inset-right) + 8px));
    }
    .scroll-to-top {
      bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
      width: 50px;
      height: 50px;
    }
    .scroll-to-top svg { width: 24px; height: 24px; }
  }
}
