/* =========================================================
   Mongol script pages: horizontal layout, vertical text (mng pages only).
   ========================================================= */

html[lang="mn-Mong"] {
  --mng-font: "Noto Sans Mongolian", "Mongolian Baiti", sans-serif;
}

html[lang="mn-Mong"] body {
  font-family: var(--mng-font);
}

html[lang="mn-Mong"] :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .btn, .nav-link, .dropdown-item, .navbar-brand-text) {
  font-family: var(--mng-font) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* ── Vertical unit: column length is capped by max-height. */
html[lang="mn-Mong"] :is(
  .header-topbar .topbar,
  .navbar-brand-text,
  .header-v3 .nav-link,
  .header-v3 .navbar-cta .btn,
  .header-v3 .dropdown-item,
  .header-v3 .dropdown-title,
  .post-page-breadcrumb .breadcrumb-item,
  .heading-row,
  .typography,
  .widget-title,
  .widget-category a,
  .widget-links .item-title,
  .footer-v1 .contact-title,
  .footer-v1 .footer-link,
  .footer-bottom .wrapper
) {
  writing-mode: vertical-lr;
}

/* =========================================================
   1. Header: logo, menu and buttons on one row from xl
   ========================================================= */

html[lang="mn-Mong"] .header-v3 {
  position: relative !important;
  top: 0 !important;
}

/* Topbar: icon on the left, vertical title beside it. */
html[lang="mn-Mong"] .header-topbar .topbar {
  flex-direction: column;
  font-size: .8125rem;
  line-height: 1.5;
  max-height: 3.5rem;
  gap: .5rem !important;
}
html[lang="mn-Mong"] .header-topbar > .container > .d-flex {
  align-items: flex-start !important;
}
html[lang="mn-Mong"] .header-topbar > .container > .d-flex > .d-flex:last-child {
  align-self: center;
}

/* Brand: logo plus name over three to four columns. */
html[lang="mn-Mong"] .navbar-brand {
  align-items: flex-start !important;
}
html[lang="mn-Mong"] .navbar-brand > .d-flex {
  width: 4.5rem !important;
}
html[lang="mn-Mong"] .header-v3 .navbar-brand-text > span {
  white-space: normal !important;
  font-size: 1.125rem !important;
  line-height: 1.5 !important;
  max-height: 6.5rem;
}
html[lang="mn-Mong"] .header-v3 .navbar-brand-text > small {
  display: none !important;
}

/* Search field hidden; the round button opens the search modal. */
html[lang="mn-Mong"] .header-v3 .navbar-actions .form-control {
  display: none;
}

/* Menu: each item a vertical column with the caret below. */
html[lang="mn-Mong"] .header-v3 .nav-link {
  white-space: normal !important;
  max-height: 7.5rem;
  padding: 1.25rem .75rem !important;
  font-size: .9375rem !important;
  line-height: 1.5;
  align-items: flex-start !important;
}
html[lang="mn-Mong"] .header-v3 .dropdown-toggle::after {
  margin: .5em 0 0 !important;
}
html[lang="mn-Mong"] .header-v3 .navbar-cta .btn {
  max-height: 7.5rem;
  padding: .875rem .5rem;
  white-space: normal;
  line-height: 1.5;
}

@media (min-width: 1200px) {
  html[lang="mn-Mong"] .header-v3 {
    --mng-gutter: max(.75rem, calc((100% - 1116px) / 2));
    display: grid;
    grid-template-columns: [full-start] var(--mng-gutter) [brand] auto [nav] minmax(0, 1fr) [cta] auto [act] auto var(--mng-gutter) [full-end];
    align-items: center;
    background-color: var(--bs-body-bg);
    border-bottom: var(--bs-border-width) solid var(--bs-border-color);
    box-shadow: var(--bs-box-shadow-sm);
  }
  html[lang="mn-Mong"] .header-v3 > .header-topbar {
    grid-column: full-start / full-end;
  }
  html[lang="mn-Mong"] .header-v3 > :is(.header-brandbar, .navbar),
  html[lang="mn-Mong"] .header-v3 > :is(.header-brandbar, .navbar) > .container {
    display: contents !important;
  }
  html[lang="mn-Mong"] .header-v3 .navbar-brand { grid-column: brand; grid-row: 2; padding-block: 1.25rem; }
  html[lang="mn-Mong"] .header-v3 .navbar-nav  { grid-column: nav;   grid-row: 2; align-self: stretch; }
  html[lang="mn-Mong"] .header-v3 .navbar-cta  { grid-column: cta;   grid-row: 2; margin-right: 1.5rem; }
  html[lang="mn-Mong"] .header-v3 .navbar-actions { grid-column: act; grid-row: 2; }
  html[lang="mn-Mong"] .header-v3 .navbar-nav {
    margin: 0 1.5rem !important;
    justify-content: center;
  }
  html[lang="mn-Mong"] .header-v3 .navbar-nav > .nav-item {
    display: flex;
  }
}
@media (min-width: 1400px) {
  html[lang="mn-Mong"] .header-v3 {
    --mng-gutter: max(.75rem, calc((100% - 1296px) / 2));
  }
}

/* Dropdown: items in a horizontal row, text vertical. */
@media (min-width: 1200px) {
  html[lang="mn-Mong"] .header-v3 .nav-item.dropdown > .dropdown-menu {
    top: 100% !important;
  }
  html[lang="mn-Mong"] .header-v3 .dropdown-links > .dropdown-menu {
    padding-inline: var(--mng-gutter) !important;
  }
  html[lang="mn-Mong"] .header-v3 .dropdown-menu .wrapper {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 1.5rem;
    min-width: 0 !important;
    width: max-content;
    max-width: 100% !important;
    overflow-x: auto;
    margin-inline: 0 !important;
  }
  html[lang="mn-Mong"] .header-v3 .dropdown-list .wrapper {
    gap: .25rem;
  }
  html[lang="mn-Mong"] .header-v3 .dropdown-links .wrapper {
    min-height: 16.5rem;
  }
  html[lang="mn-Mong"] .header-v3 .dropdown-menu :is(.wrapper, .dropdown-grid) > li.col {
    display: flex;
    flex: none;
    width: auto;
    max-width: none;
    padding: 0;
    margin: 0;
    gap: .75rem;
  }
  html[lang="mn-Mong"] .header-v3 .dropdown-menu :is(.wrapper, .dropdown-grid) > li.col > hr {
    margin: 0;
    border: 0;
    border-left: var(--bs-border-width) solid;
    height: auto;
    opacity: .15;
  }
  html[lang="mn-Mong"] .header-v3 .dropdown-menu :is(.wrapper, .dropdown-grid) > li.col > ul {
    display: flex;
    gap: .25rem;
  }
  /* Mega dropdown: groups in one row, banner or post card at fixed width. */
  html[lang="mn-Mong"] .header-v3 .dropdown-mega > .dropdown-grid {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1.5rem;
    column-count: auto;
    margin: 0 !important;
  }
  html[lang="mn-Mong"] .header-v3 .dropdown-mega > :is(.dropdown-banner, .dropdown-post) {
    flex: none;
    width: 18rem;
  }
  html[lang="mn-Mong"] .header-v3 .dropdown-title {
    display: block !important;
    white-space: normal !important;
    font-size: 1rem;
    line-height: 1.5;
    max-height: 13rem;
  }
  html[lang="mn-Mong"] .header-v3 .dropdown-title > i {
    margin-bottom: .5rem;
  }
  html[lang="mn-Mong"] .header-v3 .dropdown-item {
    max-height: 13rem;
    padding: .75rem .375rem !important;
    line-height: 1.5;
  }
}

/* =========================================================
   2. BREADCRUMB
   ========================================================= */

html[lang="mn-Mong"] .post-page-breadcrumb .breadcrumb {
  align-items: flex-start;
  gap: .25rem;
}
html[lang="mn-Mong"] .post-page-breadcrumb .breadcrumb-item {
  max-height: 7rem;
  line-height: 1.5;
}

/* =========================================================
   3. Subpage: vertical title on the left, content on the right
   ========================================================= */

/* Title spans all rows in column 1; other parts stack in column 2. */
@media (min-width: 768px) {
  html[lang="mn-Mong"] :is(.col-main, .col-main *):has(> .heading-row:not(.d-none)) {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: start;
    column-gap: 1.5rem;
    row-gap: 0;
  }
  html[lang="mn-Mong"] :is(.col-main, .col-main *):has(> .heading-row:not(.d-none)) > .heading-row {
    grid-column: 1;
    grid-row: 1 / span 12;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }
  html[lang="mn-Mong"] :is(.col-main, .col-main *):has(> .heading-row:not(.d-none)) > :not(.heading-row) {
    grid-column: 2;
    min-width: 0;
    margin-top: 0 !important;
  }
  html[lang="mn-Mong"] :is(.col-main, .col-main *):has(> .heading-row:not(.d-none)) > :not(.heading-row) + :not(.heading-row) {
    margin-top: 2rem !important;
  }
}
html[lang="mn-Mong"] .heading-row > .heading-main {
  width: auto !important;
  height: 100%;
}
html[lang="mn-Mong"] .heading-row > .heading-main > :is(h1, h2) {
  font-size: 1.375rem;
  line-height: 1.4;
  max-height: 18rem;
}
html[lang="mn-Mong"] .heading-row.heading-var-3 > .heading-main > :is(h1, h2) {
  display: flex;
  align-items: center;
  gap: .75rem;
}
/* Subpage title fills its column height; the gold rule extends down. */
@media (min-width: 768px) {
  html[lang="mn-Mong"] .col-main .heading-row.heading-var-3:not(.heading-row-page) > .heading-main > :is(h1, h2) {
    height: 100%;
    max-height: none;
  }
}
html[lang="mn-Mong"] .heading-row.heading-var-3 > .heading-main > :is(h1, h2)::after {
  content: "";
  flex: 1 1 auto;
  width: 1px;
  height: auto;
  min-height: 2rem;
  background: linear-gradient(180deg, var(--bs-gold) 0%, rgba(var(--bs-gold-rgb), 0) 100%);
}

/* Rich text: vertical panel up to 30rem tall, scrolls horizontally. */
html[lang="mn-Mong"] .typography {
  flex-shrink: 0;
  font-size: 1.0625rem;
  max-height: 30rem;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  line-height: 1.75;
  padding-bottom: .5rem;
}
html[lang="mn-Mong"] .typography :is(p, ul, ol, blockquote, h1, h2, h3, h4, h5, h6) {
  margin: 0;
}
html[lang="mn-Mong"] .typography :is(ul, ol) {
  padding: 0;
  padding-inline-start: 1.25rem;
}
html[lang="mn-Mong"] .typography li + li {
  margin: 0;
  margin-block-start: .25rem;
}
/* Tables use their full height; other text columns stay at 30rem. */
html[lang="mn-Mong"] .typography:has(table) {
  max-height: none;
  overflow-y: visible;
}
html[lang="mn-Mong"] .typography:has(table) > :not(table, figure, div) {
  max-height: 30rem;
}
html[lang="mn-Mong"] .typography :is(th, td) {
  max-height: 14rem;
  line-height: 1.5;
}
html[lang="mn-Mong"] .typography img {
  width: auto;
  max-width: none;
  max-height: 100%;
}

/* =========================================================
   4. Sidebar
   ========================================================= */

html[lang="mn-Mong"] .col-sidebar .widget-category {
  flex-direction: row !important;
  align-items: flex-start;
}
html[lang="mn-Mong"] .col-sidebar .widget-category > .widget-title {
  max-height: 14rem;
}
html[lang="mn-Mong"] .col-sidebar .widget-category > ul {
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .75rem .125rem !important;
  min-width: 0;
}
html[lang="mn-Mong"] .col-sidebar .widget-category > ul > li {
  display: flex;
  align-items: flex-start;
}
html[lang="mn-Mong"] .col-sidebar .widget-category > ul > li > .d-flex {
  flex-direction: column;
  align-items: center !important;
}
html[lang="mn-Mong"] .col-sidebar .widget-category a {
  max-height: 12rem;
  padding: .5rem .25rem !important;
  line-height: 1.5;
}
html[lang="mn-Mong"] .col-sidebar .widget-category .collapse > ul {
  flex-direction: row !important;
  margin: 0 0 0 .25rem !important;
  padding: 0 0 0 .25rem !important;
}
html[lang="mn-Mong"] .col-sidebar .cat-icon {
  transform: rotate(0deg);
}
html[lang="mn-Mong"] .col-sidebar [data-bs-toggle="collapse"]:not(.collapsed) .cat-icon {
  transform: rotate(-90deg);
}

/* Quick link tile: icon top left, vertical title beside it. */
html[lang="mn-Mong"] .col-sidebar .widget-links .feature-item {
  flex-direction: row !important;
  align-items: flex-start !important;
}
html[lang="mn-Mong"] .col-sidebar .widget-links .item-details {
  height: 100%;
  min-width: 0;
}
html[lang="mn-Mong"] .col-sidebar .widget-links .item-title {
  max-height: 100%;
  line-height: 1.5;
  margin: 0;
}

/* =========================================================
   5. Footer
   ========================================================= */

html[lang="mn-Mong"] .footer-v1 .contact-title {
  max-height: 6rem;
  line-height: 1.5;
}
/* Keep the phone contact card inside the footer without offset. */
@media (max-width: 991.98px) {
  html[lang="mn-Mong"] .footer-v1 {
    margin-top: 0;
  }
  html[lang="mn-Mong"] .footer-v1 .footer-contact-wrap {
    margin-bottom: 0 !important;
    padding-top: 2.5rem;
  }
  html[lang="mn-Mong"] .footer-v1 .footer-contact {
    transform: none !important;
  }
}
html[lang="mn-Mong"] .footer-v1 .widget-links {
  flex-direction: row !important;
  align-items: flex-start;
}
html[lang="mn-Mong"] .footer-v1 .widget-links > .widget-title {
  max-height: 12rem;
  line-height: 1.5;
}
html[lang="mn-Mong"] .footer-v1 .widget-links > ul {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 1rem .5rem !important;
  columns: auto !important;
  min-width: 0;
}
html[lang="mn-Mong"] .footer-v1 .widget-links > ul > li {
  margin: 0 !important;
}
html[lang="mn-Mong"] .footer-v1 .footer-link {
  display: inline-block;
  max-height: 12rem;
  line-height: 1.5;
}
html[lang="mn-Mong"] .footer-v1 .footer-link:hover {
  transform: translateY(.25rem);
}
/* Title gold rule: in vertical text it sits on the right side. */
html[lang="mn-Mong"] .footer-v1 .widget-title {
  padding: 0 .625rem 0 0;
}
html[lang="mn-Mong"] .footer-v1 .widget-title::after {
  left: auto;
  right: 0;
  top: 0;
  bottom: auto;
  width: 2px;
  height: 2rem;
  background: linear-gradient(180deg, var(--bs-gold) 0%, rgba(var(--bs-gold-rgb), 0) 100%);
}
html[lang="mn-Mong"] .footer-bottom .wrapper {
  max-height: 10rem;
}

/* =========================================================
   6. Card (item-element): vertical title and text, horizontal date
   ========================================================= */

html[lang="mn-Mong"] .item-element :is(.item-title, .item-desc, .item-info:not(.d-none), .item-badge, .item-category) {
  writing-mode: vertical-lr;
  line-height: 1.5;
}
html[lang="mn-Mong"] .item-element .item-title {
  max-height: 9.5rem;
  font-size: 1rem;
}
html[lang="mn-Mong"] .item-element .item-title:is(.line-clamp-1, .line-clamp-2, .line-clamp-3, .line-clamp-4) {
  -webkit-line-clamp: 6;
  line-clamp: 6;
}
html[lang="mn-Mong"] .item-element :is(.item-desc, .item-info) {
  max-height: 9.5rem;
}
html[lang="mn-Mong"] .item-element .item-badge {
  max-height: 7rem;
  white-space: normal;
  text-align: start;
  padding: .5em .35em;
}

/* =========================================================
   7. Home
   ========================================================= */

/* News ticker: vertical messages scrolling horizontally, not sticky. */
html[lang="mn-Mong"] #block-notice {
  position: relative !important;
  top: 0 !important;
}
html[lang="mn-Mong"] #block-notice > .container {
  align-items: stretch !important;
}
html[lang="mn-Mong"] #block-notice .item-badge {
  writing-mode: vertical-lr;
  align-self: center;
  padding: .75em .4em;
  font-size: .8125rem;
}
html[lang="mn-Mong"] #block-notice .ticker-track {
  align-items: flex-start;
}
html[lang="mn-Mong"] #block-notice .ticker-item {
  writing-mode: vertical-lr;
  white-space: normal !important;
  max-height: 5.5rem;
  line-height: 1.5;
  align-items: flex-start !important;
}

