/*
 * DEÜ YBS — Navbar & Header CSS
 * Dosya: assets/css/navbar.css
 * functions.php'den wp_enqueue_style ile yüklenir.
 * header.php içinde <style> bloğu YOKTUR.
 */

/* ── Navbar ── */
.deu-navbar {
  background: #FFFFFF !important;
  border-bottom: 2px solid #ECEAE4;
  transition: all .25s ease;
  padding-top: 5px;
  padding-bottom: 5px;
}
.deu-navbar.scrolled { box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

/* Marka */
.deu-logo-box {
  width: 40px; height: 40px;
  background: #002366; border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900; font-size: .8rem; color: #fff;
  flex-shrink: 0;
}
.deu-brand-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700; font-size: .875rem;
  color: #002366; letter-spacing: .04em; line-height: 1.1;
}
.deu-brand-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: .6rem; color: #6B6760;
  letter-spacing: .07em; text-transform: uppercase;
}
.navbar-brand:hover { opacity: .88; }

/* Nav linkleri */
.deu-navbar .nav-link {
  color: #002366 !important;
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 1.1rem .75rem !important;
  position: relative;
  transition: color .15s ease;
}
.deu-navbar .nav-link::after {
  content: '';
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 3px; background: #8C1515;
  transition: width .25s ease;
}
.deu-navbar .nav-link:hover,
.deu-navbar .nav-link.active,
.deu-navbar .nav-item.active > .nav-link { color: #8C1515 !important; }
.deu-navbar .nav-link:hover::after,
.deu-navbar .nav-link.active::after { width: 100%; }

/* Dropdown toggle ok animasyonu */
.deu-navbar .dropdown-toggle::after { transition: transform .2s ease; }
.deu-navbar .dropdown-toggle.show::after { transform: rotate(180deg); }

/* Dropdown menü */
.deu-navbar .dropdown-menu {
  border: 1px solid #ECEAE4;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,26,61,.16);
  padding: .5rem 0;
  min-width: 210px;
  margin-top: 0 !important;
  animation: dropIn .15s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.deu-navbar .dropdown-item {
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem; color: #3D3A34;
  padding: .625rem 1.25rem;
  border-left: 2px solid transparent;
  transition: all .15s ease;
}
.deu-navbar .dropdown-item:hover,
.deu-navbar .dropdown-item:focus {
  color: #C41230;
  background: rgba(196,18,48,.04);
  border-left-color: #C41230;
  padding-left: 1.5rem;
}

/* ── Arama formu ── */

/* Wrapper: sabit 200px — genişleme YOK, ikon içerde sabit */
.deu-search-wrap {
  position: relative;
  width: 200px;
  max-width: 200px;
  flex-shrink: 0;
}

/* Input: sağda ikon için padding */
.deu-search-input {
  width: 100%;
  max-width: 200px;
  padding: .35rem 2rem .35rem .75rem;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 4px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: .8125rem;
  transition: background .2s ease, border-color .2s ease;
  outline: none;
  -webkit-appearance: none;
}
.deu-search-input::placeholder { color: rgba(255,255,255,.45); }
.deu-search-input:focus {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.5);
  color: #fff;
  box-shadow: none;
  /* width sabit — layout kayması YOK */
}

/* İkon: absolute, inputun içinde sağda */
.deu-search-btn {
  position: absolute;
  top: 50%;
  right: .4rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(255,255,255,.7);
  padding: 0;
  line-height: 1;
  cursor: pointer;
  transition: color .15s;
  display: flex;
  align-items: center;
}
.deu-search-btn:hover { color: #fff; }

/* ── CTA Butonu (#C41230) ── */
.deu-cta-btn {
  background-color: #C41230 !important;
  border-color: #C41230 !important;
  color: #fff !important;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600; font-size: .8rem;
  letter-spacing: .04em; text-transform: uppercase;
  padding: .45rem 1rem;
  border-radius: 2px;
  white-space: nowrap;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}
.deu-cta-btn:hover {
  background-color: #9A0E25 !important;
  border-color: #9A0E25 !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(196,18,48,.4) !important;
}
.deu-cta-btn.dropdown-toggle::after { margin-left: .3rem; }

/* ── Hamburger ── */
.navbar-toggler { padding: .4rem .6rem; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(0,35,102,.85)' stroke-width='2.2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}
.navbar-toggler:focus { box-shadow: 0 0 0 2px rgba(196,18,48,.4); }

/* ── Mobil ── */
@media (max-width: 991.98px) {
  .deu-navbar .nav-link { padding: .7rem 1rem !important; }
  .deu-navbar .nav-link::after { display: none; }

  /* ════════════════════════════════════════════════════════════
     MOBİL DROPDOWN — Kontrast & Okunabilirlik Düzeltmesi
     Önceki sürüm beyaz zemine %70 beyaz yazı koyuyordu (görünmez).
     Şimdi: Açık lacivert tonlu kart + KOYU LACIVERT yazı.
     ════════════════════════════════════════════════════════════ */
  .deu-navbar .dropdown-menu {
    background: #F4F6FA !important;              /* Açık nötr arka plan */
    border: 1px solid #ECEAE4 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 26, 61, .08) !important;
    padding: .5rem !important;
    margin: .5rem 0 !important;
    min-width: 220px;
    z-index: 1070 !important;                    /* navbar (1050) ve collapse (1060) üstü */
    overflow: visible !important;                /* Kesilmeyi önle */
  }

  .deu-navbar .dropdown-item {
    color: #001A3D !important;                   /* Kurumsal lacivert — kontrast 12:1 */
    font-weight: 600 !important;
    padding: .75rem 1rem !important;
    border-radius: 6px !important;
    min-height: 44px;                            /* Touch target */
    display: flex !important;
    align-items: center;
    line-height: 1.4;
    white-space: normal;                         /* Uzun yazılar wrap olsun */
  }

  .deu-navbar .dropdown-item:hover,
  .deu-navbar .dropdown-item:focus {
    color: #fff !important;
    background: #001A3D !important;
  }

  /* Çıkış Yap gibi tehlike linkleri */
  .deu-navbar .dropdown-item.text-danger {
    color: #8C1515 !important;
  }
  .deu-navbar .dropdown-item.text-danger:hover,
  .deu-navbar .dropdown-item.text-danger:focus {
    color: #fff !important;
    background: #8C1515 !important;
  }

  /* Divider ince çizgi */
  .deu-navbar .dropdown-divider {
    border-top-color: #ECEAE4 !important;
    margin: .25rem 0 !important;
  }

  /* Parent containers'da overflow:hidden varsa dropdown'u kesmesin */
  .navbar-collapse,
  .navbar-nav,
  .deu-nav-actions {
    overflow: visible !important;
  }

  /* Arama: mobilde tam genişlik */
  .deu-search-wrap { width: 100%; max-width: 100%; }
  .deu-search-input { max-width: 100%; }
  /* Aksiyon grubu: mobilde dikey istif */
  .deu-nav-actions {
    flex-direction: column;
    align-items: stretch !important;
    gap: .5rem !important;
  }
  .deu-cta-btn { width: 100%; justify-content: center; }
}

/* ── Skip link ── */
.visually-hidden-focusable:focus {
  position: fixed; top: .5rem; left: .5rem; z-index: 9999;
  padding: .5rem 1rem; background: #C41230; color: #fff;
  border-radius: 4px; font-weight: 600; text-decoration: none;
}
