/* Ortak site stilleri — header, arka plan, sayfa iskeleti */

.site-page {
  --bg: #faf7f4;
  --card: #ffffff;
  --text: #2c2420;
  --text-soft: #6b5e57;
  --accent: #b8896a;
  --accent-dark: #9a7054;
  --border: #e8ddd4;

  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(184, 137, 106, 0.16), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(184, 137, 106, 0.1), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 85%, rgba(201, 162, 39, 0.06), transparent 50%);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
}

.site-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: multiply;
  z-index: 0;
}

.site-page > * {
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px;
  background: rgba(250, 247, 244, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.site-brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 10px;
  transition: opacity 0.2s;
}

.site-brand:hover {
  opacity: 0.85;
}

.site-brand-logo {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

.site-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  background: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-link:hover,
.nav-trigger:hover,
.nav-dropdown.open .nav-trigger {
  color: var(--text);
  background: rgba(154, 112, 84, 0.1);
}

.nav-link.active {
  color: var(--text);
  background: rgba(154, 112, 84, 0.1);
}

.nav-trigger svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  transition: transform 0.2s;
}

.nav-dropdown.open .nav-trigger svg {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 220px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(44, 36, 32, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 11px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  color: var(--text);
  background: rgba(154, 112, 84, 0.12);
}

.site-header-spacer {
  justify-self: end;
}

/* Ortak footer */
.site-footer {
  flex-shrink: 0;
  padding: 28px 24px calc(24px + env(safe-area-inset-bottom));
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 14px;
  text-decoration: none;
  color: var(--text);
}

.site-footer-brand img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.site-footer-brand span {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.site-footer-label {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--text-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer-label[hidden] {
  display: none !important;
}

.site-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer-links a:hover {
  color: var(--accent-dark);
}

.site-footer-dot {
  color: var(--border);
}

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

@media (max-width: 640px) {
  .site-header {
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  }

  .site-header-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
  }

  .site-brand {
    justify-self: center;
    order: -1;
  }

  .site-header-spacer {
    display: none;
  }

  .site-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
  }

  .nav-link,
  .nav-trigger {
    padding: 8px 11px;
    font-size: 0.85rem;
  }
}

/* Sayfa başına dön butonu — tüm sayfalarda (.site-page > * kuralını ezmek için yüksek özgüllük) */
.site-page > .scroll-top-btn,
.scroll-top-btn {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 120;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  background: var(--accent, #b8896a);
  border: none;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(154, 112, 84, 0.45);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, background 0.2s;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.scroll-top-btn:hover {
  background: var(--accent-dark, #9a7054);
}

.scroll-top-btn svg {
  width: 22px;
  height: 22px;
}