/* Stacked blocks: vertical title on the left, content on the right. */
@media (min-width: 768px) {
  html[lang="mn-Mong"] :is(#block-posts1, #block-stats) > .container {
    flex-direction: row !important;
    align-items: stretch;
  }
  html[lang="mn-Mong"] #block-posts1 > .container > :first-child {
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    flex: none;
  }
  html[lang="mn-Mong"] :is(#block-posts1, #block-stats) .items-wrapper {
    flex: 1 1 0;
    min-width: 0;
    align-content: flex-start;
  }
}
@media (max-width: 767.98px) {
  html[lang="mn-Mong"] #block-posts1 > .container > :first-child {
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
  }
}
html[lang="mn-Mong"] .heading-row {
  width: auto !important;
  max-width: none !important;
  flex: none;
}
html[lang="mn-Mong"] .heading-row > .heading-desc > p {
  max-height: 16rem;
  line-height: 1.6;
}
@media (min-width: 768px) {
  html[lang="mn-Mong"] :is(#block-posts1, #block-stats) .heading-row.heading-var-3 > .heading-main > h2 {
    height: 100%;
    max-height: none;
  }
}
html[lang="mn-Mong"] .item-filter .form-select {
  writing-mode: vertical-lr;
  width: auto !important;
  max-height: 14rem;
  padding: .75rem .5rem 2.25rem;
  background-position: center bottom .75rem;
}

