/**
 * DBIM 3.0 (Digital Brand Identity Manual) layer for the NSU theme.
 *
 * Loaded after style.css (see templates/html.tpl.php) so it overrides the
 * legacy styles without editing them.
 *
 * COLOUR GROUP: only one primary colour group may be used (DBIM 2.1).
 * Burgundy is a placeholder until NSU confirms its choice. To switch, replace
 * the five --dbim-c* values with another group from the manual, e.g.
 *   Cinnamon Red: #771D1D #A72626 #D75151 #FAAAAA #FCDADA
 *   Blue:         #162F6A #214AAB #5279D7 #A3BBF3 #D2DFFF
 *   Green:        #0F5757 #2D8686 #75BDBD #A6D9D9 #D9F2F2
 */

/* ------------------------------------------------------------------ */
/* Fonts: Noto Sans (DBIM 4.1), self-hosted.                           */
/* ------------------------------------------------------------------ */
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/noto/noto-sans-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/noto/noto-sans-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/noto/noto-sans-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/noto/noto-sans-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/noto/noto-sans-devanagari-400.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/noto/noto-sans-devanagari-500.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/noto/noto-sans-devanagari-600.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/noto/noto-sans-devanagari-700.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: 'Noto Sans Meetei Mayek'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/noto/noto-sans-meetei-mayek-400.woff2) format('woff2'); }

/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */
:root {
  /* Primary colour group (placeholder: Burgundy). c1 = key colour (darkest). */
  --dbim-c1: #6C1340;
  --dbim-c2: #A32966;
  --dbim-c3: #DB70A6;
  --dbim-c4: #EBADCC;
  --dbim-c5: #FAEBF2;

  /* Functional palette (DBIM 2.2). */
  --dbim-linen: #EBEAEA;
  --dbim-white: #FFFFFF;
  --dbim-text: #150202;
  --dbim-link: #0D6EFD;
  --dbim-grey1: #C6C6C6;
  --dbim-grey2: #8E8E8E;
  --dbim-grey3: #606060;

  --dbim-font: 'Noto Sans', 'Noto Sans Meetei Mayek', Arial, sans-serif;
  --dbim-max: 1280px;
}

/* ------------------------------------------------------------------ */
/* Typography (DBIM 4.1, 4.3.1 desktop / 4.3.2 mobile)                 */
/* ------------------------------------------------------------------ */
html { font-size: 16px; }
html.dbim-text-sm { font-size: 14px; }
html.dbim-text-lg { font-size: 18px; }
html.dbim-text-xl { font-size: 20px; }

body {
  font-family: var(--dbim-font) !important;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--dbim-text);
  background: var(--dbim-white);
}
/* The legacy stylesheet sets many other font families; DBIM mandates Noto Sans
   everywhere. Icon fonts are excluded so their glyphs keep working. */
body *:not(.fa):not(.glyphicon):not([class*="fa-"]) {
  font-family: var(--dbim-font) !important;
}

h1, .h1 { font-size: 2.25rem; line-height: 1.25; }
h2, .h2 { font-size: 1.5rem;  line-height: 1.3; }
h3, .h3 { font-size: 1.25rem; line-height: 1.35; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; }
small, .small { font-size: 0.75rem; }

/* Main content follows the text-size controls. */
#skipContent p, #skipContent li, #skipContent td, #skipContent th,
#skipContent dd, #skipContent dt { font-size: 1rem; line-height: 1.5; }
#skipContent p, .inner-contant-wrap p, .expore-sec p, .minister-row p { text-align: left; }

/* Tables: left text, centred headings (DBIM 4.1.1). */
#skipContent th { text-align: center; }

a { color: var(--dbim-link); }
a:hover, a:focus { text-decoration: underline; }
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--dbim-c3);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  html { font-size: 14px; }
  h1, .h1 { font-size: 1.7143rem; }  /* 24px */
  h2, .h2 { font-size: 1.4286rem; }  /* 20px */
  h3, .h3 { font-size: 1.1429rem; }  /* 16px */
}

