/* ==========================================================================
   Anokey university theme (theme B)
   Phase 1: site-wide header. Everything is prefixed .ak- so nothing here
   can restyle the rest of the site by accident.
   ========================================================================== */

:root {
    --ak-navy: #171347;
    --ak-deep: #0b1430;
    --ak-orange: #F26522;
    --ak-orange-dark: #C2410C;
    --ak-ink: #1c2033;
    --ak-muted: #5b6175;
    --ak-soft: #f4f5fa;
    --ak-topbar-h: 40px;
    --ak-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.ak-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
    width: 100%;
}

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* -------------------------------------------------- header frame */

.ak-header {
    font-family: var(--ak-font);
    z-index: 1000;
}

.ak-header.is-solid {
    position: sticky;
    /* the top bar scrolls away; the main bar stays */
    top: calc(var(--ak-topbar-h) * -1);
}

.ak-header.is-solid.no-topbar {
    top: 0;
}

.ak-header.is-overlay {
    position: absolute;
    top: 0; left: 0; right: 0;
}

.ak-header a { text-decoration: none; }

/* -------------------------------------------------- top bar */

.ak-topbar {
    background: var(--ak-deep);
    color: #d6daea;
    font-size: 13px;
    min-height: var(--ak-topbar-h);
    display: flex;
    align-items: center;
}

.ak-header.is-overlay .ak-topbar { background: rgba(11, 20, 48, .55); }

.ak-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ak-topbar__contact,
.ak-topbar__links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ak-topbar a {
    color: #d6daea;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .2s ease;
}