/* Block action button with vertical text. */
html[lang="mn-Mong"] #block-posts6 .item-filter button {
  writing-mode: vertical-lr;
  padding: .75rem .25rem !important;
}
html[lang="mn-Mong"] :is(.block-action, .item-action) .btn:not(.btn-circle) {
  writing-mode: vertical-lr;
  max-height: 9rem;
  padding: 1rem .625rem;
  line-height: 1.5;
}

/* Featured news: large card title vertical at the image bottom left. */
html[lang="mn-Mong"] .post-item.item-var-3 .item-details {
  width: auto !important;
  top: 0;
  bottom: 0;
  flex-direction: row;
  align-items: flex-end;
}
html[lang="mn-Mong"] .post-item.item-var-3 .item-title {
  max-height: 100%;
  font-size: 1.375rem;
}
html[lang="mn-Mong"] .post-item.item-var-3 .item-meta {
  writing-mode: vertical-lr;
}
html[lang="mn-Mong"] .post-item.item-var-3 .item-overlay {
  background: linear-gradient(90deg, rgba(var(--bs-body-bg-rgb), .92) 0%, rgba(var(--bs-body-bg-rgb), 0) 70%);
}

/* List row: small image plus title. */
html[lang="mn-Mong"] .item-var-4 .item-title {
  max-height: 6.5rem;
}

