/* Site header — inc/site-header.inc.php
   Kurumsal, sade çubuk: Menü | bağlantılar … arama + giriş. Menü en solda (kullanıcı alışkanlığı). Zemin sitenin mavisi.
   Kendi `ieo-header` önekiyle yalıtılmıştır; style.new.css / bootstrap'in genel a, button, input kuralları sıfırlanır.
   Kaydırınca .is-compact (js/site-pages-ui.js): 64px → 56px. Zemin hep düz mavi; gölge yok. */

.ieo-header {
    --ieo-h: 64px;
    --ieo-fs: 16px;   /* çubuktaki tüm yazılar tek boyut, tek kalınlık (600) */
    --ieo-bg: var(--site-page-primary, #4bb5ef);
    --ieo-ink: #fff;
    --ieo-ink-soft: #fff;
    --ieo-line: rgba(255, 255, 255, .28);
    --ieo-deep: var(--site-page-primary-deep, #1a6d96);
    --ieo-font: 'Figtree', var(--site-page-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif);
    --ieo-ease: cubic-bezier(.2, .7, .2, 1);

    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--ieo-bg);
    color: var(--ieo-ink);
    font-family: var(--ieo-font);
    font-size: 15px;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.ieo-header *, .ieo-header *::before, .ieo-header *::after { box-sizing: border-box; }
.ieo-header a { color: inherit; text-decoration: none; }
.ieo-header button, .ieo-header input { font: inherit; color: inherit; margin: 0; }

.ieo-header.is-compact {
    --ieo-h: 56px;
}

.ieo-header__inner {
    max-width: 1320px;
    height: var(--ieo-h);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    transition: height .2s var(--ieo-ease);
}

/* Menü (yan menüyü açar) */
.ieo-header__menu {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    height: 36px;
    padding: 0 12px 0 10px;
    margin-left: -10px;
    border-radius: 8px;
    font-size: var(--ieo-fs);
    font-weight: 600;
    transition: background-color .15s var(--ieo-ease);
}
.ieo-header__menu .fas { font-size: 17px; transition: transform .2s var(--ieo-ease); }
.ieo-header__menu:hover .fas { transform: scaleX(.86); transform-origin: left; }
.ieo-header__menu:hover { background: rgba(255, 255, 255, .14); }

/* Girişte Menü bir düğmedir (açılır liste); düğme varsayılanlarını sıfırla */
.ieo-header button.ieo-header__menu { border: 0; background: none; cursor: pointer; font-size: var(--ieo-fs); font-weight: 600; }
.ieo-header .ieo-header__menu[aria-expanded="true"] { background: rgba(255, 255, 255, .14); }
.ieo-header__menu-wrap .ieo-header__dropdown-menu { left: -10px; min-width: 240px; }

/* Ana bağlantılar */
.ieo-header__nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
}
.ieo-header__nav > a,
.ieo-header__dropdown-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 0;
    background: none;
    font-size: var(--ieo-fs);
    font-weight: 600;
    letter-spacing: -.005em;
    color: var(--ieo-ink-soft);
    cursor: pointer;
    transition: color .15s var(--ieo-ease);
}
.ieo-header__nav > a::after,
.ieo-header__dropdown-toggle::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s var(--ieo-ease);
}
.ieo-header__nav > a:hover,
.ieo-header__dropdown-toggle:hover,
.ieo-header__dropdown-toggle[aria-expanded="true"] { color: var(--ieo-ink); }
.ieo-header__nav > a:hover::after,
.ieo-header__dropdown-toggle:hover::after,
.ieo-header__dropdown-toggle[aria-expanded="true"]::after { transform: scaleX(1); }

/* .ieo-header button { font: inherit } sıfırlamasını ez */
.ieo-header .ieo-header__dropdown-toggle { font-size: var(--ieo-fs); font-weight: 600; }
/* Bulunulan sayfa: alt çizgi kalıcı */
.ieo-header__nav > a[aria-current="page"]::after { transform: scaleX(1); }

