/* Department name beside the header logo (GIGW 5.1.1). Shared by _HeaderPartial (main site)
   and _DistrictHeaderPartial (district sites) so both show the same lines in the same colours.
   Moved here unchanged from header-inline.css; the main header's width-band tweaks for
   .header-org-name stay in that file. */

/* ------------------------------------------------------------------ *
 * GIGW 5.1.1 — the department this portal belongs to, in text
 *
 * The audit's observation was "Ministry of Department is missing". These three lines carry the
 * department's approved name, in the order it supplied: name, government, office. Line 1 repeats
 * the logo wordmark on purpose — the approved name begins with it, and below 768px styles.css
 * hides every header image, leaving this block as the only thing naming the department.
 *
 * Placed to the right of the logo, matching the treatment used before. Colours: the name line
 * takes var(--nav-bg) so it follows the selected theme (#095a6f, the ocean default, is ~7.8:1
 * on white); the government and office lines are #495057, ~7.5:1. Nothing drops below the 12px
 * floor this project holds — 12px is the smallest, used on phones.
 *
 * max-width keeps the long office line ("Office of Settlement Commissioner and Director Land
 * Records") wrapping inside the brand area instead of pushing into the quick-links nav.
 * ------------------------------------------------------------------ */
.header-org-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 14px;
    line-height: 1.25;
    max-width: 22em;
}

/* Department brand colour — the brown of the Bhumi Abhilekh logo wordmark. Deliberately NOT
   var(--nav-bg): the department (Mahesh Sutar, 22-09-2026) asked that "Bhumi Abhilekh" /
   "Government of Maharashtra" / the office line keep the logo colour and never change with
   the theme. Its own variable, which no theme sets, so it stays fixed.
   No !important, so body.high-contrast (gigw-accessibility.css) still overrides it.

   28-09-2026: the department asked for #B37C3E. That measures 3.58:1 on the white header and
   these three lines are 12.5–15px, i.e. normal-size text needing 4.5:1 — it fails WCAG 2.1 AA,
   which GIGW requires. #9A6A35 is the nearest shade of the same brown that passes, at 4.68:1;
   it is used here per GIGW_COMPLIANCE.md §4.2. Do NOT restore #B37C3E without either written
   department sign-off recorded in the §7 exceptions register, or type large enough to qualify
   as WCAG large text (>=24px, or >=18.66px bold), where 3:1 would apply.

   03-11-2026: darkened to #755128 - the same hue as #9A6A35 scaled down to 7.09:1, so the name
   also meets AAA (7:1) like the rest of aaa-contrast.css. Department confirmation of the darker
   brand shade is pending (GIGW_COMPLIANCE.md §7, O-11). */
.header-org-name {
    --brand-brown: #755128;
}

.header-org-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-brown, #755128);
}

.header-org-gov {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--brand-brown, #755128);
}

.header-org-office {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--brand-brown, #755128);
}

/* Tablets: the quick-links row starts competing for the same space, so the type comes down
   rather than the name wrapping into those links. */
@media (max-width: 991.98px) {
    .header-org-title  { font-size: 13.5px; }
    .header-org-gov    { font-size: 12px; }
    .header-org-office { font-size: 12px; }
}

/* ------------------------------------------------------------------ *
 * District header (_DistrictHeaderPartial) - same block beside the district logo.
 *
 * mobile-reflow.css indents the district quick links by 7.5rem on desktop; that indent only
 * filled the empty space beside the logo, which the department name now occupies. Kept, it
 * squeezed the links to one word per line at 1024px. `.district-header-row nav...` (0,2,1)
 * outranks mobile-reflow's `nav.district-quick-links` (0,1,1); both are !important.
 * ------------------------------------------------------------------ */
/* Wide screens: the brand keeps its natural width; the spacing between the links gives instead. */
.district-header-row .district-header-brand {
    flex-shrink: 0;
}

.district-header-row nav.district-quick-links {
    padding-left: 1rem !important;
}

/* The district row carries the district name (h1) as well, so in Marathi the five quick links
   were 26px short of one line in the 1320px container and all wrapped onto two. The container
   stays the same width as the home page; the nav's own side padding (px-4 + the 1rem above)
   is what gives way, plus 8px of the district name's 18px right margin (an inline style, hence
   !important). The brand gets a 32px gap so the name does not crowd the district name; the
   links' own side padding (6.4px -> 4px, gap-2 still separates them) pays for it.
   Measured: one line in Marathi from 1440px. */
@media (min-width: 1200px) {
    .district-header-row .district-header-brand {
        margin-right: 32px;
    }

    .district-header-row nav.district-quick-links > a {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .district-header-row nav.district-quick-links {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .district-header-row nav.district-quick-links > .district-name {
        margin-right: 10px !important;
    }
}

/* District name in the district header. It is an <h1> on the district home / District Info pages
   and a <p> on pages that have their own <h1> (one-h1 rule). These give the <p> the exact box the
   <h1> had (Bootstrap heading line-height and bottom margin), and replace the old inline
   margin-right:18px (CSP). Font size and weight come from fs-2 / fw-medium on both. */
.district-header-row .district-name {
    margin: 0 18px 0.5rem 0;
    line-height: 1.2;
}

/* The Maharashtra emblem (last link in the row) never gives way - it was squeezed to a dot.
   Desktop only: below 992px the links take a full line and the emblem must be free to wrap. */
@media (min-width: 992px) {
    .district-header-row > .d-flex > a.nav-link {
        flex-shrink: 0;
    }
}

/* Laptops: 64px emblem, as the main header uses in this band (header-inline.css). */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .district-header-row > .d-flex > a.nav-link > img {
        width: 64px !important;
        height: 64px !important;
    }
}

@media (max-width: 1199.98px) {
    /* Laptops: the name and the links share the room; neither is squeezed to a word a line. */
    .district-header-row .district-header-brand {
        min-width: 0;
        flex: 0 1 auto;
    }

    .district-header-row .header-org-name {
        margin-left: 8px;
        min-width: 10em;          /* links wrap to two lines first, as they did before */
        max-width: 13em;          /* 15em pushed the emblem 10px off-screen at 992px (English) */
    }
}

/* Below 992px the quick links already take a full-width centred line (mobile-reflow.css), so
   the brand gets its own line above them, centred the same way as on the main site. */
@media (max-width: 991.98px) {
    .district-header-row {
        flex-wrap: wrap;
    }

    .district-header-row .district-header-brand {
        flex: 0 0 100%;
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .district-header-row .header-org-name {
        margin-left: 0;
        align-items: center;
        text-align: center;
        max-width: 100%;
    }
}