/* ══════════════════════════════════════
   BERC Header v4
   ══════════════════════════════════════ */
:root {
    --bh-blue: #0d47a1;
    --bh-blue-h: #1565c0;
    --bh-blue-l: #e3f2fd;
    --bh-dark: #0f172a;
    --bh-text: #334155;
    --bh-muted: #94a3b8;
    --bh-border: #e2e8f0;
    --bh-bg: #f8fafc;
    --bh-white: #fff;
    --bh-r: 8px;
    --bh-t: .2s ease;
    --bh-w: 1500px;
    --bh-h: 72px;
    --bh-f: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.elementor-default #masthead,
body .site-header { display: none !important; }
body.bh-locked { overflow: hidden !important; }

/* Reset: targeted, not nuclear. Don't touch i/svg (icons). */
#bercHeader, #bercHeader *:not(i):not(svg):not(path),
#megaXidmetler, #megaXidmetler *:not(i):not(svg):not(path),
#megaHaqqimizda, #megaHaqqimizda *:not(i):not(svg):not(path),
#dropLayiheler, #dropLayiheler *:not(i):not(svg):not(path),
#bercSearch, #bercSearch *:not(i):not(svg):not(path),
#bercMobile, #bercMobile *:not(i):not(svg):not(path),
#bercOverlay {
    box-sizing: border-box;
    font-family: var(--bh-f);
    -webkit-font-smoothing: antialiased;
}
#bercHeader a, #megaXidmetler a, #megaHaqqimizda a,
#dropLayiheler a, #bercSearch a, #bercMobile a {
    text-decoration: none;
}

.bh { position: sticky; top: 0; z-index: 99999; }

/* ─── Bar ─── */
.bh-bar { background: var(--bh-white); border-bottom: 1px solid var(--bh-border); height: var(--bh-h); transition: box-shadow var(--bh-t); }
.bh--scrolled .bh-bar { box-shadow: 0 1px 12px rgba(0,0,0,.06); }
.bh-wrap { max-width: var(--bh-w); margin: 0 auto; padding: 0 clamp(1.25rem,3vw,2.5rem); height: 100%; display: flex; align-items: center; }

/* ─── Logo ─── */
.bh-logo { flex-shrink: 0; display: flex; align-items: center; }
.bh-logo img { height: 34px; width: auto; display: block; }

/* ─── Nav centered ─── */
.bh-nav { flex: 1; display: flex; align-items: center; justify-content: center; }
.bh-nav__list { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
#bercHeader .bh-nav__item > a {
    display: flex; align-items: center; gap: .3rem;
    padding: 0 .9rem; height: var(--bh-h);
    font-size: .8125rem; font-weight: 500;
    color: var(--bh-text); white-space: nowrap;
    transition: color var(--bh-t); position: relative;
    background: transparent; border: none; outline: none;
}
#bercHeader .bh-nav__item > a:visited { color: var(--bh-text); background: transparent; }
#bercHeader .bh-nav__item > a:hover,
#bercHeader .bh-nav__item > a:focus,
#bercHeader .bh-nav__item > a:active,
#bercHeader .bh-nav__item--open > a { color: var(--bh-blue); background: transparent; }
.bh-nav__item--open > a::after { content: ''; position: absolute; bottom: 0; left: .9rem; right: .9rem; height: 2px; background: var(--bh-blue); }
.bh-nav__arrow { font-size: .55rem; transition: transform var(--bh-t); }
.bh-nav__item--open .bh-nav__arrow { transform: rotate(180deg); }
#bercHeader .bh-nav__item--cta > a {
    margin-left: .5rem; height: auto; padding: .5rem 1.1rem;
    background: var(--bh-blue); color: #fff;
    border-radius: 6px; font-weight: 600; font-size: .8125rem;
}
#bercHeader .bh-nav__item--cta > a:hover,
#bercHeader .bh-nav__item--cta > a:focus,
#bercHeader .bh-nav__item--cta > a:visited { background: var(--bh-blue-h); color: #fff; }
.bh-nav__item--cta > a::after { display: none; }

/* ─── Actions ─── */
.bh-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
#bercHeader .bh-actions__search {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border: 1px solid var(--bh-border); border-radius: 50%;
    background: transparent; cursor: pointer;
    color: var(--bh-text); font-size: .8125rem; transition: all var(--bh-t);
    outline: none; box-shadow: none;
}
#bercHeader .bh-actions__search:hover { border-color: var(--bh-blue); color: var(--bh-blue); background: var(--bh-blue-l); }

