﻿/* =========================================================
   layout.css  -  styles ONLY the shared layout
   (top bar, header, navbar, banner, footer, accessibility panel)
   Inner pages keep their old look from base.css / bootstrap.css.
   Load this file LAST, after base.css and base-responsive.css.
   ========================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
    --b-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --b-ink: #150202; /* DBIM text */
    --b-text: #150202;
    --b-muted: #606060; /* DBIM grey */
    --b-bg: #EBEAEA; /* DBIM Linen */
    --b-surface: #FFFFFF;
    --b-line: #C6C6C6; /* DBIM grey */
    --b-nav: #150202;
    --b-accent: #0D6EFD; /* DBIM info/link */
    --b-accent-dark: #0D6EFD;
    --b-accent-soft: #EBEAEA;
    --b-radius: 14px;
    --b-radius-sm: 10px;
    --b-shadow-sm: 0 1px 2px rgba(21, 2, 2, .06), 0 2px 6px rgba(21, 2, 2, .06);
    --b-shadow: 0 18px 40px -14px rgba(21, 2, 2, .35);
    --b-ease: cubic-bezier(.2, .7, .2, 1);
    /* ONE brand blue for everything navy. Set it to the DBIM primary blue from the DBIM manual */
    --c-brand: #162F6A;
    --c-nav-text: var(--c-brand);
    --c-nav-hover: var(--c-brand);
    --c-nav-line: var(--c-brand);
    --c-nav-pill: var(--c-brand);
    --c-nav-pill-text: #FFFFFF;
    --c-drop-bg: var(--c-brand);
    --c-drop-text: #FFFFFF;
    --c-drop-hover-bg: #EBEAEA;
    --c-drop-hover-text: var(--c-brand);
    --c-footer-bg: var(--c-brand);
    --c-footer-text: #EBEAEA;
    --c-footer-hover: #FFFFFF;
    --c-footer-line: rgba(255, 255, 255, .25);
    --c-logo-band: #EBEAEA;
    --c-hairline: #C6C6C6;
    --c-logo-band-lavender: #EBEAEA;
    --c-tool-icon: var(--c-brand);
    --c-footer-accent: #FFC107; /* DBIM warning */
    --c-title-a: var(--c-brand);
    --c-title-b: var(--c-brand);
    --c-title-c: var(--c-brand);
    --b-font-scale: 1;
}

/* Replaces Bootstrap's default #212529 body text */
body {
    color: var(--b-ink);
}

/* ---------- 2. Minimal base ---------- */
html {
    font-size: calc(16px * var(--b-font-scale));
}

#b-accessibility, #b-header, .globalnav-bg, .footer-carousal, .footer-bs {
    font-family: var(--b-font);
}

    #b-accessibility :focus-visible, #b-header :focus-visible, .globalnav-bg :focus-visible, .footer-bs :focus-visible {
        outline: 3px solid var(--b-accent);
        outline-offset: 2px;
        border-radius: 4px;
    }

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 2000;
    background: var(--b-ink);
    color: #fff;
    padding: .6rem 1rem;
    border-radius: 8px;
}

    .skip-link:focus {
        top: 12px;
        color: #fff;
    }

/* ---------- 3. Accessibility bar + tools panel ---------- */
#b-accessibility {
    position: relative;
    z-index: 1100;
    min-height: 40px;
    color: var(--b-muted);
}

    #b-accessibility::before, #b-header::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 100vw;
        transform: translateX(-50%);
        z-index: -1;
        background: #ffffff;
        pointer-events: none;
        border-bottom: 1px solid var(--c-hairline);
    }

.b-acc-goi, .b-acc-ministry {
    font-size: .75rem;
    letter-spacing: .02em;
}

.b-acc-goi {
    border-right: 1px solid var(--c-hairline);
    color: var(--b-ink);
}

    .b-acc-goi img {
        height: 16px;
        width: auto;
        margin-right: 4px;
        border-radius: 2px;
    }

