/* =========================================================
   SAMARTH DBIM FINAL POLISH
   Safe visual override layer.
   Loaded AFTER the existing legacy/V3 CSS so existing
   functionality, Razor bindings and JavaScript are preserved.
   ASP.NET MVC 4.8 / Bootstrap 5.2.3 / jQuery 3.7.1
   ========================================================= */

:root {
    --samarth-primary: #003f73;
    --samarth-primary-2: #0066ae;
    --samarth-primary-dark: #002f57;
    --samarth-primary-soft: #eaf4fb;
    --samarth-surface: #ffffff;
    --samarth-border-final: #cfe1ee;
    --samarth-text-final: #17324d;
    --samarth-success: #198754;
    --samarth-focus-final: #ffbf00;
}

/* =========================================================
   1. PAGE / TYPOGRAPHY
   ========================================================= */
html, body {
    font-family: "Noto Sans", Arial, sans-serif !important;
}

body {
    background: var(--samarth-primary-soft) !important;
    color: var(--samarth-text-final) !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
}

/* Keep the existing centered content but avoid excessive side gaps. */
.samarth-container {
    width: min(1600px, calc(100% - 40px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* =========================================================
   2. TOP UTILITY BAR
   ========================================================= */
.wrapper > section.menusec {
    background: var(--samarth-primary-dark) !important;
    min-height: 44px !important;
}

.menugigwrow a,
.menugigwrow a:visited {
    color: #fff !important;
}

/* =========================================================
   3. HEADER / BRAND IDENTITY
   ========================================================= */
.samarth-final-header {
    background: #fff !important;
    border-bottom: 1px solid var(--samarth-border-final) !important;
}

.samarth-header-inner {
    width: min(1600px, calc(100% - 40px)) !important;
    margin: 0 auto !important;
    min-height: 146px !important;
    padding: 16px 0 !important;
}

.samarth-brand-block {
    min-width: 0;
}

.samarth-brand-logo {
    width: 108px !important;
    height: 108px !important;
    max-width: 108px !important;
    max-height: 108px !important;
    object-fit: contain !important;
}

.samarth-brand-text h1 {
    color: var(--samarth-primary-2) !important;
    font-family: "Noto Sans", Arial, sans-serif !important;
    font-size: clamp(22px, 2vw, 34px) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
}

.samarth-brand-text h2 {
    color: var(--samarth-primary) !important;
    font-family: "Noto Sans", Arial, sans-serif !important;
    font-size: clamp(13px, 1vw, 18px) !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    margin: 8px 0 0 !important;
}

.samarth-header-gov img {
    max-width: 150px !important;
    max-height: 90px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* =========================================================
   4. NAVBAR - SINGLE PRIMARY BLUE FAMILY
   ========================================================= */
.samarth-main-nav.samarth-final-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 1050 !important;
    background: var(--samarth-primary) !important;
    border-bottom: 3px solid var(--samarth-primary-2) !important;
    box-shadow: 0 2px 8px rgba(0, 47, 87, .18) !important;
}

.samarth-final-navbar {
    background: transparent !important;
}

.samarth-final-nav-list {
    background: transparent !important;
}

.samarth-final-nav-link,
.samarth-final-nav-link:visited {
    color: #fff !important;
    background: transparent !important;
    font-family: "Noto Sans", Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    min-height: 52px !important;
    padding: 0 18px !important;
    border-left: 1px solid rgba(255,255,255,.12) !important;
}

.samarth-final-nav-item:last-child .samarth-final-nav-link {
    border-right: 1px solid rgba(255,255,255,.12) !important;
}

.samarth-final-nav-link:hover,
.samarth-final-nav-link:focus-visible,
.samarth-final-nav-item.is-open > .samarth-final-nav-link,
.samarth-final-nav-item.samarth-home-item > .samarth-final-nav-link:hover,
.samarth-final-nav-item.samarth-home-item > .samarth-final-nav-link:focus-visible {
    color: #fff !important;
    background: var(--samarth-primary-2) !important;
}

/* Active home remains blue, not green. */
.samarth-final-nav-item.samarth-home-item > .samarth-final-nav-link {
    background: #0879c9 !important;
    color: #fff !important;
}

/* Login is an action, but stays inside the same primary colour family. */
.samarth-login-item-final > .samarth-login-link-final,
.samarth-login-link-final {
    background: var(--samarth-primary-2) !important;
    color: #fff !important;
    font-weight: 800 !important;
}

.samarth-login-item-final > .samarth-login-link-final:hover,
.samarth-login-item-final > .samarth-login-link-final:focus-visible {
    background: #07558f !important;
    color: #fff !important;
}

/* Dropdowns */
.samarth-final-dropdown {
    background: #fff !important;
    border: 1px solid var(--samarth-border-final) !important;
    box-shadow: 0 10px 26px rgba(0,47,87,.16) !important;
}

.samarth-final-dropdown a,
.samarth-dropdown-title {
    font-family: "Noto Sans", Arial, sans-serif !important;
}

.samarth-final-dropdown a:hover,
.samarth-final-dropdown a:focus-visible {
    color: #fff !important;
    background: var(--samarth-primary-2) !important;
}

/* =========================================================
   5. HERO / BANNER - KEEP EXISTING ASSET & FUNCTIONALITY
   ========================================================= */
.samarth-custom-carousel {
    border: 1px solid var(--samarth-border-final) !important;
    border-radius: 10px !important;
    box-shadow: 0 3px 12px rgba(0,63,115,.10) !important;
    background: #fff !important;
}

.samarth-carousel-viewport {
    background: #fff !important;
    border-radius: 10px !important;
}

.samarth-carousel-image {
    object-position: center center !important;
}

.samarth-carousel-prev,
.samarth-carousel-next {
    background: rgba(0,63,115,.92) !important;
    border-color: rgba(255,255,255,.9) !important;
}

.samarth-carousel-prev:hover,
.samarth-carousel-next:hover {
    background: var(--samarth-primary-2) !important;
}

.samarth-carousel-dot {
    border-color: var(--samarth-primary-2) !important;
}

.samarth-carousel-dot.active,
.samarth-carousel-dot:hover {
    background: var(--samarth-primary-2) !important;
}

/* =========================================================
   6. QUICK ACCESS - UNIFIED BLUE ICON STYLE
   ========================================================= */
.samarth-offering-card {
    background: #fff !important;
    border: 1px solid var(--samarth-border-final) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,63,115,.07) !important;
    color: var(--samarth-primary) !important;
}

.samarth-offering-card:hover {
    border-color: #9fc8e2 !important;
    box-shadow: 0 7px 16px rgba(0,63,115,.12) !important;
    transform: translateY(-2px) !important;
}

.samarth-offering-icon,
.offering-green .samarth-offering-icon,
.offering-blue .samarth-offering-icon,
.offering-orange .samarth-offering-icon,
.offering-purple .samarth-offering-icon {
    background: var(--samarth-primary-2) !important;
    color: #fff !important;
}

/* =========================================================
   7. MAIN CONTENT CARDS
   ========================================================= */
.samarth-info-card,
.samarth-content-card,
.samarth-status-card {
    background: #fff !important;
    border: 1px solid var(--samarth-border-final) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,63,115,.06) !important;
}

.samarth-info-card h2,
.samarth-content-card h2,
.samarth-card-heading,
.samarth-section-heading h2 {
    color: var(--samarth-primary) !important;
    font-family: "Noto Sans", Arial, sans-serif !important;
}

.samarth-info-card p,
.samarth-content-card p,
.samarth-info-card li,
.samarth-content-card li {
    color: var(--samarth-text-final) !important;
    font-family: "Noto Sans", Arial, sans-serif !important;
}

.samarth-primary-btn,
.samarth-info-card a.samarth-primary-btn,
.samarth-content-card a.samarth-primary-btn {
    background: var(--samarth-primary-2) !important;
    color: #fff !important;
    border: 1px solid var(--samarth-primary-2) !important;
    border-radius: 5px !important;
    font-weight: 700 !important;
}

.samarth-primary-btn:hover,
.samarth-primary-btn:focus-visible {
    background: var(--samarth-primary) !important;
    color: #fff !important;
}

/* =========================================================
   8. BMC STATUS - GREEN ONLY AS FUNCTIONAL STATUS
   ========================================================= */
.samarth-status-heading {
    background: var(--samarth-success) !important;
    color: #fff !important;
}

/* Do not remove existing BMC table/data bindings. */
.samarth-status-card input,
.samarth-status-card .form-control {
    border-color: var(--samarth-border-final) !important;
    background: #f8fbfd !important;
}

/* =========================================================
   9. NOTICES / DOCUMENTS / LINKS
   ========================================================= */
.samarth-notice-card,
.samarth-doc-card,
.samarth-links-card {
    background: #fff !important;
    border: 1px solid var(--samarth-border-final) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,63,115,.05) !important;
}

