/* ==========================================================================
   psikoajanda — site basligi (header) duzeltmeleri
   Tema dosyalarina DOKUNULMAZ; bu dosya mu-plugin ile yuklenir.

   Cozdugu sorunlar:
   1) Mobil/tablette menu HIC gorunmuyordu. Menu sutunu `d-none d-lg-block`
      ile gizleniyor, hamburger kabi (.techogy-responsive-menu) o sutunun
      ICINDE. Orijinal temada `d-none` YOKTU — sonradan eklenmis.
   2) "Giris / Kayit" iki satira kiriliyor, "Uzmanlar" sag kenardan tasiyordu.
   3) Dokunma hedefleri 44px'in altindaydi, odak halkasi yoktu.
   ========================================================================== */

/* --- 1. Sag taraftaki dugmeler: her genislikte tek satir ----------------- */

.theme_header__main .header-right-content {
  min-width: 0;
}

.theme_header__main .header-buttons-wrapper {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: 0;
}

.theme_header__main .header-buttons-wrapper > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;          /* "Giris / Kayit" artik kirilmiyor */
  min-height: 2.75rem;          /* 44px dokunma hedefi */
  padding: 0.5rem 1.125rem;
  line-height: 1.2;
}

/* Sutunlarin tasmasini engelle (yatay kaydirma cubugunun sebebi) */
.theme_header__main [class*="col-"] {
  min-width: 0;
}

/* --- 1b. Dugmeler dar alanda kucululsun, TASMASIN --------------------------
   Customizer Ek CSS'i her iki dugmeye de `padding: 15px 30px !important` ve
   18px yazi veriyor; ikisi birlikte ~316px istiyor ama 992px'de sutunda
   ~224px yer var. Eskiden metin iki satira kirilarak sigiyordu; artik
   kirilmadigi icin yerine olculu bir kucultme koyuyoruz.
   `!important` zorunlu: ezilen kural da !important.                        */

@media (max-width: 1399.98px) {
  .theme_header__main .header-buttons-wrapper > a.girisButton,
  .theme_header__main .header-buttons-wrapper > a.kayitButton {
    padding: 0.625rem 1.125rem !important;
    font-size: 0.9375rem !important;
  }
}

@media (max-width: 1199.98px) {
  .theme_header__main .header-buttons-wrapper > a.girisButton,
  .theme_header__main .header-buttons-wrapper > a.kayitButton {
    padding: 0.5rem 0.875rem !important;
    font-size: 0.875rem !important;
  }
}

/* Son guvenlik agi: yine de sigmazsa tasmak yerine alt satira insinler. */
.theme_header__main .header-buttons-wrapper {
  flex-wrap: wrap;
  row-gap: 0.375rem;
}

/* --- 2. Odak gorunurlugu (klavye) --------------------------------------- */

.theme_header__main a:focus-visible,
.theme_header__main .slicknav_btn:focus-visible {
  outline: 0.1875rem solid #3154A5;
  outline-offset: 0.125rem;
  border-radius: 0.375rem;
}

/* ==========================================================================
   3. TABLET VE MOBIL  (< 992px)
   ========================================================================== */

@media (max-width: 991.98px) {

  /* 3a. Gizlenen menu sutununu geri ac.
     Bootstrap `.d-none { display:none !important }` kullaniyor; ezmek icin
     !important sart. Ozgullugumuz (0,3,0) onunkinden (0,1,0) yuksek. */
  .theme_header__main .nav-design-one.d-none {
    display: block !important;
    position: static;
    flex: 0 0 auto;
    width: 0;
    max-width: 0;
    padding: 0;
    margin: 0;
  }

  /* Masaustu menusu kapali kalsin (tema zaten .mainmenu'yu gizliyor,
     burada garantiye aliyoruz — sutun artik gorunur oldugu icin). */
  .theme_header__main .nav-design-one .mainmenu {
    display: none !important;
  }

  /* 3b. Hamburger dugmesi: temanin -40px hackleri yerine kesin konum.
     .theme-header-area zaten position:relative. */
  /* Hamburger'in konum referansi .theme-header-area olmali.
     .nav-menu-wrapper `position:relative` (main.css) ve sifir genislikli
     sutunun icinde oldugu icin dugme logonun sagina dusuyordu. */
  .theme_header__main .nav-design-one .nav-menu-wrapper,
  .theme_header__main .nav-design-one .nav-wrapper-one,
  .theme_header__main .techogy-responsive-menu,
  .theme_header__main .slicknav_menu {
    position: static;
    width: auto;
  }

  .theme_header__main .slicknav_menu {
    display: block;
    background: transparent;
    padding: 0;
  }

  .theme_header__main a.slicknav_btn,
  .theme_header__main .slicknav_btn {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    float: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    background: transparent;
    border-radius: 0.5rem;
    box-shadow: none;
    z-index: 1001;
  }

  /* Hamburger metnini gizle, yalniz cizgiler kalsin */
  .theme_header__main .slicknav_menu .slicknav_menutxt {
    display: none;
  }

  .theme_header__main .slicknav_menu .slicknav_icon {
    float: none;
    margin: 0;
    width: 1.5rem;
    height: 1.125rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .theme_header__main .slicknav_menu .slicknav_icon-bar {
    width: 1.5rem;
    height: 0.1875rem;
    margin: 0;
    border-radius: 0.125rem;
    background-color: #ffffff;
    box-shadow: none;
  }

  /* 3c. Dugmeler hamburger'in altina girmesin */
  .theme_header__main .header-right-content {
    padding-right: 3.25rem;
  }

  /* 3d. Acilan menu: basligin altinda tam genislikte panel */
  .theme_header__main ul.slicknav_nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 0.5rem 0;
    background: #3154A5;
    border-radius: 0 0 0.75rem 0.75rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.18);
    z-index: 1000;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
  }

  .theme_header__main ul.slicknav_nav a {
    display: block;
    padding: 0.875rem 1.25rem;
    min-height: 2.75rem;
    color: #ffffff !important;
    font-size: 1rem;
  }

  .theme_header__main ul.slicknav_nav .slicknav_row {
    padding: 0.875rem 1.25rem;
    margin: 0;
    min-height: 2.75rem;
  }

  .theme_header__main ul.slicknav_nav ul {
    margin: 0;
    background: rgba(0, 0, 0, 0.12);
  }

  .theme_header__main ul.slicknav_nav ul a {
    padding-left: 2.5rem;
  }
}

/* --- 3e. Klavyeyle alt menu (WCAG 2.1.1) --------------------------------
   Tema alt menuyu yalnizca :hover ile aciyor; klavye kullanicisi
   "Psiko Ag" altindaki Psikomedya / Sosyal Oda'ya hic ulasamiyordu.     */

.theme_header__main .theme-main-menu li:focus-within > ul,
.theme_header__main .theme-main-menu li:focus-within > .sub-menu {
  display: block;
  visibility: visible;
  opacity: 1;
}

/* --- 4. Cok dar ekran (< 576px) ----------------------------------------- */

@media (max-width: 575.98px) {
  .theme_header__main .header-buttons-wrapper > a.girisButton,
  .theme_header__main .header-buttons-wrapper > a.kayitButton {
    font-size: 0.8125rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  .theme_header__main .header-right-content {
    padding-right: 3rem;
  }

  /* Logo dugmelerin uzerine biniyordu: responsive.css:1593 logoyu 150px'e
     sabitliyor ama col-4 320px'lik ekranda ~83px veriyor. */
  .theme_header__main .logo.theme-logo img {
    max-width: 100% !important;
    height: auto;
  }
}