.b-sitemap-icon {
    width: 22px;
    height: 22px;
    opacity: .75;
    transition: opacity .2s, transform .2s;
}

    .b-sitemap-icon:hover {
        opacity: 1;
        transform: scale(1.1);
    }

.b-tool-item {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 28px;
    padding: 0 .4rem;
}

    .b-tool-item + .b-tool-item {
        border-left: 1px solid var(--c-hairline);
    }

.b-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 34px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--c-tool-icon);
    text-decoration: none;
    cursor: pointer;
    transition: color .2s, background .2s;
}

    .b-tool-btn svg {
        display: block;
        width: 24px;
        height: 24px;
    }

    .b-tool-btn:hover {
        color: var(--b-accent-dark);
        background: var(--b-accent-soft);
        text-decoration: none;
    }

.b-acc-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 1050;
    width: 340px;
    max-width: 92vw;
    padding: 16px;
    background: #fff;
    color: var(--b-text);
    border: 1px solid var(--b-line);
    border-radius: 16px;
    box-shadow: var(--b-shadow);
    animation: b-pop .2s var(--b-ease);
}

.b-panel-hidden {
    display: none !important;
}

.b-acc-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--b-line);
    font-weight: 700;
    color: var(--b-ink);
}

.b-acc-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #EBEAEA;
    color: var(--b-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

    .b-acc-close:hover {
        background: #C6C6C6;
        color: var(--b-ink);
    }

.b-acc-heading {
    margin: 14px 0 8px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--b-muted);
}

.b-acc-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.b-acc-btn {
    padding: .55rem .6rem;
    font: 500 .78rem/1.2 var(--b-font);
    text-align: center;
    color: var(--b-ink);
    background: #FFFFFF;
    border: 1px solid var(--b-line);
    border-radius: 10px;
    cursor: pointer;
    transition: all .18s;
}

    .b-acc-btn:hover {
        border-color: var(--b-accent);
        background: var(--b-accent-soft);
    }

    .b-acc-btn.active {
        background: var(--b-accent);
        border-color: var(--b-accent);
        color: #fff;
    }

.b-acc-reset {
    grid-column: 1 / -1;
    background: #FFFFFF;
    border-color: #DC3545;
    color: #DC3545;
}

    .b-acc-reset:hover {
        background: #EBEAEA;
        border-color: #DC3545;
    }

.bhashini-plugin-container {
    min-height: 34px;
}

/* ---------- 4. Header (logo + title block + search + NIC logo) ---------- */
#b-header {
    padding-top: .7rem !important;
    padding-bottom: .6rem !important;
    position: relative;
    isolation: isolate;
    height: auto !important;
    min-height: 88px;
    overflow: visible;
    gap: 1.5rem;
    background: transparent;
}

.b-header-brand {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
}

.b-emblem-image {
    flex: none;
    height: 4.25rem;
    width: auto;
}

/* title + sub title sit close together, one under the other */
.b-header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .2rem;
    min-width: 0;
    margin-left: 1rem;
    padding: .1rem 0;
}

    /* the <br /> in the HTML created the big gap: hide it */
    .b-header-text br {
        display: none;
    }

.b-header-title {
    display: block;
    margin: 0;
    font-size: clamp(1rem, 1.7vw, 1.4rem);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
    color: var(--c-title-a);
}

.b-title-b {
    color: var(--c-title-b);
}

.b-header-subtitle {
    display: block;
    margin: 0;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .1em;
    line-height: 1.3;
    color: var(--c-title-b);
}

    /* the <h6><b> inside the sub title must not add its own margin / size */
    .b-header-subtitle h6,
    .b-header-subtitle b {
        margin: 0;
        padding: 0;
        font: inherit;
        letter-spacing: inherit;
        line-height: inherit;
        text-transform: inherit;
        color: inherit;
    }

.b-header-subtitle-muted {
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--b-muted);
}

@media (min-width: 1200px) {
    .b-header-title {
        white-space: nowrap;
    }
}

