/* Bootstrap 5.3.8 migration: targeted layout compatibility fixes. */
/* Preserve the original compact header and right-aligned heading region. */
.main-top-header-section .row { align-items: center; }
.main-top-header-section .logo img { max-width: 190px; height: auto; }
.main-top-header-section .middle-text { margin: .5rem 0; }
.main-top-header-section .middle-text h2 { line-height: 1.2; }
/* Bootstrap 5 uses a flex grid: never force its columns to inline-block. */
/* Keep vacancy PDF icons inside their own columns, not absolutely positioned. */
.main-newsupdate-sec .update-box-main {
  position: relative;
  top: auto; left: auto; right: auto;
  margin: 12px auto;
  z-index: auto;
}
.main-newsupdate-sec .main-update-sec .row { align-items: center; }
.main-newsupdate-sec .update-content { margin: 12px auto; }
/* Do not add a 3rem gap to every Bootstrap carousel (including hero banner). */
#carouselExampleControls .carousel-inner { margin-top: 0; }
/* Bootstrap 5 no longer provides the old xs grid class. */
@media (max-width: 575.98px) {
  .main-top-header-section .logo img { max-width: 150px; }
  .main-top-header-section .middle-text h2 { font-size: 1.1rem; }
  .main-top-header-section .middle-text h3 { font-size: .85rem; line-height: 1.4; }
}

/* Screenshot 3: isolate the Useful Link badge within its own panel. */
.useful-text { position: relative; isolation: isolate; }
.useful-text .circle-three-box { position: absolute; top: 8px; left: 50%; right: auto; transform: translateX(-50%); margin: 0; z-index: 1; }
.useful-text h2 { padding-top: 48px; line-height: 1.5; padding-bottom: 18px; }
/* Header: align the title in the available width beside the MCA logo. */
.main-top-header-section .container-fluid > .row { position: relative; min-height: 92px; }
.main-top-header-section .middle-text { margin: 0; width: 100%; }
.main-top-header-section .middle-text h2 { font-size: clamp(1.15rem, 1.55vw, 1.7rem); white-space: normal; }
.main-top-header-section .middle-text h3 { font-size: clamp(.85rem, 1vw, 1.1rem); }
@media (min-width: 768px) {
 .main-top-header-section .container-fluid > .row > [class*="col-"]:first-child { width: 22%; }
 .main-top-header-section .container-fluid > .row > [class*="col-"]:nth-child(2) { width: 78%; }
}
@media (max-width: 767.98px) {
 .main-top-header-section .container-fluid > .row > [class*="col-"]:first-child { width: 32%; }
 .main-top-header-section .container-fluid > .row > [class*="col-"]:nth-child(2) { width: 68%; }
 .main-top-header-section .middle-text h2 { font-size: 1rem; }
 .main-top-header-section .middle-text h3 { font-size: .75rem; line-height: 1.35; }
}

/* Screenshot 1 alignment target: center header independently of the logo column. */
@media (min-width: 992px) {
  .main-top-header-section .container-fluid > .row { min-height: 110px; align-items: center; }
  .main-top-header-section .container-fluid > .row > [class*="col-"]:nth-child(2) {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(860px, calc(100% - 280px)); max-width: none;
  }
  .main-top-header-section .middle-text { width: 100%; }
  .main-top-header-section .middle-text h2 { font-size: 29px; line-height: 1.18; white-space: nowrap; }
  .main-top-header-section .middle-text h3 { font-size: 18px; line-height: 30px; }
  /* Preserve the banner height and the About/News vertical position in screenshot 1. */
  #carouselExampleControls .carousel-item > img { width: 100%; height: 410px; object-fit: cover; }
}
@media (min-width: 992px) and (max-width: 1350px) {
  .main-top-header-section .middle-text h2 { font-size: 24px; white-space: normal; }
  #carouselExampleControls .carousel-item > img { height: auto; aspect-ratio: 3.18 / 1; object-fit: cover; }
}


/* Bootstrap 5 carousel final: preserve native slide animation. */
.main-logo-nav-sect + .container-fluid { padding-top: 20px; }
#carouselExampleControls .carousel-inner { margin-top: 0 !important; overflow: hidden; }
#carouselExampleControls .carousel-item { width: 100%; }
#carouselExampleControls .carousel-item img { display: block; width: 100%; height: auto; }
@media (max-width: 767px) { .main-logo-nav-sect + .container-fluid { padding-top: 12px; } }

/* Explicit gap above the hero row; does not alter carousel internals. */
.container-fluid.hero-banner-spacing { padding-top: 18px !important; background: #fff; }
@media (max-width: 767.98px) { .container-fluid.hero-banner-spacing { padding-top: 12px !important; } }


/* 2026-11-02: isolated Bootstrap 5 fix for the four-logo footer carousel.
   Each slide must be a horizontal flex row; do not apply to the hero carousel. */
#demo > .carousel-inner {
  width: 90%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}
#demo .carousel-item.active,
#demo .carousel-item-next,
#demo .carousel-item-prev {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
}
#demo .carousel-item > .col-md-3 {
  flex: 0 0 25%;
  width: 25%;
  max-width: 25%;
  min-width: 0;
  padding: 0 4px;
}
#demo .carousel-image,
#demo .carousel-image a { display: block; height: 100%; }
#demo .carousel-image img { display: block; width: 100%; height: auto; }
#demo .carousel-control-prev,
#demo .carousel-control-next { width: 6%; opacity: 1; }
#demo .carousel-control-prev-icon,
#demo .carousel-control-next-icon { background-image: none; width: auto; height: auto; }
#demo .carousel-control-prev-icon i,
#demo .carousel-control-next-icon i { color: #8793a5; }
/* White strip after the blue navigation, without changing slide layout. */
.main-logo-nav-sect + .hero-banner-spacing {
  padding-top: 18px !important;
  background-color: white;
}
@media (max-width: 575.98px) {
  #demo > .carousel-inner { width: 94%; }
  #demo .carousel-item > .col-md-3 { padding: 0 2px; }
}

/* Spacer element owns navigation-to-hero white gap. */
.container-fluid.hero-banner-spacing { padding-top: 0 !important; }
.main-logo-nav-sect + .container-fluid { padding-top: 0 !important; }
.hero-nav-white-gap { display:block !important;clear:both;height:18px !important;min-height:18px !important;background:#fff !important; }

/* Targeted nav-to-hero spacing; preserve both carousels. */
body > .container-fluid.hero-banner-spacing { padding-top:18px !important; }
.container-fluid.hero-banner-spacing { padding-top:18px !important; }

/* White gap is a separate block in Home.aspx. Avoid double padding. */
body > .container-fluid.hero-banner-spacing, .container-fluid.hero-banner-spacing { padding-top:0 !important; }

/* Reserve space for the visible navigation bar */
@media (min-width: 992px) {
    .main-logo-nav-sect {
        min-height: 46px !important;
    }
}

/* CSP-safe replacements for legacy inline attributes. */
.hero-nav-white-gap { display:block !important; clear:both; width:100%; height:18px !important; min-height:18px !important; background-color:#fff !important; }
.hero-banner-spacing { background-color:#fff !important; padding-top:0 !important; }
.main-footer-sec, .bottom-footer { visibility:visible; animation-delay:1800ms; -webkit-animation-delay:1800ms; }