.dbim-container {
  max-width: var(--dbim-max);
  margin: 0 auto;
  padding: 0 16px;
}
.dbim-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Buttons: consistent size and visible states (DBIM 4.5). */
.form-submit, .btn, input[type="submit"] {
  font-family: var(--dbim-font);
  font-size: 1rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 4px;
  border: 1px solid var(--dbim-c1);
  background: var(--dbim-c1);
  color: var(--dbim-white);
  cursor: pointer;
}
.form-submit:hover, .btn:hover, input[type="submit"]:hover { background: var(--dbim-c2); border-color: var(--dbim-c2); }
.form-submit:disabled, .btn:disabled, input[type="submit"]:disabled { background: var(--dbim-grey1); border-color: var(--dbim-grey1); color: var(--dbim-grey3); cursor: not-allowed; }

/* ------------------------------------------------------------------ */
/* Skip link                                                           */
/* ------------------------------------------------------------------ */
.dbim-skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 10000;
  background: var(--dbim-c1); color: var(--dbim-white); padding: 8px 16px;
}
.dbim-skip-link:focus { top: 8px; color: var(--dbim-white); }

/* ------------------------------------------------------------------ */
/* Header (DBIM 5.4.2)                                                 */
/* ------------------------------------------------------------------ */
.dbim-header { width: 100%; float: left; background: var(--dbim-white); }

/* Utility bar: parent ministry + user controls. */
.dbim-utility { background: var(--dbim-linen); border-bottom: 1px solid var(--dbim-grey1); font-size: 0.875rem; }
.dbim-utility-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; min-height: 40px; }
.dbim-parent { margin: 0; color: var(--dbim-text); }
.dbim-controls { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; gap: 4px 16px; }
.dbim-controls > li { display: flex; align-items: center; gap: 4px; }
.dbim-controls a { color: var(--dbim-text); }
.dbim-controls button {
  background: var(--dbim-white); color: var(--dbim-text);
  border: 1px solid var(--dbim-grey1); border-radius: 4px;
  min-width: 32px; height: 28px; padding: 0 6px; line-height: 1; cursor: pointer;
}
.dbim-controls button:hover { border-color: var(--dbim-c1); color: var(--dbim-c1); }
.dbim-controls button[aria-pressed="true"] { background: var(--dbim-c1); border-color: var(--dbim-c1); color: var(--dbim-white); }
.dbim-language-label { white-space: nowrap; }
.dbim-language .goog-te-gadget { font-size: 0 !important; }
.dbim-language .goog-te-gadget select { font-size: 0.875rem; height: 28px; border: 1px solid var(--dbim-grey1); border-radius: 4px; }
.dbim-language .goog-logo-link, .dbim-language .goog-te-gadget > span { display: none !important; }
.dbim-language .goog-te-gadget div { display: inline; }

/* Brand row: logo lockup 3A + search + co-branding. */
.dbim-brand-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.dbim-lockup { display: flex; align-items: center; gap: 12px; color: var(--dbim-text); text-decoration: none !important; }
.dbim-lockup:hover .dbim-org-title { color: var(--dbim-c1); }
.dbim-emblem { height: 57px; width: auto; }
.dbim-lockup-divider { width: 1px; align-self: stretch; background: var(--dbim-grey1); }
.dbim-org-logo { height: 60px; width: auto; }
.dbim-org-name { display: flex; flex-direction: column; }
.dbim-org-title { font-size: 1.5rem; font-weight: 700; line-height: 1.2; color: var(--dbim-text); }
.dbim-org-tagline { font-size: 0.875rem; color: var(--dbim-grey3); }

.dbim-brand-right { display: flex; align-items: center; gap: 16px; }
.dbim-cobrand img { height: 49px; width: auto; }

/* Search (highlighted search bar). */
.dbim-search .form-item { margin: 0; }
.dbim-search form > div { display: flex; }
.dbim-search .container-inline { display: flex; align-items: center; }
.dbim-search input[type="text"], .dbim-search input[type="search"] {
  height: 40px; width: 240px; max-width: 60vw;
  border: 1px solid var(--dbim-grey2); border-right: 0; border-radius: 4px 0 0 4px;
  padding: 0 12px; font-size: 1rem; color: var(--dbim-text);
}
.dbim-search input[type="submit"] { height: 40px; border-radius: 0 4px 4px 0; padding: 0 16px; }

