/* TakinAmooz: course-first, compact one-row desktop masthead.
   Keep the existing brand nav, real routes and unified drawer implementation. */
body[data-tna-academy-shell] {
    --amz-shell-bg: #0e192a;
    --amz-shell-paper: #14243c;
    --amz-shell-text: #eff5ff;
    --amz-shell-muted: #abbcd4;
    --amz-shell-accent: #a5c7ff;
    --amz-shell-line: rgba(154, 185, 231, .22);
}
html[data-tna-theme="light"] body[data-tna-academy-shell] {
    --amz-shell-bg: #f5f8fe;
    --amz-shell-paper: #fff;
    --amz-shell-text: #182d4b;
    --amz-shell-muted: #516580;
    --amz-shell-accent: #2456a6;
    --amz-shell-line: rgba(49, 83, 131, .2);
}
body[data-tna-academy-shell] .tna-site-header.is-brand-header {
    position: sticky !important;
    inset-block-start: 0 !important;
    margin-block-start: 0 !important;
    padding-block: max(8px, env(safe-area-inset-top)) 8px;
    background: transparent !important;
}
body[data-tna-academy-shell] .tna-site-header.is-brand-header::before { display: none; }
body[data-tna-academy-shell] .tna-site-header .tna-site-nav {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(8px, 1.35vw, 22px);
    min-height: 76px;
    padding: 9px clamp(12px, 1.3vw, 20px);
    border: 1px solid var(--amz-shell-line) !important;
    border-radius: 20px !important;
    background: color-mix(in srgb, var(--amz-shell-paper) 95%, transparent) !important;
    box-shadow: 0 15px 42px rgba(3, 16, 36, .14) !important;
    color: var(--amz-shell-text);
    direction: inherit !important;
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    transition: min-height .25s ease, box-shadow .25s ease, border-color .25s ease;
}
body[data-tna-academy-shell] .tna-site-header.is-scrolled .tna-site-nav {
    min-height: 68px;
    border-color: color-mix(in srgb, var(--amz-shell-accent) 45%, var(--amz-shell-line)) !important;
    box-shadow: 0 9px 27px rgba(3, 16, 36, .21) !important;
}
body[data-tna-academy-shell] .tna-site-brand { grid-area: auto; min-width: 0; padding: 0; gap: 10px; text-decoration: none; }
body[data-tna-academy-shell] .tna-site-brand__mark { width: 48px; height: 48px; flex-basis: 48px; border-radius: 13px; border: 1px solid var(--amz-shell-line); box-shadow: none; background: color-mix(in srgb, var(--amz-shell-accent) 9%, var(--amz-shell-paper)); }
body[data-tna-academy-shell] .tna-site-brand__copy strong { font-size: 1.02rem; color: var(--amz-shell-text); }
body[data-tna-academy-shell] .tna-site-brand__copy small { font-size: .72rem; color: var(--amz-shell-muted); }
body[data-tna-academy-shell] .tna-site-brand__context { display: none !important; }
body[data-tna-academy-shell] .tna-site-actions { grid-area: auto; padding: 0; }
body[data-tna-academy-shell] .tna-site-actions .tna-site-icon-button { border: 1px solid var(--amz-shell-line); border-radius: 12px; box-shadow: none; color: var(--amz-shell-text); background: transparent; }
body[data-tna-academy-shell] .tna-site-primary-action { background: #2b64bc !important; color: #fff !important; border-radius: 12px !important; box-shadow: 0 8px 18px rgba(43, 100, 188, .18) !important; }
body[data-tna-academy-shell] .tna-site-desktop-nav {
    grid-area: auto;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
    gap: clamp(2px, .4vw, 7px);
    padding: 0;
    border: 0;
}
body[data-tna-academy-shell] .tna-site-desktop-nav > a {
    min-height: 42px;
    white-space: nowrap;
    border: 1px solid transparent !important;
    border-radius: 11px !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--amz-shell-muted);
    padding: 9px clamp(6px, .65vw, 11px) !important;
    font-size: clamp(.74rem, .79vw, .88rem);
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}
body[data-tna-academy-shell] .tna-site-desktop-nav > a:hover,
body[data-tna-academy-shell] .tna-site-desktop-nav > a:focus-visible {
    color: var(--amz-shell-text);
    background: color-mix(in srgb, var(--amz-shell-accent) 13%, transparent) !important;
    transform: translateY(-1px);
}
body[data-tna-academy-shell] .tna-site-desktop-nav > a[aria-current="page"] {
    color: var(--amz-shell-text);
    border-color: color-mix(in srgb, var(--amz-shell-accent) 24%, transparent) !important;
    background: color-mix(in srgb, var(--amz-shell-accent) 17%, transparent) !important;
    box-shadow: none !important;
}
body[data-tna-academy-shell] .tna-site-desktop-nav > a::before { display: none; }
body[data-tna-academy-shell] .amz-footer {
    margin-block-start: 40px;
    padding-block: clamp(42px, 6vw, 80px) 24px;
    border-block-start: 1px solid var(--amz-shell-line);
    background: var(--amz-shell-bg) !important;
    color: var(--amz-shell-text);
}
.amz-footer__invitation { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block-end: 42px; margin-block-end: 42px; border-block-end: 1px solid var(--amz-shell-line); }
.amz-footer__invitation > div > span { color: var(--amz-shell-accent); font-size: .75rem; letter-spacing: .04em; }
.amz-footer__invitation h2 { max-width: 22ch; font-size: clamp(1.7rem, 3vw, 2.8rem); line-height: 1.7; margin: 14px 0 0; }
.amz-footer__invitation > a { display: inline-flex; gap: 24px; align-items: center; min-height: 50px; padding: 12px 22px; border-radius: 10px; background: #2b64bc; color: #fff; font-size: .85rem; text-decoration: none; }
.amz-footer__columns { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 44px; }
.amz-footer__about > strong { font-size: 1.8rem; }
.amz-footer__about p { max-width: 38ch; color: var(--amz-shell-muted); line-height: 2; font-size: .88rem; }
.amz-footer__about > a { color: var(--amz-shell-accent); font-size: .85rem; }
.amz-footer__columns nav { display: flex; flex-direction: column; align-items: start; gap: 8px; }
.amz-footer__columns nav > strong { color: var(--amz-shell-text); margin-block-end: 12px; font-size: 1rem; }
.amz-footer__columns nav > a, .amz-footer__ecosystem > a { min-height: 44px; display: inline-flex; align-items: center; color: var(--amz-shell-muted); font-size: .85rem; text-decoration: none; }
.amz-footer a:hover { text-decoration: underline; text-underline-offset: 6px; }
.amz-footer a:focus-visible { outline: 2px solid var(--amz-shell-accent); outline-offset: 5px; }
.amz-footer__ecosystem { display: flex; gap: 4px 24px; align-items: center; flex-wrap: wrap; border-block: 1px solid var(--amz-shell-line); margin-block: 32px 22px; padding-block: 18px; }
.amz-footer__ecosystem > strong { font-size: .78rem; color: var(--amz-shell-accent); }
.amz-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 22px; color: var(--amz-shell-muted); font-size: .7rem; line-height: 1.8; }
/* The shared hamburger takes over below 1440px, not 1200px.
   Match the canonical nav breakpoint to avoid an orphaned desktop grid. */
