/* =====================================================
   HEADER MODERN CONTROLS v7
   Eşit yükseklik ve uyumlu tasarım
   ===================================================== */

/* =====================================================
   ORTAK DEĞİŞKENLER
   ===================================================== */
:root {
  --control-height: 32px;
  --control-radius: 8px;
  --control-bg: rgba(255, 255, 255, 0.1);
  --control-border: rgba(255, 255, 255, 0.2);
  --control-gap: 8px;
}

/* =====================================================
   GENEL
   ===================================================== */
header.main-header .header-top-menu .appsMenuLink {
  margin-right: 0 !important;
}

/* =====================================================
   DİL DEĞİŞTİRİCİ
   ===================================================== */
header.main-header .header-top-menu .lang-switcher {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  margin-left: 30px !important;
  padding: 0 !important;
}

header.main-header .header-top-menu .lang-switcher:empty {
  display: none !important;
}

/* Lang button */
header.main-header .header-top-menu .lang-switcher .lang-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: var(--control-height) !important;
  padding: 0 10px !important;
  margin: 0 !important;
  background: var(--control-bg) !important;
  border: 1px solid var(--control-border) !important;
  border-radius: var(--control-radius) !important;
  color: #fff !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

header.main-header .header-top-menu .lang-switcher .lang-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

header.main-header .header-top-menu .lang-switcher .lang-icon {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
  opacity: 0.85 !important;
}

header.main-header .header-top-menu .lang-switcher .lang-code {
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-top: 1px !important;
}

/* Eski stiller override */
header.main-header .header-top-menu .lang-switcher a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: var(--control-height) !important;
  padding: 0 10px !important;
  margin: 0 !important;
  background: var(--control-bg) !important;
  border: 1px solid var(--control-border) !important;
  border-radius: var(--control-radius) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  line-height: 1 !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

header.main-header .header-top-menu .lang-switcher a::before {
  display: none !important;
  content: none !important;
  background-image: none !important;
}

header.main-header .header-top-menu .lang-switcher a:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* Fixed header */
header.main-header.fixed .header-top-menu .lang-switcher .lang-btn,
header.main-header.fixed .header-top-menu .lang-switcher a {
  background: rgba(0, 118, 255, 0.08) !important;
  border-color: rgba(0, 118, 255, 0.15) !important;
  color: #0076ff !important;
}

header.main-header.fixed .header-top-menu .lang-switcher .lang-icon {
  stroke: #0076ff !important;
}

/* =====================================================
   DARK MODE TOGGLE
   ===================================================== */
header.main-header .header-top-menu .dark-mode-switch {
  display: inline-flex !important;
  align-items: center !important;
  margin-left: var(--control-gap) !important;
}

header.main-header .header-top-menu .dark-mode-switch > span {
  display: none !important;
}

header.main-header .header-top-menu .dark-mode-switch ul {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 4px !important;
  background: var(--control-bg) !important;
  border: 1px solid var(--control-border) !important;
  border-radius: var(--control-radius) !important;
  list-style: none !important;
  position: relative !important;
  height: var(--control-height) !important;
}

/* Bar-bg slider */
header.main-header .header-top-menu .dark-mode-switch ul li.bar-bg {
  position: absolute !important;
  width: 24px !important;
  height: 24px !important;
  background: linear-gradient(135deg, #0076ff 0%, #00a3ff 100%) !important;
  border-radius: 6px !important;
  left: 4px !important;
  top: 4px !important;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 0 !important;
  box-shadow: 0 2px 6px rgba(0, 118, 255, 0.35) !important;
}

body.dark-mode header.main-header .dark-mode-switch ul li.bar-bg {
  left: 28px !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4) !important;
}

/* Toggle butonları */
header.main-header .header-top-menu .dark-mode-switch ul li.white,
header.main-header .header-top-menu .dark-mode-switch ul li.dark {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  list-style: none !important;
  z-index: 1 !important;
  position: relative !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
}

