/* =====================================================================
   BNAA – mobile UI
   - phones (≤767px): footer replaced by a fixed bottom bar (5 shortcuts)
   - tablets & phones (≤1024px): menu = drawer sliding in from the right
   - language picker = centred modal
   ===================================================================== */

.bnaa-bottom-nav,
.bnaa-drawer-head { display: none; }

/* ---------------- Language modal (all screen sizes) ---------------- */
.bnaa-lang-modal {
    position: fixed; inset: 0; z-index: 10050;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: rgba(10, 12, 15, .55);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    opacity: 0; transition: opacity .2s ease;
}
.bnaa-lang-modal[hidden] { display: none; }
.bnaa-lang-modal.is-open { opacity: 1; }
.bnaa-lang-modal__card {
    position: relative; width: 100%; max-width: 340px;
    background: #fff; color: #1a1a1a; border-radius: 18px;
    padding: 26px 20px 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    transform: translateY(12px) scale(.97); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.bnaa-lang-modal.is-open .bnaa-lang-modal__card { transform: none; }
.bnaa-lang-modal__title {
    margin: 0 0 16px; font: 600 18px/1.3 "Open Sans", Arial, sans-serif;
    text-align: center; letter-spacing: 0; text-transform: none; color: #1a1a1a;
}
.bnaa-lang-modal__close {
    position: absolute; top: 8px; right: 10px; width: 36px; height: 36px;
    border: 0; background: none; font-size: 28px; line-height: 1; color: #777; cursor: pointer;
}
.bnaa-lang-modal__list { display: flex; flex-direction: column; gap: 8px; }
.bnaa-lang-modal__item {
    display: flex; align-items: center; gap: 14px;
    min-height: 52px; padding: 10px 16px; border-radius: 12px;
    border: 1px solid #e6e6e6; color: #1a1a1a; text-decoration: none;
    font: 500 15px/1.2 "Open Sans", Arial, sans-serif;
    transition: background .15s, border-color .15s;
}
.bnaa-lang-modal__item:hover, .bnaa-lang-modal__item:focus { background: #f5f5f5; color: #1a1a1a; text-decoration: none; }
.bnaa-lang-modal__item.is-current { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }
.bnaa-lang-modal__item .fa-check { margin-left: auto; }
.bnaa-lang-modal__code {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(0, 0, 0, .06); font-weight: 700; font-size: 13px; letter-spacing: .04em;
}
.bnaa-lang-modal__item.is-current .bnaa-lang-modal__code { background: rgba(255, 255, 255, .15); }

/* ---------------- Drawer menu (≤1024px) ---------------- */
@media (max-width: 1024px) {
    /* the theme puts a transform on the header wrapper, which would make the
       fixed drawer relative to the header and trap it under other layers */
    .header .header-wrapper { transform: none !important; }
    body.bnaa-drawer-open #nav,
    body.bnaa-drawer-open .header-wrapper { z-index: 10002 !important; }

    /* ---- fixed top bar: logo left, burger right ---- */
    .header#nav { height: 0 !important; min-height: 0 !important; margin: 0 !important; }
    .header .header-wrapper {
        position: fixed !important; top: 0; left: 0; right: 0;
        height: 64px; z-index: 9990;
        -webkit-backface-visibility: hidden; backface-visibility: hidden;
        background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
        transition: background-color .25s ease, box-shadow .25s ease;
    }
    body.bnaa-scrolled .header .header-wrapper {
        background: rgba(29, 31, 34, .96);
        box-shadow: 0 2px 14px rgba(0, 0, 0, .25);
    }
    .header .header-wrapper > .container-m-30 { height: 64px; padding: 0 8px 0 16px; }
    .header .logo-row {
        display: flex !important; align-items: center; justify-content: space-between;
        height: 64px !important;
    }
    .header .logo-container-2, .header .logo-2 {
        float: none !important; position: static !important;
        display: flex; align-items: center; height: 64px; padding: 0 !important; margin: 0 !important;
        visibility: visible !important; opacity: 1 !important;
    }
    .header .logo-2 a { display: block; line-height: 0; }
    .header .logo-2 .logo-img {
        display: block !important; height: 44px !important; width: auto !important; max-width: 170px;
        visibility: visible !important; opacity: 1 !important;
    }
    .header .menu-btn-respons-container {
        position: static !important; float: none !important;
        width: 48px !important; height: 48px !important; margin: 0 !important;
        display: flex; align-items: center; justify-content: center;
        background: none !important; box-shadow: none !important;
    }
    .header .menu-btn-respons-container .btn-navbar,
    .header .menu-btn-respons-container .btn-navbar.collapsed {
        background: none !important; float: none !important; margin: 0 !important;
        padding: 0 !important; width: 48px; height: 48px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        color: #fff; -webkit-tap-highlight-color: transparent;
    }
    .header .menu-btn-respons-container .btn-navbar:active { background: rgba(255, 255, 255, .12) !important; }
    .header .menu-btn-respons-container .hamb-mob-icon { color: #fff !important; font-size: 30px; line-height: 1; }

    /* page-title banners must clear the fixed 64px top bar */
    .page-title-cont { padding-top: 96px !important; padding-bottom: 40px !important; }

    #main-menu #bnaa-drawer.navbar-collapse {
        display: block !important;
        position: fixed; top: 0; right: 0; bottom: 0;
        width: min(340px, 86vw); height: 100% !important; max-height: none !important;
        margin: 0; padding: 0 0 calc(24px + env(safe-area-inset-bottom));
        overflow-y: auto; -webkit-overflow-scrolling: touch;
        background: #1d1f22; border: 0;
        z-index: 10001;
        transform: translateX(100%); visibility: hidden;
        transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s;
        box-shadow: -12px 0 40px rgba(0, 0, 0, .35);
    }
    #main-menu #bnaa-drawer.navbar-collapse.in {
        transform: none; visibility: visible;
        transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s;
    }
    #bnaa-drawer .navbar-nav { margin: 0; float: none; }
    #bnaa-drawer .navbar-nav > li { float: none; }

    .bnaa-drawer-head {
        display: flex; align-items: center; justify-content: space-between;
        position: sticky; top: 0; z-index: 1;
        padding: 14px 14px 14px 18px; background: #1d1f22;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
    }
    .bnaa-drawer-lang {
        display: inline-flex; align-items: center; gap: 8px;
        height: 40px; padding: 0 16px; border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, .25); background: none; color: #fff;
        font: 600 13px/1 "Open Sans", Arial, sans-serif; letter-spacing: .06em; cursor: pointer;
    }
    .bnaa-drawer-close {
        width: 44px; height: 44px; border: 0; border-radius: 50%;
        background: rgba(255, 255, 255, .08); color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
    }
    /* the language entry lives in the drawer header / modal on mobile */
    #bnaa-drawer .bnaa-lang-item { display: none !important; }

    .bnaa-drawer-backdrop {
        position: fixed; inset: 0; z-index: 10000;
        background: rgba(0, 0, 0, .5);
        opacity: 0; transition: opacity .3s ease;
    }
    .bnaa-drawer-backdrop[hidden] { display: none; }
    body.bnaa-drawer-open .bnaa-drawer-backdrop { opacity: 1; }
    body.bnaa-drawer-open { overflow: hidden; }
}