/* Partner logos: title on the left, scrolling logos on the right. */
html[lang="mn-Mong"] #block-orgs {
  display: grid;
  grid-template-columns: max(.75rem, calc((100% - 1296px) / 2)) auto minmax(0, 1fr) max(.75rem, calc((100% - 1296px) / 2));
  align-items: center;
}
html[lang="mn-Mong"] #block-orgs > .container {
  width: auto;
  max-width: none;
  margin: 0 !important;
}
html[lang="mn-Mong"] #block-orgs > .container:not(.marquee-track) {
  grid-column: 2;
  padding: 0 2rem 0 0;
}
html[lang="mn-Mong"] #block-orgs > .marquee-track {
  grid-column: 3;
  padding: 0;
}
@media (max-width: 1399.98px) {
  html[lang="mn-Mong"] #block-orgs {
    grid-template-columns: max(.75rem, calc((100% - 1116px) / 2)) auto minmax(0, 1fr) max(.75rem, calc((100% - 1116px) / 2));
  }
}
/* Partner logos: vertical name beside each logo. */
html[lang="mn-Mong"] #block-orgs .item-title {
  max-height: 4.5rem;
  font-size: .8125rem;
}

/* Statistics: icon plus title; each figure is a vertical label and number. */
html[lang="mn-Mong"] #block-stats .item-stats {
  flex-direction: row !important;
  align-items: flex-end;
  gap: .75rem !important;
}
html[lang="mn-Mong"] #block-stats .item-stats .item-info {
  max-height: 6rem;
}
html[lang="mn-Mong"] #block-stats .item-stats .item-desc {
  writing-mode: horizontal-tb;
  max-height: none;
}
html[lang="mn-Mong"] #block-stats .item-title {
  max-height: 6rem;
}

