/* =========================================================
   MUGR Current Students — Academic Regulation V1
   Route: g=9
   Fixed navigation for desktop / tablet / mobile.
   ========================================================= */

.mugr-academic-regulation{
  min-width:0;
  --reg-blue:#315fc6;
  --reg-teal:#159487;
  --reg-gold:#c67d13;
  --reg-border:#dbe4ef;
  --reg-text:#20334a;
}

.mugr-academic-regulation__nav{
  position:relative;
  z-index:20;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:0 0 18px!important;
  padding:7px!important;
  border:1px solid var(--reg-border)!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.97)!important;
  box-shadow:0 6px 18px rgba(31,61,108,.05)!important;
}

.mugr-academic-regulation__nav > li{
  width:auto!important;
  max-width:none!important;
  margin:0!important;
  border:0!important;
  border-radius:12px!important;
  overflow:hidden;
  background:#fff;
}

.mugr-academic-regulation__nav > li > a{
  position:relative;
  display:flex!important;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:72px;
  padding:11px 12px!important;
  border:1px solid #e0e7f0;
  border-radius:12px;
  background:#fff!important;
  color:var(--reg-text)!important;
  transition:.16s ease;
}

.mugr-academic-regulation__nav > li > a:hover{
  transform:translateY(-1px);
  background:#f8faff!important;
  border-color:#c7d4e6;
  box-shadow:0 5px 14px rgba(31,61,108,.06);
}

.mugr-academic-regulation__nav > li > a > span:first-child{
  margin:0!important;
  font-size:23px!important;
}

.mugr-academic-regulation__nav > li:nth-child(1) > a > span:first-child{
  color:var(--reg-blue)!important;
}
.mugr-academic-regulation__nav > li:nth-child(2) > a > span:first-child{
  color:var(--reg-teal)!important;
}
.mugr-academic-regulation__nav > li:nth-child(3) > a > span:first-child{
  color:var(--reg-gold)!important;
}

.mugr-academic-regulation__nav > li > a > span:nth-child(2){
  margin:0!important;
  color:var(--reg-text)!important;
  font-size:13px!important;
  line-height:1.45!important;
  font-weight:650;
}

.mugr-academic-regulation__nav > li > a > span:last-child{
  display:none!important;
}

/* active indicator */
.mugr-academic-regulation__nav > li > a::after{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:0;
  height:3px;
  border-radius:999px 999px 0 0;
  opacity:0;
  transform:scaleX(.45);
  transition:.16s ease;
}

.mugr-academic-regulation__nav > li:nth-child(1) > a::after{background:var(--reg-blue)}
.mugr-academic-regulation__nav > li:nth-child(2) > a::after{background:var(--reg-teal)}
.mugr-academic-regulation__nav > li:nth-child(3) > a::after{background:var(--reg-gold)}

.mugr-academic-regulation__nav > li.is-active > a{
  background:#f7f9fd!important;
  border-color:#cbd8e9!important;
}

.mugr-academic-regulation__nav > li.is-active > a::after{
  opacity:1;
  transform:scaleX(1);
}

.mugr-academic-regulation__section{
  scroll-margin-top:145px;
}

/* Portaled fixed state: works even when legacy parents have overflow/transform. */
body > .mugr-academic-regulation__nav.is-fixed{
  position:fixed!important;
  z-index:2147482000!important;
  margin:0!important;
  border-radius:0 0 16px 16px!important;
  box-shadow:0 9px 26px rgba(28,55,94,.14)!important;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}

.mugr-academic-regulation__placeholder{
  display:block;
}

/* Tablet: same 3-column fixed rail, slightly tighter. */
@media(min-width:768px) and (max-width:1199.98px){
  .mugr-academic-regulation__nav{
    gap:6px;
    padding:6px!important;
  }

  .mugr-academic-regulation__nav > li > a{
    min-height:66px;
    padding:9px 8px!important;
  }

  .mugr-academic-regulation__nav > li > a > span:first-child{
    font-size:20px!important;
  }

  .mugr-academic-regulation__nav > li > a > span:nth-child(2){
    font-size:12px!important;
  }
}

