:root {
    --homepage-header-height: 100px;
}

/* Keep long initiative titles within their cards and show an ellipsis. */
.initiatives-bag .ini-para {
    min-width: 0;
}
.initiatives-bag .ini-para p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    overflow-wrap: anywhere;
    line-height: 1.3;
    max-height: 3.9em;
    margin-bottom: 0;
}

/* Keep shortcuts against the viewport's left edge, outside the
   animated slider that would otherwise contain fixed-position elements. */
.slidecontain > .homepage-floating-social {
    position: fixed;
    left: 20px;
    right: auto;
    width: max-content;
    margin: 0;
}

@media (min-width: 576px) {
    .homepage-floating-menu .slider-short.cmpad {
        position: fixed;
        left: 20px;
        right: auto;
        width: max-content;
        max-width: none;
        margin: 0;
        padding: 0;
    }
}

/* Reference: 20px to the shortcuts, then a clear gap before the 70px banner edge. */
.homepage-floating-menu .slider-short ul,
.homepage-floating-menu .slider-short ul > li > a,
.homepage-floating-social .social a {
    width: 36px;
}

/* Keep flyout links independent of the narrow icon rail. */
.homepage-floating-menu .slider-short ul > li {
    position: relative;
    padding: 0;
}
.homepage-floating-menu .slider-short ul > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
}
.homepage-floating-menu .slider-short .dropdown-menu {
    left: calc(100% + 10px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    min-width: 160px;
    padding: 12px 16px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 24px #00000026;
    animation: none;
}
.homepage-floating-menu .slider-short .dropdown-menu a {
    width: auto;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    line-height: 1.5;
}
.homepage-floating-menu .slider-short .dropdown-menu.access {
    min-width: 64px;
}
.homepage-floating-menu .slider-short .dropdown-menu::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10px;
    width: 10px;
}
.homepage-floating-menu .slider-short li:hover > .dropdown-menu,
.homepage-floating-menu .slider-short li:focus-within > .dropdown-menu {
    display: block;
}

/* Size the header from its content instead of leaving a fixed-height gap. */
@media (min-width: 992px) {
    header.reference-header:not(.drop) .headbottom {
        height: auto;
        min-height: 0;
        padding-top: 8px;
        padding-bottom: 0;
    }
    header.reference-header:not(.drop) .menu a.mainli {
        bottom: 0;
    }
    header.reference-header:not(.drop) .menubottom {
        margin-top: 0;
    }
}

/* Place the reference updates strip directly after the banner. */
.homepage-gallery #iframe-container {
    display: block;
    max-width: 100%;
}
.homepage-gallery #my-iframe {
    display: block;
    width: 100%;
    height: 500px;
    margin-bottom: 12px;
}

.homepage-chief-message .swiper-wrapper {
    align-items: stretch;
}
.homepage-chief-message .swiper-slide {
    height: auto;
}
.homepage-chief-message .message-box {
    height: 100%;
}
.homepage-chief-message .chief-message-readmore {
    display: inline-block;
    margin-top: 8px;
    color: #e31e25;
    font-size: .85rem;
}
body:not(.dark) .homepage-chief-message .message-box .para1 {
    color: rgb(26 26 26 / 75%);
}