/* ─── Language Switcher ─── */
.bh-lang { position: relative; }
#bercHeader .bh-lang__btn {
    display: flex; align-items: center; gap: .35rem;
    padding: .45rem .75rem; font-size: .8125rem; font-weight: 600;
    color: var(--bh-text); background: transparent;
    border: 1px solid var(--bh-border); border-radius: 6px;
    cursor: pointer; transition: all var(--bh-t); white-space: nowrap;
    outline: none; box-shadow: none;
}
#bercHeader .bh-lang__btn:hover,
#bercHeader .bh-lang__btn:focus { border-color: var(--bh-blue); color: var(--bh-blue); background: transparent; }
.bh-lang__btn i { font-size: .5rem; transition: transform var(--bh-t); }
.bh-lang--open .bh-lang__btn i { transform: rotate(180deg); }
.bh-lang__drop { position: absolute; top: calc(100% + 6px); right: 0; background: var(--bh-white); border: 1px solid var(--bh-border); border-radius: var(--bh-r); box-shadow: 0 8px 24px rgba(0,0,0,.08); min-width: 56px; padding: .3rem; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: all .2s ease; z-index: 100000; }
.bh-lang--open .bh-lang__drop { opacity: 1; visibility: visible; transform: translateY(0); }
#bercHeader .bh-lang__item {
    display: block; padding: .4rem .65rem; font-size: .8125rem; font-weight: 500;
    color: var(--bh-text); text-align: center; border-radius: 5px;
    transition: all var(--bh-t); background: transparent;
}
#bercHeader .bh-lang__item:hover,
#bercHeader .bh-lang__item:focus { background: var(--bh-blue-l); color: var(--bh-blue); }

/* ─── Hamburger ─── */
.bh-hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 38px; height: 38px; background: none; border: none; cursor: pointer; outline: none; }
.bh-hamburger span { display: block; width: 20px; height: 2px; background: var(--bh-dark); border-radius: 2px; }

/* ─── Overlay ─── */
.bh-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 99998; opacity: 0; visibility: hidden; transition: all .25s ease; backdrop-filter: blur(2px); }
.bh-overlay--visible { opacity: 1; visibility: visible; }

/* ═══ MEGA (shared) ═══ */
.bh-mega { position: absolute; top: var(--bh-h); left: 0; width: 100%; background: var(--bh-white); border-bottom: 1px solid var(--bh-border); box-shadow: 0 8px 32px rgba(0,0,0,.07); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .2s ease; z-index: 99999; }
.bh-mega--open { opacity: 1; visibility: visible; transform: translateY(0); }

/* ═══ MEGA: Xidmətlərimiz ═══ */
.bh-mega__grid { display: grid; grid-template-columns: 380px 1fr; min-height: 480px; }
.bh-mega__left { border-right: 1px solid var(--bh-border); padding: 1rem 0; overflow-y: auto; max-height: 560px; }
#megaXidmetler .bh-mega__sahe {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: .65rem 1.25rem;
    font-size: .8125rem; font-weight: 500;
    color: var(--bh-text); background: transparent;
    border: none; cursor: pointer; text-align: left;
    transition: all var(--bh-t); outline: none;
}
.bh-mega__sahe span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bh-mega__sahe i { font-size: .55rem; color: var(--bh-muted); flex-shrink: 0; margin-left: .5rem; transition: all var(--bh-t); }
#megaXidmetler .bh-mega__sahe--active { background: var(--bh-blue-l); color: var(--bh-blue); font-weight: 600; }
#megaXidmetler .bh-mega__sahe--active i { color: var(--bh-blue); }
.bh-mega__right { padding: 1.25rem 1.75rem; overflow-y: auto; max-height: 560px; }
.bh-mega__panel { display: none; }
.bh-mega__panel--active { display: block; animation: bhFade .15s ease; }
@keyframes bhFade { from { opacity: 0; } to { opacity: 1; } }
.bh-mega__panel-title { margin: 0 0 .75rem; font-size: .875rem; font-weight: 700; color: var(--bh-dark); }
#megaXidmetler .bh-mega__panel-title a { color: var(--bh-dark); display: inline-flex; align-items: center; gap: .4rem; transition: color var(--bh-t); }
#megaXidmetler .bh-mega__panel-title a:hover { color: var(--bh-blue); }
.bh-mega__services { display: flex; flex-direction: column; gap: 1px; }
#megaXidmetler .bh-mega__service {
    display: flex; align-items: center; justify-content: space-between;
    padding: .55rem .75rem; font-size: .8125rem; font-weight: 500;
    color: var(--bh-text); background: transparent;
    border-radius: 6px; transition: all var(--bh-t);
}
#megaXidmetler .bh-mega__service:hover { background: var(--bh-blue-l); color: var(--bh-blue); }
.bh-mega__service i { font-size: .5rem; color: var(--bh-muted); transition: all var(--bh-t); }
#megaXidmetler .bh-mega__service:hover i { color: var(--bh-blue); transform: translateX(2px); }