/* Mobile = genuine finger swipe rail, fixed directly below mobile shell. */
@media(max-width:767.98px){
  .mugr-academic-regulation{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:visible!important;
  }

  .mugr-academic-regulation__nav,
  body > .mugr-academic-regulation__nav.is-fixed{
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:8px!important;
    width:100%!important;
    max-width:100vw!important;
    padding:6px 10px 8px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x mandatory;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x;
    scrollbar-width:none;
  }

  .mugr-academic-regulation__nav::-webkit-scrollbar,
  body > .mugr-academic-regulation__nav.is-fixed::-webkit-scrollbar{
    display:none;
  }

  .mugr-academic-regulation__nav > li,
  body > .mugr-academic-regulation__nav.is-fixed > li{
    flex:0 0 72vw!important;
    width:72vw!important;
    min-width:72vw!important;
    max-width:72vw!important;
    scroll-snap-align:center;
  }

  .mugr-academic-regulation__nav > li > a{
    min-height:58px;
    justify-content:flex-start;
    padding:9px 11px!important;
  }

  .mugr-academic-regulation__nav > li > a > span:first-child{
    flex:0 0 30px;
    width:30px;
    font-size:19px!important;
    text-align:center;
  }

  .mugr-academic-regulation__nav > li > a > span:nth-child(2){
    min-width:0;
    font-size:12px!important;
    text-align:left;
    white-space:normal;
  }

  body > .mugr-academic-regulation__nav.is-fixed{
    left:0!important;
    right:0!important;
    top:104px!important;
    border-radius:0 0 13px 13px!important;
  }

  .mugr-academic-regulation__section{
    scroll-margin-top:178px;
  }
}


/* =========================================================
   V1.1 — PREMIUM FIXED NAVIGATION POLISH
   ========================================================= */

/* More refined shell */
.mugr-academic-regulation__nav{
  gap:10px!important;
  padding:8px!important;
  border-color:#d7e1ee!important;
  border-radius:18px!important;
  background:rgba(248,251,255,.98)!important;
  box-shadow:0 10px 28px rgba(31,61,108,.08)!important;
}

/* Soft identity colors */
.mugr-academic-regulation__nav > li:nth-child(1) > a{
  background:#f3f7ff!important;
}
.mugr-academic-regulation__nav > li:nth-child(2) > a{
  background:#eefaf7!important;
}
.mugr-academic-regulation__nav > li:nth-child(3) > a{
  background:#fff8ec!important;
}

.mugr-academic-regulation__nav > li > a{
  min-height:68px!important;
  border-color:#dce5ef!important;
  box-shadow:0 2px 8px rgba(31,61,108,.025);
}

/* Hover stays readable: light background => dark text */
.mugr-academic-regulation__nav > li:nth-child(1) > a:hover{
  background:#e8f0ff!important;
  border-color:#bdd0f1!important;
}
.mugr-academic-regulation__nav > li:nth-child(2) > a:hover{
  background:#e3f5f0!important;
  border-color:#b7ded5!important;
}
.mugr-academic-regulation__nav > li:nth-child(3) > a:hover{
  background:#fff1d9!important;
  border-color:#ecd3a4!important;
}

.mugr-academic-regulation__nav > li > a:hover,
.mugr-academic-regulation__nav > li > a:hover span,
.mugr-academic-regulation__nav > li > a:hover strong,
.mugr-academic-regulation__nav > li > a:hover i{
  color:#1f3044!important;
  -webkit-text-fill-color:#1f3044!important;
}