.ak-topbar a:hover { color: #ffffff; }
.ak-topbar a.is-accent { color: var(--ak-orange); font-weight: 700; }
.ak-topbar a.is-accent:hover { color: #ffb38c; }

.ak-topbar__switchers {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* the theme's currency / language widgets, recoloured for the dark bar */
.ak-topbar .custom-dropdown-toggle,
.ak-topbar .js-lang-title { color: #d6daea !important; font-size: 13px !important; }
.ak-topbar .custom-dropdown { padding: 6px 0; }
/* open leftwards so the list never pushes past the right edge on phones */
.ak-topbar .custom-dropdown .custom-dropdown-body { top: 100%; left: auto; right: 0; z-index: 1200; }
.ak-topbar .language-select { color: #d6daea; }
.ak-topbar .language-select > div > .btn { color: #d6daea !important; background: transparent !important; border: 0 !important; box-shadow: none !important; font-size: 13px; padding: 4px 0; }
.ak-topbar .language-select > div > .btn:hover { color: #ffffff !important; }
.ak-topbar .language-select .dropdown-menu { z-index: 1200; }

/* -------------------------------------------------- main bar */

.ak-mainbar {
    position: relative;
    background: var(--ak-navy);
    transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}

.ak-header.is-scrolled .ak-mainbar { box-shadow: 0 10px 30px rgba(11, 20, 48, .25); }

.ak-header.is-overlay .ak-mainbar { background: transparent; }

.ak-header.is-overlay.is-fixed .ak-mainbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--ak-navy);
    box-shadow: 0 10px 30px rgba(11, 20, 48, .25);
    /* no fill-mode: a held transform would make this bar the containing
       block of the fixed phone drawer and the cart/bell drop-downs */
    animation: akSlideDown .35s ease;
}

@keyframes akSlideDown {
    from { transform: translateY(-100%); }
    to { transform: none; }
}

.ak-mainbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 82px;
}

.ak-header.is-scrolled .ak-mainbar__inner { min-height: 70px; }

/* brand */
.ak-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.ak-brand img {
    height: 46px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: transform .4s ease, height .3s ease;
}

.ak-header.is-scrolled .ak-brand img { height: 40px; }
.ak-brand:hover img { transform: translateY(-2px) rotate(-2deg); }

/* White plate for a dark-coloured logo (crest style): it hangs a little
   below the navy bar, and tucks back inside the bar once you scroll. */
.ak-brand.has-plate {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    background: #ffffff;
    padding: 10px 18px;
    margin-bottom: -26px;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 12px 28px rgba(11, 20, 48, .28);
    transition: margin .3s ease, padding .3s ease, border-radius .3s ease;
}

.ak-brand.has-plate img { height: 88px; max-width: 150px; }
.ak-brand.has-plate:hover img { transform: none; }
.ak-brand.has-plate .ak-brand__name { color: var(--ak-navy); }

.ak-header.is-scrolled .ak-brand.has-plate,
.ak-header.is-overlay.is-fixed .ak-brand.has-plate {
    align-self: center;
    margin-bottom: 0;
    padding: 4px 10px;
    border-radius: 12px;
}

.ak-header.is-scrolled .ak-brand.has-plate img,
.ak-header.is-overlay.is-fixed .ak-brand.has-plate img { height: 54px; }

.ak-brand__name {
    font-weight: 800;
    font-size: 22px;
    color: #ffffff;
    letter-spacing: .3px;
}

/* -------------------------------------------------- menu */

.ak-nav { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
.ak-nav__head, .ak-nav__mobile { display: none; }

.ak-menu {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 6px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 28px;
}

.ak-menu__item { position: relative; }

.ak-menu__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background .25s ease, color .25s ease;
}

/* sliding orange underline */
.ak-menu__link::after {
    content: "";
    position: absolute;
    left: 16px; right: 16px; bottom: 5px;
    height: 2px;
    background: var(--ak-orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.ak-menu__link:hover::after,
.ak-menu__link:focus-visible::after { transform: scaleX(1); }

.ak-menu__link.is-current {
    background: #ffffff;
    color: var(--ak-navy) !important;
}

.ak-menu__link.is-current::after { display: none; }

.ak-caret { transition: transform .25s ease; }
.has-dropdown.is-open .ak-caret { transform: rotate(180deg); }

/* categories dropdown */
.ak-mega {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    min-width: 290px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 50px rgba(11, 20, 48, .22);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
    z-index: 30;
}

/* invisible bridge so the menu does not close crossing the gap */
.ak-mega::before {
    content: "";
    position: absolute;
    top: -16px; left: 0; right: 0;
    height: 16px;
}

.has-dropdown:hover > .ak-mega,
.has-dropdown.is-open > .ak-mega {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.ak-mega__list,
.ak-mega__subs { list-style: none; margin: 0; padding: 0; }

.ak-mega__item { position: relative; }

.ak-mega__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--ak-ink) !important;
    font-weight: 600;
    font-size: 15px;
    transition: background .2s ease, color .2s ease;
}

.ak-mega__link:hover,
.ak-mega__item:hover > .ak-mega__link {
    background: var(--ak-soft);
    color: var(--ak-orange-dark) !important;
}

.ak-mega__icon { width: 26px; height: 26px; object-fit: contain; }
.ak-mega__chev { margin-left: auto; opacity: .55; }

.ak-mega__subs {
    position: absolute;
    top: -10px;
    left: calc(100% + 10px);
    min-width: 230px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 50px rgba(11, 20, 48, .22);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.ak-mega__subs::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: -12px;
    width: 12px;
}

.ak-mega__item:hover > .ak-mega__subs {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.ak-mega__subs a {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--ak-ink) !important;
    font-size: 14px;
    font-weight: 500;
}

.ak-mega__subs a:hover { background: var(--ak-soft); color: var(--ak-orange-dark) !important; }

/* -------------------------------------------------- actions */

.ak-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.ak-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    background: transparent;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease, transform .25s ease;
}

.ak-icon-btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); transform: translateY(-1px); }

/* the theme's cart + bell, inside a .top-navbar wrapper for their dropdown styles */
.ak-header .ak-widgets.top-navbar {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 2px;
}

.ak-widgets .btn-transparent {
    color: #ffffff !important;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .25s ease;
}

.ak-widgets .btn-transparent:hover { background: rgba(255, 255, 255, .1); }
.ak-widgets .btn-transparent:disabled { opacity: .6; }
.ak-widgets .btn-transparent svg { stroke: currentColor; margin: 0 !important; }
.ak-widgets .dropdown-menu { color: var(--ak-ink); font-family: inherit; }

/* logged-in user menu */
.ak-user { margin-right: 6px; }
.ak-user .navbar-auth-user-dropdown { margin-left: 4px !important; padding-bottom: 8px; margin-bottom: -8px; }
.ak-user .navbar-user .user-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-user .navbar-user .user-name,
.ak-user .navbar-user span { color: #ffffff !important; }
.ak-user .navbar-user img { border: 2px solid rgba(255, 255, 255, .5); border-radius: 50%; width: 40px; height: 40px; object-fit: cover; }
.ak-user .custom-dropdown-body { top: calc(100% + 2px) !important; }
.ak-user .custom-dropdown-body a,
.ak-user .custom-dropdown-body span { color: var(--ak-ink); }

/* pill buttons */
.ak-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--ak-font);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.ak-pill--ghost { border-color: rgba(255, 255, 255, .55); color: #ffffff !important; background: transparent; }
.ak-pill--ghost:hover { background: #ffffff; color: var(--ak-navy) !important; }
.ak-pill--accent { background: var(--ak-orange); color: var(--ak-navy) !important; }
.ak-pill--accent:hover { background: #ff7a3a; transform: translateY(-1px); }

.ak-pulse { animation: akPulse 2.4s infinite; }

@keyframes akPulse {
    0% { box-shadow: 0 0 0 0 rgba(242, 101, 34, .55); }
    70% { box-shadow: 0 0 0 14px rgba(242, 101, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(242, 101, 34, 0); }
}

.ak-burger { display: none; }

/* -------------------------------------------------- search bar */

.ak-searchbar {
    background: #10155a;
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 14px 0;
    animation: akDrop .25s ease both;
}

.ak-searchbar[hidden] { display: none; }

@keyframes akDrop {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}

.ak-search {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ak-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: #ffffff;
    color: var(--ak-ink);
    font-family: var(--ak-font);
    font-size: 16px;
}

.ak-search input:focus { outline: 3px solid rgba(242, 101, 34, .5); outline-offset: 1px; }

.ak-search--inline input { height: 46px; }

.ak-search--inline button {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    border: 0;
    background: var(--ak-orange);
    color: var(--ak-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* -------------------------------------------------- scroll progress */

.ak-progress {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    pointer-events: none;
}

.ak-progress span {
    display: block;
    height: 3px;
    background: var(--ak-orange);
    transform: scaleX(0);
    transform-origin: left;
}

/* -------------------------------------------------- phone & tablet */

.ak-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 20, 48, .6);
    z-index: 1090;
    opacity: 0;
    transition: opacity .3s ease;
}

.ak-backdrop.is-visible { opacity: 1; }
.ak-backdrop[hidden] { display: none; }

body.ak-lock { overflow: hidden; }

/* the drawer lives inside the header, so the header must sit above the backdrop */
body.ak-lock .ak-header { z-index: 1095; }

@media (max-width: 1365px) {
    .ak-menu__link { padding: 10px 12px; font-size: 14px; }
}

@media (max-width: 1199px) {
    .ak-burger { display: inline-flex; }
    .ak-desktop-only { display: none !important; }
    .ak-topbar__links > a { display: none; }
    .ak-mainbar__inner { min-height: 70px; }
    .ak-brand img { height: 40px; }
    .ak-brand.has-plate { padding: 6px 12px; margin-bottom: -18px; border-radius: 0 0 14px 14px; }
    .ak-brand.has-plate img { height: 66px; max-width: 120px; }
    .ak-header.is-scrolled .ak-brand.has-plate img,
    .ak-header.is-overlay.is-fixed .ak-brand.has-plate img { height: 48px; }

    .ak-nav {
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: min(360px, 88vw);
        background: var(--ak-navy);
        transform: translateX(100%);
        transition: transform .35s cubic-bezier(.2, .8, .2, 1);
        z-index: 1100;
        overflow-y: auto;
        padding: 18px 18px 32px;
        box-sizing: border-box;
        display: block;
        visibility: hidden;
    }

    .ak-nav.is-open { transform: none; visibility: visible; }

    .ak-nav__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 14px;
    }

    .ak-nav__title { color: #ffffff; font-weight: 800; font-size: 18px; }

    .ak-menu {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        background: none;
        border: 0;
        border-radius: 0;
        padding: 0;
        gap: 4px;
    }

    .ak-menu__link {
        width: 100%;
        justify-content: space-between;
        padding: 14px 16px;
        border-radius: 14px;
        font-size: 16px;
    }

    .ak-menu__link::after { display: none; }
    .ak-menu__link:hover { background: rgba(255, 255, 255, .08); }

    /* categories open as an accordion inside the drawer */
    .ak-mega {
        position: static;
        min-width: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, .06);
        border-radius: 14px;
        margin-top: 4px;
        display: none;
    }

    .ak-mega::before { display: none; }
    .has-dropdown:hover > .ak-mega { display: none; }
    .has-dropdown.is-open > .ak-mega { display: block; }

    .ak-mega__link { color: #ffffff !important; }
    .ak-mega__link:hover, .ak-mega__item:hover > .ak-mega__link { background: rgba(255, 255, 255, .08); color: #ffffff !important; }
    .ak-mega__chev { display: none; }

    .ak-mega__subs {
        position: static;
        min-width: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: none;
        padding: 0 0 6px 36px;
    }

    .ak-mega__subs::before { display: none; }
    .ak-mega__subs a { color: #c3c7e6 !important; padding: 7px 10px; }
    .ak-mega__subs a:hover { background: none; color: #ffffff !important; }

    .ak-nav__mobile {
        display: flex;
        flex-direction: column;
        gap: 14px;
        margin-top: 22px;
        padding-top: 22px;
        border-top: 1px solid rgba(255, 255, 255, .12);
    }

    .ak-nav__auth { display: flex; gap: 10px; }
    .ak-nav__auth .ak-pill { flex: 1 1 0; }
    .ak-nav__extra { color: #c3c7e6 !important; font-weight: 600; padding: 4px 2px; }
    .ak-nav__extra:hover { color: #ffffff !important; }
}

@media (max-width: 767px) {
    .ak-topbar__contact { display: none; }
    .ak-topbar__inner { justify-content: flex-end; }
    .ak-container { padding: 0 16px; }
    .ak-actions { gap: 4px; }
    .ak-user .navbar-user .user-name { display: none; }
}

/* -------------------------------------------------- footer (phase 2)
   Same content as before (newsletter, the four admin columns, logo,
   socials) - only the colours and shapes change. */

.footer.bg-secondary {
    background: var(--ak-deep) !important;
    border-radius: 32px 32px 0 0;
    color: #c3c8e2;
    font-family: var(--ak-font);
}

.footer .footer-subscribe {
    background: var(--ak-orange) none !important;
    border-radius: 24px;
    height: auto;
    padding: 32px 40px;
    box-shadow: 0 20px 40px rgba(11, 20, 48, .25);
}

.footer .footer-subscribe strong { color: var(--ak-navy); font-size: 26px; font-weight: 800; }
.footer .footer-subscribe .text-white { color: #2a1608 !important; }
.footer .footer-subscribe .subscribe-input { border-radius: 999px; }
.footer .footer-subscribe .btn-primary { background: var(--ak-navy) !important; border-color: var(--ak-navy) !important; color: #ffffff !important; font-weight: 800; }
.footer .footer-subscribe .btn-primary:hover { background: #241e6b !important; }

.footer.bg-secondary .header { color: #ffffff !important; font-weight: 800 !important; }
.footer.bg-secondary a,
.footer.bg-secondary ul li a { color: #c3c8e2 !important; transition: color .2s ease; }
.footer.bg-secondary a:hover,
.footer.bg-secondary ul li a:hover { color: var(--ak-orange) !important; }
.footer.bg-secondary .border-blue { border-top-color: #222c55; }
.footer .footer-social a { display: inline-block; transition: transform .25s ease; }

/* the logo on the dark footer sits on the same white plate */
.footer .footer-logo.ak-footer-plate { width: auto; height: auto; }
.footer .footer-logo.ak-footer-plate a { display: inline-block; background: #ffffff; padding: 8px 14px; border-radius: 14px; }
.footer .footer-logo.ak-footer-plate img { height: 64px; width: auto; max-width: 180px; object-fit: contain; }
.footer .footer-social a:hover { transform: translateY(-3px); }

@media (max-width: 767px) {
    .footer .footer-subscribe { padding: 24px; }
    .footer .footer-subscribe strong { font-size: 22px; }
}

/* -------------------------------------------------- right-to-left */

.rtl .ak-topbar .custom-dropdown .custom-dropdown-body { right: auto; left: 0; }
.rtl .ak-mega { left: auto; right: 0; }
.rtl .ak-mega__subs { left: auto; right: calc(100% + 10px); }
.rtl .ak-mega__subs::before { left: auto; right: -12px; }
.rtl .ak-mega__chev { margin-left: 0; margin-right: auto; transform: scaleX(-1); }
.rtl .ak-menu__link::after { transform-origin: right; }

@media (max-width: 1199px) {
    .rtl .ak-nav { right: auto; left: 0; transform: translateX(-100%); }
    .rtl .ak-nav.is-open { transform: none; }
    .rtl .ak-mega__subs { padding: 0 36px 6px 0; }
}

/* -------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
    .ak-header *,
    .ak-header *::before,
    .ak-header *::after {
        animation: none !important;
        transition: none !important;
    }
}