/* ═══ MEGA: Haqqımızda 50-50 ═══ */
.bh-about { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 1.5rem 0; min-height: 280px; }
.bh-about__links { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; padding-right: 2rem; align-content: start; }
#megaHaqqimizda .bh-about__item {
    display: flex; align-items: center; gap: .85rem;
    padding: 1rem 1.1rem; font-size: .875rem; font-weight: 500;
    color: var(--bh-text); background: var(--bh-bg);
    border-radius: var(--bh-r); transition: all var(--bh-t);
    border: 1px solid var(--bh-border);
}
#megaHaqqimizda .bh-about__item:hover {
    background: var(--bh-blue-l); color: var(--bh-blue);
    border-color: rgba(13,71,161,.15);
}
.bh-about__thumb { width: 36px; height: 36px; border-radius: var(--bh-r); object-fit: cover; flex-shrink: 0; }
.bh-about__icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--bh-blue-l); border-radius: var(--bh-r); color: var(--bh-blue); font-size: .9rem; flex-shrink: 0; }
.bh-about__news { border-left: 1px solid var(--bh-border); padding-left: 2rem; display: flex; flex-direction: column; }
.bh-about__news-title { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--bh-muted); margin-bottom: .75rem; }
#megaHaqqimizda .bh-about__news-item {
    display: flex; flex-direction: column; padding: .65rem 0;
    border-bottom: 1px solid var(--bh-border);
    color: var(--bh-text); background: transparent;
    transition: color var(--bh-t);
}
#megaHaqqimizda .bh-about__news-item:hover { color: var(--bh-blue); }
.bh-about__news-item span { font-size: .8125rem; font-weight: 500; line-height: 1.45; color: inherit; }
.bh-about__news-item small { font-size: .6875rem; color: var(--bh-muted); margin-top: .2rem; }
#megaHaqqimizda .bh-about__news-all {
    display: inline-flex; align-items: center; gap: .4rem;
    margin-top: auto; padding-top: .75rem;
    font-size: .8125rem; font-weight: 600; color: var(--bh-blue);
    transition: gap var(--bh-t);
}
#megaHaqqimizda .bh-about__news-all:hover { gap: .6rem; color: var(--bh-blue); }

/* ═══ DROPDOWN ═══ */
.bh-drop { position: absolute; top: var(--bh-h); background: var(--bh-white); border: 1px solid var(--bh-border); border-radius: 0 0 var(--bh-r) var(--bh-r); box-shadow: 0 8px 24px rgba(0,0,0,.07); min-width: 300px; padding: .4rem; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .2s ease; z-index: 99999; }
.bh-drop--open { opacity: 1; visibility: visible; transform: translateY(0); }
#dropLayiheler .bh-drop__item {
    display: flex; align-items: center; gap: .75rem; padding: .75rem .85rem;
    color: var(--bh-text); background: transparent;
    border-radius: 6px; transition: all var(--bh-t);
}
#dropLayiheler .bh-drop__item:hover { background: var(--bh-blue-l); color: var(--bh-blue); }
.bh-drop__item > i:first-child { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: var(--bh-bg); border-radius: 8px; font-size: .8125rem; color: var(--bh-blue); flex-shrink: 0; }
.bh-drop__item:hover > i:first-child { background: var(--bh-blue-l); }
.bh-drop__item div { flex: 1; }
.bh-drop__item strong { display: block; font-size: .8125rem; font-weight: 600; color: inherit; }
.bh-drop__item span { font-size: .6875rem; color: var(--bh-muted); }
.bh-drop__ext { font-size: .6rem; color: var(--bh-muted); }