/* Keep category icon accents even on hover */
.mugr-academic-regulation__nav > li:nth-child(1) > a:hover > span:first-child,
.mugr-academic-regulation__nav > li:nth-child(1) > a:hover > span:first-child i{
  color:var(--reg-blue)!important;
  -webkit-text-fill-color:var(--reg-blue)!important;
}
.mugr-academic-regulation__nav > li:nth-child(2) > a:hover > span:first-child,
.mugr-academic-regulation__nav > li:nth-child(2) > a:hover > span:first-child i{
  color:var(--reg-teal)!important;
  -webkit-text-fill-color:var(--reg-teal)!important;
}
.mugr-academic-regulation__nav > li:nth-child(3) > a:hover > span:first-child,
.mugr-academic-regulation__nav > li:nth-child(3) > a:hover > span:first-child i{
  color:var(--reg-gold)!important;
  -webkit-text-fill-color:var(--reg-gold)!important;
}

/* Stronger active state */
.mugr-academic-regulation__nav > li.is-active > a{
  border-color:#bfcde1!important;
  box-shadow:0 5px 15px rgba(31,61,108,.07)!important;
}

.mugr-academic-regulation__nav > li.is-active > a::after{
  height:4px!important;
  left:12px!important;
  right:12px!important;
}

/* Fixed rail: leave a tiny clean gap below desktop header, and float inset. */
@media(min-width:768px){
  body > .mugr-academic-regulation__nav.is-fixed{
    top:50px!important;
    border-radius:0 0 18px 18px!important;
    box-shadow:0 12px 30px rgba(28,55,94,.15)!important;
  }
}

/* Mobile behavior remains as previously approved. */
@media(max-width:767.98px){
  body > .mugr-academic-regulation__nav.is-fixed{
    top:104px!important;
  }

  .mugr-academic-regulation__nav > li > a:hover,
  .mugr-academic-regulation__nav > li > a:hover span,
  .mugr-academic-regulation__nav > li > a:hover i{
    color:#1f3044!important;
    -webkit-text-fill-color:#1f3044!important;
  }
}


/* =========================================================
   V1.2 — ACTIVE UNDERLINE FIX FOR ALL 3 TABS
   ========================================================= */
.mugr-academic-regulation__nav > li.is-active > a::after{
  content:""!important;
  display:block!important;
  position:absolute!important;
  left:12px!important;
  right:12px!important;
  bottom:0!important;
  height:4px!important;
  border-radius:4px 4px 0 0!important;
  opacity:1!important;
  transform:none!important;
  visibility:visible!important;
}

/* Tab 1 — Graduate Studies announcement */
.mugr-academic-regulation__nav > li:nth-child(1).is-active > a::after{
  background:var(--reg-blue)!important;
}

/* Tab 2 — Rules / regulations */
.mugr-academic-regulation__nav > li:nth-child(2).is-active > a::after{
  background:var(--reg-teal)!important;
}

/* Tab 3 — Mahidol University announcement */
.mugr-academic-regulation__nav > li:nth-child(3).is-active > a::after{
  background:var(--reg-gold)!important;
}

/* Ensure anchor can own the underline pseudo element */
.mugr-academic-regulation__nav > li > a{
  position:relative!important;
  overflow:hidden!important;
}


/* =========================================================
   V1.3 — REAL ACTIVE LINE (not pseudo-element)
   Legacy g-* hover classes were suppressing ::after on tabs 2/3.
   ========================================================= */

.mugr-academic-regulation__nav > li > a::after{
  display:none!important;
  content:none!important;
}

.mugr-academic-regulation__active-line{
  position:absolute!important;
  left:12px!important;
  right:12px!important;
  bottom:0!important;
  height:4px!important;
  display:block!important;
  border-radius:4px 4px 0 0!important;
  opacity:0!important;
  transform:scaleX(.35)!important;
  transform-origin:center!important;
  transition:opacity .16s ease, transform .16s ease!important;
  pointer-events:none!important;
  z-index:5!important;
}

.mugr-academic-regulation__active-line--1{
  background:#315fc6!important;
}
.mugr-academic-regulation__active-line--2{
  background:#159487!important;
}
.mugr-academic-regulation__active-line--3{
  background:#c67d13!important;
}

.mugr-academic-regulation__active-line.is-visible{
  opacity:1!important;
  transform:scaleX(1)!important;
}