.b-header-search {
    flex: 0 1 250px;
    min-width: 190px;
    margin-left: auto;
}

.b-header-logo {
    flex: none;
    display: flex;
    align-items: center;
}

    .b-header-logo img {
        display: block;
        height: 3.4rem;
        width: auto;
    }

/* ---- Search box: icon left | Search... | divider | blue button ---- */
#b-header .b-header-search .input-group {
    flex-wrap: nowrap;
    align-items: stretch;
    background: #fff;
    border: 2px solid #C6C6C6;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s;
}

    #b-header .b-header-search .input-group:focus-within {
        border-color: var(--b-accent);
        box-shadow: 0 0 0 3px rgba(13, 110, 253, .18);
    }

#b-header .b-header-search .form-control {
    height: 42px;
    padding: 0 1rem 0 2.7rem;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0;
    color: var(--b-ink);
    font-size: .95rem;
    background-color: #fff;
    /* search icon colour = brand blue (# is written %23 inside the SVG) */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23162F6A' stroke-width='2.6' stroke-linecap='round'><circle cx='10.5' cy='10.5' r='6.5'/><path d='M15.5 15.5L21 21'/></svg>"), linear-gradient(#C6C6C6, #C6C6C6);
    background-repeat: no-repeat, no-repeat;
    background-position: 14px center, right 10px center;
    background-size: 18px 18px, 1px 55%;
}

    #b-header .b-header-search .form-control::placeholder {
        color: #606060;
        opacity: 1;
    }

    /* hide the browser's own "x" clear button */
    #b-header .b-header-search .form-control::-webkit-search-cancel-button {
        display: none;
    }

#b-header .b-header-search .input-group-append {
    margin: 0;
}

#b-header .b-header-search .btn-outline-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 42px;
    margin: 0 !important;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--c-nav-pill) !important;
    color: #fff !important;
    font-size: 1.05rem;
    transition: background .2s;
}

    #b-header .b-header-search .btn-outline-secondary:hover,
    #b-header .b-header-search .btn-outline-secondary:focus {
        background: var(--c-nav-pill) !important;
        color: #fff !important;
    }

/* ---------- 5. Global navigation ---------- */
.globalnav-bg {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #ffffff !important;
    border-bottom: 1px solid var(--c-hairline);
    box-shadow: none;
}

    .globalnav-bg .navbar {
        padding-top: 0;
        padding-bottom: 0;
    }

    .globalnav-bg .main-menu {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .25rem;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
    }

        .globalnav-bg .main-menu li {
            position: relative;
        }

        /* ---- menu items: normal = plain text (Home is NOT blue on refresh) ---- */
        .globalnav-bg .main-menu .nav-link {
            position: relative;
            display: inline-flex;
            align-items: center;
            margin: .45rem 0 !important;
            padding: .5rem 1.1rem !important;
            border: 0;
            border-radius: 8px !important;
            background: transparent !important;
            box-shadow: none;
            color: var(--c-nav-text) !important;
            font-family: var(--b-font);
            font-size: 1rem;
            font-weight: 500;
            letter-spacing: -.005em;
            text-decoration: none;
            white-space: nowrap;
            transition: background .2s, color .2s;
        }

            .globalnav-bg .main-menu .nav-link::before {
                display: none !important;
            }

            /* blue pill ONLY on hover / press / open dropdown  (.active removed on purpose) */
            .globalnav-bg .main-menu .nav-link:hover,
            .globalnav-bg .main-menu .nav-link:focus,
            .globalnav-bg .main-menu .nav-link:active,
            .globalnav-bg .main-menu .dropdown.show > .nav-link {
                background: var(--c-nav-pill) !important;
                color: var(--c-nav-pill-text) !important;
            }

        /* chevron ONLY on items that have a dropdown (Home and Gallery have none) */
        .globalnav-bg .main-menu .dropdown-toggle::after {
            content: "" !important;
            display: inline-block !important;
            width: .45em;
            height: .45em;
            margin-left: .55rem;
            vertical-align: .15em;
            border: 0 !important;
            border-right: 2px solid currentColor !important;
            border-bottom: 2px solid currentColor !important;
            transform: rotate(45deg);
            transition: transform .25s;
        }

        .globalnav-bg .main-menu .dropdown.show > .dropdown-toggle::after {
            transform: rotate(45deg);
            vertical-align: -.05em;
        }