/* Right-side quick links with vertical labels. */
html[lang="mn-Mong"] #block-quick .cta-label {
  writing-mode: vertical-lr;
  max-height: 8rem;
}

/* Accessibility panel */
html[lang="mn-Mong"] #a11y-bar :is(.a11y-title-text, .a11y-text) {
  writing-mode: vertical-lr;
  max-height: 4.5rem;
  line-height: 1.4;
}

/* =========================================================
   8. News: card grid list and detail page
   ========================================================= */

html[lang="mn-Mong"] .posts-v2 .item-var-4 {
  flex-direction: column !important;
  align-items: stretch !important;
}
html[lang="mn-Mong"] .posts-v2 .item-var-4 > .item-media {
  width: 100% !important;
  flex: none;
}
html[lang="mn-Mong"] .posts-v2 .item-var-4 .item-meta {
  flex-wrap: wrap;
  align-items: flex-start !important;
}
html[lang="mn-Mong"] .posts-v2 .item-var-4 .item-category {
  max-height: 7rem;
}
html[lang="mn-Mong"] .posts-v2 .item-var-4 .item-title {
  max-height: 10rem;
}

/* Detail: title with category tag on the left, image and body right. */
html[lang="mn-Mong"] .heading-row-page > .heading-main > h1 {
  font-size: 1.5rem !important;
  line-height: 1.5;
  height: auto !important;
  max-height: 26rem !important;
}
html[lang="mn-Mong"] .heading-row-page > .heading-main {
  align-items: flex-start;
}
html[lang="mn-Mong"] .heading-row-page > .heading-main > .badge {
  align-self: flex-start;
  white-space: normal;
  max-height: 10rem;
  padding: .6em .35em;
}
html[lang="mn-Mong"] .post-share small,
html[lang="mn-Mong"] .post-share-done {
  writing-mode: vertical-lr;
  max-height: 10rem;
}