/* ---------------- Bottom bar (phones ≤767px) ---------------- */
@media (max-width: 767px) {
    .bnaa-desktop-footer { display: none !important; }
    body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

    /* items that are in the bottom bar are not repeated in the drawer */
    #bnaa-drawer .bnaa-in-bottom-bar { display: none !important; }

    .bnaa-bottom-nav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
        height: calc(64px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: #1a1a1a; border-top: 1px solid rgba(255, 255, 255, .08);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, .25);
        /* own compositor layer: stays perfectly still while the page scrolls
           (iOS/Android momentum scrolling, toolbar show/hide) */
        transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0);
        will-change: transform; -webkit-backface-visibility: hidden; backface-visibility: hidden;
    }
    .bnaa-bottom-nav__item {
        flex: 1 1 0; min-width: 0;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
        position: relative;
        padding: 6px 2px; color: #fff; text-decoration: none; text-align: center;
        font: 600 10.5px/1.15 "Open Sans", Arial, sans-serif; letter-spacing: .02em;
        transition: color .15s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .bnaa-bottom-nav__item i { font-size: 20px; line-height: 1; }
    .bnaa-bottom-nav__item span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .bnaa-bottom-nav__item:hover, .bnaa-bottom-nav__item:focus { color: #fff; text-decoration: none; }
    /* only the page you are on is highlighted */
    .bnaa-bottom-nav__item.is-active, .bnaa-bottom-nav__item.is-active:hover,
    .bnaa-bottom-nav__item.is-active:focus { color: #ff4d4d; }
    .bnaa-bottom-nav__item.is-active::before {
        content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
        width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: #ff4d4d;
    }
    .bnaa-bottom-nav__item:focus-visible { outline: 2px solid #4ca0ff; outline-offset: -4px; }

    /* reports accordion: use the full width */
    #report-container, #report-container .accordion, #report-container .accordion > div, #report-container dl.toggle {
        width: 100% !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important;
    }

    /* statistics counters: 8-digit sums must fit two per row */
    .count-number { font-size: clamp(24px, 8vw, 40px) !important; line-height: 1.15 !important; white-space: nowrap; }

    .cookie-banner { bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
}

/* ---------------- Contact form: captcha + disabled send button ---------------- */
.bnaa-captcha { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.bnaa-captcha__label { margin: 0; font-weight: 600; color: #4b4e53; text-transform: none; letter-spacing: 0; }
.bnaa-captcha__task {
    display: inline-block; padding: 4px 12px; margin: 0 2px; border-radius: 6px;
    background: #f1f1f1; color: #1a1a1a; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
}
.bnaa-captcha .bnaa-captcha__input { width: 80px !important; text-align: center; font-weight: 600; }
.bnaa-captcha__input.is-valid { border-color: #2e9d55 !important; }
.bnaa-captcha__input.is-invalid { border-color: #d9363e !important; }
.bnaa-captcha__hint { flex-basis: 100%; color: #d9363e; font-size: 13px; }
.bnaa-captcha__hint[hidden] { display: none; }
.js-contact-form .bnaa-submit[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
