/* ==========================================================================
   dbim-standard.css  (added 2026-11-27)
   One consistent typography / spacing layer on top of the legacy CSS, using
   the DBIM tokens defined in dbim-typography.css:
       desktop  H1 36 | H2 24 | H3 20 | P1 16 | P2 14 | small 12
       mobile   H1 24 | H2 20 | H3 16 | P1 14 | P2 12 | small 10   (<= 767px)
   Line height: headings 1.3, text 1.5. Spacing on an 8px rhythm.
   Selectors are prefixed with #bdMainSite (the <body> id) so they win over the
   legacy sheets and the inline <style> blocks inside page templates without
   needing !important.  Rollback: remove the <link> in partials/header.blade.php.
   ========================================================================== */

:root {
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --radius: 6px;
  --box-bg: #f0f3f8;
  --a11y-focus: #f7931e;
}

/* ---------- 1. Skip link & landmarks ------------------------------------- */
.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100000;
  padding: 10px 16px;
  background: var(--brand-primary);
  color: #fff !important;
  font-size: 16px;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 0; outline: 3px solid var(--a11y-focus); }
.skip-target { display: block; height: 0; outline: none; }
.skip-target:focus { outline: none; }

/* ---------- 2. Logo (now a link to the home page) ------------------------ */
#bdMainSite a.logo,
#bdMainSite a.logo:hover,
#bdMainSite a.logo:focus { color: var(--text-on-light); text-decoration: none !important; }
#bdMainSite a.logo:focus-visible { outline: 3px solid var(--a11y-focus); outline-offset: 4px; }
#bdMainSite .logo-text { display: block; margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--text-on-light); }
#bdMainSite .logo-text .logo-subtext { display: block; margin: 2px 0 0; font-size: 16px; font-weight: 600; line-height: 1.3; color: #555; }
@media only screen and (max-width: 800px) {
  #bdMainSite .logo-text { font-size: 16px; }
  #bdMainSite .logo-text .logo-subtext { font-size: 14px; }
}
@media only screen and (max-width: 400px) {
  #bdMainSite .logo-text { font-size: 14px; }
  #bdMainSite .logo-text .logo-subtext { font-size: 12px; }
}

/* ---------- 3. Base text --------------------------------------------------- */
#bdMainSite #innerContent,
#bdMainSite #innerContent p,
#bdMainSite #innerContent li,
#bdMainSite #innerContent td,
#bdMainSite #innerContent th,
#bdMainSite #innerContent dd,
#bdMainSite #innerContent dt,
#bdMainSite .mcontent,
#bdMainSite .mcontent p,
#bdMainSite .mcontent li {
  font-size: var(--fs-p1);
  line-height: var(--lh-body);
}
#bdMainSite #innerContent p { margin: 0 0 var(--space-2); }
#bdMainSite #innerContent table p { margin: 0; }
#bdMainSite #innerContent small, #bdMainSite .text-small { font-size: var(--fs-small); }

/* Headings inside page content */
#bdMainSite #innerContent h1 { font-size: var(--fs-h1); }
#bdMainSite #innerContent h2 { font-size: var(--fs-h2); }
#bdMainSite #innerContent h3 { font-size: var(--fs-h3); }
#bdMainSite #innerContent h4 { font-size: 18px; }
#bdMainSite #innerContent h5,
#bdMainSite #innerContent h6 { font-size: var(--fs-p1); }
#bdMainSite #innerContent h1, #bdMainSite #innerContent h2, #bdMainSite #innerContent h3,
#bdMainSite #innerContent h4, #bdMainSite #innerContent h5, #bdMainSite #innerContent h6 {
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  margin: var(--space-3) 0 var(--space-1);
}
#bdMainSite #innerContent > h2:first-child,
#bdMainSite #innerContent > h1:first-child { margin-top: 0; }
@media only screen and (max-width: 767px) {
  #bdMainSite #innerContent h4 { font-size: 16px; }
}