/* Also keep a non-pseudo fallback border shadow on active tabs. */
.mugr-academic-regulation__nav > li:nth-child(1).is-active > a{
  box-shadow:inset 0 -1px 0 rgba(49,95,198,.18), 0 5px 15px rgba(31,61,108,.07)!important;
}
.mugr-academic-regulation__nav > li:nth-child(2).is-active > a{
  box-shadow:inset 0 -1px 0 rgba(21,148,135,.18), 0 5px 15px rgba(31,61,108,.07)!important;
}
.mugr-academic-regulation__nav > li:nth-child(3).is-active > a{
  box-shadow:inset 0 -1px 0 rgba(198,125,19,.18), 0 5px 15px rgba(31,61,108,.07)!important;
}


/* =========================================================
   V1.4 — SAME THICK ACTIVE LINE FOR TAB 1 / 2 / 3
   ========================================================= */
.mugr-academic-regulation__nav > li > a > .mugr-academic-regulation__active-line{
  left:12px!important;
  right:12px!important;
  bottom:0!important;
  width:auto!important;
  height:5px!important;
  min-height:5px!important;
  max-height:5px!important;
  border:0!important;
  border-radius:5px 5px 0 0!important;
}

.mugr-academic-regulation__nav > li.is-active > a > .mugr-academic-regulation__active-line{
  display:block!important;
  opacity:1!important;
  visibility:visible!important;
  transform:scaleX(1)!important;
}

/* Same strong active treatment, only identity color differs */
.mugr-academic-regulation__nav > li:nth-child(1).is-active > a > .mugr-academic-regulation__active-line{
  background:#315fc6!important;
}
.mugr-academic-regulation__nav > li:nth-child(2).is-active > a > .mugr-academic-regulation__active-line{
  background:#159487!important;
}
.mugr-academic-regulation__nav > li:nth-child(3).is-active > a > .mugr-academic-regulation__active-line{
  background:#c67d13!important;
}


/* =========================================================
   V1.5 — DOCUMENT CONTENT CARDS
   Inspired by the approved Tuition Fee document archive style.
   ========================================================= */

.mugr-academic-regulation .mugr-reg-doc-section{
  margin:0 0 18px!important;
  padding:16px 16px 10px!important;
  border:1px solid #dfe6f2;
  border-radius:17px;
  background:#fff;
  box-shadow:0 5px 16px rgba(36,61,117,.035);
}

.mugr-academic-regulation .mugr-reg-doc-section__heading{
  position:relative;
  margin:0 0 10px!important;
  padding:3px 0 12px 46px!important;
  border-bottom:1px solid #edf1f6;
  color:#172b4d!important;
  font-size:19px!important;
  line-height:1.4!important;
  font-weight:700!important;
}

.mugr-academic-regulation .mugr-reg-doc-section__heading::before{
  content:attr(data-section-number);
  position:absolute;
  left:0;
  top:-3px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#eef3ff;
  color:#4d69bf;
  font-size:13px;
  font-weight:700;
}

/* Different accent identity per section */
.mugr-academic-regulation #title-link02 .mugr-reg-doc-section__heading::before{
  background:#eaf8f5;
  color:#159487;
}
.mugr-academic-regulation #title-link03 .mugr-reg-doc-section__heading::before{
  background:#fff6e7;
  color:#c67d13;
}

.mugr-academic-regulation .mugr-reg-doc-section ul.list-unstyled{
  margin:0!important;
  padding:0!important;
}

.mugr-academic-regulation .mugr-reg-doc-row{
  position:relative;
  display:grid!important;
  grid-template-columns:auto auto minmax(0,1fr) auto!important;
  gap:10px;
  align-items:center;
  margin:0!important;
  padding:11px 2px!important;
  border:0!important;
  border-bottom:1px solid #edf1f6!important;
  background:#fff!important;
  transition:background .15s ease;
}

.mugr-academic-regulation .mugr-reg-doc-row:last-child{
  border-bottom:0!important;
}

.mugr-academic-regulation .mugr-reg-doc-row:hover{
  background:#f8faff!important;
}