header.main-header .header-top-menu .dark-mode-switch ul li a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  cursor: pointer !important;
}

/* Eski ytu-icon'ları gizle */
header.main-header .header-top-menu .dark-mode-switch ul li i.ytu-icon {
  display: none !important;
}

/* Yeni SVG ikonlar */
header.main-header .header-top-menu .dark-mode-switch ul li.white a::before,
header.main-header .header-top-menu .dark-mode-switch ul li.dark a::before {
  content: '' !important;
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  opacity: 0.5 !important;
  transition: opacity 0.2s ease !important;
}

/* Güneş ikonu */
header.main-header .header-top-menu .dark-mode-switch ul li.white a::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E") !important;
}

/* Ay ikonu */
header.main-header .header-top-menu .dark-mode-switch ul li.dark a::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E") !important;
}

/* Aktif ikon */
header.main-header .header-top-menu .dark-mode-switch ul li.white.active a::before,
header.main-header .header-top-menu .dark-mode-switch ul li.dark.active a::before {
  opacity: 1 !important;
}

/* Fixed header */
header.main-header.fixed .header-top-menu .dark-mode-switch ul {
  background: rgba(0, 118, 255, 0.06) !important;
  border-color: rgba(0, 118, 255, 0.12) !important;
}

header.main-header.fixed .header-top-menu .dark-mode-switch ul li.white a::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230076ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E") !important;
  opacity: 0.4 !important;
}

header.main-header.fixed .header-top-menu .dark-mode-switch ul li.dark a::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230076ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E") !important;
  opacity: 0.4 !important;
}

header.main-header.fixed .header-top-menu .dark-mode-switch ul li.white.active a::before,
header.main-header.fixed .header-top-menu .dark-mode-switch ul li.dark.active a::before {
  filter: brightness(0) invert(1) !important;
  opacity: 1 !important;
}

/* =====================================================
   DARK MODE BODY
   ===================================================== */