/* Global navigation. */
.dbim-nav.naviarea { background: var(--dbim-c1) !important; min-height: 0; width: 100%; float: left; }
.dbim-nav .dbim-container { padding: 0 16px; }
.dbim-nav-toggle { display: none; }
.dbim-nav ul.nice-menu-down { width: auto !important; }
.dbim-nav ul.nice-menu-down > li { border-right: 0 !important; }
.dbim-nav ul.nice-menu-down > li > a {
  display: block; padding: 12px 14px !important;
  color: var(--dbim-white) !important; font-size: 0.9375rem; font-weight: 500;
}
.dbim-nav ul.nice-menu li:hover, .dbim-nav ul.nice-menu li.over { background-color: var(--dbim-c2) !important; }
.dbim-nav ul.nice-menu ul { background: var(--dbim-c1) !important; }
.dbim-nav ul.nice-menu ul li { border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important; }
.dbim-nav ul.nice-menu ul li a { font-size: 0.875rem; }
.dbim-nav ul.nice-menu a:focus { outline-color: var(--dbim-white); }
/* Set by dbim.js when a submenu would run past the right edge of the window. */
.dbim-nav ul.nice-menu li.dbim-flip-top > ul { left: auto !important; right: 0 !important; }
.dbim-nav ul.nice-menu li li.dbim-flip > ul { left: auto !important; right: 100% !important; }

/* Quick links under the menu (registration_page region). */
.dbim-quickbar { width: 100%; float: left; background: var(--dbim-c5); }
.dbim-quickbar ul { list-style: none; margin: 0; padding: 6px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dbim-quickbar li { float: none !important; width: auto !important; background: none !important; }
.dbim-quickbar li a {
  display: inline-block; padding: 6px 14px !important; border-radius: 4px;
  background: var(--dbim-c1); color: var(--dbim-white) !important; font-size: 0.875rem; font-weight: 600;
}
.dbim-quickbar li a:hover { background: var(--dbim-c2); text-decoration: none; }
.dbim-quickbar li a.adblinkq { display: inline-flex; align-items: center; gap: 6px; }
.dbim-badge {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  background: var(--dbim-white); color: var(--dbim-c1); font-size: 0.75rem; font-weight: 700; line-height: 1.4;
}

/* ------------------------------------------------------------------ */
/* Announcement ticker (replaces <marquee>; pausable, GIGW 2.2.2)      */
/* ------------------------------------------------------------------ */
.dbim-ticker { width: 100%; float: left; background: var(--dbim-c5); border-bottom: 1px solid var(--dbim-c4); }
.dbim-ticker-inner { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.dbim-ticker-label {
  flex: none; background: var(--dbim-c1); color: var(--dbim-white);
  font-weight: 600; font-size: 0.875rem; padding: 4px 12px; border-radius: 4px;
}
.dbim-ticker-viewport { flex: 1; overflow: hidden; white-space: nowrap; }
.dbim-ticker-track {
  display: inline-block; list-style: none; margin: 0; padding: 0 0 0 100%;
  animation: dbim-ticker 45s linear infinite;
}
.dbim-ticker-track li { display: inline-block; margin-right: 48px; }
.dbim-ticker-track a { color: var(--dbim-c1); font-weight: 600; font-size: 0.9375rem; }
.dbim-ticker:hover .dbim-ticker-track,
.dbim-ticker:focus-within .dbim-ticker-track,
.dbim-ticker.is-paused .dbim-ticker-track { animation-play-state: paused; }
.dbim-ticker-toggle {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  background: var(--dbim-white); color: var(--dbim-c1);
  border: 1px solid var(--dbim-c1); border-radius: 4px; padding: 4px 10px; font-size: 0.875rem; cursor: pointer;
}
.dbim-ticker-toggle:hover { background: var(--dbim-c1); color: var(--dbim-white); }
@keyframes dbim-ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .dbim-ticker-viewport { white-space: normal; }
  .dbim-ticker-track { animation: none; padding-left: 0; }
  .dbim-ticker-toggle { display: none; }
}

/* ------------------------------------------------------------------ */
/* Homepage banner: fill the slot without distorting the image.        */
/* Legacy CSS forces width:100% + height:408px, which squashes 3:2     */
/* photos. Recommended upload size: 1440 x 600 px (about 2.4 : 1).     */
/* ------------------------------------------------------------------ */
#homecrousal .item img.first-slide {
  width: 100%;
  height: 408px;
  object-fit: cover;
  object-position: center 35%; /* favour the upper-middle, where faces usually are */
}
@media (max-width: 767px) {
  #homecrousal .item img.first-slide { height: 250px; }
}