@media (max-width: 1439px) {
    body[data-tna-academy-shell] .tna-site-header .tna-site-nav {
        display: flex !important;
        flex-direction: row !important;
        min-height: 70px !important;
        justify-content: space-between;
        gap: 12px !important;
        padding: 8px 12px !important;
        direction: inherit !important;
    }
    body[data-tna-academy-shell] .tna-site-brand { padding: 0; margin-inline-end: auto; }
    body[data-tna-academy-shell] .tna-site-menu-button {
        width: 46px !important;
        height: 46px !important;
        flex: none;
        min-width: 46px !important;
        min-height: 46px !important;
        border-radius: 12px !important;
        border-color: var(--amz-shell-line) !important;
        background: transparent !important;
        color: var(--amz-shell-text) !important;
    }
    /* Academy retains its independent header colors and spacing; the shared
       theme/language toggles must stay accessible before opening the drawer. */
    body[data-tna-academy-shell] .tna-site-desktop-nav { display: none !important; }
    body[data-tna-academy-shell] .tna-site-drawer.tcr-drawer {
        --tcr-shell-panel: var(--amz-shell-paper);
        --tcr-shell-text: var(--amz-shell-text);
        --tcr-shell-muted: var(--amz-shell-muted);
        --tcr-shell-gold: var(--amz-shell-accent);
        --tcr-shell-line: var(--amz-shell-line);
        border-radius: 0 !important;
        background: var(--amz-shell-paper) !important;
    }
    body[data-tna-academy-shell] .tcr-drawer__nav > a { color: var(--amz-shell-text) !important; }
    body[data-tna-academy-shell] .tcr-drawer__quick a { color: var(--amz-shell-accent) !important; }
}
@media (max-width: 700px) {
    .amz-footer__invitation { align-items: start; flex-direction: column; }
    .amz-footer__columns { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
    .amz-footer__about { grid-column: 1 / -1; }
    .amz-footer__ecosystem { gap: 4px 20px; }
    .amz-footer__ecosystem > strong { width: 100%; }
    .amz-footer__bottom { flex-direction: column; }
}

/* Footer: editorial hierarchy, softer color, visible navigational affordance. */
.amz-footer__invitation {
    padding: clamp(22px, 3vw, 36px);
    border: 1px solid var(--amz-shell-line);
    border-radius: 22px;
    background: linear-gradient(115deg, color-mix(in srgb, var(--amz-shell-accent) 12%, transparent), transparent 72%);
}
.amz-footer__invitation > a { border-radius: 12px; transition: transform .2s ease, box-shadow .2s ease; }
.amz-footer__invitation > a:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(43, 100, 188, .19); }
.amz-footer__columns { gap: clamp(24px, 3.6vw, 50px); }
.amz-footer__columns nav > a,
.amz-footer__ecosystem > a { border-radius: 8px; transition: color .18s ease, transform .18s ease; }
.amz-footer__columns nav > a:hover,
.amz-footer__ecosystem > a:hover { color: var(--amz-shell-text); transform: translateX(0); }
.amz-footer__bottom { padding-block-start: 20px; border-block-start: 1px solid var(--amz-shell-line); }
@media (max-width: 700px) {
    body[data-tna-academy-shell] .tna-site-nav { border-radius: 16px !important; }
    .amz-footer__invitation { padding: 22px 18px; }
    .amz-footer__columns { gap: 28px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    body[data-tna-academy-shell] .tna-site-nav,
    body[data-tna-academy-shell] .tna-site-desktop-nav > a,
    .amz-footer__invitation > a,
    .amz-footer__columns nav > a,
    .amz-footer__ecosystem > a { transition: none !important; transform: none !important; }
}

/* Give the full academy navigation its own desktop measure. Icon labels remain
   available through aria-label/title; the redundant language abbreviation is hidden. */
@media (min-width: 1440px) {
    body[data-tna-academy-shell] .tna-site-header > .tna-container { width: min(1440px, calc(100% - 40px)); max-width: none; }
    body[data-tna-academy-shell] .tna-site-desktop-nav { width: 100%; max-width: 100%; margin-inline: 0; justify-self: stretch; }
    body[data-tna-academy-shell] .tna-site-actions [data-tna-theme-label],
    body[data-tna-academy-shell] .tna-site-actions .tna-site-language strong { display: none; }
}