.samarth-notice-card h2,
.samarth-doc-card h2,
.samarth-links-card h2 {
    color: var(--samarth-primary) !important;
}

.samarth-notice-card a,
.samarth-doc-card a,
.samarth-links-card a {
    color: var(--samarth-primary-2) !important;
}

/* =========================================================
   10. CITIZEN ENGAGEMENT - NEUTRAL/LIGHT BLUE
   ========================================================= */
.samarth-social-strip {
    background: #f5f9fc !important;
    border: 1px solid var(--samarth-border-final) !important;
    border-radius: 8px !important;
}

.samarth-social-title h2 {
    color: var(--samarth-primary) !important;
}

.samarth-social-link {
    background: #fff !important;
    border: 1px solid var(--samarth-border-final) !important;
    color: var(--samarth-text-final) !important;
}

/* Social brand colours are retained because they identify external platforms. */
.samarth-social-link.facebook i { color: #1877f2 !important; }
.samarth-social-link.twitter i { color: #111 !important; }
.samarth-social-link.youtube i { color: #dc2626 !important; }
.samarth-social-link.linkedin i { color: #0a66c2 !important; }

/* =========================================================
   11. FOOTER - DARK PRIMARY BLUE FAMILY
   ========================================================= */
.samarth-footer-main {
    background: var(--samarth-primary-dark) !important;
    color: #fff !important;
}

.samarth-footer-bottom {
    background: #00243f !important;
    color: #fff !important;
}

.samarth-footer-heading,
.samarth-footer-connect,
.samarth-footer-official p,
.samarth-footer-about-text,
.samarth-footer-column,
.samarth-footer-contact-item p,
.samarth-footer-visitor {
    color: #fff !important;
}

/* Keep one small green accent; do not make the whole footer green. */
.samarth-footer-heading-line {
    background: #91d33f !important;
}

.samarth-footer-leaf {
    color: #91d33f !important;
}

.samarth-footer-link-list a,
.samarth-footer-policy-links a {
    color: #fff !important;
}

.samarth-footer-link-list a:hover,
.samarth-footer-policy-links a:hover {
    color: #d9efff !important;
}

.samarth-footer-column {
    border-right-color: rgba(255,255,255,.28) !important;
}

/* =========================================================
   12. FOCUS / ACCESSIBILITY
   ========================================================= */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--samarth-focus-final) !important;
    outline-offset: 2px !important;
}

/* =========================================================
   13. RESPONSIVE SAFETY
   ========================================================= */
@media (max-width: 991.98px) {
    .samarth-header-inner {
        width: calc(100% - 30px) !important;
        min-height: auto !important;
    }

    .samarth-brand-logo {
        width: 82px !important;
        height: 82px !important;
        max-width: 82px !important;
        max-height: 82px !important;
    }

    .samarth-final-nav-link,
    .samarth-final-nav-item.samarth-home-item > .samarth-final-nav-link {
        background: #064b80 !important;
    }

    .samarth-final-nav-link:hover,
    .samarth-final-nav-link:focus-visible,
    .samarth-final-nav-item.is-open > .samarth-final-nav-link {
        background: var(--samarth-primary-2) !important;
    }

    .samarth-login-item-final > .samarth-login-link-final {
        background: var(--samarth-primary-2) !important;
    }
}

@media (max-width: 767.98px) {
    .samarth-container {
        width: calc(100% - 20px) !important;
    }

    .samarth-header-inner {
        width: calc(100% - 20px) !important;
        padding: 12px 0 !important;
    }

    .samarth-brand-text h1 {
        font-size: 20px !important;
    }

    .samarth-brand-text h2 {
        font-size: 12px !important;
    }

    .samarth-header-gov {
        display: none !important;
    }

    .samarth-offering-grid,
    .samarth-main-grid {
        grid-template-columns: 1fr !important;
    }

    .samarth-social-strip {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .samarth-social-links {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
    }

    .samarth-social-link {
        width: 100% !important;
        min-width: 0 !important;
    }
}