/* ═══ SEARCH ═══ */
#bercSearch { position: fixed; inset: 0; z-index: 999999; background: rgba(15,23,42,.85); backdrop-filter: blur(16px); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 15vh; opacity: 0; visibility: hidden; transition: all .3s ease; }
#bercSearch.bh-search--open { opacity: 1; visibility: visible; }
#bercSearch .bh-search__close { position: absolute; top: 2rem; right: 2rem; width: 44px; height: 44px; border: none; background: rgba(255,255,255,.1); border-radius: 50%; cursor: pointer; font-size: 1.25rem; color: rgba(255,255,255,.7); display: flex; align-items: center; justify-content: center; transition: all var(--bh-t); outline: none; }
#bercSearch .bh-search__close:hover { background: rgba(255,255,255,.2); color: #fff; }
.bh-search__center { width: 90%; max-width: 600px; }
#bercSearch .bh-search__field { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.5rem; background: var(--bh-white); border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.2); border: none; }
#bercSearch .bh-search__field i { font-size: 1rem; color: var(--bh-muted); }
#bercSearch .bh-search__field input { flex: 1; border: none; outline: none; box-shadow: none; font-size: 1.0625rem; font-weight: 500; color: var(--bh-dark); background: transparent; font-family: var(--bh-f); }
#bercSearch .bh-search__field input::placeholder { color: #b0b8c4; font-weight: 400; }
#bercSearch .bh-search__field input:focus { border: none; outline: none; box-shadow: none; }
.bh-search__results { max-height: 45vh; overflow-y: auto; background: var(--bh-white); border-radius: 0 0 12px 12px; margin-top: -2px; }
.bh-search__results:empty { display: none; }
.bh-search__results .bh-sr__group { padding: .5rem; }
.bh-search__results .bh-sr__group + .bh-sr__group { border-top: 1px solid var(--bh-border); }
.bh-sr__label { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--bh-muted); padding: .4rem .75rem; }
#bercSearch .bh-sr__item {
    display: flex; align-items: center; justify-content: space-between;
    padding: .55rem .75rem; font-size: .8125rem; font-weight: 500;
    color: var(--bh-text); background: transparent;
    border-radius: 6px; transition: all var(--bh-t);
}
#bercSearch .bh-sr__item:hover { background: var(--bh-blue-l); color: var(--bh-blue); }
.bh-sr__item i { font-size: .65rem; color: var(--bh-muted); }
#bercSearch .bh-sr__item:hover i { color: var(--bh-blue); }
.bh-sr__empty { padding: 1.5rem; text-align: center; font-size: .875rem; color: var(--bh-muted); }
.bh-search__hints { margin-top: 2rem; text-align: center; }
.bh-search__hints-label { font-size: .75rem; font-weight: 500; color: rgba(255,255,255,.45); margin-bottom: .75rem; }
.bh-search__hints-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
#bercSearch .bh-search__tag { padding: .4rem .85rem; font-size: .75rem; font-weight: 500; color: rgba(255,255,255,.7); background: rgba(255,255,255,.1); border-radius: 20px; transition: all var(--bh-t); }
#bercSearch .bh-search__tag:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ═══ MOBILE ═══ */
#bercMobile { position: fixed; inset: 0; z-index: 999999; background: var(--bh-white); transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; overflow: hidden; font-family: var(--bh-f); }
#bercMobile.bh-mob--open { transform: translateX(0); }
#bercMobile .bh-mob__header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid var(--bh-border); flex-shrink: 0; min-height: 60px; background: var(--bh-white); }
#bercMobile .bh-mob__header .bh-logo img { height: 28px; }
#bercMobile .bh-mob__close { width: 38px; height: 38px; border: none; background: var(--bh-bg); border-radius: 50%; cursor: pointer; font-size: 1rem; color: var(--bh-text); display: flex; align-items: center; justify-content: center; outline: none; }
#bercMobile .bh-mob__search { display: flex; align-items: center; gap: .75rem; margin: 1rem 1.5rem; padding: .7rem 1rem; background: var(--bh-bg); border: none; border-radius: var(--bh-r); flex-shrink: 0; }
#bercMobile .bh-mob__search i { color: var(--bh-muted); font-size: .8125rem; }
#bercMobile .bh-mob__search input { flex: 1; border: none; outline: none; box-shadow: none; font-size: .9375rem; color: var(--bh-dark); background: transparent; font-family: var(--bh-f); }
#bercMobile .bh-mob__search input::placeholder { color: var(--bh-muted); }
.bh-mob__search-results { max-height: 0; overflow: hidden; transition: max-height .3s ease; margin: 0 1.5rem; background: var(--bh-white); }
.bh-mob__search-results--open { max-height: 40vh; overflow-y: auto; border-bottom: 1px solid var(--bh-border); margin-bottom: .5rem; }
#bercMobile .bh-mob__levels { flex: 1; position: relative; overflow: hidden; background: var(--bh-white); }
#bercMobile .bh-mob__level { position: absolute; inset: 0; padding: .5rem 1.5rem 2rem; overflow-y: auto; overflow-x: hidden; transform: translateX(100%); opacity: 0; visibility: hidden; transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .2s ease, visibility .3s; display: flex; flex-direction: column; background: var(--bh-white); z-index: 1; }
#bercMobile .bh-mob__level--active { transform: translateX(0); opacity: 1; visibility: visible; z-index: 2; }
#bercMobile .bh-mob__back { display: flex; align-items: center; gap: .5rem; padding: .75rem 0; font-size: .8125rem; font-weight: 600; color: var(--bh-blue); background: none; border: none; cursor: pointer; margin-bottom: .25rem; outline: none; }
.bh-mob__title { font-size: 1.25rem; font-weight: 700; color: var(--bh-dark); margin-bottom: 1rem; }
#bercMobile .bh-mob__link {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: .5rem; padding: .8rem 0; font-size: .9375rem; font-weight: 500;
    color: var(--bh-text); background: transparent;
    border: none; border-bottom: 1px solid var(--bh-border);
    cursor: pointer; width: 100%; min-width: 0; text-align: left; outline: none;
    white-space: normal !important; overflow-wrap: break-word; word-break: break-word;
}
#bercMobile .bh-mob__link span {
    flex: 1; min-width: 0;
    white-space: normal !important;
    overflow-wrap: break-word; word-break: break-word;
    display: block;
}
#bercMobile .bh-mob__link i { color: var(--bh-muted); font-size: .7rem; flex-shrink: 0; margin-top: .25rem; }
#bercMobile .bh-mob__link--cta {
    margin-top: 1rem; justify-content: center;
    background: var(--bh-blue); color: #fff;
    border-radius: var(--bh-r); border: none; border-bottom: none;
    padding: .9rem; font-weight: 600;
}
#bercMobile .bh-mob__link--cta:hover,
#bercMobile .bh-mob__link--cta:focus { background: var(--bh-blue-h); color: #fff; }
#bercMobile .bh-mob__link--view-all { font-size: .8125rem; font-weight: 600; color: var(--bh-blue); margin-bottom: .5rem; }
#bercMobile .bh-mob__footer { padding: 1rem 1.5rem; border-top: 1px solid var(--bh-border); flex-shrink: 0; background: var(--bh-white); }
.bh-mob__lang-row { display: flex; gap: .5rem; }
#bercMobile .bh-mob__lang-item { padding: .4rem .75rem; font-size: .8125rem; font-weight: 500; color: var(--bh-text); border-radius: 6px; transition: all var(--bh-t); }
#bercMobile .bh-mob__lang-item--active { background: var(--bh-blue); color: #fff; font-weight: 600; }

/* ═══ RESPONSIVE ═══ */
@media (max-width:1200px) {
    .bh-nav { display: none; }
    .bh-hamburger { display: flex; }
    .bh-mega, .bh-drop { display: none !important; }
    .bh-wrap { justify-content: space-between; }
}
@media (min-width:1201px) { #bercMobile { display: none !important; } }
@media (max-width:640px) {
    .bh-logo img { height: 26px; }
    :root { --bh-h: 60px; }
}

/* ─── Scrollbar ─── */
.bh-mega__left::-webkit-scrollbar, .bh-mega__right::-webkit-scrollbar, .bh-mob__level::-webkit-scrollbar, .bh-search__results::-webkit-scrollbar { width: 3px; }
.bh-mega__left::-webkit-scrollbar-thumb, .bh-mega__right::-webkit-scrollbar-thumb, .bh-mob__level::-webkit-scrollbar-thumb, .bh-search__results::-webkit-scrollbar-thumb { background: var(--bh-border); border-radius: 3px; }