/* Side info: label and value in separate columns. */
html[lang="mn-Mong"] .widget-info > ul {
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 1rem 1.5rem !important;
}
html[lang="mn-Mong"] .widget-info > ul > li {
  writing-mode: vertical-lr;
  max-height: 12rem;
  line-height: 1.5;
  gap: .25rem;
}
html[lang="mn-Mong"] .widget-posts {
  flex-direction: row !important;
  align-items: flex-start;
}
html[lang="mn-Mong"] .widget-posts > .widget-title {
  writing-mode: vertical-lr;
  max-height: 12rem;
}
html[lang="mn-Mong"] .widget-posts > .items-wrapper {
  flex: 1 1 0;
  min-width: 0;
}
html[lang="mn-Mong"] .widget-posts .widget-action .btn {
  writing-mode: vertical-lr;
  padding: 1rem .625rem;
}

/* =========================================================
   9. Lists, accordion, forms, map, org chart
   ========================================================= */

/* Label and value rows (date, address, phone): one column each. */
html[lang="mn-Mong"] .item-element .item-spec-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .5rem 1rem;
}
html[lang="mn-Mong"] .item-element .item-spec-list > li {
  writing-mode: vertical-lr;
  max-height: 12rem;
  line-height: 1.5;
}

/* Side menu: extra subpages of the active group wrap to the next row. */
html[lang="mn-Mong"] .col-sidebar .widget-category > ul > li {
  flex-wrap: wrap;
  max-width: 100%;
}
html[lang="mn-Mong"] .col-sidebar .widget-category .collapse {
  max-width: 100%;
}
html[lang="mn-Mong"] .col-sidebar .widget-category .collapse > ul {
  flex-wrap: wrap;
}