.ieo-header__caret { font-size: 10px; transition: transform .2s var(--ieo-ease); }
.ieo-header__dropdown-toggle[aria-expanded="true"] .ieo-header__caret { transform: rotate(180deg); }

/* ── Açılır pencereler (Odamız, Nöbetçi Eczane, Yayınlar, Yardımcı Eczacı, Hızlı Erişim) ──
   Betiksiz: üzerine gelince (:hover) ya da odaklanınca (:focus-within, klavye/dokunma) açılır.
   .12s gecikme: fare çubuğun üzerinden hızla geçerken pencereler yanıp sönmesin. */
.ieo-header__item { position: relative; }
.ieo-header .ieo-header__trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 0;
    background: none;
    font-size: var(--ieo-fs);
    font-weight: 600;
    letter-spacing: -.005em;
    color: var(--ieo-ink-soft);
    cursor: pointer;
}
.ieo-header__trigger::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s var(--ieo-ease);
}
.ieo-header__item:hover > .ieo-header__trigger::after,
.ieo-header__item:focus-within > .ieo-header__trigger::after { transform: scaleX(1); }
.ieo-header__item:hover .ieo-header__caret,
.ieo-header__item:focus-within .ieo-header__caret { transform: rotate(180deg); }

.ieo-header__panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    z-index: 5;
    padding: 20px 24px 22px;
    background: #fff;
    color: #1f2937;
    border: 1px solid #dfe7ee;
    border-radius: 14px;
    white-space: normal;
    text-align: left;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .18s var(--ieo-ease), transform .18s var(--ieo-ease), visibility 0s linear .18s;
}
/* çubukla pencere arasındaki boşlukta fare kaçmasın */
.ieo-header__panel::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.ieo-header__item:hover > .ieo-header__panel,
.ieo-header__item:focus-within > .ieo-header__panel {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .18s var(--ieo-ease) .12s, transform .18s var(--ieo-ease) .12s, visibility 0s linear .12s;
}

.ieo-header__panel-title { margin: 0; font-size: 17px; font-weight: 700; color: #0b2a4a; }
.ieo-header__panel-sub { margin: 2px 0 0; font-size: 13px; color: #6b7280; }
.ieo-header__label { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ieo-deep); }

/* Sütunlu pencere */
.ieo-header__cols { display: flex; gap: 40px; margin-top: 14px; }
.ieo-header__col { display: flex; flex-direction: column; min-width: 150px; }
.ieo-header__col a {
    padding: 7px 0;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    transition: color .15s var(--ieo-ease), transform .15s var(--ieo-ease);
}
.ieo-header__col a:hover { color: var(--ieo-deep); transform: translateX(3px); }

/* Hızlı Erişim düğmesi + kart ızgarası */
.ieo-header .ieo-header__quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    border: 1.5px solid #fff;
    border-radius: 999px;
    background: none;
    font-size: var(--ieo-fs);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s var(--ieo-ease);
}
.ieo-header__item--quick:hover > .ieo-header__quick-btn,
.ieo-header__item--quick:focus-within > .ieo-header__quick-btn { background: rgba(255, 255, 255, .15); }
/* Kartların kendisi ortak (css/site-pages.css .site-quick-*); burada yalnız pencere yerleşimi */
.ieo-header__panel--quick { left: auto; right: 0; width: 880px; }
.ieo-header__quick-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.ieo-header__panel--quick .site-quick-group:last-child .site-quick-grid { margin-bottom: 0; }

/* Yardımcı Eczacı: dikkat noktası */
.ieo-header__dot { position: relative; padding-right: 10px; }
.ieo-header__dot::after {
    content: '';
    position: absolute;
    top: -1px;
    right: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e53935;
    box-shadow: 0 0 0 2px var(--ieo-bg);
}