/* ------------------------------------------------------------------ */
/* Footer (DBIM 5.6): key colour background                            */
/* ------------------------------------------------------------------ */
.dbim-partner-logos { width: 100%; float: left; background: var(--dbim-white); border-top: 1px solid var(--dbim-linen); }

.dbim-footer { width: 100%; float: left; background: var(--dbim-c1); color: var(--dbim-white); font-size: 0.875rem; }
.dbim-footer a { color: var(--dbim-white) !important; }
.dbim-footer a:hover, .dbim-footer a:focus { text-decoration: underline; }
.dbim-footer a:focus { outline-color: var(--dbim-white); }
.dbim-footer-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  padding-top: 32px; padding-bottom: 24px;
}
.dbim-footer h2 {
  font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--dbim-white); margin: 0 0 12px;
}
.dbim-footer ul { list-style: none; margin: 0; padding: 0; }
.dbim-footer li { margin: 0 0 8px; font-size: 0.875rem; }

.dbim-social { display: flex; gap: 12px; }
.dbim-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 50%;
}
.dbim-social a:hover { background: rgba(255, 255, 255, 0.15); text-decoration: none; }
.dbim-social .fa { font-size: 18px; color: var(--dbim-white); }

.dbim-footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.25); }
.dbim-footer-bottom-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  padding-top: 14px; padding-bottom: 14px;
}
.dbim-footer-bottom p { margin: 0; color: var(--dbim-white); font-size: 0.875rem; }
.dbim-counter, .dbim-counter * { color: var(--dbim-white) !important; float: none !important; }

/* ------------------------------------------------------------------ */
/* High contrast mode                                                  */
/* ------------------------------------------------------------------ */
html.dbim-high-contrast body,
html.dbim-high-contrast .dbim-header, html.dbim-high-contrast .dbim-utility,
html.dbim-high-contrast .dbim-brand, html.dbim-high-contrast .dbim-ticker,
html.dbim-high-contrast .dbim-quickbar, html.dbim-high-contrast .dbim-partner-logos,
html.dbim-high-contrast #skipContent, html.dbim-high-contrast section,
html.dbim-high-contrast .dbim-nav.naviarea, html.dbim-high-contrast .dbim-footer,
html.dbim-high-contrast .dbim-nav ul.nice-menu ul {
  background: #000000 !important; color: #FFFFFF !important;
}
html.dbim-high-contrast body *:not(img):not(.fa) { color: #FFFFFF !important; border-color: #FFFFFF !important; }
html.dbim-high-contrast a, html.dbim-high-contrast a * { color: #FFFF00 !important; }
html.dbim-high-contrast .dbim-emblem { filter: invert(1); }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 991px) {
  .dbim-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dbim-brand-right { width: 100%; justify-content: space-between; }
}
@media (max-width: 767px) {
  .dbim-parent { display: none; }
  .dbim-utility-inner { justify-content: center; padding-top: 6px; padding-bottom: 6px; }
  .dbim-org-title { font-size: 1.2857rem; }
  .dbim-emblem { height: 44px; }
  .dbim-org-logo { height: 46px; }
  .dbim-cobrand { display: none; }
  .dbim-search, .dbim-search form, .dbim-search input[type="text"] { width: 100%; max-width: none; }
  .dbim-search { flex: 1; }

  .dbim-nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--dbim-white); border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 4px; padding: 6px 12px; margin: 8px 0; font-size: 1rem; cursor: pointer;
  }
  .dbim-menu { display: none; }
  .dbim-menu.is-open { display: block; }
  .dbim-nav ul.nice-menu-down > li { display: block !important; width: 100% !important; }

  .dbim-footer-grid { grid-template-columns: 1fr; }
  .dbim-footer-bottom-inner { flex-direction: column; align-items: flex-start; }
}