/* Sizes typed into the CMS editor (style="font-size:15px", 0.8em, medium ...)
   are normalised to the DBIM body size; "large"/"x-large" (used by editors as
   pseudo-headings) map to the H3 size. */
#bdMainSite #innerContent [style*="font-size"],
#bdMainSite .mcontent [style*="font-size"] { font-size: inherit !important; }
#bdMainSite #innerContent [style*="font-size: large"], #bdMainSite #innerContent [style*="font-size:large"],
#bdMainSite #innerContent [style*="x-large"], #bdMainSite .mcontent [style*="font-size: large"],
#bdMainSite .mcontent [style*="font-size:large"], #bdMainSite .mcontent [style*="x-large"] {
  font-size: var(--fs-h3) !important; line-height: var(--lh-heading);
}

/* Form labels and controls */
#bdMainSite #innerContent label,
#bdMainSite #innerContent .form-group label { font-size: var(--fs-p2); font-weight: var(--fw-medium); line-height: 1.4; }
#bdMainSite #innerContent input, #bdMainSite #innerContent select,
#bdMainSite #innerContent textarea, #bdMainSite #innerContent button { font-size: var(--fs-p1); }

/* ---------- 4. Inner page banner title (was a 38px <span>, now <h1>) ----- */
#bdMainSite .innerBanner h1.innerBannerTitle {
  float: left;
  width: 100%;
  margin: 0;
  padding: var(--space-4) 0;
  color: #fff;
  font-size: var(--fs-h1);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  letter-spacing: 0;
}
@media only screen and (max-width: 1023px) {
  #bdMainSite .innerBanner h1.innerBannerTitle { padding: var(--space-3) 0; }
}
@media only screen and (max-width: 767px) {
  #bdMainSite .innerBanner .container { padding-left: 15px; padding-right: 15px; }
  #bdMainSite .innerBanner h1.innerBannerTitle { padding: 20px 0; width: 85%; }
}

/* Breadcrumb */
#bdMainSite .breadcrumb, #bdMainSite .breadcrumb li,
#bdMainSite .breadcrumb a, #bdMainSite .breadcrumb span { font-size: var(--fs-p2); line-height: 1.5; }

/* Left / right section menu */
#bdMainSite .rightPart .menuTitle,
#bdMainSite .leftMenu .menuTitle { font-size: var(--fs-h3); line-height: var(--lh-heading); margin-bottom: var(--space-2); }
#bdMainSite #menuLeft li a, #bdMainSite .innerLink a, #bdMainSite li.innerLink > a { font-size: var(--fs-p2); line-height: 1.5; }

/* Sitemap */
#bdMainSite .site_map li a, #bdMainSite .site_map li a span,
#bdMainSite .site_map li span { font-size: var(--fs-p1); }

/* Archive / listing dates */
#bdMainSite .PLdate, #bdMainSite .date { font-size: var(--fs-p2); }

/* ---------- 5. Navigation ------------------------------------------------- */
#bdMainSite #nav ul li a,
#bdMainSite .menuSubUl li a { font-size: var(--fs-p2); line-height: 1.5; }

/* ---------- 6. Home page --------------------------------------------------- */
#bdMainSite .welcome-intro { font-size: var(--fs-p1); line-height: var(--lh-body); margin: var(--space-3) auto; max-width: 1100px; }

/* Slider caption */
#bdMainSite .indexBanner .sliderText .title,
#bdMainSite .indexBanner .sliderText p.title { font-size: var(--fs-p1); font-weight: var(--fw-semibold); line-height: 1.4; }

/* Tabs (What's New, Press Releases ...) */
#bdMainSite .resTab .tabNav li a,
#bdMainSite a.tabval { font-size: var(--fs-p1); line-height: 1.5; }
#bdMainSite .recordBox a,
#bdMainSite .recordBox > a { font-size: var(--fs-p1); font-weight: var(--fw-semibold); line-height: 1.5; }
#bdMainSite .recordBox, #bdMainSite .recordBox span { line-height: 1.5; }
#bdMainSite a.readMore, #bdMainSite a.readMore strong { font-size: var(--fs-p2); }

