/* ============================================================
   DBIM Theme  (Digital Brand Identity Manual)
   Layered AFTER style.css to provide DBIM design tokens,
   the utility classes required by the ported accessibility
   widget, the National Emblem identity block, external-link
   indicators, and targeted UI/UX polish for AWEIL.
   ============================================================ */

:root {
    --dbim-blue: #1a3c8b;          /* primary government blue */
    --dbim-blue-dark: #112a63;
    --dbim-blue-light: #2c5cc5;
    --dbim-saffron: #ff9933;
    --dbim-green: #138808;
    --dbim-yellow: #f2c200;
    --dbim-ink: #1f2933;
    --dbim-muted: #52606d;
    --dbim-border: #d7dce3;
    --dbim-surface: #f4f6fa;
    --dbim-focus: #0b5cff;
    --dbim-radius: 8px;
}

/* ---------- Typography ----------
   Preserve the site's original Poppins 14px / 22px sizing. accessible.css
   sets `body { font-size: inherit }` (= 16px root), which enlarged all body
   text; restore 14px here. Using rem keeps the accessibility text-size
   control working (it scales the html root, and rem follows it). */
body {
    font-size: 0.875rem;   /* 14px at default root */
    line-height: 1.571;    /* ~22px */
}

/* ---------- Icon helpers (used by ported widget markup) ---------- */
.dbim-icon {
    display: inline-block;
    vertical-align: middle;
    flex: 0 0 auto;
    line-height: 1;
}
.icon-16 { width: 16px; height: 16px; }
.icon-20 { width: 20px; height: 20px; }
.icon-24 { width: 24px; height: 24px; }
.icon-32 { width: 32px; height: 32px; }
.fs-sm { font-size: 0.8125rem; }

/* ---------- DBIM buttons ---------- */
.btn-yellow {
    background-color: var(--dbim-yellow);
    border-color: var(--dbim-yellow);
    color: #1f2933;
}
.btn-yellow:hover,
.btn-yellow:focus {
    background-color: #d9ad00;
    border-color: #d9ad00;
    color: #1f2933;
}
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
}

/* ---------- Accessibility offcanvas floating tab ---------- */
.top-40-zoom {
    top: 40%;
    transform: translateY(-50%);
}
#accessibility .position-absolute.end-100 .btn {
    box-shadow: -2px 2px 6px rgba(0, 0, 0, 0.2);
}

/* ---------- Skip to main content link ---------- */
.skip-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus,
.skip-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* ---------- Topbar surface (DBIM gradient) ---------- */
.dbim-bg-gradient-blue-primary {
    background-color: var(--dbim-blue) !important;
    background-image: linear-gradient(90deg, var(--dbim-blue-dark) 0%, var(--dbim-blue) 100%) !important;
}
.header .topbar { padding: 6px 0; }

/* Force readable light content on the dark gradient topbar
   (overrides style.css .header .single-top a { color:#666 }) */
.header .topbar,
.header .topbar p,
.header .topbar a,
.header .topbar .single-top a,
.header .topbar .single-top i,
.header .topbar .topbar-icon-link {
    color: #ffffff;
}
.header .topbar a:hover,
.header .topbar .single-top a:hover,
.header .topbar .topbar-icon-link:hover,
.header .topbar .topbar-icon-link:focus {
    color: #ffe89a;
}
.topbar-icon-link {
    display: inline-flex;
    align-items: center;
}

/* Language switch buttons — readable on the blue bar */
.header .topbar .switchlang {
    border-radius: 4px;
    padding: 2px 10px;
    font-weight: 600;
    line-height: 1.6;
}
.header .topbar .switchlang.yellow {
    background: var(--dbim-yellow) !important;
    color: #1f2933 !important;
}
.header .topbar .switchlang.blue {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.55);
}
.header .topbar .switchlang:hover { filter: brightness(1.05); }

