/* Footer rows shared by BOTH footers: the main-site footer (_FooterPartial) and the district
 * site footer (_LayoutDistrictWebsite), so the two cannot drift apart again (they did - the
 * district copy had its own inline rules and no 5.2.12 underline). Moved verbatim from
 * footer-inline.css on 30-Oct-2026; footer-inline.css keeps the feedback form, links carousel
 * and Web Information Manager modal. Change footer row layout HERE, not in a layout file. */

    /* Footer structure improvements */
     .footer-border.footer {
        padding: 5px !important;
    } 

    .footer-bottom {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        gap: 20px;
    }

    .footer-info, .footer-links, .social-icons, .footer-updated, .footer-copy,
    .footer-bottom-left {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 12px;
    }

    /* Row 2 left-hand group: social icons + update date together */
    .footer-bottom-left {
        gap: 28px;
    }

    .social-icons a {
        line-height: 1;
    }

    .social-icons a:focus-visible {
        outline: 2px solid #0071BC;
        outline-offset: 2px;
        border-radius: 4px;
    }

    .footer-copy {
        font-size: 0.95rem;
        margin: 0 !important;
        line-height: 1.5 !important;
    }

    /* The ownership statement had no rule of its own, so it inherited its way down to
       12.6px — measured, the smallest text anywhere in the footer, sitting beside a 16px
       copyright line that says something closely related. GIGW asks for this statement by
       name (5.1.2), so it should not be the hardest line on the page to read. Matched to
       .footer-copy above: same size, same line-height, so the two read as the pair they
       are. Contrast was already 16.5:1, so only the size needed changing. */
    .footer-owner {
        /* 16px, not 0.95rem: the root font-size on this site is 14px, so rem-based sizing
           lands at 13.3px — below the 14px counters beside it and well below the copyright.
           styles.css pins .footer-copy to 16px, and this line is its pair, so it takes the
           same absolute value. */
        font-size: 16px;
        margin: 0;
        line-height: 1.5;
    }

    /* GIGW/WCAG AA: ensure all text inside the light-themed footer has
       at least 4.5:1 contrast against the cream/peach themed backgrounds.
       #1b1b1b on any theme's `--bg-color-light` gives ≥ 11:1. */
    .theme-bg-light.footer,
    .theme-bg-light.footer .footer-info,
    .theme-bg-light.footer .footer-visitors,
    .theme-bg-light.footer .footer-bottom,
    .theme-bg-light.footer .footer-copy,
    .theme-bg-light.footer .footer-updated,
    .theme-bg-light.footer .updated-text {
        color: #1b1b1b !important;
    }

    /* 📱 Mobile & Tablet */
    /* Band widened from 576px to 991.98px.
       `.footer-bottom` carries `justify-content: space-between !important` above, which
       throws the social icons to the left edge and the copyright to the right. That is the
       desktop composition and it is right from 992px up, where the row is wide enough to
       read as two groups. Below that it only looked deliberate under 576px, because this
       block stacked and centred it — so 576-991.98px kept the split-to-the-edges layout
       while every other row in the footer was already centred.
       That band is also where a phone with "Desktop site" switched on lands (~980px),
       which is how the department found it.
       justify-content is restated because the !important above still applies; in a column
       with no fixed height it behaves like flex-start, but saying so costs nothing. */
    @media (max-width: 991.98px) {
        .footer-bottom {
            flex-direction: column !important;
            justify-content: center !important;
            align-items: center !important;
            text-align: center !important;
            padding: 10px 15px !important;
        }

        .footer-bottom-left {
            flex-direction: column !important;
            gap: 10px;
        }

        .footer-updated {
             justify-content: center !important;
             margin-left: 0 !important;
        }

        /* Below 992px the logo/description and the feedback form stack (col-lg-6), so
           centre them. styles.css gives .footer-logo-section a 79px right margin and
           left-aligned flex items, which pushed the logo and description off to the left. */
        .mahabhumi-footer .footer-logo-section {
            align-items: center;
            margin-right: 0;
            text-align: center;
        }

        .mahabhumi-footer .footer-desc1 {
            width: 100%;
            max-width: 760px; /* same as .feedback-card, so both blocks line up */
        }

        .mahabhumi-footer .feedback-heading {
            text-align: center;
        }
    }

    /* Desktop, all widths from 992px: contact + visitor counts and the policy links are ONE
       row. styles.css gives .footer-links `margin-top: 12px` (spacing for the stacked phone
       layout), and at 1400px+ nothing removed it, so the links sat 12px lower than the counters
       beside them. Was cleared only in the 992-1399.98px band below. */
    @media (min-width: 992px) {
        .footer .footer-links {
            margin-top: 0;
        }
    }

    /* Laptops 992-1399.98px: keep the 1440px composition (contact + visitor counts on the
       left, policy links on the right, one row). At 1024px the two groups need ~1020px
       but only ~985px is available, so the links wrapped onto their own row, left-aligned.
       Font size is NOT reduced (16px is the GIGW minimum pinned in styles.css); only the
       spacing is: the links' 8px side margins plus the 12px flex gap, and the 12px side
       margins on the counters. margin-left:auto keeps the links on the right even if a
       longer translation still makes them wrap. Below 992px the stacked/centred layout
       above applies; at 1400px+ the original spacing is untouched. */
    @media (min-width: 992px) and (max-width: 1399.98px) {
        /* Below ~1320px .footer-bottom is the full viewport width with no side padding,
           so the phone icon sat on the left edge and "मदत" was clipped on the right.
           16px keeps it off the edges; border-box so the padding does not widen it. */
        .footer .footer-bottom {
            gap: 12px;
            padding-left: 16px !important;
            padding-right: 16px !important;
            box-sizing: border-box;
        }

        .footer .footer-info {
            gap: 8px;
        }

        .footer .footer-info span {
            margin: 0 6px;
        }

        .footer .footer-links {
            margin-top: 0;
            margin-left: auto;
            justify-content: flex-end;
            gap: 4px;
        }

        .footer .footer-links a,
        .footer .footer-links button {
            margin: 0;
        }

        /* Row 2 (social icons + updated date | copyright): at 992px the copyright dropped
           onto its own line. Tighter icon spacing (8px -> 4px each side, styles.css) and
           group gap (28px -> 16px) frees ~50px; margin-left:auto keeps the copyright on
           the right if a longer translation still wraps it. Icon size is unchanged. */
        .footer .footer-bottom-left {
            gap: 16px !important;
        }

        .footer .social-icons a {
            margin: 0 4px;
        }

        .footer .footer-copy {
            margin-left: auto !important;
        }
    }