@media (min-width: 992px) {
    .globalnav-bg .main-menu {
        justify-content: center;
    }
}

@media (min-width: 1200px) {
    .globalnav-bg .main-menu {
        flex-wrap: nowrap;
    }
}

/* ---- Dropdown: solid blue box, light highlight on hover ---- */
.navbar .dropdown-menu {
    top: 100%;
    left: 0;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 260px;
    overflow: hidden;
    background: var(--c-drop-bg) !important;
    border: 0 !important;
    border-radius: 0 0 8px 8px !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 18px 30px -12px rgba(21, 2, 2, .35);
    animation: b-pop .2s var(--b-ease);
}

    .navbar .dropdown-menu.show {
        display: block;
    }

.navbar .dropdown-item {
    padding: .8rem 1.1rem !important;
    border-radius: 0 !important;
    background: transparent;
    color: var(--c-drop-text) !important;
    font-size: .93rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    transition: background .15s, color .15s;
}

    .navbar .dropdown-item:last-child {
        border-bottom: 0;
    }

    .navbar .dropdown-item:hover,
    .navbar .dropdown-item:focus,
    .navbar .dropdown-item:active,
    .navbar .dropdown-item.active {
        background: var(--c-drop-hover-bg) !important;
        color: var(--c-drop-hover-text) !important;
    }

/* ---------- 6. Mobile off-canvas navigation ---------- */
.b-nav-toggler {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin: .55rem 0;
    padding: 0;
    background: #FFFFFF;
    border: 1px solid var(--b-line);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    z-index: 1070;
}

    .b-nav-toggler span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--b-ink);
        border-radius: 2px;
        transition: transform .3s var(--b-ease), opacity .2s;
    }

    .b-nav-toggler.change {
        position: fixed;
        top: 12px;
        right: 12px;
    }

        .b-nav-toggler.change .bar1 {
            transform: translateY(7px) rotate(45deg);
        }

        .b-nav-toggler.change .bar2 {
            opacity: 0;
        }

        .b-nav-toggler.change .bar3 {
            transform: translateY(-7px) rotate(-45deg);
        }

.b-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1025;
    background: rgba(21, 2, 2, .6);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}

    .b-mobile-backdrop.b-mobile-open {
        opacity: 1;
        visibility: visible;
    }

@media (max-width: 991.98px) {
    .b-nav-toggler {
        display: inline-flex;
    }

    #collapsibleNavbar {
        display: block !important;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1060;
        width: min(86vw, 340px);
        padding: 4.5rem 1rem 2rem;
        overflow-y: auto;
        background: #fff;
        box-shadow: -20px 0 50px rgba(21, 2, 2, .3);
        transform: translateX(105%);
        visibility: hidden;
        transition: transform .32s var(--b-ease), visibility 0s .32s;
    }

        #collapsibleNavbar.b-mobile-open {
            transform: none;
            visibility: visible;
            transition-delay: 0s;
        }

    .globalnav-bg .main-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

        .globalnav-bg .main-menu .nav-link {
            display: flex;
            margin: 0 !important;
            padding: .6rem 1.1rem !important;
            font-size: 1.05rem;
        }

        .globalnav-bg .main-menu .dropdown-toggle::after {
            margin-left: auto;
            margin-top: 0;
        }

    .navbar .dropdown-item {
        border-bottom: 0;
    }

    #collapsibleNavbar .dropdown-menu {
        position: static !important;
        transform: none !important;
        display: none;
        float: none;
        margin: .2rem 0 .6rem !important;
        padding: .3rem !important;
        min-width: 0;
        background: #EBEAEA !important;
        border: 0;
        border-radius: 8px !important;
        box-shadow: none;
        animation: none;
    }

    #collapsibleNavbar .dropdown.show > .dropdown-menu {
        display: block;
    }

    #collapsibleNavbar .dropdown-item {
        color: var(--b-text) !important;
        border-radius: 6px !important;
    }

        #collapsibleNavbar .dropdown-item:hover {
            background: var(--c-drop-hover-bg) !important;
            color: var(--c-drop-hover-text) !important;
        }
}