@media (max-width: 575px) {
    .homepage-latest-updates .news-sec > .cmpad > .d-flex {
        flex-wrap: wrap;
    }
    .homepage-latest-updates .news-head {
        display: flex;
        width: 100%;
        height: auto;
        padding-top: 12px;
        color: #383278;
    }
    .homepage-latest-updates .news-con {
        width: 100%;
    }
}
/* Match the reference banner without letting intrinsic image widths size Swiper. */
.slidecontain > .slider.cmpad {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 70px;
    padding-right: 0;
    margin-top: var(--homepage-header-height, 100px);
    height: calc(100vh - var(--homepage-header-height, 100px));
}
.slidecontain .mainslider,
.slidecontain .mainslider .swiper-wrapper,
.slidecontain .mainslider .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
}
.slidecontain .mainslider .swiper-slide {
    position: relative;
    overflow: hidden;
}
.slidecontain .mainslider .slideimg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.slidecontain .slider-para {
    right: 0;
    bottom: 100px;
    margin-bottom: 0;
    z-index: 2;
}
@media (max-width: 1200px) {
    .slidecontain > .slider.cmpad { height: 600px; }
}
@media (max-width: 991px) {
    .slidecontain > .slider.cmpad { height: 500px; }
}
@media (max-width: 767px) {
    .slidecontain > .slider.cmpad {
        padding-left: 70px;
        height: 400px;
    }
    .slidecontain .slider-para {
        width: calc(100% - 40px);
        bottom: 40px;
        height: auto;
        min-height: 70px;
    }
    .slidecontain .slider-para p {
        padding-left: 24px;
        max-height: none;
        font-size: .8rem;
        line-height: 1.5;
    }
}
@media (max-width: 575px) {
    .slidecontain > .slider.cmpad {
        height: 360px;
        padding-left: 15px;
    }
}
@media (max-width: 480px) {
    .slidecontain > .slider.cmpad { height: 300px; }
}
@media (max-width: 420px) {
    .slidecontain > .slider.cmpad { height: 250px; }
}
@media (max-width: 380px) {
    .slidecontain > .slider.cmpad { height: 200px; }
}

/* Mobile reference: image above a full-width caption, dots at the right. */
@media (max-width: 767px) {
    .slidecontain > .slider.cmpad {
        padding-left: 15px;
        height: auto;
    }
    .slidecontain .mainslider {
        border-radius: 3rem 0 0 0;
    }
    .slidecontain .mainslider .swiper-wrapper,
    .slidecontain .mainslider .swiper-slide {
        height: auto;
    }
    .slidecontain .mainslider .slideimg.mob {
        height: auto;
        aspect-ratio: 8 / 3;
    }
    .slidecontain .mainslider .slideimg.mob img {
        height: 100%;
    }
    .slidecontain .slider-para {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        height: auto;
        min-height: 36px;
        margin: 0;
        padding: 8px 12px;
        border-left: 8px solid #ed1b24;
        box-sizing: border-box;
    }
    .slidecontain .slider-para::before,
    .slidecontain .slider-para::after {
        content: none;
    }
    .slidecontain .slider-para p {
        padding-left: 0;
        margin: 0;
        font-size: .8rem;
        line-height: 1.5;
    }
    .slidecontain .main-pagination.swiper-pagination-bullets {
        top: 15px;
        right: 10px;
        bottom: auto;
        left: auto;
        width: auto;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .slidecontain .main-pagination .swiper-pagination-bullet {
        margin: 0 !important;
    }
}

/* Keep section controls in normal flow and draw arrows without icon fonts. */
.homepage-chief-message .news-button,
.news-main-bag .news-button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
    margin-left: 16px;
}
.homepage-chief-message .news-button .swiper-button-prev,
.homepage-chief-message .news-button .swiper-button-next,
.news-main-bag .news-button .swiper-button-prev,
.news-main-bag .news-button .swiper-button-next {
    position: static;
    flex: 0 0 36px;
    width: 36px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.homepage-chief-message .news-button .swiper-button-prev::after,
.homepage-chief-message .news-button .swiper-button-next::after,
.news-main-bag .news-button .swiper-button-prev::after,
.news-main-bag .news-button .swiper-button-next::after {
    content: '';
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    color: #e31e25;
}
.homepage-chief-message .news-button .swiper-button-prev::after,
.news-main-bag .news-button .swiper-button-prev::after {
    transform: rotate(-135deg);
    color: #383278;
}
.homepage-chief-message .news-button svg,
.news-main-bag .news-button svg {
    display: none;
}
.homepage-chief-message .news-button button:focus-visible,
.news-main-bag .news-button button:focus-visible {
    outline: 2px solid #383278;
    outline-offset: 2px;
}