/* Sidebar / box titles: all the same level (h2), DBIM H3 size */
#bdMainSite h2.box-title,
#bdMainSite .box-title a,
#bdMainSite .box-title strong {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  letter-spacing: 0;
}
#bdMainSite h2.box-title { margin: 0; text-align: center; }
#bdMainSite .info-header.box-title,
#bdMainSite .info-headeremg.box-title,
#bdMainSite .contus-header.box-title,
#bdMainSite .imp-links-heading.box-title {
  padding: var(--space-1) var(--space-2);
  background: var(--brand-primary);
  border-radius: var(--radius) var(--radius) 0 0;
  margin: 0;
}
#bdMainSite .info-headeremg.box-title { border-radius: var(--radius); }
#bdMainSite .box-title, #bdMainSite .box-title a, #bdMainSite .box-title strong { color: #fff; }
#bdMainSite .box-title a:hover { color: #fff; }
/* 5.css hides any span inside .contentPart h2 (old image-replacement trick) */
#bdMainSite .contentPart h2.box-title span {
  text-indent: 0; overflow: visible; width: auto; height: auto;
  position: static; background: none; float: none;
}
#bdMainSite .info-headeremg .emg-title { display: block; color: #fff; }
#bdMainSite .info-headeremg .emg-note { display: block; margin-top: 4px; color: #ffd700; font-size: var(--fs-p2); font-weight: var(--fw-semibold); }
#bdMainSite .ministerDetails h2.ministerName {
  color: var(--brand-primary);
  margin: var(--space-1) 0 var(--space-1);
  padding: 0;
  background: none;
}
#bdMainSite .ministerDetails h2.ministerName span { display: block; font-size: var(--fs-p2); font-weight: 400; }
#bdMainSite .botimpor1 h2.box-title { color: var(--brand-primary); padding: var(--space-2) var(--space-2) var(--space-1); }

/* Box bodies */
#bdMainSite .info-text-top, #bdMainSite .info-text,
#bdMainSite .contus p, #bdMainSite .ministerDetailList li,
#bdMainSite .ministerDetailList li a { font-size: var(--fs-p2); line-height: 1.5; }
#bdMainSite .info-text-top { padding-top: var(--space-1); margin: 0; }
#bdMainSite .info-text { margin: 0; padding: 0 var(--space-1) var(--space-1); }
#bdMainSite .impHomeLinks li, #bdMainSite .impHomeLinks li a { font-size: var(--fs-p2); line-height: 1.5; }
#bdMainSite .botimpor1 a.view { font-size: var(--fs-p2); }

/* Even vertical rhythm between the right-hand boxes */
#bdMainSite .contentRightBlock_1 > br { display: none; }
#bdMainSite .contentRightBlock_1 > div,
#bdMainSite .contentRightBlock_1 > .botimgnew1 { margin-top: var(--space-2); }
#bdMainSite .contentRightBlock_1 > div:first-child { margin-top: 0; }
#bdMainSite .index_img3, #bdMainSite .contus, #bdMainSite .botimpor1 { border-radius: var(--radius); }

/* Registration cards */
#bdMainSite .register-title { font-size: var(--fs-h3); line-height: var(--lh-heading); margin-bottom: var(--space-2); }
#bdMainSite .register-button { font-size: var(--fs-p2); font-weight: var(--fw-semibold); padding: 10px var(--space-3); min-height: 44px; }

/* India Perspectives / Children's Corner cards */
#bdMainSite .ip-card-title, #bdMainSite .kc-title { font-size: var(--fs-p1); line-height: 1.4; }
#bdMainSite .ip-card-desc, #bdMainSite .kc-desc, #bdMainSite .ip-tagline { font-size: var(--fs-p2); line-height: 1.5; }
#bdMainSite .ip-visit-btn, #bdMainSite .ip-card-arrow { font-size: var(--fs-small); }