/* Light/Dark theme toggle button in the topbar */
.header .topbar .theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #ffffff;
    border-radius: 4px;
    width: 34px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.header .topbar .theme-toggle:hover { background: rgba(255, 255, 255, 0.28); color: #fff; }
.header .topbar .theme-toggle i { color: #fff; }
.header .topbar .theme-toggle svg,
.header .topbar .theme-toggle svg path { fill: #fff !important; }

/* ---------- National Emblem identity block ---------- */
.dbim-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    text-decoration: none;
}
/* width override beats responsive.css `.logo img { width:120px }` */
.middle-header .dbim-identity .national-emblem-navbar,
.national-emblem-navbar {
    width: 52px !important;
    height: auto !important;
    flex: 0 0 auto;
}
.dbim-identity .identity-divider {
    width: 1px;
    align-self: stretch;
    background: var(--dbim-border);
    margin: 6px 0;
    flex: 0 0 auto;
}
.dbim-identity .identity-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;   /* prevent the logo img from stretching to column width */
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.2;
}
.dbim-identity .dark-img-logo {
    width: auto !important;     /* keep aspect ratio (overrides responsive.css .logo img{width:120px}) */
    height: auto !important;
    max-width: 100%;
    max-height: 56px;
    align-self: flex-start;
    object-fit: contain;
}
.dbim-identity .identity-org {
    font-weight: 700;
    color: var(--dbim-blue);
    font-size: 1.05rem;
}
.dbim-identity .identity-sub,
.dbim-identity .identity-sub.govtline {
    display: block;
    font-size: 0.82rem;
    color: var(--dbim-muted);
    white-space: normal;
    margin: 0;
}

/* ---------- External-link indicator (GIGW / DBIM) ---------- */
a.external-link::after,
a[target="_blank"].external-link::after {
    content: "";
    display: inline-block;
    width: 0.7em;
    height: 0.7em;
    margin-left: 0.3em;
    vertical-align: baseline;
    background-color: currentColor;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 3v2h3.59l-9.3 9.29 1.42 1.42L19 6.41V10h2V3h-7zM5 5h5V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5h-2v5H5V5z"/></svg>') no-repeat center / contain;
            mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 3v2h3.59l-9.3 9.29 1.42 1.42L19 6.41V10h2V3h-7zM5 5h5V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5h-2v5H5V5z"/></svg>') no-repeat center / contain;
}
/* Don't add the glyph to icon-only links (social), they carry SR text instead */
a.external-link.topbar-icon-link::after,
a.external-link.no-ext-glyph::after { content: none; }

/* ---------- Accessibility trigger in topbar ---------- */
.access-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- Targeted UI polish ---------- */
.middle-header { padding: 10px 0; }
.main-menu .navbar-nav > li > a:focus-visible,
.topbar a:focus-visible,
.footer a:focus-visible,
.accessibility-btn:focus-visible {
    outline: 3px solid var(--dbim-focus);
    outline-offset: 2px;
    border-radius: 3px;
}
.footer .single-footer h2 { letter-spacing: 0.2px; }

/* ---------- Mobile / responsive ---------- */
@media (max-width: 991.98px) {
    .header .topbar .row { row-gap: 6px; }
    .header .topbar .single-top,
    .header .topbar .d-flex { justify-content: center !important; }
    .middle-header { position: relative; }
    .middle-header .dbim-identity { justify-content: flex-start; }
    /* Keep the AWEIL wordmark a sensible size (responsive.css forces .logo img:120px) */
    .middle-header .dbim-identity .dark-img-logo { width: auto !important; max-width: 100%; max-height: 50px; }
    /* Mobile menu: keep it in normal flow (not absolute) so the dropdown
       pushes the hero down instead of rendering behind it. Remove the
       legacy -68px margin that overlapped the logo. */
    .header .mobile-nav { position: static; width: 100%; text-align: right; margin-top: 4px; }
    .header .slicknav_menu { display: block; }
    .header .slicknav_btn { margin: 0 !important; display: inline-block; float: none; }
    .header .slicknav_nav { position: static; clear: both; text-align: left; margin-top: 8px; z-index: 1; }
}
@media (max-width: 767.98px) {
    .header .topbar .skip-link { order: -1; }
    .dbim-identity { gap: 10px; }
    .middle-header .dbim-identity .national-emblem-navbar { width: 46px !important; }
    .middle-header .dbim-identity .dark-img-logo { max-height: 44px; }
    .middle-header .widget-main { text-align: center; margin-top: 10px; }
    .middle-header .single-widget.logo img { width: auto !important; max-height: 54px; }
}
@media (max-width: 575.98px) {
    .dbim-identity .identity-org { font-size: 0.95rem; }
    .dbim-identity .identity-sub { font-size: 0.74rem; }
    .middle-header .dbim-identity .national-emblem-navbar { width: 42px !important; }
    .middle-header .dbim-identity .dark-img-logo { max-height: 38px; }
    .header .topbar .access-trigger span,
    .header .topbar .switchlang { font-size: 0.78rem; }
}