/* Açılır menü */
.ieo-header__dropdown { position: relative; }
.ieo-header__dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 260px;
    padding: 6px;
    background: #fff;
    color: #1f2937;
    border-radius: 12px;
    border: 1px solid #dfe7ee;
    animation: ieo-header-pop .16s var(--ieo-ease);
}
.ieo-header__dropdown-menu[hidden] { display: none; }
.ieo-header__dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}
.ieo-header__dropdown-menu a .fas { width: 16px; color: var(--ieo-deep); text-align: center; }
.ieo-header__dropdown-menu a:hover { background: #f1f7fb; color: var(--ieo-deep); }
@keyframes ieo-header-pop { from { opacity: 0; transform: translateY(-6px); } }
/* Menü öğeleri sırayla belirir (40ms arayla) */
.ieo-header__dropdown-menu a { animation: ieo-header-item .22s var(--ieo-ease) both; }
.ieo-header__dropdown-menu a:nth-child(2) { animation-delay: .04s; }
.ieo-header__dropdown-menu a:nth-child(3) { animation-delay: .08s; }
@keyframes ieo-header-item { from { opacity: 0; transform: translateX(-4px); } }
.ieo-header__dropdown-menu a .fas { transition: transform .2s var(--ieo-ease); }
.ieo-header__dropdown-menu a:hover .fas { transform: translateX(2px); }


/* Sağ: arama + giriş */
.ieo-header__actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.ieo-header__search { position: relative; display: flex; align-items: center; justify-content: flex-end; width: 38px; }
.ieo-header__search input:focus { position: absolute; right: 0; z-index: 2; }
.ieo-header__search input {
    width: 38px;
    height: 38px;
    padding: 0;
    cursor: pointer;
    border: 1.5px solid #fff;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: width .25s var(--ieo-ease), background-color .2s var(--ieo-ease), border-color .2s var(--ieo-ease);
}
.ieo-header__search input::placeholder { color: transparent; }
.ieo-header__search input::-webkit-search-cancel-button { display: none; }
.ieo-header__search input:hover { background: rgba(255, 255, 255, .15); }
.ieo-header__search input:focus { width: 280px; padding: 0 40px 0 16px; background: #fff; border-color: #fff; color: #1f2937; cursor: text; }
.ieo-header__search input:focus::placeholder { color: #6b7280; }
/* #id: style.new.css'teki eski #menu-search-button kuralını (id önceliği) ezmek için */
.ieo-header #menu-search-button,
.ieo-header .ieo-header__search-button {
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    position: absolute;
    right: 3px;
    z-index: 3;
    width: 32px;
    height: 32px;
    pointer-events: none;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}
.ieo-header .ieo-header__search:focus-within #menu-search-button,
.ieo-header .ieo-header__search:focus-within .ieo-header__search-button { color: var(--ieo-deep); pointer-events: auto; }

.ieo-header__login,
.ieo-header__account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--ieo-deep) !important;
    font-size: var(--ieo-fs);
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .15s var(--ieo-ease);
}
.ieo-header__login .fas, .ieo-header__account .fas { transition: transform .2s var(--ieo-ease); }
.ieo-header__login:hover .fas { transform: translateX(3px); }
.ieo-header__login:hover,
.ieo-header__account:hover { background: #f1f7fb; }

.ieo-header a:focus-visible,
.ieo-header button:focus-visible,
.ieo-header summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 8px; }
.ieo-header__dropdown-menu a:focus-visible { outline-color: var(--ieo-deep); }

/* B: lacivert yazı (mavi zeminde kontrast 6.3:1; beyaz 2.3:1) */
.ieo-header--ink { --ieo-ink: #0b2a4a; --ieo-ink-soft: #0b2a4a; --ieo-line: rgba(11, 42, 74, .18); }
.ieo-header--ink .ieo-header__nav > a::after,
.ieo-header--ink .ieo-header__dropdown-toggle::after { background: currentColor; }
.ieo-header--ink .ieo-header__search input { border-color: rgba(11, 42, 74, .25); background: rgba(255, 255, 255, .35); }
.ieo-header--ink #menu-search-button,
.ieo-header--ink .ieo-header__search-button { color: var(--ieo-ink); }
.ieo-header--ink a:focus-visible,
.ieo-header--ink button:focus-visible,
.ieo-header--ink summary:focus-visible { outline-color: var(--ieo-ink); }

/* Kısayollar — yalnız telefonda */
.ieo-header__shortcuts { display: none; }

@media (min-width: 1600px) {
    .ieo-header__inner { max-width: 1520px; }
}
@media (max-width: 1320px) {
    .ieo-header__inner { gap: 12px; padding: 0 16px; }
    .ieo-header { --ieo-fs: 15px; }
    /* dar masaüstünde Hızlı Erişim yalnız ızgara simgesi (yazı aria-label'da) */
    .ieo-header .ieo-header__quick-btn { width: 38px; padding: 0; justify-content: center; }
    .ieo-header__quick-btn span { display: none; }
    .ieo-header__nav > a, .ieo-header__dropdown-toggle { padding: 0 11px; }
    .ieo-header__nav > a::after, .ieo-header__dropdown-toggle::after { left: 11px; right: 11px; }
}



/* Telefon / tablet */
@media (max-width: 1100px) {
    .ieo-header { --ieo-h: 60px; }
    .ieo-header.is-compact { --ieo-h: 56px; }
    .ieo-header__inner { padding: 0 12px; gap: 8px; }
    .ieo-header__menu { padding: 0 8px; margin-left: -4px; }
    .ieo-header__menu { margin-right: auto; }
    .ieo-header__menu-wrap { margin-right: auto; }
    .ieo-header__nav { display: none; }
    .ieo-header__item--quick { display: none; }   /* telefonda üzerine gelme yok; alttaki Hızlı Erişim şeridi var */
    .ieo-header__actions { gap: 6px; position: static; }
    .ieo-header__search:focus-within { position: static; }   /* açıkken kutu header boyunca yayılır */
    .ieo-header__search input:focus { left: 12px; right: 12px; width: auto; }
    .ieo-header .ieo-header__search:focus-within #menu-search-button,
    .ieo-header .ieo-header__search:focus-within .ieo-header__search-button { right: 16px; }
    .ieo-header__login, .ieo-header__account { width: 38px; padding: 0; justify-content: center; }
    .ieo-header__login span, .ieo-header__account span { display: none; }

    /* Kısayollar: çubuğun altında yana kaydırılan tek dokunuşluk düğmeler. Parmakla rahat basılsın diye 36px;
       kaydırınca (.is-compact) katlanır, yukarı dönünce geri gelir. Sonda "Tümü" → Hızlı Erişim sayfası. */
    .ieo-header__shortcuts {
        display: flex;
        gap: 8px;
        padding: 0 12px 10px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scroll-padding: 0 12px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        max-height: 60px;
        transition: max-height .2s var(--ieo-ease), padding-bottom .2s var(--ieo-ease), opacity .2s var(--ieo-ease);
    }
    .ieo-header__shortcuts::-webkit-scrollbar { display: none; }
    .ieo-header__shortcuts a {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 36px;
        padding: 0 14px;
        border: 1.5px solid rgba(255, 255, 255, .7);
        border-radius: 999px;
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        scroll-snap-align: start;
        transition: background-color .15s var(--ieo-ease);
    }
    .ieo-header__shortcuts a:active { background: rgba(255, 255, 255, .2); }
    .ieo-header__shortcuts a[aria-current="page"],
    .ieo-header__shortcuts .ieo-header__shortcuts-all { background: #fff; border-color: #fff; color: var(--ieo-deep); }
    .ieo-header.is-compact .ieo-header__shortcuts { max-height: 0; padding-bottom: 0; opacity: 0; overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .ieo-header, .ieo-header * { transition: none !important; animation: none !important; }
}
@media print {
    .ieo-header { display: none !important; }
}