/* Scrolling notice bar */
#bdMainSite a.mar, #bdMainSite marquee span { font-size: var(--fs-p2); }

/* Notice popup */
#bdMainSite .popup .mission p, #bdMainSite .popup .mission strong,
#bdMainSite .popup .mission a { font-size: var(--fs-p1); line-height: 1.5; }

/* Mobile quick-link tiles */
#bdMainSite .tabIconBoxLink .tabBoxTitle { font-size: var(--fs-p2); }

/* ---------- 7. Footer ----------------------------------------------------- */
#bdMainSite .footerLinks li, #bdMainSite .footerLinks li a { font-size: var(--fs-p2); line-height: 1.5; }
#bdMainSite .footerLeft span, #bdMainSite .footerRight span,
#bdMainSite .footerRight p, #bdMainSite .footer_copy { font-size: var(--fs-p2); line-height: 1.5; }
#bdMainSite .footerCont { padding: var(--space-3) 0; }

/* ---------- 8. Accessibility Tools panel ---------------------------------- */
.access_panel[hidden] { display: none !important; }
#bdMainSite .access_panel { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
#bdMainSite .access_panel_row { margin-bottom: 0 !important; padding: var(--space-1) 12px; gap: 12px; }
#bdMainSite .access_panel_column {
  min-height: 88px;
  justify-content: center;
  font: inherit;
  color: var(--text-on-light);
}
#bdMainSite .access_panel_column span { font-size: var(--fs-small); font-weight: var(--fw-semibold); line-height: 1.3; }
#bdMainSite .access_panel_column:focus-visible,
#bdMainSite .access_panel_reset:focus-visible,
#bdMainSite .accessibility-panel__close:focus-visible { outline: 3px solid var(--a11y-focus); outline-offset: 2px; }
#bdMainSite .access_panel_column[disabled] { opacity: 0.45; cursor: not-allowed; }
#bdMainSite .access_panel_column[disabled]:hover { background: #fff !important; }
#bdMainSite .a11y-text-level { margin: 4px 12px 0; font-size: var(--fs-p2); font-weight: var(--fw-semibold); color: var(--brand-primary); text-align: center; }
@media only screen and (max-width: 480px) {
  #bdMainSite .access_panel_column { min-height: 76px; padding: 10px 6px; }
}

/* The third-party chat widget (HubSpot) sits above everything and covered
   the bottom of the panel: hide it only while the panel is open. */
html.a11y-panel-open #hubspot-messages-iframe-container { visibility: hidden !important; }

/* ---------- 9. Accessibility Tools effects (classes on <html>) ------------ */
/* Text size (90% .. 130%): scales the DBIM type tokens, so every text that
   uses them grows/shrinks while the layout, header and this panel stay put
   (an earlier body-zoom approach pushed the panel off-screen on tablets). */
:root { --a11y-scale: 1; }
html.a11y-text-0 { --a11y-scale: 0.9; }
html.a11y-text-2 { --a11y-scale: 1.1; }
html.a11y-text-3 { --a11y-scale: 1.2; }
html.a11y-text-4 { --a11y-scale: 1.3; }
:root {
  --fs-h1: calc(36px * var(--a11y-scale));
  --fs-h2: calc(24px * var(--a11y-scale));
  --fs-h3: calc(20px * var(--a11y-scale));
  --fs-p1: calc(16px * var(--a11y-scale));
  --fs-p2: calc(14px * var(--a11y-scale));
  --fs-small: calc(12px * var(--a11y-scale));
  --fs-nav: calc(14px * var(--a11y-scale));
}
@media (max-width: 767px) {
  :root {
    --fs-h1: calc(24px * var(--a11y-scale));
    --fs-h2: calc(20px * var(--a11y-scale));
    --fs-h3: calc(16px * var(--a11y-scale));
    --fs-p1: calc(14px * var(--a11y-scale));
    --fs-p2: calc(12px * var(--a11y-scale));
    --fs-small: calc(10px * var(--a11y-scale));
    --fs-nav: calc(16px * var(--a11y-scale));
  }
}
/* Texts still sized in px by the legacy sheets: hook them to the tokens */
#bdMainSite .search-box input { font-size: var(--fs-p2); }

