/**
 * taoCustom — IHS Schools CBT Theme
 *
 * Scope: HEADER and NAVIGATION only.
 * No styles here should affect the page body, typography, forms, tables,
 * buttons, cards, sidebar, or any other application content area.
 * The body of the application is left entirely unchanged.
 *
 * Colour palette derived from the IHS Schools CBT badge / logo identity:
 *   Primary   #1a3a6b  (Deep navy — dominant logo fill)
 *   Accent    #c8922a  (Gold — logo highlights / CTAs)
 */

/* ============================================
   Design Tokens (header/nav scope only)
   ============================================ */

:root {
    /* Primary brand — deep navy */
    --color-primary:         #1a3a6b;
    --color-primary-dark:    #122754;
    --color-primary-light:   #2e5499;

    /* Accent — gold */
    --color-accent:          #c8922a;
    --color-accent-dark:     #a67420;

    /* Text */
    --color-text-light:      #ffffff;

    /* Top-bar typography */
    --topbar-brand-font-size: 18px;
    --topbar-nav-font-size:   15px;

    /* Transitions (header-only usage) */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
}

/* ============================================
   IHS Schools CBT Header / Dark Bar
   IHS Schools CBT renders: <header class="dark-bar clearfix">
   with background:#333 in tao-3.css (loaded AFTER our sheet).
   We must use !important on .dark-bar to win the cascade.
   ============================================ */

/* Override the default dark (#333) header background.
   tao-3.css sets max-height:65px on .dark-bar — we remove that constraint
   so content defines the height. The gold box-shadow provides the accent
   underline without consuming any layout height. */
.dark-bar {
    background: var(--color-primary) !important;
    background-color: var(--color-primary) !important;
    max-height: none !important;
    box-shadow: 0 3px 0 0 var(--color-accent), 0 4px 8px rgba(26,58,107,0.12) !important;
    color: var(--color-text-light) !important;
}

/* All links inside the dark-bar (nav items, brand anchor) */
.dark-bar a {
    color: var(--color-text-light) !important;
}

/* Top-bar navigation typography */
.dark-bar .nav li > a,
.dark-bar nav li > a {
    font-size: var(--topbar-nav-font-size) !important;
}

.dark-bar a:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Active nav item highlight */
.dark-bar .nav li.active > a,
.dark-bar nav li.active > a {
    background-color: var(--color-accent) !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Hover state on nav items */
.dark-bar .nav li > a:hover,
.dark-bar nav li > a:hover {
    background-color: var(--color-primary-light) !important;
}

/* Footer shares .dark-bar — keep it branded too */
footer.dark-bar {
    background: var(--color-primary-dark) !important;
    background-color: var(--color-primary-dark) !important;
    border-top: 2px solid var(--color-accent) !important;
}

/* ============================================
   IHSO Logo
   Rendered server-side by header-logo.tpl into the TAO ThemeService
   'header-logo' slot.
   TAO outputs:
     <a href="/" class="lft ihso-logo-wrap">
       <img id="tao-main-logo" src="logo.png"/>
       <span class="ihso-brand-name">IHS Schools CBT</span>
     </a>
   ============================================ */

/* Stretch the brand anchor to the full header height and flex-centre */
.dark-bar a.lft.ihso-logo-wrap,
a.lft.ihso-logo-wrap {
    display: inline-flex !important;
    align-items: center !important;
    height: auto !important;
    padding: 6px 20px 6px 12px !important;
    margin: 0 !important;
    float: left !important;
    text-decoration: none !important;
    gap: 10px;
}

/* Reset TAO's block + margin on the img; let flexbox handle layout */
#tao-main-logo,
.ihso-logo-wrap img.ihso-logo-img {
    display: block !important;
    height: 56px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4));
    transition: transform var(--transition-fast), filter var(--transition-fast);
}

.ihso-logo-wrap:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

/* Brand name beside the logo */
.ihso-logo-wrap .ihso-brand-name {
    font-size: var(--topbar-brand-font-size);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.03em;
    line-height: 1;
}

/* ============================================
   Responsive — header/nav adjustments only
   ============================================ */

@media (max-width: 768px) {
    #tao-main-logo,
    .ihso-logo-wrap img.ihso-logo-img {
        height: 44px !important;
    }

    .dark-bar a.lft.ihso-logo-wrap,
    a.lft.ihso-logo-wrap {
        padding: 0 12px 0 8px !important;
    }

    .ihso-logo-wrap .ihso-brand-name {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .ihso-logo-wrap .ihso-brand-name {
        display: none; /* show only the badge on small screens */
    }
}