body.dark-mode header.main-header .header-top-menu .lang-switcher .lang-btn,
body.dark-mode header.main-header .header-top-menu .lang-switcher a {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

body.dark-mode header.main-header .header-top-menu .lang-switcher .lang-icon {
  stroke: #fff !important;
}

body.dark-mode header.main-header .header-top-menu .dark-mode-switch ul {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* =====================================================
   DARK MODE + FIXED HEADER (Sticky durumu)
   ===================================================== */
body.dark-mode header.main-header.fixed .header-top-menu .lang-switcher .lang-btn,
body.dark-mode header.main-header.fixed .header-top-menu .lang-switcher a {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

body.dark-mode header.main-header.fixed .header-top-menu .lang-switcher .lang-icon {
  stroke: #fff !important;
}

body.dark-mode header.main-header.fixed .header-top-menu .dark-mode-switch ul {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Dark mode + Fixed header - İkonlar beyaz olmalı */
body.dark-mode header.main-header.fixed .header-top-menu .dark-mode-switch ul li.white a::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E") !important;
  opacity: 0.5 !important;
  filter: none !important;
}

body.dark-mode header.main-header.fixed .header-top-menu .dark-mode-switch ul li.dark a::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E") !important;
  opacity: 0.5 !important;
  filter: none !important;
}

body.dark-mode header.main-header.fixed .header-top-menu .dark-mode-switch ul li.white.active a::before,
body.dark-mode header.main-header.fixed .header-top-menu .dark-mode-switch ul li.dark.active a::before {
  opacity: 1 !important;
  filter: none !important;
}

/* Dark mode + Fixed header - Menü yazıları beyaz kalmalı */
body.dark-mode header.main-header.fixed .header-top-menu nav ul li a {
  color: #fff !important;
}

body.dark-mode header.main-header.fixed .header-top-menu nav ul li a:hover {
  color: rgba(255, 255, 255, 0.7) !important;
}

body.dark-mode header.main-header.fixed .header-bottom-menu nav ul li a {
  color: #fff !important;
}

body.dark-mode header.main-header.fixed .header-bottom-menu nav ul li a:hover {
  color: rgba(255, 255, 255, 0.7) !important;
}

body.dark-mode header.main-header.fixed .appsMenuLink span {
  color: #fff !important;
}

/* =====================================================
   MOBİL
   ===================================================== */
@media (max-width: 992px) {
  /* Lang-mod-change container - Sola hizalı */
  .mobile-menu-bottom .lang-mod-change {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    padding: 20px 0 !important;
    width: 100% !important;
  }

  .mobile-menu-bottom .lang-mod-change .col-6 {
    width: auto !important;
    flex: none !important;
    padding: 0 !important;
  }

  /* Dil değiştirici */
  .mobile-menu-bottom .lang-switcher {
    display: inline-flex !important;
  }

  .mobile-menu-bottom .lang-switcher .lang-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    background: rgba(0, 118, 255, 0.08) !important;
    border: 1px solid rgba(0, 118, 255, 0.15) !important;
    border-radius: 10px !important;
    color: #0076ff !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
  }

  .mobile-menu-bottom .lang-switcher .lang-icon {
    width: 20px !important;
    height: 20px !important;
    stroke: #0076ff !important;
  }

  .mobile-menu-bottom .lang-switcher .lang-code {
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
  }

  .mobile-menu-bottom .lang-switcher a::before {
    display: none !important;
  }

  /* Dark mode switch */
  .mobile-menu-bottom .dark-mode-switch {
    display: inline-flex !important;
    align-items: center !important;
  }

  .mobile-menu-bottom .dark-mode-switch > span {
    display: none !important;
  }

  .mobile-menu-bottom .dark-mode-switch ul {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 5px !important;
    background: rgba(0, 118, 255, 0.08) !important;
    border: 1px solid rgba(0, 118, 255, 0.15) !important;
    border-radius: 10px !important;
    list-style: none !important;
    position: relative !important;
    height: 48px !important;
    min-width: 96px !important;
  }

  /* Bar-bg slider mobil */
  .mobile-menu-bottom .dark-mode-switch ul li.bar-bg {
    position: absolute !important;
    width: 38px !important;
    height: 38px !important;
    left: 5px !important;
    top: 5px !important;
    background: linear-gradient(135deg, #0076ff 0%, #00a3ff 100%) !important;
    border-radius: 8px !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 118, 255, 0.35) !important;
  }

  body.dark-mode .mobile-menu-bottom .dark-mode-switch ul li.bar-bg {
    left: calc(100% - 43px) !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4) !important;
  }

  /* Toggle butonları mobil */
  .mobile-menu-bottom .dark-mode-switch ul li.white,
  .mobile-menu-bottom .dark-mode-switch ul li.dark {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    list-style: none !important;
    z-index: 1 !important;
    position: relative !important;
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .mobile-menu-bottom .dark-mode-switch ul li a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    cursor: pointer !important;
  }

  /* Eski ikonları gizle */
  .mobile-menu-bottom .dark-mode-switch ul li i {
    display: none !important;
  }

  /* Yeni SVG ikonlar mobil */
  .mobile-menu-bottom .dark-mode-switch ul li.white a::before,
  .mobile-menu-bottom .dark-mode-switch ul li.dark a::before {
    content: '' !important;
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    opacity: 0.5 !important;
    transition: opacity 0.2s ease !important;
  }

  /* Güneş ikonu mobil */
  .mobile-menu-bottom .dark-mode-switch ul li.white a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230076ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E") !important;
  }

  /* Ay ikonu mobil */
  .mobile-menu-bottom .dark-mode-switch ul li.dark a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230076ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E") !important;
  }

  /* Aktif ikon mobil */
  .mobile-menu-bottom .dark-mode-switch ul li.white.active a::before {
    opacity: 1 !important;
    filter: brightness(0) invert(1) !important;
  }

  body.dark-mode .mobile-menu-bottom .dark-mode-switch ul li.dark.active a::before {
    opacity: 1 !important;
    filter: brightness(0) invert(1) !important;
  }
}