/* Dark contrast: black background, white text, yellow links everywhere */
html.a11y-contrast body,
html.a11y-contrast body *:not(img):not(video):not(iframe):not(svg):not(path) {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
html.a11y-contrast body *:not(.sliderImg):not(.ip-left-panel) { background-image: none !important; }
html.a11y-contrast body a,
html.a11y-contrast body a * { color: #ffff00 !important; }
html.a11y-contrast body a:hover,
html.a11y-contrast body a:focus { color: #fff !important; }
/* Dark line icons would vanish on black: invert them */
html.a11y-contrast .logo-img,
html.a11y-contrast .header-tools img,
html.a11y-contrast .access_panel img { filter: invert(1) !important; }
html.a11y-contrast .access_panel_column[aria-pressed="true"] { outline: 3px solid #ffff00; }
html.a11y-contrast .popup-overlay { background-color: rgba(0, 0, 0, 0.85) !important; }

/* Invert colours (photos are flipped back so they look normal) */
html.a11y-invert { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert img, html.a11y-invert video, html.a11y-invert iframe,
html.a11y-invert .sliderImg, html.a11y-invert .ip-left-panel { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert .access_panel img, html.a11y-invert .header-tools img, html.a11y-invert .logo-img { filter: none; }

/* Saturation (greyscale) */
html.a11y-grayscale { filter: grayscale(1); }
html.a11y-grayscale.a11y-invert { filter: invert(1) hue-rotate(180deg) grayscale(1); }

/* Highlight links */
html.a11y-links body a:not(.logo):not(.skip-link) {
  background-color: #ffff00 !important;
  color: #000 !important;
  text-decoration: underline !important;
  outline: 2px solid #000;
  outline-offset: 1px;
}
html.a11y-links body a:not(.logo) * { color: #000 !important; }
html.a11y-links body a:has(> img:only-child) { background-color: transparent !important; outline: 3px solid #ffff00; }

/* Hide images (header tools, emblem and the panel icons stay visible) */
html.a11y-hide-images body img,
html.a11y-hide-images body video,
html.a11y-hide-images body picture,
html.a11y-hide-images body iframe { visibility: hidden !important; }
html.a11y-hide-images body * { background-image: none !important; }
html.a11y-hide-images .header-tools img,
html.a11y-hide-images .access_panel img,
html.a11y-hide-images .logo-img { visibility: visible !important; }

/* Big cursor */
html.a11y-big-cursor body,
html.a11y-big-cursor body * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'><path d='M5 2l14 10-6 1.5 3.5 7-3 1.5-3.5-7L5 19z' fill='black' stroke='white' stroke-width='1.5'/></svg>") 4 2, auto !important;
}
html.a11y-big-cursor body a, html.a11y-big-cursor body a *,
html.a11y-big-cursor body button, html.a11y-big-cursor body button * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'><path d='M9 11V4.5a1.5 1.5 0 0 1 3 0V10h.5V3a1.5 1.5 0 0 1 3 0v7h.5V4.5a1.5 1.5 0 0 1 3 0V15c0 3.9-3.1 7-7 7h-.6c-2 0-3.8-.9-5-2.5L3.3 15.2a1.6 1.6 0 0 1 2.4-2.1L9 15z' fill='white' stroke='black' stroke-width='1.2'/></svg>") 14 2, pointer !important;
}

/* Reduced motion preference: stop decorative animation */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