/* ---------- 7. Banner carousel ---------- */
#demo {
    position: relative;
    background: var(--b-nav);
}

    #demo .carousel-inner img {
        display: block;
        width: 100%;
        height: auto;
    }

    #demo .carousel-indicators {
        margin-bottom: .6rem;
    }

        #demo .carousel-indicators li {
            width: 28px;
            height: 4px;
            margin: 0 4px;
            opacity: .55;
            border-radius: 14px;
            background-color: #fff;
            transition: opacity .25s, width .25s, background-color .25s;
        }

            #demo .carousel-indicators li.active {
                width: 44px;
                opacity: 1;
                background-color: var(--b-accent);
            }

    #demo .carousel-control-prev, #demo .carousel-control-next {
        width: 72px;
        opacity: 1;
    }

        #demo .carousel-control-prev span[class*="fa-"], #demo .carousel-control-next span[class*="fa-"] {
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            width: 46px;
            height: 46px;
            font-size: 20px !important;
            color: #fff !important;
            background: rgba(21, 2, 2, .45);
            border-radius: 50%;
            backdrop-filter: blur(6px);
            border: 1px solid rgba(255, 255, 255, .25);
            transition: background .2s, transform .2s;
        }

        #demo .carousel-control-prev:hover span[class*="fa-"], #demo .carousel-control-next:hover span[class*="fa-"] {
            background: var(--b-accent);
            transform: scale(1.08);
        }

/* ---------- 8b. "For More Information" bar ---------- */
.b-more-info {
    padding: 1.5rem 15px 1rem;
    font-size: .95rem;
    color: var(--b-text);
}

    .b-more-info a {
        font-weight: 700;
        color: var(--b-accent-dark);
        text-decoration: none;
    }

        .b-more-info a:hover {
            text-decoration: underline;
        }

/* ---------- 9. Footer logos + footer ---------- */
.footer-carousal {
    padding: 2.4rem 0 .8rem;
    background: var(--c-logo-band-lavender);
    border-top: 1px solid var(--b-line);
}

.b-logo-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    max-width: 1176px;
    margin: 0 auto;
    padding: 0 15px 2.2rem;
}

.b-logo-viewport {
    flex: 1 1 auto;
    min-width: 0;
    padding: .6rem .3rem 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 .3rem;
    scrollbar-width: none;
}

    .b-logo-viewport::-webkit-scrollbar {
        display: none;
    }

    .b-logo-viewport:focus-visible {
        outline: 3px solid var(--b-accent);
        outline-offset: 2px;
    }

.b-logo-track {
    display: flex;
    gap: 1.25rem;
}

.footer-carousal .f-logo {
    flex: 0 0 calc((100% - 3.75rem) / 4);
    scroll-snap-align: start;
}

    .footer-carousal .f-logo a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 140px;
        padding: 10px 14px;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 3px 10px rgba(21, 2, 2, .14);
        transition: transform .25s var(--b-ease), box-shadow .25s;
    }

        .footer-carousal .f-logo a:hover {
            transform: translateY(-4px);
            box-shadow: 0 14px 26px -10px rgba(21, 2, 2, .4);
        }

    .footer-carousal .f-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

@media (max-width: 991.98px) {
    .footer-carousal .f-logo {
        flex-basis: calc((100% - 2.5rem) / 3);
    }
}

@media (max-width: 767.98px) {
    .footer-carousal .f-logo {
        flex-basis: calc((100% - 1.25rem) / 2);
    }
}