/* FAQ: each question a vertical tab, the open answer to its right. */
html[lang="mn-Mong"] .accordion {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .5rem;
}
html[lang="mn-Mong"] .accordion-item {
  display: flex;
  flex: none;
  max-width: 100%;
  border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color) !important;
  border-radius: var(--bs-accordion-border-radius) !important;
  overflow: hidden;
}
html[lang="mn-Mong"] .accordion-header {
  display: flex;
}
html[lang="mn-Mong"] .accordion-button {
  writing-mode: vertical-lr;
  width: auto;
  height: auto;
  max-height: 22rem;
  min-height: 12rem;
  padding: 1.25rem .875rem;
  line-height: 1.5;
  border-radius: 0 !important;
  align-items: flex-start;
}
html[lang="mn-Mong"] .accordion-button::after {
  margin: auto 0 0;
}
html[lang="mn-Mong"] .accordion-collapse.show,
html[lang="mn-Mong"] .accordion-collapse.collapsing {
  display: flex;
  min-width: 0;
  height: auto !important;
  border-left: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color);
}
html[lang="mn-Mong"] .accordion-body {
  min-width: 0;
  border-top: 0;
}
html[lang="mn-Mong"] .accordion-body .typography {
  max-height: 22rem;
}

/* Alerts */
html[lang="mn-Mong"] .col-main .alert {
  writing-mode: vertical-lr;
  max-height: 12rem;
  line-height: 1.6;
  align-items: flex-start !important;
  width: fit-content;
}

/* Form: vertical label plus input per field, fields flow left to right. */
html[lang="mn-Mong"] .pro-form > [class*="col"] {
  writing-mode: vertical-lr;
  flex: none;
  width: auto !important;
  max-width: 100%;
  margin-top: 0;
}
html[lang="mn-Mong"] .pro-form {
  align-items: flex-start;
  row-gap: 1.5rem;
}
html[lang="mn-Mong"] .pro-form .form-label {
  margin: 0 .5rem 0 0;
  max-height: 16rem;
  line-height: 1.5;
}
html[lang="mn-Mong"] .pro-form :is(.form-control, .form-select) {
  width: auto;
  height: 16rem;
  line-height: 1.5;
}
html[lang="mn-Mong"] .pro-form textarea.form-control {
  width: 10rem;
}
html[lang="mn-Mong"] .pro-form .form-check-inline {
  margin: 0 0 1.5rem 0 !important;
}
html[lang="mn-Mong"] .pro-form .form-check:not(.form-check-inline) {
  max-height: 16rem;
  padding: 0;
  padding-inline-start: 1.5em;
}
html[lang="mn-Mong"] .pro-form .form-check .form-check-input {
  margin-left: 0;
  margin-inline-start: -1.5em;
}
html[lang="mn-Mong"] .pro-form :is(.form-text, small) {
  max-height: 16rem;
}
html[lang="mn-Mong"] .pro-form .btn {
  writing-mode: vertical-lr;
  padding: 1rem .625rem;
}

