@media (max-width: 800px) {
    .homeCaroselImg img {
        height: auto;
    }

    .topMainHeading {
        padding-left: 14%;
        font-size: 28px !important;
    }

    .topLogo {
        width: 88px;
    }

    .fs-01 {
        font-size: 2rem;
    }

    .chairmanImg {
        width: 50%;
    }

    footer {
        padding-top: 14rem;
    }

    .footerYellow {
        top: -21rem;
    }

    .aboutTopBanner {
        height: 214px;
    }

    .aboutGallary {
        top: 24%;
        width: 50%;
    }

    .missonDiv {
        width: 50%;
        margin-left: 0%;
        margin-top: 0rem;
    }

    .vissionDiv {
        width: 55%;
    }

    .goalsDiv {
        width: 55%;
        margin-left: 0%;
    }

    .founderMessageSection {
        padding-top: 0;
    }

    .fs-7Resp {
        font-size: 18px !important;
    }

    .founderMessageDiv div {
        top: 9%;
    }

    .aboutImportImg {
        width: 185px;
    }

    .aboutBodySection {
        padding-top: 3rem;
    }

    .institutionsTopBanner,
    .galleryTopBanner,
    .blogsTopBanner,
    .contactTopBanner {
        height: 215px;
    }

    .instituteBoxes {
        top: 5%;
    }

    .badgeStyleMarginSingle {
        top: 18%;
    }

    .homeGalleryHeading {
        font-size: 2.5rem;
    }

    .homeGallerySubheading {
        font-size: 1rem;
    }

    .homeGalleryCard img {
        height: 220px;
    }

    .standForHeading {
        font-size: 2.5rem;
    }

    .standForSubheading {
        font-size: 1rem;
    }

    .standForIcon {
        width: 150px;
        height: 150px;
    }

    .chooseMisHeading {
        font-size: 2.6rem;
    }

    .chooseMisSubheading {
        font-size: 1rem;
    }

    .chooseMisCard {
        padding: 2.2rem 1.5rem 2rem;
    }

    .chooseMisIcon {
        width: 90px;
        height: 90px;
    }

    .departmentsHeading {
        font-size: 2.4rem;
    }

    .departmentImageWrap img {
        height: 210px;
    }
}

/* Header: Academics dropdown item is hidden by default (shown only for specific devices) */
.dropdown-menu .moreAcademicsDropdownItem {
    display: none;
}

