@media only screen and (max-width: 991px) {
    .about-breadcrumb { min-height: 220px; }
    .about-breadcrumb-content h1 { font-size: clamp(28px, 6vw, 40px); margin-bottom: 15px; }
    .about-breadcrumb-content nav { font-size: 15px; gap: 10px; }
    .notice-page { padding: 25px 0 45px; }
    .administration-page { padding: 45px 0; }
    .administration-breadcrumb { min-height:230px; }
    .administration-breadcrumb-content h1 { font-size:36px; }
    .principal-profile { grid-template-columns:1fr; gap:25px; padding:28px; }
    .principal-photo { min-height:auto; height:520px; }
    .principal-content h2 { font-size:32px; }
    .administration-grid { grid-template-columns: repeat(2,1fr); gap: 15px; }
    .notice-panel { padding: 20px 14px 25px; }
    .notice-tabs { gap: 8px; }
    .notice-tab { min-height: 48px; padding: 8px 16px; font-size: 16px; }
    .notice-table th, .notice-table td { padding: 10px 8px; }
    .home-photo-gallery { padding: 45px 0; }
    .home-principal-section { padding: 45px 0; }
    .home-principal-profile { grid-template-columns: 320px 1fr; min-height: 440px; }
    .home-principal-photo { min-height: 440px; }
    .home-principal-content { padding: 32px; }
    .home-principal-content h2 { font-size: 30px; }
    .home-video-gallery { padding: 45px 0; }
    .photo-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .video-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .photo-gallery-item { height: 210px; }
    .video-gallery-item { height: 220px; }
    .photo-gallery-heading h2 { font-size: 29px; }
    .college-topbar {
        height: 40px;
    }

    .latest-notice,
    .header-logins,
    .header-logins a {
        height: 40px;
    }

    .latest-notice {
        font-size: 14px;
    }

    .latest-notice-marquee {
        right: 139px;
        left: 115px;
        height: 40px;
        font-size: 14px;
        line-height: 40px;
    }

    .notice-pin {
        top: 50%;
        right: -10px;
        left: auto;
        border-top-width: 20px;
        border-bottom-width: 20px;
        border-left-width: 10px;
        transform: translateY(-50%);
    }

    .header-logins a {
        padding: 0 9px;
        font-size: 12px;
    }

    .header-logins a.ems-login {
        padding: 0 9px;
    }

    .college-branding {
        height: 104px;
        width: 100%;
        margin: 0;
    }

    .branding-inner {
        display: flex;
        height: 100%;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .college-full-logo img {
        object-fit: contain;
    }

    .college-nav {
        height: 52px;
    }

    .nav-inner {
        max-width: 100%;
    }

    .college-home {
        flex-basis: 44px;
    }

    .college-menu-toggle {
        display: flex;
        width: 52px;
        margin-left: auto;
        align-items: center;
        justify-content: center;
        border: 0;
        color: #fff;
        background: transparent;
        font-size: 20px;
    }

    .college-menu {
        position: absolute;
        z-index: 9999;
        top: 52px;
        right: 0;
        left: 0;
        display: none;
        max-height: calc(100vh - 196px);
        padding: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #293f94;
        box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
    }

    .college-menu.active {
        display: block;
    }

    .college-menu > li {
        display: block;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,.12);
    }

    .college-menu > li > a {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
    }

    .college-submenu {
        position: static;
        display: none;
        min-width: 100%;
        padding: 0 0 0 15px;
        border-top: 0;
        background: rgba(0, 0, 0, .12);
        box-shadow: none;
        visibility: hidden;
        opacity: 0;
        transform: none;
    }

    .college-has-submenu.submenu-open > .college-submenu {
        display: block;
        visibility: visible;
        opacity: 1;
    }

    .college-has-submenu > a > i { transition: transform .2s ease; }
    .college-has-submenu.submenu-open > a > i { transform: rotate(180deg); }

    .college-submenu li a { color: #fff; padding: 9px 20px; }

    .college-menu > li > a {
        padding: 10px 20px;
        font-size: 16px;
    }

    .college-menu .download-menu {
        margin-left: 0;
    }

    body.college-menu-open { overflow: hidden; }

    /*=== header css start ===*/

    .main-header {
        display: none;
    }
    .mobile-header {
        display: block;
    }
    .nhm-header {
        left: 0;
        transition: all 0.15s ease-in-out;
    }
    a.nhm-head-link i {
        margin-right: 0;
    }
    .nhm-header .header-wrapper {
        padding: 0 15px;
    }
    .mob-hamburger {
        display: none;
    }
    .mobile-header {
        padding: 15px 0;
        background: #fff;
    }
    .mobile-header .row {
        align-items: center;
    }

    .nav-toggle i {
        font-size: 20px;
        border: 2px solid var(--primary-color);
        padding: 5px 8px;
    }
    .search-icon {
        font-size: 20px;
        text-align: right;
        display: block;
        margin-right: 5px;
    }
    .main-nav {
        display: none;
    }

    .menu_search form input {
        width: 383px !important;
        height: 60px !important;
        border-radius: 35px;
        font-size: 17px;
        padding: 20px;
    }
    ul.dropdown {
        overflow: auto;
    }

    /* main slider start  */

    .slider-text {
        position: absolute;
        top: 12%;
        left: 50%;
        text-align: center;
        color: white;
        margin: 0 auto;
        /* max-width: 100%; */
        z-index: 99;
        transform: translate(-50%);
    }
    .main_slider .owl-dots .owl-dot span {
        width: 11px;
        height: 11px;
        margin: 2px 3px;
        background: white !important;
        border: 1px solid #111;
        display: block;
        -webkit-backface-visibility: visible;
        transition: opacity 0.2s ease;
        border-radius: 30px;
    }
      .donation-details-content {
        flex-direction: column;
        background: #2b6aa3;
    }

    .donation-content-left,
    .donation-content-right {
        width: 100%;
    }

    .donation-form {
        flex-direction: column;
        align-items: center;
    }
     .program-grid {
        grid-template-columns: 1fr;
    }

    .slider-content {
        height: clamp(210px, 56vw, 420px);
    }

    .slider-image,
    .owl-carousel.hero-slider.main_slider {
        height: clamp(210px, 56vw, 420px);
    }

    .main_slider .owl-prev,
    .main_slider .owl-next {
        width: 32px !important;
        height: 36px !important;
        font-size: 16px !important;
        line-height: 36px !important;
    }

    /* main slider end */

    .search_btn {
        width: 383px !important;
        height: 60px !important;
        font-size: 18px;
        position: absolute;
        right: 0px;
        top: 70px;
    }
 
    .faq_img {
        padding: 15px;
        z-index: 1;
        position: relative;
        margin-top: 25px;
        height: 281px;
        margin-left: 25px;
    }
    .appoinment_img {
        display: none;
    }
    .helpline {
        padding-top: 50px !important;
    }
    .helpline_contact li {
        margin-bottom: 20px;
    }
    .helpline::after {
        width: 0;
        height: 0;
    }
    .helpline::before {
        width: 0;
        height: 0;
    }
    .work_process_area::after {
        width: 0px;
    }
    .about_left {
        margin-top: 30px;
    }
    /*=== header css end ===*/

    /*=== banner css start ===*/
    .banner-post {
        display: block;
    }
    .banner-left .banner-post-item {
        height: auto;
    }
    .banner-title {
        bottom: 15px;
        left: 15px;
    }
    .banner-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        margin-top: 15px;
    }
    .banner-right .banner-title h5 {
        font-size: 14px;
        color: #fff;
        font-weight: 700;
    }
    .banner-right .banner-title p {
        font-size: 14px;
        font-weight: 600;
    }
    .banner-right .banner-post-item {
        height: 130px;
    }
    .post-title {
        font-size: 14px;
    }
    .banner-title h5 {
        margin-bottom: 3px;
        font-weight: 700;
    }
    /*=== banner css end ===*/

    /*=== post css start ===*/
    .category-post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .category-post img {
        height: 130px;
        border-radius: 5px;
    }
    .category-post h5 {
        font-size: 14px;
    }
    /*=== post css end ===*/

    /*=== post sidebar start ===*/
    .recent-title h5 {
        font-size: 14px;
        font-weight: 700;
    }
    /*=== post sidebar end ===*/

    /*=== footer css start ===*/
    .footer-logo {
        width: 50%;
        margin-bottom: 5px;
    }
    .footer-title {
        margin-top: 25px;
    }
    /*=== footer css end ===*/

    /*=== category css end ===*/
    .category-item {
        display: block;
        padding: 0;
        margin: 0;
        margin-bottom: 40px;
    }

    .fixed-top {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 99999;
    }
.about_img {
    height: 200px;
    box-shadow: -8px 8px 0px 0px var(--blue-color);
}

@media only screen and (max-width: 575px) {
    .home-principal-profile { grid-template-columns: 1fr; }
    .home-principal-photo { min-height: auto; height: 420px; }
    .home-principal-content { padding: 28px 22px 32px; }
    .home-principal-content h2 { font-size: 27px; }
    .home-principal-content h3 { font-size: 18px; }
    .administration-grid { grid-template-columns: 1fr; }
    .administration-breadcrumb { min-height:190px; }
    .administration-breadcrumb-content h1 { font-size:30px; }
    .principal-profile { padding:18px; border-radius:8px; }
    .principal-photo { height:410px; }
    .principal-content h2 { font-size:27px; }
    .principal-content h3 { font-size:18px; }
    .principal-description { font-size:16px; line-height:1.7; }
    .photo-gallery-grid { grid-template-columns: 1fr; }
    .video-gallery-grid { grid-template-columns: 1fr; }
    .photo-gallery-item { height: 240px; }
    .video-gallery-item { height: 230px; }
    .college-header-container {
        max-width: calc(100% - 20px);
    }

    .latest-notice-marquee {
        right: 77px;
    }

    .college-branding {
        height: 90px;
    }

    .college-menu { max-height: calc(100vh - 182px); }
}

.off-canvas-menu.active {
    top: 70px;
    visibility: visible;
    opacity: 1;
}
    .menu-bar {
        margin-right: 20px;
    }
    .fixed-social-top {
        z-index: 99999 !important;
    }
    .subscription {
        padding: 25px;
        border-radius: 30px;
    }

    .subscribe_text h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .subscrib_form .subscrib_btn {
        position: static;
        width: 100%;
        background: var(--primary-color);
        margin-top: 15px;
        transform: translate(0);
        -webkit-transform: translate(0);
        -moz-transform: translate(0);
        -ms-transform: translate(0);
        -o-transform: translate(0);
    }

    .quick_link,
    .address {
        margin-top: 50px;
    }

    .copyright ul {
        margin-top: 15px;
    }

    .copyright ul li a {
        margin-left: 0;
        margin-right: 25px;
        margin-top: 5px;
    }
    /*=== footer css end ===*/

    .appoinment_overlay {
        padding: 5px;
        background: #00a6fbde;
        border-radius: 10px;
    }
    .appoinment {
        padding-top: 15px;
        padding-bottom: 60px;
    }
    .appointment-form {
        padding: 20px 13px;
    }
}

