/* Site header — views/partials/header.ejs + public/js/header-scroll.js
   En ustte sayfaya yapisik tam genislikte bir bar. Kaydirinca (.is-scrolled)
   kenarlardan ayrilir: asagi kayar, daralir, koseleri yuvarlanir ve golgeli
   buzlu cam bir karta donusur. .is-menu-open: mobil menu acik. */
.sh {
  --sh-h: 64px;
  --sh-h-compact: 58px;
  --sh-gap: 10px;
  --sh-ink: #1C1917;
  --sh-ink-soft: #57534E;
  --sh-accent: #C15A34;
  --sh-accent-dark: #A44A28;
  --sh-cream: #FDFBF7;
  --sh-line: rgba(28, 25, 23, .08);
  --sh-ease: cubic-bezier(.22, 1, .36, 1);
  --sh-dur: .55s;

  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 0;
  transition: padding var(--sh-dur) var(--sh-ease);
}
@media (min-width: 1024px) {
  .sh { --sh-h: 84px; --sh-h-compact: 64px; --sh-gap: 14px; }
}

/* Hero olmayan sayfalarda en ustteki tam genislik zemin; kaydirinca soner. */
.sh::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(253, 251, 247, .96);
  border-bottom: 1px solid var(--sh-line);
  transition: opacity .35s ease;
  pointer-events: none;
}
.sh--overlay::before { opacity: 0; }

.sh.is-scrolled { padding: var(--sh-gap) var(--sh-gap) 0; }
.sh.is-scrolled::before { opacity: 0; }

/* Menu acikken cekmece, sag alttaki iletisim butonunun (z-60) da ustunde kalsin. */
.sh.is-menu-open { z-index: 80; }

.sh-bar {
  position: relative;
  max-width: 80rem;
  height: var(--sh-h);
  margin: 0 auto;
  padding-inline: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 0 0 rgba(28, 25, 23, 0);
  transition:
    height var(--sh-dur) var(--sh-ease),
    max-width var(--sh-dur) var(--sh-ease),
    padding var(--sh-dur) var(--sh-ease),
    border-radius var(--sh-dur) var(--sh-ease),
    background-color .4s ease,
    border-color .4s ease,
    box-shadow var(--sh-dur) var(--sh-ease);
}
@media (min-width: 768px) { .sh-bar { padding-inline: 2rem; } }

.sh.is-scrolled .sh-bar {
  height: var(--sh-h-compact);
  max-width: 76rem;
  padding-inline: 1rem 1.25rem;
  border-color: rgba(28, 25, 23, .07);
  border-radius: 18px;
  background: rgba(253, 251, 247, .82);
  -webkit-backdrop-filter: saturate(170%) blur(16px);
  backdrop-filter: saturate(170%) blur(16px);
  box-shadow:
    0 1px 2px rgba(28, 25, 23, .05),
    0 18px 40px -18px rgba(28, 25, 23, .38);
}
@media (min-width: 768px) { .sh.is-scrolled .sh-bar { padding-inline: 1.5rem .65rem; border-radius: 999px; } }

/* ---------- Logo ---------- */
.sh-logo { display: flex; align-items: center; flex-shrink: 0; margin-inline-end: auto; }
.sh-logo img {
  display: block;
  height: 40px;
  width: auto;
  transition: height .4s var(--sh-ease), transform .3s var(--sh-ease);
}
@media (min-width: 1024px) { .sh-logo img { height: 50px; } }
.sh.is-scrolled .sh-logo img { height: 36px; }
@media (min-width: 1024px) { .sh.is-scrolled .sh-logo img { height: 42px; } }
.sh-logo:hover img { transform: translateY(-1px); }
.sh-logo:focus-visible { outline: 2px solid var(--sh-accent); outline-offset: 4px; border-radius: 6px; }

/* ---------- Masaustu menu ---------- */
.sh-nav { display: none; align-items: center; gap: 2rem; }
@media (min-width: 1024px) { .sh-nav { display: flex; } }
@media (min-width: 1280px) { .sh-nav { gap: 2.5rem; } }

.sh-link {
  position: relative;
  padding: .5rem 0;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--sh-ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color .25s ease;
}
.sh-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: .15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--sh-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .35s var(--sh-ease);
}
.sh-link:hover { color: var(--sh-ink); }
.sh-link:hover::after { transform: scaleX(1); }
.sh-link.is-active { color: var(--sh-ink); font-weight: 600; }
.sh-link.is-active::after { transform: scaleX(1); }
.sh-link:focus-visible { outline: 2px solid var(--sh-accent); outline-offset: 4px; border-radius: 4px; }

/* ---------- Sag taraf ---------- */
.sh-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }

.sh-cta {
  display: none;
  align-items: center;
  gap: .45rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--sh-accent);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px -10px rgba(193, 90, 52, .7);
  transition: background-color .25s ease, box-shadow .25s ease, transform .25s var(--sh-ease);
}
@media (min-width: 768px) { .sh-cta { display: inline-flex; } }
.sh-cta svg { transition: transform .3s var(--sh-ease); }
.sh-cta:hover { background: var(--sh-accent-dark); transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(193, 90, 52, .8); }
.sh-cta:hover svg { transform: translateX(3px); }
.sh-cta:focus-visible { outline: 2px solid var(--sh-accent); outline-offset: 3px; }
.sh-cta--block { display: flex; justify-content: center; width: 100%; height: 3rem; }

/* Hamburger -> X */
.sh-burger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  color: var(--sh-ink);
  transition: background-color .2s ease;
}
.sh-burger:hover { background: rgba(28, 25, 23, .06); }
.sh-burger:focus-visible { outline: 2px solid var(--sh-accent); outline-offset: 2px; }
@media (min-width: 1024px) { .sh-burger { display: none; } }
.sh-burger span {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  margin-left: -10px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .35s var(--sh-ease), opacity .2s ease;
}
.sh-burger span:nth-child(1) { transform: translateY(-6px); }
.sh-burger span:nth-child(3) { transform: translateY(6px); }
.sh-burger.is-open span:nth-child(1) { transform: rotate(45deg); }
.sh-burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(.3); }
.sh-burger.is-open span:nth-child(3) { transform: rotate(-45deg); }

/* Okuma ilerleme cizgisi — kartin alt kenarinda, yuvarlak koselerin icinde. */
.sh-progress {
  position: absolute;
  left: 2rem;
  right: 2rem;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--sh-accent), #E8B79C);
  transform: scaleX(var(--sh-progress, 0));
  transform-origin: left center;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
[dir="rtl"] .sh-progress { transform-origin: right center; }
.sh.is-scrolled .sh-progress { opacity: 1; }

/* Hero olmayan sayfalarda icerik header'in altinda kalmasin. */
.sh-spacer { height: 64px; }
@media (min-width: 1024px) { .sh-spacer { height: 84px; } }

/* ---------- Mobil menu ---------- */
.sh-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(28, 25, 23, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sh-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 75;
  display: flex;
  flex-direction: column;
  width: min(86vw, 360px);
  height: 100vh;
  height: 100dvh;
  background: var(--sh-cream);
  box-shadow: -16px 0 40px rgba(28, 25, 23, .18);
}
.sh-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--sh-line); }
.sh-drawer__head img { height: 36px; width: auto; }
.sh-drawer__close { display: inline-flex; padding: .5rem; margin-inline-end: -.5rem; border-radius: 999px; color: var(--sh-ink); }
.sh-drawer__close:hover { background: rgba(28, 25, 23, .06); }
.sh-drawer__nav { flex: 1; overflow-y: auto; padding: 1rem .75rem; }
.sh-drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .95rem .75rem;
  border-radius: 12px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--sh-ink);
  text-decoration: none;
  opacity: 0;
  transform: translateX(16px);
  transition: background-color .2s ease, opacity .35s ease, transform .45s var(--sh-ease);
}
.sh-drawer__link svg { color: rgba(28, 25, 23, .3); transition: transform .25s var(--sh-ease), color .2s ease; }
.sh-drawer__link:hover { background: rgba(28, 25, 23, .04); }
.sh-drawer__link:hover svg { transform: translateX(3px); color: var(--sh-accent); }
[dir="rtl"] .sh-drawer__link svg { transform: scaleX(-1); }
[dir="rtl"] .sh-drawer__link:hover svg { transform: scaleX(-1) translateX(3px); }
.sh-drawer__link.is-active { background: rgba(193, 90, 52, .1); font-weight: 600; }
.sh-drawer__link.is-active svg { color: var(--sh-accent); }
.sh-drawer.is-open .sh-drawer__link {
  opacity: 1;
  transform: none;
  transition-delay: calc(80ms + var(--i, 0) * 45ms);
}
.sh-drawer__foot { padding: 1.25rem; border-top: 1px solid var(--sh-line); }

/* ---------- Giris animasyonu ----------
   Saf CSS: JS yuklenmese de oge sonunda gorunur kalir (fill-mode: both). */
@keyframes sh-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.sh-logo { animation: sh-in .7s var(--sh-ease) both; }
.sh-link { animation: sh-in .7s var(--sh-ease) both; animation-delay: calc(120ms + var(--i, 0) * 55ms); }
.sh-actions { animation: sh-in .7s var(--sh-ease) .4s both; }

@media (prefers-reduced-motion: reduce) {
  .sh, .sh *, .sh *::before, .sh *::after { transition: none !important; animation: none !important; }
  .sh-drawer__link { opacity: 1; transform: none; }
}