.mugr-reg-doc-row__pdf{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border:1px solid #ffd9d9;
  border-radius:8px;
  background:#fff0f0;
  color:#d14848;
  font-size:15px;
}

.mugr-academic-regulation .mugr-reg-doc-row .g-pos-rel.g-mr-5{
  margin:0!important;
}

.mugr-academic-regulation .mugr-reg-doc-row__number{
  display:grid!important;
  place-items:center;
  min-width:34px;
  height:32px;
  margin:0!important;
  border-radius:8px;
  background:#eef3ff;
  color:#4d69bf!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1!important;
}

.mugr-academic-regulation .mugr-reg-doc-row > .align-self-center{
  min-width:0;
  padding:0!important;
}

.mugr-academic-regulation .mugr-reg-doc-row__title{
  color:#344054!important;
  text-decoration:none!important;
  font-size:14px!important;
  line-height:1.55!important;
  font-weight:500;
}

.mugr-academic-regulation .mugr-reg-doc-row__title:hover{
  color:#234b9f!important;
  text-decoration:underline!important;
}

.mugr-academic-regulation .mugr-reg-doc-row .u-label{
  display:inline-flex;
  align-items:center;
  margin-left:6px;
  padding:3px 7px!important;
  border-radius:999px!important;
  font-size:9px!important;
  line-height:1.2;
}

.mugr-reg-doc-row__open{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:7px 9px;
  border-radius:9px;
  background:#eef4ff;
  color:#315fc6!important;
  text-decoration:none!important;
  white-space:nowrap;
  font-size:11px;
  font-weight:700;
  transition:.15s ease;
}

.mugr-reg-doc-row__open:hover{
  background:#dfe9ff;
  color:#234caa!important;
}

/* Remove legacy right-side counters if present */
.mugr-academic-regulation .mugr-reg-doc-row > .align-self-center.ml-auto,
.mugr-academic-regulation .mugr-reg-doc-row > .ml-auto{
  display:none!important;
}

