/*
 * UFO & Bilinmeyenler — Header Stilleri
 * header.css
 *
 * Tema kök dizinine koyun ve functions.php'den enqueue edin.
 * single-post.css ve homepage.css ile uyumludur.
 */

/* ── Font import ── */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,300..800;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300..700;1,8..60,400&display=swap');

/* ── Değişkenler ── */
:root {
  --tmnf-bg: #0b0c10;
  --tmnf-surface: #0f1117;
  --tmnf-surface-2: #14161e;
  --tmnf-surface-offset: #1a1d28;
  --tmnf-border: rgba(255,255,255,0.08);
  --tmnf-divider: rgba(255,255,255,0.05);
  --tmnf-text: #e2e4ed;
  --tmnf-text-muted: #8b8fa8;
  --tmnf-text-faint: #757a96;
  --tmnf-accent: #00d4c8;
  --tmnf-accent-dim: rgba(0,212,200,0.13);
  --tmnf-accent-hover: #00b8ad;
  --tmnf-font-display: 'Exo 2', 'Helvetica Neue', sans-serif;
  --tmnf-font-body: 'Source Serif 4', Georgia, serif;
  --tmnf-text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --tmnf-text-sm: clamp(0.875rem, 0.82rem + 0.28vw, 1rem);
  --tmnf-text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --tmnf-ease: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --tmnf-header-h: 68px;
}

/* ── Temel sıfırlama ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--tmnf-bg);
  color: var(--tmnf-text);
  font-family: var(--tmnf-font-body);
  padding-top: var(--tmnf-header-h);
}

/* Skip link */
.tmnf-skip-link {
  position: absolute;
  top: -100px;
  left: var(--tmnf-sp-4, 1rem);
  z-index: 9999;
  background: var(--tmnf-accent);
  color: #000;
  font-family: var(--tmnf-font-display);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  transition: top 200ms;
}
.tmnf-skip-link:focus { top: 8px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ═══════════════════════════════════════════════════════
   HEADER KAPSAYICI
═══════════════════════════════════════════════════════ */
.tmnf-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--tmnf-header-h);
  background: rgba(11, 12, 16, 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--tmnf-border);
  transition: background var(--tmnf-ease), box-shadow var(--tmnf-ease), border-color var(--tmnf-ease);
}

.tmnf-header.tmnf-header--scrolled {
  background: rgba(11, 12, 16, 0.97);
  border-bottom-color: rgba(255,255,255,0.10);
  box-shadow: 0 4px 24px rgba(0,0,0,0.45);
}

.tmnf-header__inner {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ═══════════════════════════════════════════════════════
   LOGO
═══════════════════════════════════════════════════════ */
.tmnf-header__logo { flex-shrink: 0; }

.tmnf-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--tmnf-accent);
}

.tmnf-logo-mark {
  color: var(--tmnf-accent);
  flex-shrink: 0;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1), color var(--tmnf-ease);
}

.tmnf-logo-link:hover .tmnf-logo-mark {
  transform: rotate(45deg) scale(1.06);
  color: #fff;
}

.tmnf-logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1;
}

.tmnf-logo-text__primary {
  font-family: var(--tmnf-font-display);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  transition: color var(--tmnf-ease);
}

.tmnf-logo-link:hover .tmnf-logo-text__primary {
  color: var(--tmnf-accent);
}

.tmnf-logo-text__tagline {
  font-family: var(--tmnf-font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tmnf-text-faint);
}

/* ═══════════════════════════════════════════════════════
   MASAÜSTÜ NAVİGASYON
═══════════════════════════════════════════════════════ */
.tmnf-nav-desktop {
  flex: 1;
  display: flex;
  justify-content: center;
}

.tmnf-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
}

.tmnf-nav-list > li {
  position: relative;
  padding-bottom: 12px; /* Hover alanını genişletmek için */
}

.tmnf-nav-list > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--tmnf-font-display);
  font-size: var(--tmnf-text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--tmnf-text-muted);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: color var(--tmnf-ease), background var(--tmnf-ease);
  white-space: nowrap;
  position: relative;
}

.tmnf-nav-list > li > a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0.85rem;
  right: 0.85rem;
  height: 1.5px;
  background: var(--tmnf-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--tmnf-ease);
  border-radius: 1px;
}