/* Galaxy Z Fold 5 (cover screen portrait ~344px): move Academics into More */
@media screen and (hover: none) and (pointer: coarse) and (min-width: 340px) and (max-width: 350px) and (orientation: portrait) {
    .topNavAcademicsLink {
        display: none !important;
    }

    .dropdown-menu .moreAcademicsDropdownItem {
        display: block;
    }

    .topNavLinks {
        flex-wrap: nowrap !important;
        gap: 0.25rem !important;
    }

    .topNavLinks .mx-2 {
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
    }

    /* Academics page: prevent Bank Details content clipping on narrow cover screen */
    .academicsBankDetails .card-body {
        padding: 1.25rem !important;
        /* overrides Bootstrap p-5 */
    }

    .academicsBankDetails table {
        width: 100%;
        table-layout: fixed;
    }

    .academicsBankDetails td {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .academicsBankDetails td:first-child {
        width: 40%;
    }

    .academicsBankDetails .fs-5 {
        font-size: 1rem !important;
    }
}

/* Samsung Galaxy S8+ (phone) portrait ~360×740 CSS px: Bank Details clipping fix */
@media screen and (hover: none) and (pointer: coarse) and (min-width: 355px) and (max-width: 365px) and (min-height: 735px) and (max-height: 750px) and (orientation: portrait) {
    .academicsBankDetails .card-body {
        padding: 1.5rem !important;
        /* overrides Bootstrap p-5 */
    }

    .academicsBankDetails table {
        width: 100%;
        table-layout: fixed;
    }

    .academicsBankDetails td {
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .academicsBankDetails td:first-child {
        width: 34%;
    }

    .academicsBankDetails td.themeColor {
        font-size: 0.95rem;
    }
}

/* Surface Duo (dual-screen, 540×720 CSS px): show More before Contact (device-only) */
@media screen and (hover: none) and (pointer: coarse) and (min-width: 535px) and (max-width: 545px) and (min-height: 715px) and (max-height: 725px) and (orientation: portrait) {
    .topNavMoreDropdown {
        order: 60;
    }

    .topNavContactLink {
        order: 70;
    }
}

@media screen and (hover: none) and (pointer: coarse) and (min-width: 715px) and (max-width: 725px) and (min-height: 535px) and (max-height: 545px) and (orientation: landscape) {
    .topNavMoreDropdown {
        order: 60;
    }

    .topNavContactLink {
        order: 70;
    }
}

/* Tablets/iPads + smart displays: keep home hero banner like desktop (image on right, text on left) */
@media (hover: none) and (pointer: coarse) and (min-width: 768px) and (max-width: 1366px) {
    .heroBannerSection {
        min-height: 328px !important;
        padding: 0 !important;
        background-size: contain !important;
        background-position: right center !important;
    }

    .heroBannerContent {
        text-align: left !important;
        margin: 0 !important;
        max-width: 480px;
    }

    .heroBannerSubtitle {
        margin: 0 !important;
        max-width: 420px;
    }

    .heroBannerButtons {
        justify-content: flex-start;
    }
}

/* Nest Hub Max: ensure hero image is not cropped (match desktop contain behavior) */
@media screen and (min-width: 1024px) and (max-width: 1366px) and (min-height: 700px) and (orientation: landscape) {
    .heroBannerSection {
        background-size: contain !important;
        background-position: right center !important;
    }
}

/* Nest Hub (1024x600): ensure hero image is not cropped (match desktop contain behavior) */
@media screen and (min-width: 960px) and (max-width: 1024px) and (max-height: 650px) and (orientation: landscape) {
    .heroBannerSection {
        background-size: contain !important;
        background-position: right center !important;
    }
}

/* Surface Duo: render "Our Blogs" like iPad Mini (stacked section, but keep card image/text split) */
@media screen and (hover: none) and (pointer: coarse) and (min-width: 535px) and (max-width: 545px) and (min-height: 715px) and (max-height: 725px) and (orientation: portrait),
screen and (hover: none) and (pointer: coarse) and (min-width: 715px) and (max-width: 725px) and (min-height: 535px) and (max-height: 545px) and (orientation: landscape) {
    .ourBlogs .badgeStyleHome {
        top: 1rem !important;
        left: 1rem;
        height: 64px;
        width: 64px;
        z-index: 2;
    }

    .ourBlogs .badgeStyleHome .fs-6 {
        font-size: 0.9rem !important;
    }

    .ourBlogs .card .row.g-0>.blogsHomeImg {
        flex: 0 0 auto;
        width: 33.333333%;
    }

    .ourBlogs .card .row.g-0>.col-md-8 {
        flex: 0 0 auto;
        width: 66.666667%;
    }

    .ourBlogs .blogsHomeImg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Testimonials (Parents Feedback): mimic Surface Pro 7 layout */
    .testimonialsBubble img.d-none.d-lg-block.testimonialsBubbleImage {
        display: block !important;
    }

    .testimonialsBubble img.d-block.d-lg-none.testimonialsBubbleImage {
        display: none !important;
    }

    .testimonialsBubble .testimonialsBubblePf {
        display: none !important;
    }

    .testimonialsBubble {
        min-height: 420px;
        margin-top: 2rem;
    }

    .testimonialsBubbleImage {
        min-height: 420px;
        object-fit: contain;
    }

    .testimonialsContent {
        padding: 4.5rem 2rem 2rem 3.5rem;
    }

    .testimonialsQuoteOpen {
        font-size: 5.5rem;
        top: 10px;
        left: 20px;
    }

    .testimonialsQuoteClose {
        font-size: 5.5rem;
        bottom: 50px;
        right: 30px;
    }

    .testimonialsPagination {
        margin-left: 0;
        justify-content: center;
        gap: 2rem;
        padding-top: 1.25rem;
    }
}

/* iPad / Tablet (touch): Gallery should show 1 image by default and side-scroll for next */
@media (hover: none) and (pointer: coarse) and (min-width: 769px) and (max-width: 1366px) {
    .homeGalleryCarousel {
        padding: 0 2.5rem;
    }

    .homeGalleryViewport {
        overflow: auto hidden !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .homeGalleryViewport::-webkit-scrollbar {
        display: none;
    }

    .homeGalleryTrack {
        flex-wrap: nowrap !important;
        gap: 0 !important;
        justify-content: flex-start !important;
        transition: none !important;
        transform: none !important;
    }

    .homeGallerySlide {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}

@media (max-width: 768px) {

    /* Header Tablet - Keep desktop layout */
    .topHeaderBar {
        padding: 0.5rem 0;
    }

    .topHeaderBar .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .topHeaderBar .d-flex {
        gap: 0.5rem !important;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .topHeaderBar .fs-7 {
        font-size: 0.7rem;
    }

    .topSocialIcon {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .topLogo {
        width: 75px;
        margin-top: 0.25rem !important;
    }

    .logoSection {
        padding: 1.5rem 0 !important;
    }

    .logoSection .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .logoSection .row {
        flex-direction: row;
        align-items: center;
    }

    .logoSection .col-md-8,
    .logoSection .col-md-4 {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
    }

    .logoSection .d-flex {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 1rem !important;
    }

    .logoSection .justify-content-md-end {
        justify-content: flex-end !important;
        margin-top: 0 !important;
    }

    .school-logo-img {
        width: 70px;
        height: 70px;
        margin: 0;
    }

    .school-title-main {
        font-size: 1.5rem;
    }

    .school-tagline {
        font-size: 0.85rem;
    }

    .nav-link-plain {
        font-size: 0.88rem;
        margin: 0 0.4rem;
    }

    /* Hero Tablet */
    .heroBannerTitle {
        font-size: 2.5rem;
    }

    .heroBannerSubtitle {
        font-size: 1rem;
    }

    /* Background Elements */
    .chooseMisEllipse,
    .chooseMisStar,
    .standForEllipse,
    .standForStar {
        width: 350px;
        opacity: 0.28;
    }
}

@media (max-width: 500px) {

    /* Top Header Bar Mobile */
    .topHeaderBar {
        padding: 0.4rem 0;
    }

    .topHeaderBar .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .topHeaderBar .d-grid {
        gap: 0.75rem;
    }

    .topHeaderBar .d-flex {
        margin-right: -8px;
        margin-left: 14px;
        gap: 0.4rem !important;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 0.65rem;
    }

    .topHeaderBar .fs-7 {
        font-size: 0.65rem;
    }

    .topHeaderBar span {
        font-size: 0.65rem;
    }

    .topHeaderBar .me-3 {
        margin-right: 0.5rem !important;
    }

    .topSocialIcon {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .topSocialIcon i {
        font-size: 0.75rem;
    }

    .topLogo {
        display: none !important;
    }

    .logoSection {
        padding: 0.75rem 0 !important;
    }

    .logoSection .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .logoSection .row {
        flex-direction: column;
        text-align: center;
    }

    .logoSection .col-md-8,
    .logoSection .col-md-4 {
        width: 100%;
        max-width: 100%;
    }

    .school-logo-img {
        width: 50px;
        height: 50px;
        margin: 0 auto;
    }

    .logoSection .d-flex {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 0.05rem !important;
        text-align: center;
    }

    .logoSection .flex-grow-1 {
        text-align: center;
        width: 100%;
    }

    .logoSection .justify-content-md-end {
        justify-content: center !important;
        margin-top: 1rem !important;
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }

    .nav-link-plain {
        font-size: 0.8rem;
        margin: 0 0.3rem;
        padding: 0.25rem 0;
    }

    .topMainHeading {
        padding-left: 0%;
    }

    .mxWidthAutoResp {
        max-width: fit-content;
        margin: 0 auto;
    }

    .instituteBuilding_2 {
        width: 100%;
        top: 12% !important;
    }

    .fs-01 {
        margin-top: 17px;
        font-size: 2rem;
    }

    .container {
        padding-left: 5%;
        padding-right: 5%;
    }

    .chairmanImg {
        width: 75%;
        left: auto !important;
        right: 0 !important;
        margin-bottom: 2px;
    }

    .aboutTopBanner {
        height: 160px;
        background-size: cover;
    }

    .aboutGallary {
        width: 94%;
        top: 24.5rem;
    }

    .custom-tabs .nav-link {
        font-size: 12px !important;
        padding: 0 0 8px 0;
    }

    .chairmanImgAbout {
        width: 100%;
    }

    .blogsHomeImg {
        height: 200px !important;
    }

    .blogsHomeImg img {
        object-fit: cover;
        width: 100%;
    }

    .founderMessageSection {
        padding-top: 0;
    }

    .founderMessageDiv img {
        width: 100%;
    }

    .founderMessageDiv div {
        width: 80%;
        top: 8%;
        right: 8%;
    }

    .homeGalleryHeading {
        font-size: 2.2rem;
    }

    .homeGallerySubheading {
        font-size: 0.95rem;
    }

    .homeGalleryCard img {
        height: 200px;
    }

    .departmentsHeading {
        font-size: 2rem;
    }

    .departmentImageWrap img {
        height: 190px;
    }

    .departmentBody {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        justify-content: center;
    }

    .departmentIcon {
        width: 48px;
        height: 48px;
    }

    .standForHeading {
        font-size: 2.2rem;
    }

    .standForSubheading {
        font-size: 0.95rem;
    }

    .standForIcon {
        width: 130px;
        height: 130px;
        border-width: 10px;
    }

    .chooseMisHeading {
        font-size: 2.3rem;
    }

    .chooseMisSubheading {
        font-size: 0.95rem;
    }

    .chooseMisCard {
        padding: 2rem 1.4rem 1.8rem;
    }

    .chooseMisIcon {
        width: 82px;
        height: 82px;
        border-radius: 18px;
    }

    .chooseMisLink {
        padding: 0.55rem 1.5rem;
    }

    .aboutImportImg {
        width: 185px;
        margin-right: 0 !important;
    }

    .blogsTopBanner {
        height: 120px;
    }

    .missonDiv {
        width: 100%;
        margin-left: 0%;
        margin-top: 25rem;
    }

    .vissionDiv,
    .goalsDiv {
        width: 100%;
        margin-left: 0%;
    }

    .topLogo {
        width: 80px;
    }

    .aboutUniversities {
        top: 1.5rem;
        margin-top: 15rem;
    }

    .aboutUniversities .card {
        width: 100%;
    }

    .badgeStyleMarginSingle {
        top: 6%;
    }

    .badgeStyleHome {
        /* top: 24%; */
        top: 7rem;
    }

    .blogImg {
        min-height: 155px;
        object-fit: cover;
    }

    .badgeStyleMargin {
        /* top: 25%; */
        top: 7.2rem;
    }

    .contactTopBanner {
        min-height: 120px;
    }

    .contactMailBox div {
        width: 70px !important;
    }

    .institutionsTopBanner {
        height: 122px;
    }

    .instituteBoxes {
        position: unset !important;
        padding-bottom: 0rem;
    }

    .InstitutionBannerBottomDiv {
        height: 350px;
    }

    .InstitutionBannerBottomDiv img {
        position: unset !important;
    }

    .galleryTopBanner {
        height: 122px;
    }

    .quickLinkMb {
        margin-bottom: 5rem;
    }

    .profileName {
        left: 0%;
    }

    .timelineSection {
        height: auto;
        padding-bottom: 10rem;
    }

    .timelineText_1 {
        top: 0%;
        right: 4%;
        left: auto;
        width: 40%;
    }

    .timelineText_2 {
        top: 18%;
        left: 7%;
        width: 36%;
    }

    .timelineText_3 {
        top: 42%;
        right: 5%;
        width: 40%;
    }

    .timelineText_4 {
        bottom: 20%;
        left: 7%;
        width: 40%;
    }

    .bodyOuterDiv {
        width: 80%;
        height: 350px;
    }

    .fs-7Resp {
        font-size: 15px !important;
    }

    .bodyCarouselOuterDiv {
        width: 85%;
    }

    .profileName_1 {
        left: 0%;
    }

    .aboutBodySection {
        padding-top: 4rem;
    }

    /* Student's Representative Body: keep desktop-like row, avoid text clipping */
    .ethos-student-body .row.align-items-center {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    /* Keep the center pillar line hidden on mobile to avoid overlap, or keep if preferred. Hiding as per user's old code. */
    .ethos-student-body .position-absolute.top-0.start-50.translate-middle-x.d-none.d-md-block {
        display: block !important;
    }

    /* Show only the helper text blocks inside each row on mobile */
    .ethos-student-body .row.align-items-center .d-none.d-md-block {
        display: block !important;
    }

    /* Helper text blocks: force flex layout so they sit on sides */
    .ethos-student-body .row.align-items-center>.col-md-5.d-none.d-md-block {
        flex: 1 1 0 !important;
        width: auto !important;
        max-width: none !important;
    }

    .ethos-student-body .row.align-items-center>.col-md-5 h3,
    .ethos-student-body .row.align-items-center>.col-md-5 h4 {
        font-size: 0.85rem !important;
        line-height: 1.2;
        margin-bottom: 0.15rem !important;
    }

    .ethos-student-body .row.align-items-center>.col-md-5 p {
        font-size: 0.7rem !important;
        line-height: 1.25;
        margin-bottom: 0 !important;
    }

    /* Allow columns to shrink without cutting text */
    .ethos-student-body .col-md-5 {
        flex: 1 1 0 !important;
        min-width: 0;
        width: auto !important;
        max-width: none !important;
        padding: 0 0.25rem !important;
    }

    .ethos-student-body .col-md-2 {
        flex: 0 0 50px !important;
        width: 50px !important;
        max-width: 50px !important;
        align-self: center;
        padding: 0 !important;
    }

    /* Scale down the icons and text slightly for mobile fit */
    .ethos-student-body .rounded-circle.shadow-lg {
        width: 44px !important;
        height: 44px !important;
    }

    .ethos-student-body .rounded-circle.shadow-lg i {
        font-size: 1.1rem !important;
    }

    .ethos-student-body .bg-white.p-4 {
        padding: 0.5rem !important;
        min-width: 0;
    }

    .ethos-student-body h4 {
        font-size: 0.85rem !important;
        line-height: 1.25;
    }

    .ethos-student-body .badge {
        font-size: 0.6rem !important;
        padding: 0.25rem 0.5rem !important;
        white-space: normal !important;
        text-align: center;
    }

    /* Ensure pillar line stays visible (desktop-like) */
    .ethos-student-body .position-absolute.top-0.start-50.translate-middle-x {
        display: block !important;
        left: 50% !important;
    }

    .timelineText_5 {
        bottom: 0%;
        right: 4%;
        width: 40%;
    }

    .footerYellow {
        width: 94% !important;
        top: -8rem;
        left: 3%;
    }

    .borderRight {
        display: none;
    }

    .relatedBlogsRespHeading {
        font-size: 1.5rem;
    }

    .footerLogo {
        width: 150px;
    }

    footer {
        padding-top: 10rem;
    }
}

@media (max-width: 1199px) {

    /* Top Header Bar Large Tablet */
    .topHeaderBar .fs-7 {
        font-size: 0.74rem;
    }

    .topSocialIcon {
        width: 29px;
        height: 29px;
    }

    .logoSection {
        padding: 1.75rem 0 !important;
    }

    .school-logo-img {
        width: 75px;
        height: 75px;
    }

    .school-title-main {
        font-size: 1.75rem;
    }

    .school-tagline {
        font-size: 0.9rem;
    }

    .aboutMisHeading {
        font-size: 2.8rem;
    }

    .aboutMisStar {
        left: 65%;
    }

    /* Header menu (Nest Hub / tablets): keep each label on one line */
    .topNavLinks {
        gap: 1rem !important;
        flex-wrap: wrap;
    }
}

/* iPad Pro / touch tablets: keep About star away from the photo */
@media (hover: none) and (pointer: coarse) and (min-width: 881px) and (max-width: 1366px) {
    .aboutMisStar {
        left: -32px !important;
        top: -32px !important;
        width: 120px;
        height: auto;
        opacity: 0.18;
        z-index: 0 !important;
    }

    .aboutMisHero {
        z-index: 2;
    }
}

/* iPad Pro (12.9") specific: move About hero media slightly up (device-only) */
@media screen and (hover: none) and (pointer: coarse) and (min-width: 1000px) and (max-width: 1030px) and (min-height: 1330px) and (max-height: 1380px) and (orientation: portrait) {
    .aboutHeroSection .aboutHeroMedia {
        margin-top: -20.25rem;
    }
}

@media screen and (hover: none) and (pointer: coarse) and (min-width: 1330px) and (max-width: 1380px) and (min-height: 1000px) and (max-height: 1030px) and (orientation: landscape) {
    .aboutHeroSection .aboutHeroMedia {
        margin-top: -1.25rem;
    }
}

/* iPad Pro / touch tablets: Testimonials bubble text overlap fix */
@media (hover: none) and (pointer: coarse) and (min-width: 992px) and (max-width: 1366px) {

    /* iPad: use pf.svg bubble for cleaner scaling */
    .testimonialsBubble .testimonialsBubbleImage {
        display: none !important;
    }

    .testimonialsBubble .testimonialsBubblePf {
        display: block !important;
    }

    /* Give the copy a safer inset so it never touches bubble strokes */
    .testimonialsContent {
        padding: 4.75rem 2.25rem 2.25rem 3.25rem !important;
    }

    /* Desktop margin hacks don't work on iPad Pro; center the nav */
    .testimonialsPagination {
        margin-top: auto !important;
        margin-left: 0 !important;
        justify-content: center;
        gap: 2rem;
    }

    .testimonialsQuoteOpen {
        z-index: 0;
    }
}

/* iPad mini + tablets: replace blue bubble with pf.svg (auto scales) */
@media (min-width: 768px) and (max-width: 1366px) {
    .testimonialsBubble .testimonialsBubbleImage {
        display: none !important;
    }

    .testimonialsBubble .testimonialsBubblePf {
        display: block !important;
    }

    .testimonialsContent {
        padding: 4.75rem 2.25rem 2.25rem 3.25rem !important;
    }

    .testimonialsPagination {
        margin-top: auto !important;
        margin-left: 450px !important;
        justify-content: center;
        gap: 2rem;
    }
}

/* Asus Zenbook Fold (desktop-class): keep Testimonials arrows stable (no vertical jump) */
@media screen and (hover: hover) and (pointer: fine) and (min-width: 1880px) and (max-width: 1960px) and (min-height: 1240px) and (max-height: 1320px),
screen and (hover: hover) and (pointer: fine) and (min-width: 1240px) and (max-width: 1320px) and (min-height: 920px) and (max-height: 1000px) {
    .testimonialsContent {
        justify-content: flex-start !important;
    }

    .testimonialsPagination {
        margin-left: 0 !important;
        margin-top: auto !important;
        padding-top: 0 !important;
        gap: 2rem !important;
        justify-content: flex-end !important;
        flex-wrap: nowrap !important;
    }

    .testimonialsNav {
        margin-left: 0 !important;
        align-items: center;
    }

    .testimonialsPageCurrent,
    .testimonialsPageTotal {
        line-height: 1;
    }
}

@media (max-width: 880px) {
    .aboutMisSection {
        padding: 40px 0;
    }

    .aboutMisHero {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 40px 20px;
    }

    .aboutMisContent {
        order: 2;
        text-align: left;
    }

    .aboutMisImageWrap {
        order: 1;
        margin: 0 auto;
        width: 100%;
        max-width: 520px;
        height: auto;
        aspect-ratio: 1;
        border-radius: 28px;
        border: 12px solid #ffffff;
    }

    .aboutMisHeading {
        font-size: 36px;
        letter-spacing: 0%;
        line-height: 120%;
    }

    .aboutMisEyebrow {
        font-size: 20px;
    }
}

@media (max-width: 991px) {

    /* Top Header Bar Tablet - Keep desktop layout */
    .topHeaderBar {
        padding: 0.5rem 0;
    }

    .topHeaderBar .container {
        padding-left: 1rem;
        padding-right: 5rem;
    }

    .topHeaderBar .d-grid {
        display: flex !important;
        justify-content: flex-end;
        align-items: center;
    }

    .topHeaderBar .d-flex {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .topHeaderBar .fs-7 {
        font-size: 0.72rem;
    }

    .topSocialIcon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .topLogo {
        width: 85px;
    }

    /* Logo Section Tablet - Keep desktop layout */
    .logoSection {
        padding: 1.5rem 0 !important;
    }

    .logoSection .row {
        flex-direction: row;
        align-items: center;
    }

    .logoSection .col-md-8,
    .logoSection .col-md-4 {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
    }

    .logoSection .d-flex {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }

    .logoSection .justify-content-md-end {
        justify-content: flex-end !important;
        margin-top: 0 !important;
    }

    .school-logo-img {
        width: 75px;
        height: 75px;
        margin: 0;
    }

    /* Header Responsive */
    .school-title-main {
        font-size: 1.6rem;
    }

    .school-tagline {
        font-size: 0.9rem;
    }

    /* Academics page: center hero CTA buttons in stacked layout */
    .innerHero-academics .innerHeroActions {
        width: 100%;
        justify-content: center;
    }

    /* Gallery page: center hero CTA buttons in stacked layout */
    .innerHero-gallery .innerHeroActions {
        width: 100%;
        justify-content: center;
    }

    /* Admissions page: center hero CTA buttons in stacked layout */
    .innerHero-admissions .innerHeroActions {
        width: 100%;
        justify-content: center;
    }

    .nav-link-plain {
        font-size: 0.9rem;
        margin: 0 0.5rem;
    }

    /* Hero Section */
    .heroBannerSection {
        min-height: auto;
        padding: 4.5rem 0;
        background-position: center;
    }

    .heroBannerContent {
        text-align: center;
        margin: 0 auto;
    }

    .heroBannerTitle {
        font-size: 3rem;
    }

    .heroBannerSubtitle {
        margin: 0 auto;
    }

    .heroBannerStar {
        left: 50%;
        transform: translateX(-50%);
        top: 8%;
    }

    .accreditShowcaseSection {
        padding: 4rem 0;
    }

    .accreditShowcaseCard {
        text-align: center;
        flex-direction: column;
        align-items: center !important;
    }

    .accreditShowcaseTitle {
        font-size: 1.1rem;
    }

    .accreditShowcaseText {
        font-size: 0.95rem;
    }

    .accreditationSection {
        padding: 3rem 0;
    }

    .accreditationCard {
        margin-bottom: 1.5rem;
    }

    .accreditationTitle {
        font-size: 1.3rem;
    }

    .accreditationIcon i {
        font-size: 2.5rem;
    }

    .noticeUpdatesSection {
        text-align: center;
    }

    .noticeUpdatesHeading {
        font-size: 2.6rem;
    }

    .noticeUpdatesSubheading {
        margin: 0 auto;
    }

    .noticeUpdatesTabs {
        justify-content: center;
    }

    .noticeUpdatesStar {
        position: static;
        margin: 2rem auto 0;
    }

    .aboutMisSection {
        padding: 40px 0;
    }

    .aboutMisHero {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 40px 20px;
    }

    .aboutMisContent {
        order: 2;
        text-align: left;
    }

    .aboutMisImageWrap {
        order: 1;
        margin: 0 auto;
        width: 100%;
        max-width: 520px;
        height: auto;
        aspect-ratio: 1;
        border-radius: 28px;
        border: 12px solid #ffffff;
    }

    .aboutMisHeading {
        font-size: 36px;
        letter-spacing: 0%;
        line-height: 120%;
    }

    .aboutMisEyebrow {
        font-size: 20px;
    }

    /* Choose MIS Section */
    .chooseMisSection {
        padding: 4rem 0;
    }

    .chooseMisHeading {
        font-size: 2.5rem;
    }

    .chooseMisEllipse,
    .chooseMisStar {
        width: 400px;
        opacity: 0.3;
    }

    /* Stand For Section */
    .standForHeading {
        font-size: 2.5rem;
    }

    .standForEllipse,
    .standForStar {
        width: 400px;
        opacity: 0.3;
    }

    /* Gallery Section */
    .homeGallerySection {
        padding: 4rem 0;
    }

    .homeGalleryHeading {
        font-size: 2.5rem;
    }

    .homeGalleryCard {
        margin-bottom: -0.5rem;
    }
}

/* Footer (iPad/tablet touch): prevent newsletter overlap (portrait + landscape) */
@media (hover: none) and (pointer: coarse) and (min-width: 576px) and (max-width: 1366px) {
    footer {
        padding-top: 2.5rem;
    }

    footer .footerYellow {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 0 0 2rem 0;
        width: 100% !important;
    }
}

/* Footer (iPad/tablet width fallback): same as above, without hover/pointer dependency */
@media (min-width: 576px) and (max-width: 1366px) {
    footer {
        padding-top: 2.5rem;
    }

    footer .footerYellow {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 0 0 2rem 0;
        width: 100% !important;
    }
}

/* Smart displays (Nest Hub/Max): prevent footer horizontal overflow + overlap */
@media (max-width: 1280px) {
    footer .container>.row {
        flex-wrap: wrap !important;
    }

    footer .footerMap {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 575px) {
    .heroBannerSection {
        padding: 3.5rem 0;
        background-position: center top;
    }

    .heroBannerTitle {
        font-size: 2.4rem;
    }

    .heroBannerSubtitle {
        font-size: 0.98rem;
    }

    .heroBannerButtons {
        flex-direction: column;
        align-items: stretch;
    }

    .heroPrimaryBtn,
    .heroSecondaryBtn {
        width: 100%;
    }

    .heroBannerStar {
        top: 4%;
    }

    .accreditShowcaseSection {
        padding: 3.5rem 0;
    }

    .accreditShowcaseCard {
        padding: 1.5rem 1.35rem;
    }

    .accreditShowcaseTitle {
        font-size: 1.05rem;
    }

    .accreditShowcaseText {
        font-size: 0.92rem;
    }

    .accreditShowcaseDot {
        width: 7px;
        height: 7px;
    }

    .noticeUpdatesSection {
        padding: 3.5rem 0;
    }

    .noticeUpdatesHeading {
        font-size: 2.3rem;
    }

    .noticeTab {
        width: 100%;
        justify-content: center;
    }

    .noticeCard {
        flex-direction: row;
        padding: 1rem 1.25rem 1rem 2.75rem;
        width: 100%;
        margin-left: 0;
    }

    .noticeAccent {
        width: 6px;
    }

    .noticeText {
        font-size: 0.98rem;
    }

    .aboutMisSection {
        padding: 40px 0;
    }

    .aboutMisHero {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 40px 20px;
    }

    .aboutMisContent {
        order: 2;
        text-align: left;
    }

    .aboutMisImageWrap {
        order: 1;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 1;
        border-radius: 28px;
        border: 12px solid #ffffff;
    }

    .aboutMisHeading {
        font-size: 28px;
        letter-spacing: 0%;
        line-height: 120%;
    }

    .aboutMisEyebrow {
        font-size: 18px;
    }

    .aboutMisText {
        font-size: 14px;
        max-width: 100%;
    }

    .aboutMisButton {
        width: fit-content;
        padding: 12px 26px;
    }

    /* Header Mobile */
    .school-title-main {
        font-size: 1.3rem;
    }

    .school-tagline {
        font-size: 0.75rem;
    }

    .nav-link-plain {
        font-size: 0.85rem;
        margin: 0 0.3rem;
        padding: 0.25rem 0;
    }

    /* Choose MIS Mobile */
    .chooseMisHeading {
        font-size: 2rem;
    }

    .chooseMisCard {
        margin-bottom: 1.5rem;
    }

    .chooseMisIcon {
        width: 90px;
        height: 90px;
    }

    .chooseMisTitle {
        font-size: 1.2rem;
    }

    .chooseMisText {
        font-size: 0.9rem;
    }

    .chooseMisEllipse,
    .chooseMisStar {
        width: 300px;
        opacity: 0.25;
    }

    /* Stand For Mobile */
    .standForHeading {
        font-size: 2rem;
    }

    .standForIcon {
        width: 140px;
        height: 140px;
    }

    .standForTitle {
        font-size: 1.2rem;
    }

    .standForText {
        font-size: 0.9rem;
    }

    .standForEllipse,
    .standForStar {
        width: 300px;
        opacity: 0.25;
    }

    /* Gallery Mobile */
    .homeGalleryHeading {
        font-size: 2rem;
    }

    .homeGallerySubheading {
        font-size: 0.95rem;
    }

    /* Accreditation Mobile */
    .accreditationSection {
        padding: 2.5rem 0;
    }

    .accreditationCard {
        padding: 1.5rem 1.5rem;
    }

    .accreditationIcon {
        width: 70px;
        height: 70px;
    }

    .accreditationIcon i {
        font-size: 2rem;
    }

    .accreditationTitle {
        font-size: 1.2rem;
    }

    .accreditationText {
        font-size: 0.9rem;
    }

    .aboutMisImageWrap {
        padding: 1rem;
        border-radius: 30px;
    }

    .aboutMisImage {
        border-radius: 22px;
    }
}

@media (max-width: 400px) {

    /* Top Header Bar Small Mobile */
    .topHeaderBar {
        padding: 0.35rem 0;
    }

    .topHeaderBar .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .topHeaderBar .d-flex {
        gap: 0.3rem !important;
        font-size: 0.6rem;
    }

    .topHeaderBar .fs-7 {
        font-size: 0.6rem;
    }

    .topHeaderBar span {
        font-size: 0.6rem;
        margin: 0 0.25rem;
    }

    .topSocialIcon {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .topSocialIcon i {
        font-size: 0.7rem;
    }

    /* Header Small Mobile */
    .logoSection {
        padding: 0.5rem 0 !important;
    }

    .logoSection .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .school-logo-img {
        width: 45px;
        height: 45px;
    }

    .school-title-main {
        font-size: 1.1rem;
    }

    .school-tagline {
        font-size: 0.7rem;
    }

    .logoSection .d-flex {
        gap: 0.5rem !important;
        text-align: center;
    }

    .logoSection .flex-grow-1 {
        text-align: center;
        width: 100%;
    }

    .logoSection .justify-content-md-end {
        gap: 0.4rem !important;
        margin-top: 0.75rem !important;
    }

    .nav-link-plain {
        font-size: 0.75rem;
        margin: 0 0.2rem;
        padding: 0.2rem 0;
    }

    /* Hero Small Mobile */
    .heroBannerTitle {
        font-size: 2rem;
    }

    .heroBannerSubtitle {
        font-size: 0.9rem;
    }

    /* Background Elements Small */
    .chooseMisEllipse,
    .chooseMisStar,
    .standForEllipse,
    .standForStar {
        width: 250px;
        opacity: 0.2;
    }

    /* Cards Small */
    .accreditationCard,
    .standForCard,
    .chooseMisCard {
        padding: 1.25rem 1rem;
    }

    .homeGalleryCard {
        padding: 0;
        border: 4px solid rgba(255, 255, 255, 0.9);
    }

    .aboutTopBanner {
        height: 115px;
        padding: 0 !important;
        background-size: cover;
        display: flex;
        align-items: center;
    }

    .aboutGallary {
        top: 28rem;
    }

    .fs-7Resp {
        font-size: 14px !important;
    }

    .aboutImportImg {
        width: 170px;
    }

    .InstitutionBannerBottomDiv {
        height: 330px;
    }

    .institutionsTopBanner {
        height: 115px;
        padding: 0 !important;
        background-size: cover;
        display: flex;
        align-items: center;
    }

    .bodyOuterDiv {
        width: 95%;
    }

    .galleryTopBanner {
        height: 115px;
        padding: 0 !important;
        background-size: cover;
        display: flex;
        align-items: center;
    }

    .blogsTopBanner {
        height: 115px;
        padding: 0 !important;
        background-size: cover;
        display: flex;
        align-items: center;
    }

    .clientCarousel {
        margin-top: 5rem;
    }

    .contactTopBanner {
        min-height: 115px;
        padding: 0 !important;
        background-size: cover;
        display: flex;
        align-items: center;
    }

    .aboutUniversities {
        margin-top: 12rem;
    }

    /* .badgeStyleMargin {
        top: 22%;
    } */

    .badgeStyleMarginSingle {
        top: 6%;
    }

    .profileName {
        left: -3%;
    }

    .footerYellow {
        left: 3%;
    }
}

@media (max-width: 1199px) {
    .chooseMisCarouselWrapper {
        padding: 0 2rem;
    }

    .chooseMisSlide {
        flex: 0 0 calc((100% - 1.5rem) / 2);
    }

    .aboutHeroTitle {
        font-size: clamp(2rem, 2.2vw + 1.2rem, 2.6rem);
    }

    .aboutLeadershipBadge,
    .aboutLeadershipRole {
        left: 8%;
    }

    .testimonialsHeadingWrap {
        max-width: 100%;
        text-align: center;
    }
}

@media (max-width: 767px) {
    .chooseMisCarouselWrapper {
        padding: 0 1.5rem;
    }

    .chooseMisSlide {
        flex: 0 0 100%;
    }

    .chooseMisArrow {
        width: 40px;
        height: 56px;
    }

    .chooseMisArrowPrev {
        left: 0;
        border-radius: 28px 0 0 28px;
    }

    .chooseMisArrowNext {
        right: 0;
        border-radius: 0 28px 28px 0;
    }

    .aboutHeroSection {
        text-align: center;
    }

    .aboutHeroBadge {
        margin: 0 auto;
    }

    .aboutHeroMedia {
        margin-top: 2.5rem;
    }

    .aboutHeroStatsCard {
        text-align: center;
    }

    .aboutStoryImage {
        margin-bottom: 2rem;
    }

    .aboutSectionLabel {
        justify-content: center;
    }

    .aboutLeadershipBadge,
    .aboutLeadershipRole {
        position: static;
        display: inline-flex;
        transform: none;
        margin-top: 1rem;
        margin-left: 10px;
    }

    .aboutLeadershipFigure {
        text-align: center;
    }

    .aboutLeadershipSignature {
        align-items: flex-start;
    }

    .aboutTimelineWrap {
        padding-left: 0;
        padding-right: 0;
    }

    .aboutTimelineLine {
        left: 0;
        transform: none;
    }

    .aboutTimelineItem {
        width: 100%;
        margin: 0;
        transform: none;
        padding: 1.5rem 1.6rem;
    }

    .aboutTimelineItem::before {
        left: -9px;
        right: auto;
    }

    .testimonialsHeadingWrap {
        align-items: center;
    }
}

@media (max-width: 576px) {
    .chooseMisArrow {
        width: 24px;
        height: 56px;
    }

    .aboutHeroBadge {
        padding: 0.45rem 1.2rem;
    }

    .aboutHeroPrimary,
    .aboutHeroSecondary {
        width: 100%;
    }

    .aboutHeroStatsCard {
        padding: 1.2rem 1rem;
    }

    .aboutStoryHighlight {
        position: static;
        display: inline-block;
        margin-top: 1.5rem;
    }

    .aboutPillarCard {
        padding: 2rem 1.6rem;
    }

    .aboutGoverningAvatar {
        width: 100px;
        height: 100px;
    }

    .testimonialsHeading {
        font-size: 2.2rem;
    }

    /* Admissions Page Hero Shapes Fix */
    .heroShape-star {
        max-width: 80px;
        top: -10px;
        left: -10px;
        opacity: 0.15;
    }

    .heroShape-dots {
        max-width: 100px;
        top: 5%;
        right: 0%;
        opacity: 0.2;
    }

    /* Keep Principal section stacked but strictly styled for mobile */
    .ethos-principal .card.border-0.shadow-lg {
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .ethos-principal .card.border-0.shadow-lg .col-md-5.bg-light.p-5 {
        background: #f8f9fa !important;
        padding: 2.5rem 1rem !important;
        text-align: center !important;
    }

    .ethos-principal .card.border-0.shadow-lg .col-md-7.p-4.p-lg-5 {
        background: #ffffff !important;
        padding: 2rem 1rem 1rem 1rem !important;
    }

    /* Principal Outer Ring and Image */
    .ethos-principal .card.border-0.shadow-lg .mx-auto.mb-3 {
        width: 150px !important;
        height: 150px !important;
        border-color: #fff !important;
        border-width: 5px !important;
    }

    .ethos-principal .card.border-0.shadow-lg .position-absolute.top-50.start-50.translate-middle.border.border-warning {
        width: 175px !important;
        height: 175px !important;
        opacity: 1 !important;
        border-width: 2px !important;
        border-color: rgba(var(--bs-warning-rgb), 0.35) !important;
    }

    /* Principal Name */
    .ethos-principal .card.border-0.shadow-lg h4.fw-bold.themeColor {
        font-size: 1.5rem !important;
        color: var(--mainColor) !important;
        margin-top: 2rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Principal Badge */
    .ethos-principal .card.border-0.shadow-lg .badge.bg-warning {
        font-size: 0.9rem !important;
        padding: 0.4rem 1.2rem !important;
        border-radius: 20px !important;
    }

    /* Section Heading */
    .ethos-principal .card.border-0.shadow-lg h3.fw-bold {
        font-size: 2.2rem !important;
        line-height: 1.1;
        color: #000 !important;
        margin-bottom: 1rem !important;
    }

    /* Section Description */
    .ethos-principal .card.border-0.shadow-lg p.text-secondary.mb-4 {
        font-size: 1.1rem !important;
        line-height: 1.5;
        color: #6c757d !important;
    }
}

@media (max-width: 360px) {
    .ethos-student-body .row.align-items-center {
        flex-wrap: wrap;
    }

    .ethos-student-body .col-md-2 {
        flex: 0 0 100%;
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 991px) {
    .standForMobileScroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 2rem;
        margin-left: -12px;
        margin-right: -12px;
        scroll-padding-left: 1.5rem;
        justify-content: flex-start !important;
    }

    .standForMobileScroll::-webkit-scrollbar {
        display: none;
    }

    .standForMobileCol {
        flex: 0 0 85%;
        max-width: 85%;
        scroll-snap-align: start;
        padding-left: 24px;
        padding-right: 0px;
    }

    .standForMobileCol .wow {
        visibility: visible !important;
        animation-name: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}