@media only screen and (min-width: 992px) and (max-width: 1199px) {
    .college-branding { width: 100%; margin: 0; }
    .branding-inner { height: 105px; padding: 8px 0; }
    .college-full-logo img { object-fit: contain; }
    .college-nav { height: 52px; }
    .nav-inner { max-width: 100%; }
    .college-home { flex-basis: 44px; }
    .college-menu-toggle { display: flex; width: 52px; margin-left: auto; align-items: center; justify-content: center; color: #fff; background: transparent; font-size: 20px; }
    .college-menu { position: absolute; z-index: 9999; top: 52px; right: 0; left: 0; display: none; max-height: calc(100vh - 205px); padding: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; background: #293f94; box-shadow: 0 8px 18px rgba(0,0,0,.2); }
    .college-menu.active { display: block; }
    .college-menu > li { display: block; width: 100%; border-bottom: 1px solid rgba(255,255,255,.12); }
    .college-menu > li > a { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 11px 22px; font-size: 17px; }
    .college-menu .download-menu { margin-left: 0; }
    .college-submenu { position: static; display: none; min-width: 100%; padding: 0 0 0 16px; border: 0; background: rgba(0,0,0,.12); box-shadow: none; visibility: hidden; opacity: 0; transform: none; }
    .college-has-submenu.submenu-open > .college-submenu { display: block; visibility: visible; opacity: 1; }
    .college-submenu li a { padding: 10px 22px; color: #fff; }
    .college-has-submenu > a > i { transition: transform .2s ease; }
    .college-has-submenu.submenu-open > a > i { transform: rotate(180deg); }
    body.college-menu-open { overflow: hidden; }
}

/* Keep touch navigation compact and long Bengali labels inside the viewport. */
@media (max-width: 1199px) {
    .college-menu > li > a { width: auto; min-height: 44px; margin: 4px 10px; white-space: normal; }
    .college-submenu li a { white-space: normal; overflow-wrap: anywhere; min-height: 44px; }
    .college-submenu li a i { flex-shrink: 0; }
    .college-menu { max-height: calc(100dvh - 205px); }
    .about-breadcrumb-content nav, .administration-breadcrumb-content nav { flex-wrap: wrap; }
    .about-breadcrumb-content h1, .administration-breadcrumb-content h1 { overflow-wrap: anywhere; }
}
@media (min-width: 1200px) and (max-width: 1399px) {
    .college-menu > li > a { padding-inline: 7px; font-size: 16px; gap: 5px; }
}

/* Keep content usable between the phone and desktop breakpoints. */
.principal-content, .home-principal-content { min-width: 0; overflow-wrap: anywhere; }
.college-site-shell img, .college-site-shell video, .college-site-shell iframe { max-width: 100%; }
.college-site-shell .pagination { flex-wrap: wrap; gap: 4px; }
.photo-gallery-grid .photo-gallery-item { height: 100%; }
.gallery-page .photo-gallery-grid { grid-template-rows: none; grid-auto-rows: 250px; }

@media (max-width: 767px) {
    .home-emergency-card .home-emergency-image img {
    width: 157px !important;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}
    .college-news-slider.owl-carousel .owl-nav { display: none; }
    .home-notice-tabs {
        flex-wrap: nowrap;
        gap: 6px;
        margin: 16px 0 12px;
        padding: 4px 2px 6px;
        overflow-x: auto;
        scrollbar-width: thin;
    }
    .home-notice-tab {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 6px 9px;
        font-size: 13px;
        white-space: nowrap;
    }
    .home-notice-tab i { margin-right: 4px; font-size: 12px; }
    .home-principal-profile { grid-template-columns: minmax(0, 1fr); }
    .home-principal-photo { min-height: 0; height: 360px; }
    .home-principal-content { padding: 28px 22px; }
}

@media (max-width: 1199px) {
    .college-menu { max-height: calc(100vh - var(--college-menu-top, 205px)); max-height: calc(100dvh - var(--college-menu-top, 205px)); }
    .college-menu-toggle { flex-shrink: 0; min-height: 44px; }
}

@media (max-width: 575px) {
    .college-site-shell .container { max-width: 100%; padding-inline: 16px; }
    .college-topbar .container { max-width: 100%; padding-inline: 8px; }
    .college-topbar,
    .latest-notice,
    .header-logins,
    .header-logins a { height: 32px; }
    .latest-notice { padding-inline: 7px; font-size: 11px; margin-right: 10px; }
    .header-logins a { padding-inline: 7px; font-size: 10px; white-space: nowrap; }
    .latest-notice-marquee { height: 32px; line-height: 32px; }
    .notice-pin { right: -8px; border-top-width: 16px; border-bottom-width: 16px; border-left-width: 8px; }
    .header-logins { margin-left: auto; }
    .notice-panel h1 { font-size: 26px; overflow-wrap: anywhere; }
    .about_left.p-4 { padding-inline: 0 !important; }
    .gallery-page .photo-gallery-grid { grid-auto-rows: 240px; }
}

/* Compact, touch-friendly galleries on phones. */
@media (max-width: 767px) {
    .home-photo-gallery, .home-video-gallery { padding: 32px 0; }
    .home-photo-gallery .photo-gallery-heading,
    .home-video-gallery .photo-gallery-heading { margin-bottom: 20px; text-align: left; }
    .home-photo-gallery .photo-gallery-heading span,
    .home-video-gallery .photo-gallery-heading span { font-size: 13px; }
    .home-photo-gallery .photo-gallery-heading h2,
    .home-video-gallery .photo-gallery-heading h2 { font-size: 26px; line-height: 1.4; }
    .home-photo-gallery .photo-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        grid-auto-rows: auto;
        gap: 10px;
    }
    .home-photo-gallery .photo-gallery-item {
        height: auto;
        aspect-ratio: 4 / 3;
        border-radius: 12px;
        box-shadow: 0 3px 10px rgba(23, 36, 91, .1);
    }
    .home-photo-gallery .photo-gallery-featured { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
    .home-photo-gallery .photo-gallery-overlay {
        opacity: 1;
        justify-content: flex-end;
        align-items: flex-start;
        padding: 10px;
        background: linear-gradient(transparent 35%, rgba(5, 12, 43, .8));
        text-align: left;
    }
    .home-photo-gallery .photo-gallery-overlay i { display: none; }
    .home-photo-gallery .photo-gallery-overlay strong {
        font-size: 12px;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .home-photo-gallery .photo-gallery-featured strong { font-size: 15px; }
    .home-photo-gallery .photo-gallery-action { margin-top: 20px; }
    .home-photo-gallery .photo-gallery-all { min-width: 0; min-height: 44px; padding: 10px 20px; border-radius: 24px; font-size: 14px; }
    .home-video-gallery .video-gallery-grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 4px 2px 14px;
        scrollbar-width: thin;
    }
    .home-video-gallery .video-gallery-item {
        flex: 0 0 86%;
        min-width: 0;
        height: auto;
        aspect-ratio: 16 / 10;
        border-radius: 14px;
        scroll-snap-align: start;
    }
    .home-video-gallery .video-gallery-item:only-child { flex-basis: 100%; }
    .home-video-gallery .video-gallery-item > strong {
        left: 12px;
        right: 12px;
        bottom: 12px;
        font-size: 14px;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .home-video-gallery .video-play { width: 44px; height: 44px; border-width: 2px; font-size: 14px; }
    .home-photo-gallery .photo-gallery-item:focus-visible,
    .home-video-gallery .video-gallery-item:focus-visible { outline: 2px solid #293f94; outline-offset: 2px; }
}