@media (max-width: 479.98px) {
    .footer-carousal .f-logo {
        flex-basis: 100%;
    }

    .b-logo-nav {
        width: 36px;
        height: 36px;
    }
}

.b-logo-nav {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--c-nav-text);
    background: #fff;
    border: 1px solid var(--c-hairline);
    border-radius: 50%;
    box-shadow: var(--b-shadow-sm);
    cursor: pointer;
    transition: background .2s, color .2s, transform .2s;
}

    .b-logo-nav:hover {
        color: #fff;
        background: var(--c-nav-hover);
        transform: scale(1.06);
    }

.b-logo-pause {
    position: absolute;
    left: 50%;
    bottom: .5rem;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: .75rem;
    color: var(--c-nav-text);
    background: #fff;
    border: 1px solid var(--c-hairline);
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s, color .2s;
}

    .b-logo-pause:hover {
        color: #fff;
        background: var(--c-nav-hover);
    }

.b-logo-slider.b-no-scroll .b-logo-nav,
.b-logo-slider.b-no-scroll .b-logo-pause {
    display: none;
}

.footer-bs {
    padding: 3rem 1rem 0;
    color: var(--c-footer-text);
    background: var(--c-footer-bg) !important;
    border-radius: 0;
}

    .footer-bs .b-footer-main {
        padding-bottom: 2.6rem;
    }

    .footer-bs .b-footer-title {
        margin: 0 0 1rem;
        font-size: 1.25rem;
        font-weight: 600;
        color: #fff;
        letter-spacing: 0;
        text-transform: none;
    }

    .footer-bs .b-footer-list {
        margin: 0 0 .5rem;
        padding: 0 15px;
        list-style: none;
    }

        .footer-bs .b-footer-list li {
            padding: .42rem 0;
        }

        .footer-bs .b-footer-list a {
            display: inline-flex;
            align-items: center;
            color: #fff;
            text-decoration: none;
            transition: color .2s, transform .2s;
        }

            .footer-bs .b-footer-list a::before {
                content: "";
                flex: none;
                width: .42em;
                height: .42em;
                margin-right: .8rem;
                border-top: 2px solid currentColor;
                border-right: 2px solid currentColor;
                transform: rotate(45deg);
            }

            .footer-bs .b-footer-list a:hover {
                color: var(--c-footer-hover);
                text-decoration: underline;
                transform: translateX(3px);
            }

    .footer-bs .b-footer-mid p {
        margin: 0 0 .9rem;
        line-height: 1.65;
    }

    .footer-bs .b-footer-mid a {
        color: #fff;
        font-weight: 700;
    }

        .footer-bs .b-footer-mid a:hover {
            text-decoration: underline;
        }

    .footer-bs .b-footer-updated {
        margin-top: 1.1rem;
        color: var(--c-footer-text);
    }

        .footer-bs .b-footer-updated strong {
            color: #fff;
        }

    .footer-bs .b-footer-end {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
    }

        .footer-bs .b-footer-end .backtotop {
            align-self: flex-end;
            margin-top: 1.5rem;
        }

    .footer-bs .b-social {
        display: flex;
        flex-wrap: wrap;
        gap: .6rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }

        .footer-bs .b-social a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 42px;
            height: 42px;
            color: #fff;
            font-size: 1rem;
            text-decoration: none;
            border: 2px solid #fff;
            border-radius: 50%;
            transition: background .25s, color .25s, transform .25s var(--b-ease);
        }

            .footer-bs .b-social a:hover {
                background: #fff;
                color: var(--c-footer-bg);
                transform: translateY(-3px);
            }

@media (min-width: 992px) {
    .footer-bs .b-footer-mid, .footer-bs .b-footer-end {
        border-left: 1px solid var(--c-footer-line);
        padding-left: 2rem;
    }
}

@media (max-width: 991.98px) {
    .footer-bs .b-footer-col {
        margin-bottom: 1.5rem;
    }
}