@media(max-width:991.98px){
  .mugr-academic-regulation .mugr-reg-doc-section{
    padding:14px 13px 8px!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-row{
    grid-template-columns:auto auto minmax(0,1fr)!important;
  }

  .mugr-reg-doc-row__open{
    grid-column:3;
    justify-self:start;
    margin-top:2px;
  }
}

@media(max-width:767.98px){
  .mugr-academic-regulation .mugr-reg-doc-section{
    padding:13px 11px 7px!important;
    border-radius:15px;
  }

  .mugr-academic-regulation .mugr-reg-doc-section__heading{
    padding:2px 0 10px 40px!important;
    font-size:16px!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-section__heading::before{
    width:31px;
    height:31px;
    font-size:12px;
  }

  .mugr-academic-regulation .mugr-reg-doc-row{
    grid-template-columns:auto minmax(0,1fr)!important;
    gap:8px;
    padding:10px 1px!important;
  }

  .mugr-reg-doc-row__pdf{
    width:30px;
    height:30px;
    font-size:14px;
  }

  /* Number becomes a small metadata chip in the content column */
  .mugr-academic-regulation .mugr-reg-doc-row .g-pos-rel.g-mr-5{
    display:none!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-row__title{
    font-size:12.5px!important;
    line-height:1.55!important;
  }

  .mugr-reg-doc-row__open{
    grid-column:2;
    margin-top:1px;
    padding:6px 8px;
    font-size:10.5px;
  }
}


/* =========================================================
   V1.6 — DESKTOP ONLY LAYOUT RESET
   Stable V1.5 base. No mobile/tablet changes.
   ========================================================= */
@media(min-width:992px){
  .box-blog .container > .blog-content-right.mugr-academic-regulation{
    width:75%!important;
    max-width:75%!important;
    padding-left:15px!important;
    padding-right:0!important;
    box-sizing:border-box!important;
  }

  /* Keep every g=9 section inside its actual desktop content column. */
  .mugr-academic-regulation .content-project-right,
  .mugr-academic-regulation .mugr-reg-doc-section{
    max-width:100%!important;
    box-sizing:border-box!important;
  }
}


/* =========================================================
   V1.7 — DESKTOP CARD ALIGNMENT WITH FIXED NAV
   User intent: document cards should begin/end on the same vertical
   lines as the fixed navigator card. Do not move the whole content column.
   ========================================================= */
@media(min-width:992px){

  /* Navigator shell has 8px internal outer spacing in the approved design.
     Match content cards to that same visual edge. */
  .mugr-academic-regulation .mugr-reg-doc-section{
    width:calc(100% - 16px)!important;
    max-width:calc(100% - 16px)!important;
    margin-left:8px!important;
    margin-right:8px!important;
    box-sizing:border-box!important;
  }

  /* Keep title/header aligned with the same navigator/card axis. */
  .mugr-academic-regulation .content-project-title{
    margin-left:8px!important;
    margin-right:8px!important;
    box-sizing:border-box!important;
  }
}


/* =========================================================
   V1.8 — DESKTOP EXACT EDGE ALIGNMENT
   - Left edge of content cards = left edge of navigator
   - Right edge expands slightly toward the feedback widget
   - Desktop only; tablet/mobile untouched
   ========================================================= */
@media(min-width:992px){

  /* Exact left alignment with fixed navigator */
  .mugr-academic-regulation .mugr-reg-doc-section{
    margin-left:0!important;
    margin-right:-8px!important;
    width:calc(100% + 8px)!important;
    max-width:calc(100% + 8px)!important;
    box-sizing:border-box!important;
  }

  /* Page title uses the same left axis */
  .mugr-academic-regulation .content-project-title{
    margin-left:0!important;
    margin-right:-8px!important;
    box-sizing:border-box!important;
  }
}


/* =========================================================
   V1.9 — DESKTOP LEFT EDGE ALIGN, RIGHT EDGE LOCKED
   Right edge stays exactly as approved in V1.8.
   Only the left edge moves inward to match the navigator.
   ========================================================= */
@media(min-width:992px){

  /* V1.8 right edge = parent + 8px.
     Move left edge inward 14px, so width becomes:
     100% + 8px - 14px = 100% - 6px.
     Result: right edge does NOT move. */
  .mugr-academic-regulation .mugr-reg-doc-section{
    margin-left:14px!important;
    margin-right:-8px!important;
    width:calc(100% - 6px)!important;
    max-width:calc(100% - 6px)!important;
    box-sizing:border-box!important;
  }

  /* Keep heading on the same left axis as the document cards,
     while preserving the approved right side. */
  .mugr-academic-regulation .content-project-title{
    margin-left:14px!important;
    margin-right:-8px!important;
    box-sizing:border-box!important;
  }
}


/* =========================================================
   V2.0 — MOBILE OVERFLOW FIX ONLY
   Desktop V1.9 is frozen and untouched.
   ========================================================= */
@media(max-width:767.98px){

  .box-blog .container > .blog-content-right.mugr-academic-regulation{
    float:none!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
    box-sizing:border-box!important;
    overflow-x:hidden!important;
  }

  .mugr-academic-regulation,
  .mugr-academic-regulation .content-project-title,
  .mugr-academic-regulation .content-project-right,
  .mugr-academic-regulation .mugr-reg-doc-section,
  .mugr-academic-regulation .mugr-reg-doc-section ul,
  .mugr-academic-regulation .mugr-reg-doc-row,
  .mugr-academic-regulation .mugr-reg-doc-row > *,
  .mugr-academic-regulation .mugr-reg-doc-row > .align-self-center,
  .mugr-academic-regulation .mugr-reg-doc-row__title{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  .mugr-academic-regulation{
    width:100%!important;
    overflow-x:hidden!important;
  }

  .mugr-academic-regulation .content-project-title,
  .mugr-academic-regulation .content-project-right,
  .mugr-academic-regulation .mugr-reg-doc-section{
    width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-section{
    overflow:hidden!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-row{
    display:grid!important;
    grid-template-columns:30px minmax(0,1fr)!important;
    gap:8px!important;
    width:100%!important;
    overflow:hidden!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-row > .align-self-center{
    grid-column:2!important;
    width:100%!important;
    overflow:hidden!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-row__title{
    display:inline!important;
    width:auto!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-row .u-label{
    display:inline-flex!important;
    max-width:100%!important;
    vertical-align:middle!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-row__open{
    grid-column:2!important;
    justify-self:start!important;
    width:auto!important;
    max-width:100%!important;
    margin-top:2px!important;
    white-space:nowrap!important;
  }

  .mugr-academic-regulation__nav,
  body > .mugr-academic-regulation__nav.is-fixed{
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
}


/* =========================================================
   V2.1 — MOBILE BOOTSTRAP ROW / COL OVERFLOW FIX
   Root cause: each document section is inside a legacy .row,
   which carries negative left/right margins. The .col-lg child
   also keeps Bootstrap side padding. On narrow devices that
   makes the card wider than the visible content shell.
   Desktop V1.9 remains untouched.
   ========================================================= */
@media(max-width:767.98px){

  /* Neutralize ONLY the rows that directly wrap g=9 document sections. */
  .mugr-academic-regulation .content-project-right > .row{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }

  /* Remove Bootstrap col gutters from the section card itself. */
  .mugr-academic-regulation .content-project-right > .row > .mugr-reg-doc-section{
    display:block!important;
    float:none!important;
    flex:none!important;
    flex-basis:auto!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:11px!important;
    padding-right:11px!important;
    box-sizing:border-box!important;
  }

  /* Legacy shortcode wrappers must shrink with the card. */
  .mugr-academic-regulation .mugr-reg-doc-section .shortcode-html,
  .mugr-academic-regulation .mugr-reg-doc-section [id^="shortcode"]{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }

  /* The old flex list item can otherwise preserve intrinsic content width. */
  .mugr-academic-regulation .mugr-reg-doc-row.d-flex{
    flex-wrap:wrap!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-row > .align-self-center{
    flex:1 1 0!important;
  }

  /* Protect the overall page from a stray legacy negative margin. */
  .box-blog,
  .box-blog > .container{
    max-width:100vw!important;
    overflow-x:hidden!important;
  }
}


/* =========================================================
   V2.2 — MOBILE NAV TOUCH / VERTICAL PAGE SCROLL FIX
   Keep horizontal swipe between tabs, but also allow the page
   to scroll vertically when the gesture starts on the navigator.
   Desktop V1.9 remains untouched.
   ========================================================= */
@media(max-width:767.98px){
  .mugr-academic-regulation__nav,
  body > .mugr-academic-regulation__nav.is-fixed{
    touch-action:pan-x pan-y!important;
    overscroll-behavior-x:contain!important;
    overscroll-behavior-y:auto!important;
  }

  .mugr-academic-regulation__nav > li,
  .mugr-academic-regulation__nav > li > a,
  body > .mugr-academic-regulation__nav.is-fixed > li,
  body > .mugr-academic-regulation__nav.is-fixed > li > a{
    touch-action:pan-x pan-y!important;
  }
}


/* =========================================================
   V2.4 — SECTION TITLE ICONS + REMOVE ROW PDF ICONS
   ========================================================= */

/* Hide old 01/02/03 pseudo-number chip. */
.mugr-academic-regulation .mugr-reg-doc-section__heading::before{
  content:none!important;
  display:none!important;
}

/* Heading no longer needs left padding reserved for the number chip. */
.mugr-academic-regulation .mugr-reg-doc-section__heading{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding-left:0!important;
}

.mugr-reg-doc-section__icon{
  flex:0 0 34px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#eef3ff;
  color:#315fc6;
  font-size:16px;
}

.mugr-academic-regulation #title-link02 .mugr-reg-doc-section__icon{
  background:#eaf8f5;
  color:#159487;
}

.mugr-academic-regulation #title-link03 .mugr-reg-doc-section__icon{
  background:#fff6e7;
  color:#c67d13;
}

/* PDF icons are removed from each document row. */
.mugr-academic-regulation .mugr-reg-doc-row__pdf{
  display:none!important;
}

/* Rebalance the document row grid now that the PDF column is gone. */
.mugr-academic-regulation .mugr-reg-doc-row{
  grid-template-columns:auto minmax(0,1fr) auto!important;
}

/* Existing number chip remains the first metadata column. */
.mugr-academic-regulation .mugr-reg-doc-row__number{
  grid-column:auto!important;
}

@media(max-width:991.98px){
  .mugr-academic-regulation .mugr-reg-doc-row{
    grid-template-columns:auto minmax(0,1fr)!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-row__open{
    grid-column:2!important;
  }
}

@media(max-width:767.98px){
  .mugr-academic-regulation .mugr-reg-doc-section__heading{
    gap:8px!important;
    padding-left:0!important;
  }

  .mugr-reg-doc-section__icon{
    flex-basis:31px;
    width:31px;
    height:31px;
    font-size:14px;
  }

  .mugr-academic-regulation .mugr-reg-doc-row{
    grid-template-columns:minmax(0,1fr)!important;
  }

  /* Mobile: keep sequence number visually lightweight before the title. */
  .mugr-academic-regulation .mugr-reg-doc-row .g-pos-rel.g-mr-5{
    display:none!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-row > .align-self-center{
    grid-column:1!important;
  }

  .mugr-academic-regulation .mugr-reg-doc-row__open{
    grid-column:1!important;
  }
}


/* =========================================================
   V2.5 — LOCAL DOCUMENT SEARCH
   ========================================================= */
.mugr-reg-search{
  margin:0 0 16px;
  padding:10px 12px;
  border:1px solid #dfe6f2;
  border-radius:14px;
  background:#fff;
  box-shadow:0 4px 14px rgba(36,61,117,.035);
}

.mugr-reg-search__box{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  height:42px;
  padding:0 12px;
  border:1px solid #d8e2ef;
  border-radius:11px;
  background:#fbfcfe;
}

.mugr-reg-search__box > i{
  flex:0 0 auto;
  color:#315fc6;
  font-size:14px;
}

.mugr-reg-search__input{
  flex:1 1 auto;
  min-width:0;
  width:100%;
  height:100%;
  padding:0!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:#20334a;
  font-size:13px;
  box-shadow:none!important;
}

.mugr-reg-search__input::placeholder{
  color:#98a4b4;
}

.mugr-reg-search__clear{
  flex:0 0 30px;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:8px;
  background:#eef3ff;
  color:#315fc6;
  cursor:pointer;
}

.mugr-reg-search__meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:22px;
  padding:6px 2px 0;
  font-size:11px;
}

.mugr-reg-search__count{
  color:#315fc6;
  font-weight:700;
}

.mugr-reg-search__hint{
  margin-left:auto;
  color:#8a98aa;
}

@media(max-width:767.98px){
  .mugr-reg-search{
    margin-bottom:12px;
    padding:8px 9px;
    border-radius:12px;
  }

  .mugr-reg-search__box{
    height:40px;
    padding:0 10px;
  }

  .mugr-reg-search__input{
    font-size:12px;
  }

  .mugr-reg-search__meta{
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
    padding-top:5px;
  }

  .mugr-reg-search__hint{
    margin-left:0;
  }
}


/* =========================================================
   V2.5.2 — SEARCH FILTER VISIBILITY FIX
   Document rows use display:grid!important, so inline display:none
   cannot hide them. Search now toggles a dedicated class instead.
   ========================================================= */
.mugr-academic-regulation .mugr-reg-doc-row.is-search-hidden,
.mugr-academic-regulation .mugr-reg-doc-section.is-search-hidden{
  display:none!important;
}


/* =========================================================
   V2.5.3 — INLINE SVG SECTION ICONS
   Avoid environment/font differences between .115 and production.
   ========================================================= */
.mugr-reg-doc-section__icon svg{
  width:17px;
  height:17px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

@media(max-width:767.98px){
  .mugr-reg-doc-section__icon svg{
    width:15px;
    height:15px;
  }
}
