/**
 * DBIM Typography — Type Scale
 * Source: https://dbimtoolkit.digifootprint.gov.in/dbim-chapters?slug=typography
 *
 * Desktop (Table 3): H1 36 / H2 24 / H3 20 / Paragraph 1 16 / Paragraph 2 14 / Small Text 12
 * Mobile  (Table 4): H1 24 / H2 20 / H3 16 / Paragraph 1 14 / Paragraph 2 12 / Small Text 10
 * Line height: 1.2–1.5x the font size. Font family: Noto Sans (declared in style.css).
 *
 * h4–h6 are not defined by DBIM; they step down from H3.
 * `body[class*="elementor-kit-"]` selectors outrank the Elementor kit's
 * `.elementor-kit-N hN` rules without hardcoding the kit ID.
 * Sizes set on individual Elementor widgets / components still take precedence.
 */

:root {
    --dbim-fs-h1: 36px;
    --dbim-fs-h2: 24px;
    --dbim-fs-h3: 20px;
    --dbim-fs-h4: 18px;
    --dbim-fs-h5: 16px;
    --dbim-fs-h6: 14px;
    --dbim-fs-p1: 16px;
    --dbim-fs-p2: 14px;
    --dbim-fs-small: 12px;
    --dbim-lh-heading: 1.25;
    --dbim-lh-body: 1.5;
}

@media (max-width: 767px) {
    :root {
        --dbim-fs-h1: 24px;
        --dbim-fs-h2: 20px;
        --dbim-fs-h3: 16px;
        --dbim-fs-h4: 16px;
        --dbim-fs-h5: 14px;
        --dbim-fs-h6: 12px;
        --dbim-fs-p1: 14px;
        --dbim-fs-p2: 12px;
        --dbim-fs-small: 10px;
    }
}

/*
 * Elementor kit heading presets (Site Settings > Global Fonts) mapped onto the DBIM scale.
 * Overridden here in code so the scale survives DB swaps; the kit's own values are 40/32/28/24px.
 * 1028aed = h1 | 6e9d167, 65c3848 = h2 | f2734e6, 0bd49a7 = h3 | 40d9adb = h4 | 5f9262d, 986b30e = h5 | d8aef2c, eff2cbb = h6
 */
body[class*="elementor-kit-"] {
    --e-global-typography-1028aed-font-size: var(--dbim-fs-h1);
    --e-global-typography-1028aed-line-height: var(--dbim-lh-heading);
    --e-global-typography-6e9d167-font-size: var(--dbim-fs-h2);
    --e-global-typography-6e9d167-line-height: var(--dbim-lh-heading);
    --e-global-typography-65c3848-font-size: var(--dbim-fs-h2);
    --e-global-typography-65c3848-line-height: var(--dbim-lh-heading);
    --e-global-typography-f2734e6-font-size: var(--dbim-fs-h3);
    --e-global-typography-f2734e6-line-height: var(--dbim-lh-heading);
    --e-global-typography-0bd49a7-font-size: var(--dbim-fs-h3);
    --e-global-typography-0bd49a7-line-height: var(--dbim-lh-heading);
    --e-global-typography-40d9adb-font-size: var(--dbim-fs-h4);
    --e-global-typography-40d9adb-line-height: var(--dbim-lh-heading);
    --e-global-typography-5f9262d-font-size: var(--dbim-fs-h5);
    --e-global-typography-5f9262d-line-height: var(--dbim-lh-heading);
    --e-global-typography-986b30e-font-size: var(--dbim-fs-h5);
    --e-global-typography-986b30e-line-height: var(--dbim-lh-heading);
    --e-global-typography-d8aef2c-font-size: var(--dbim-fs-h6);
    --e-global-typography-d8aef2c-line-height: var(--dbim-lh-heading);
    --e-global-typography-eff2cbb-font-size: var(--dbim-fs-h6);
    --e-global-typography-eff2cbb-line-height: var(--dbim-lh-heading);
}

/* Body / Paragraph 1 */
body,
body[class*="elementor-kit-"] {
    font-size: var(--dbim-fs-p1);
    line-height: var(--dbim-lh-body);
    text-align: left;
}

/* Paragraph 2 / Small Text utilities */
.dbim-text-p2 {
    font-size: var(--dbim-fs-p2);
    line-height: var(--dbim-lh-body);
}

small,
.small,
.dbim-text-small {
    font-size: var(--dbim-fs-small);
    line-height: var(--dbim-lh-body);
}

/* Headings */
h1, .h1,
body[class*="elementor-kit-"] h1,
body[class*="elementor-kit-"] .h1 {
    font-size: var(--dbim-fs-h1);
    line-height: var(--dbim-lh-heading);
}

h2, .h2,
body[class*="elementor-kit-"] h2,
body[class*="elementor-kit-"] .h2 {
    font-size: var(--dbim-fs-h2);
    line-height: var(--dbim-lh-heading);
}

/* !important retained from the previous ux4gCustom.css h3 rule */
h3, .h3,
body[class*="elementor-kit-"] h3,
body[class*="elementor-kit-"] .h3 {
    font-size: var(--dbim-fs-h3) !important;
    line-height: var(--dbim-lh-heading);
}

h4, .h4,
body[class*="elementor-kit-"] h4,
body[class*="elementor-kit-"] .h4 {
    font-size: var(--dbim-fs-h4);
    line-height: var(--dbim-lh-heading);
}

h5, .h5,
body[class*="elementor-kit-"] h5,
body[class*="elementor-kit-"] .h5 {
    font-size: var(--dbim-fs-h5);
    line-height: var(--dbim-lh-heading);
}

h6, .h6,
body[class*="elementor-kit-"] h6,
body[class*="elementor-kit-"] .h6 {
    font-size: var(--dbim-fs-h6);
    line-height: var(--dbim-lh-heading);
}