.backtotop {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
    transition: background .25s, color .25s, transform .25s var(--b-ease);
}

    .backtotop:hover {
        background: #fff;
        color: var(--c-footer-bg);
        transform: translateY(-4px);
    }

/* ---------- 10. Footer highlight + contrast tweaks ---------- */
.footer-bs .b-footer-accent {
    display: block;
    font-weight: 600;
    color: var(--c-footer-accent);
}

body.b-contrast-high .b-tool-btn {
    color: #ffea00 !important;
    background: transparent !important;
}

/* ---------- 11. Small-screen tweaks ---------- */
@media (max-width: 991.98px) {
    #b-header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .b-header-brand {
        flex: 1 1 0;
    }

    .b-header-logo {
        margin-left: auto;
    }

    .b-header-search {
        order: 3;
        flex: 1 1 100%;
        max-width: none;
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    #b-accessibility {
        display: block !important;
        padding: 6px 10px !important;
    }

        #b-accessibility .b-ministryname {
            justify-content: center;
            text-align: center;
        }

    .b-acc-ministry {
        text-align: left;
    }

    .b-acc-icons {
        justify-content: center;
        margin: .3rem 0;
    }

    #b-header img {
        max-height: 3rem !important;
        width: auto;
    }

    .b-emblem-image {
        width: auto;
    }

    /* header title block on phones */
    .b-header-text {
        margin-left: .7rem;
        gap: .15rem;
    }

    .b-header-title {
        font-size: .95rem;
    }

    .b-header-subtitle {
        font-size: .68rem;
    }

    #demo .carousel-caption h3, #demo .carousel-caption p {
        display: none !important;
    }

    #demo .carousel-control-prev, #demo .carousel-control-next {
        width: 52px;
    }
}

@media (max-width: 575.98px) {
    .b-acc-goi {
        padding-right: .25rem !important;
    }

    .b-acc-dropdown {
        position: fixed;
        top: 70px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }

    .footer-bs .footer-nav, .footer-bs .footer-ns {
        padding: 10px 8px;
    }
}

@media (max-width: 400px) {
    .b-tool-btn {
        width: 34px;
    }
}

/* ---------- 12. Accessibility modes ---------- */
body.b-contrast-high {
    background: #000;
    color: #fff;
}

    body.b-contrast-high :is(#b-header, #b-accessibility, .b-dbcard, .footer-carousal, ul.breadcrumb, .dropdown-menu, .b-acc-dropdown, #page-wrapper) {
        background: #000 !important;
        color: #fff !important;
        border-color: #fff !important;
    }

    body.b-contrast-high :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, label, .b-header-title) {
        color: #fff !important;
    }

    body.b-contrast-high a {
        color: #ffea00 !important;
        text-decoration: underline;
    }

    body.b-contrast-high .globalnav-bg, body.b-contrast-high .footer-bs {
        background: #000 !important;
        border-top: 2px solid #fff;
    }

    body.b-contrast-high .btn, body.b-contrast-high .b-acc-btn {
        background: #000 !important;
        color: #ffea00 !important;
        border: 2px solid #ffea00 !important;
    }

    body.b-contrast-high .globalnav-bg .main-menu .nav-link {
        color: #ffea00 !important;
    }

        body.b-contrast-high .globalnav-bg .main-menu .nav-link:hover,
        body.b-contrast-high .globalnav-bg .main-menu .dropdown.show > .nav-link {
            background: #000 !important;
            outline: 2px solid #ffea00;
        }

body.b-contrast-invert {
    filter: invert(1) hue-rotate(180deg);
}

    body.b-contrast-invert :is(img, video, iframe, .carousel-inner) {
        filter: invert(1) hue-rotate(180deg);
    }

body.b-contrast-saturation {
    filter: saturate(.15);
}

body.b-highlight-links a {
    background: #fff3a3 !important;
    color: #000 !important;
    outline: 2px solid #f59e0b;
    text-decoration: underline !important;
}

body.b-text-spacing * {
    letter-spacing: .08em !important;
    word-spacing: .18em !important;
}