/* Map: province names, filter buttons and floating card are vertical. */
html[lang="mn-Mong"] #block-offices .aimag-label {
  writing-mode: vertical-lr;
  font-family: var(--mng-font);
}
html[lang="mn-Mong"] #block-offices .pm-chip {
  writing-mode: vertical-lr;
  max-height: 9rem;
  padding: .625rem .3rem;
  line-height: 1.4;
}
html[lang="mn-Mong"] #block-offices .pm-filter {
  align-items: flex-start;
}
html[lang="mn-Mong"] #block-offices .pm-float .item-details {
  writing-mode: vertical-lr;
  max-height: 17rem;
}
html[lang="mn-Mong"] #block-offices .pm-float .item-spec-list > li {
  writing-mode: vertical-lr;
}
html[lang="mn-Mong"] #block-offices .pm-float .item-spec-list > li > span:first-child {
  flex-basis: auto;
}
html[lang="mn-Mong"] #block-offices :is(.pm-hint, .pm-stage > p, .pm-stage > small) {
  writing-mode: vertical-lr;
  max-height: 10rem;
}

/* =========================================================
   10. Mobile menu (offcanvas): vertical rows scrolling left to right
   ========================================================= */

html[lang="mn-Mong"] .btn-circle.btn-text {
  writing-mode: horizontal-tb;
}
html[lang="mn-Mong"] #mainMenu .offcanvas-body {
  writing-mode: vertical-lr;
  overflow-x: auto;
  overflow-y: hidden;
  line-height: 1.5;
}
html[lang="mn-Mong"] #mainMenu .offcanvas-body > .d-flex {
  margin: 0 1rem 0 0 !important;
}
html[lang="mn-Mong"] #mainMenu .offcanvas-body .form-control {
  display: none;
}
html[lang="mn-Mong"] #mainMenu .dropdown-menu {
  width: auto !important;
  height: 100%;
  padding: 0;
}
html[lang="mn-Mong"] #mainMenu .dropdown-menu > li > .dropdown-item {
  padding: 0 .375rem !important;
  white-space: normal;
}
html[lang="mn-Mong"] #mainMenu .dropdown-menu > li > .dropdown-item {
  padding-top: 2rem !important;
}
html[lang="mn-Mong"] #mainMenu .navbar-cta {
  margin-left: 1rem;
}
html[lang="mn-Mong"] #mainMenu .navbar-cta .btn {
  padding: 1rem .625rem;
}

/* =========================================================
   11. List pages (news, documents): three-column grid, vertical filters
   ========================================================= */

@media (min-width: 768px) {
  html[lang="mn-Mong"] .col-main .items-wrapper.row-cols-1 > .col-item {
    width: 33.3333%;
  }
}
@media (min-width: 576px) and (max-width: 767.98px) {
  html[lang="mn-Mong"] .col-main .items-wrapper.row-cols-1 > .col-item {
    width: 50%;
  }
}
html[lang="mn-Mong"] .feature-item .item-details.pe-15 {
  padding-right: 0 !important;
  padding-bottom: 3.5rem;
}
html[lang="mn-Mong"] .feature-item .item-action.position-absolute {
  top: auto !important;
  bottom: 1rem;
  transform: none !important;
}
html[lang="mn-Mong"] .items-filter {
  align-items: flex-start !important;
}
html[lang="mn-Mong"] .items-filter > small {
  writing-mode: vertical-lr;
  max-height: 8rem;
  line-height: 1.5;
}
html[lang="mn-Mong"] .item-filter[data-type="filter"] {
  align-items: flex-start;
}
html[lang="mn-Mong"] .item-filter[data-type="filter"] > button {
  writing-mode: vertical-lr;
  max-height: 10rem;
  padding: .75rem .3rem !important;
  line-height: 1.4;
}