.tmnf-nav-list > li > a:hover,
.tmnf-nav-list > li.current-menu-item > a,
.tmnf-nav-list > li.current-menu-ancestor > a {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.tmnf-nav-list > li > a:hover::after,
.tmnf-nav-list > li.current-menu-item > a::after,
.tmnf-nav-list > li.current-menu-ancestor > a::after {
  transform: scaleX(1);
}

.tmnf-nav-list > li.current-menu-item > a {
  color: var(--tmnf-accent);
}

/* ── Alt menü (Dropdown) ── */
.tmnf-nav-list .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--tmnf-surface-2);
  border: 1px solid var(--tmnf-border);
  border-radius: 10px;
  padding: 8px;
  list-style: none;
  margin: 0;                    /* Important: no margin */
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0ms 180ms;
  z-index: 100;
  pointer-events: none;
}

/* Hover alanı genişletme + Submenu */
.tmnf-nav-list > li {
  position: relative;
}

.tmnf-nav-list > li:hover > .sub-menu,
.tmnf-nav-list > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0ms 0ms;
  pointer-events: auto;
}

/* Invisible bridge - Bu çok önemli! */
.tmnf-nav-list > li::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;           /* This bridges the gap */
  z-index: 99;
}

/* Alt menü linkleri */
.tmnf-nav-list .sub-menu li a {
  display: block;
  font-family: var(--tmnf-font-display);
  font-size: var(--tmnf-text-xs);
  font-weight: 500;
  color: var(--tmnf-text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: color var(--tmnf-ease), background var(--tmnf-ease);
  white-space: nowrap;
}

.tmnf-nav-list .sub-menu li a:hover,
.tmnf-nav-list .sub-menu li.current-menu-item a {
  color: var(--tmnf-accent);
  background: var(--tmnf-accent-dim);
}

/* ═══════════════════════════════════════════════════════
   HEADER SAĞ ARAÇLAR, ARAMA, MOBİL MENÜ vb.
   (Aşağıdaki kısım orijinaliyle aynı kalıyor)
═══════════════════════════════════════════════════════ */

.tmnf-header__tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.tmnf-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--tmnf-text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: color var(--tmnf-ease), background var(--tmnf-ease), border-color var(--tmnf-ease);
}

.tmnf-header-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.07);
  border-color: var(--tmnf-border);
}

.tmnf-header-btn:focus-visible {
  outline: 2px solid var(--tmnf-accent);
  outline-offset: 2px;
}

/* Hamburger */
.tmnf-hamburger {
  flex-direction: column;
  gap: 5px;
  display: none;
  color: var(--tmnf-text) !important;
}

.tmnf-hamburger__bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--tmnf-text) !important;
  border-radius: 2px;
  transform-origin: center;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms ease, width 250ms ease;
}

.tmnf-hamburger[aria-expanded="true"] .tmnf-hamburger__bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.tmnf-hamburger[aria-expanded="true"] .tmnf-hamburger__bar:nth-child(2) {
  opacity: 0;
  width: 0;
}
.tmnf-hamburger[aria-expanded="true"] .tmnf-hamburger__bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Arama Paneli */
.tmnf-search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(11,12,16,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--tmnf-border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 0ms 220ms;
  z-index: 99;
}

.tmnf-search-panel[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease, visibility 0ms 0ms;
}

.tmnf-search-panel__inner {
  max-width: 1180px;
  margin-inline: auto;
  padding: 1.25rem clamp(1rem, 5vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tmnf-search-form {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--tmnf-surface-offset);
  border: 1px solid var(--tmnf-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color var(--tmnf-ease);
}

.tmnf-search-form:focus-within {
  border-color: rgba(0,212,200,0.4);
}

.tmnf-search-form__input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--tmnf-text);
  font-family: var(--tmnf-font-display);
  font-size: var(--tmnf-text-base);
  padding: 0.75rem 1rem;
  outline: none;
  caret-color: var(--tmnf-accent);
}

.tmnf-search-form__input::placeholder {
  color: var(--tmnf-text-faint);
}

.tmnf-search-form__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--tmnf-accent);
  border: none;
  color: #000;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--tmnf-ease);
}

.tmnf-search-form__btn:hover { background: var(--tmnf-accent-hover); }

.tmnf-search-panel__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--tmnf-border);
  background: var(--tmnf-surface);
  color: var(--tmnf-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--tmnf-ease), background var(--tmnf-ease);
}

.tmnf-search-panel__close:hover {
  color: #fff;
  background: var(--tmnf-surface-offset);
}