body.b-line-height :is(p, li, span, a, td, label) {
    line-height: 2 !important;
}

body.b-hide-images img {
    visibility: hidden !important;
}

body.b-big-cursor, body.b-big-cursor * {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'><path d='M4 2l16 9-7 2-2 7z' fill='black' stroke='white' stroke-width='1.5'/></svg>") 4 2, auto !important;
}

/* ---------- 13. Motion + print ---------- */
@keyframes b-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    #b-accessibility, .globalnav-bg, #demo, .footer-carousal, .backtotop, .b-mobile-backdrop {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }
}

/* ---------- 14. Ownership statement (GIGW 3.0 / DBIM) ---------- */

/* Header top bar: "Government of India" + Ministry lock-up */
.b-ministry-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.25;
    color: var(--b-ink);
}

.b-gov-line {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--b-text);
}

.b-ministry-line {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    color: var(--b-ink);
}

/* Footer lineage line */
.footer-bs .b-footer-lineage {
    padding: 1.1rem 15px 1.3rem;
    text-align: center;
    border-top: 1px solid var(--c-footer-line);
}

    .footer-bs .b-footer-lineage p {
        margin: 0;
        font-size: .9rem;
        line-height: 1.6;
        color: var(--c-footer-text);
    }

/* High contrast: keep the divider visible (text colour is handled in section 12) */
body.b-contrast-high .footer-bs .b-footer-lineage {
    border-top-color: #fff;
}

@media (max-width: 767.98px) {
    .b-gov-line {
        font-size: .68rem;
    }

    .b-ministry-line {
        font-size: .78rem;
    }
}

@media (max-width: 575.98px) {
    .footer-bs .b-footer-lineage {
        text-align: left;
    }
}

/* ---------- 14b. DBIM v3 type scale (desktop 36/24/20/16, mobile 24/20/16/14) ---------- */
:root {
    --fs-h1: 2.25rem; /* 36px */
    --fs-h2: 1.5rem; /* 24px */
    --fs-h3: 1.25rem; /* 20px */
    --fs-p: 1rem; /* 16px */
}

#main h1 {
    font-size: var(--fs-h1);
}

#main h2 {
    font-size: var(--fs-h2);
}

#main h3 {
    font-size: var(--fs-h3);
}

#main p, #main li {
    font-size: var(--fs-p);
}

.footer-bs .b-footer-title {
    font-size: var(--fs-h2);
}

@media (max-width: 767.98px) {
    :root {
        --fs-h1: 1.5rem; /* 24px */
        --fs-h2: 1.25rem; /* 20px */
        --fs-h3: 1rem; /* 16px */
        --fs-p: .875rem; /* 14px */
    }
}

/* ---------- 15. Mobile top bar fix (keep LAST so it wins) ---------- */
@media (max-width: 767.98px) {

    body #b-accessibility {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 6px 10px !important;
    }

    #main table,
    #main .table {
        display: table;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 1rem !important;
        table-layout: auto;
    }

        /* long text wraps to the next line instead of going outside */
        #main table th,
        #main table td {
            padding: .55rem .6rem !important;
            font-size: .9rem;
            line-height: 1.4;
            white-space: normal !important;
            word-break: break-word;
            overflow-wrap: anywhere;
        }

    body #b-accessibility .b-ministryname {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }

    body #b-accessibility .b-acc-icons {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: .35rem 0 0 !important;
        padding-top: .35rem !important;
        border-top: 1px solid var(--c-hairline);
    }

    body #b-accessibility .b-tool-item {
        display: flex !important;
        flex: 0 0 auto !important;
        width: auto !important;
        padding: 0 .75rem !important;
    }

        body #b-accessibility .b-tool-item + .b-tool-item {
            border-left: 1px solid var(--c-hairline);
        }

    body #b-accessibility .bhashini-plugin-container,
    body #b-accessibility .bhashini-plugin-container > * {
        display: flex !important;
        align-items: center !important;
        width: auto !important;
    }
}