/* ------------------------------------------------------------------ *
 * GIGW 5.2.12 — the policy links were identified by colour alone
 *
 * Measured on the live footer: the links render at #495057 while the text beside them
 * (the ownership and copyright lines) is #1b1b1b, with no underline and the same 400
 * weight. Two dark greys are the only thing separating a link from plain text, so anyone
 * who cannot pick up that difference has no way to tell one from the other - which is
 * exactly what 1.4.1 forbids.
 *
 * An underline is the distinction that does not depend on colour at all. It is kept on
 * hover and focus as well, so the link never loses it.
 *
 * `.footer-links button` is included because "वेब माहिती व्यवस्थापक" is a <button> styled
 * to sit in the same row - it reads as a link and has the same problem. That is the one
 * the audit's screenshot points at.
 * ------------------------------------------------------------------
 * `!important` is needed, and is not decoration: styles.css carries a site-wide
 * `a { text-decoration: none !important }`. An !important declaration outranks every normal
 * one no matter how specific, so without it this rule is delivered and simply ignored -
 * measured. The global rule is left alone; overriding it here, for these five links only,
 * is the smaller change.
 */
.footer-links a,
.footer-links button {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

    .footer-links a:hover,
    .footer-links a:focus,
    .footer-links button:hover,
    .footer-links button:focus {
        text-decoration: underline !important;
    }

    /* Meeting 23-Oct-2026: "वेब माहिती व्यवस्थापक" must react to hover exactly like the four
       links beside it. Being a <button>, it picked up a site-wide button hover that turned
       it bold (700) - measured on production - while the links stayed 400, so it looked
       like a different kind of control. Same weight, colour and background as the links. */
    .footer-links button:hover,
    .footer-links button:focus,
    .footer-links button:active {
        font-weight: 400 !important;
        color: #495057 !important;
        background: transparent !important;
    }