/* Mobil Menü (orijinal haliyle bırakıldı) */
.tmnf-mobile-nav {
  position: fixed;
  top: var(--tmnf-header-h);
  right: 0;
  width: min(360px, 92vw);
  height: calc(100dvh - var(--tmnf-header-h));
  background: var(--tmnf-surface);
  border-left: 1px solid var(--tmnf-border);
  z-index: 999;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}

.tmnf-mobile-nav[aria-hidden="false"] {
  transform: translateX(0);
}

.tmnf-mobile-nav__inner {
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tmnf-mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tmnf-mobile-nav__list > li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--tmnf-divider);
}

.tmnf-mobile-nav__list > li:first-child {
  border-top: 1px solid var(--tmnf-divider);
}

.tmnf-mobile-nav__list > li > a {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  font-family: var(--tmnf-font-display);
  font-size: var(--tmnf-text-base);
  font-weight: 600;
  color: var(--tmnf-text);
  text-decoration: none;
  padding: 0.875rem 0.25rem;
  transition: color var(--tmnf-ease);
}

.tmnf-mobile-nav__list > li > a:hover,
.tmnf-mobile-nav__list > li.current-menu-item > a {
  color: var(--tmnf-accent);
}

/* Mobil alt menü */
.tmnf-mobile-nav__list .sub-menu {
  list-style: none;
  padding: 0 0 0.5rem 1rem;
  margin: 0;
  display: none;
  flex-basis: 100%;
}

.tmnf-mobile-nav__list li.tmnf-submenu-open > .sub-menu {
  display: block;
}

.tmnf-mobile-nav__list .sub-menu li a {
  display: block;
  font-family: var(--tmnf-font-display);
  font-size: var(--tmnf-text-sm);
  color: var(--tmnf-text-muted);
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--tmnf-divider);
  transition: color var(--tmnf-ease);
}

.tmnf-mobile-nav__list .sub-menu li:last-child a {
  border-bottom: none;
}

.tmnf-mobile-nav__list .sub-menu li a:hover { color: var(--tmnf-accent); }

.tmnf-mobile-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--tmnf-border);
  background: var(--tmnf-surface-offset);
  color: var(--tmnf-text-muted);
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background var(--tmnf-ease), color var(--tmnf-ease), transform var(--tmnf-ease);
}

.tmnf-mobile-sub-toggle[aria-expanded="true"] {
  transform: rotate(180deg);
  color: var(--tmnf-accent);
  border-color: rgba(0,212,200,0.3);
}

.tmnf-mobile-nav__footer {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--tmnf-divider);
}

.tmnf-mobile-nav__extra {
  font-family: var(--tmnf-font-display);
  font-size: var(--tmnf-text-xs);
  font-weight: 500;
  color: var(--tmnf-text-faint);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color var(--tmnf-ease);
}

.tmnf-mobile-nav__extra:hover { color: var(--tmnf-accent); }

.tmnf-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms ease, visibility 0ms 280ms;
  backdrop-filter: blur(2px);
}

.tmnf-mobile-overlay.tmnf-overlay--visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 280ms ease, visibility 0ms 0ms;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 899px) {
  .tmnf-nav-desktop { display: none; }
  .tmnf-hamburger { display: inline-flex; }
}

@media (min-width: 900px) {
  .tmnf-hamburger { display: none; }
  .tmnf-mobile-nav,
  .tmnf-mobile-overlay { display: none !important; }
}

@media (hover: none) {
  .tmnf-nav-list > li > a::after { display: none; }
}

/* WordPress Admin Bar */
@media (max-width: 782px) {
  body.admin-bar .tmnf-header { top: 46px; }
  body.admin-bar .tmnf-mobile-nav { top: calc(var(--tmnf-header-h) + 46px); }
  body.admin-bar .tmnf-search-panel { margin-top: 46px; }
}

@media (min-width: 783px) {
  body.admin-bar .tmnf-header { top: 32px; }
  body.admin-bar .tmnf-mobile-nav { top: calc(var(--tmnf-header-h) + 32px); }
  body.admin-bar .tmnf-search-panel { margin-top: 32px; }
  body.admin-bar { padding-top: calc(var(--tmnf-header-h) + 32px); }
}
/* Keep the fixed header below the WordPress admin toolbar. */
body.admin-bar .tmnf-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .tmnf-header { top: 46px; } }
