/* Site-wide mobile responsiveness — Naraiuran Controls */

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

.body-container {
    overflow-x: hidden;
    width: 100%;
}

/* Hero banner images */
.header-content-wrapper > img,
.header-content-wrapper.new > img,
.header.new > img {
    width: 100%;
    height: auto;
    min-height: 180px;
    object-fit: cover;
}

/* Carousel images — override fixed 450px heights in views */
.carousel-inner .item img,
.carousel-inner .img-thumbnail {
    width: 100% !important;
    height: auto !important;
    max-height: 420px;
    object-fit: cover;
}

/* Content columns stack naturally via Bootstrap; ensure full width */
@media only screen and (max-width: 991px) {
    .content-40mg .col-md-6,
    .content-40mg .col-md-4,
    .content-40mg .col-md-8,
    .content-block .col-md-6,
    .content-block .col-md-4 {
        margin-bottom: 1.5rem;
    }

    .bismdl-wrapper .bismdl {
        width: 100% !important;
        float: none !important;
        margin-bottom: 1rem;
    }

    .bismdl-wrapper {
        display: flex;
        flex-direction: column;
    }

    .header-content.new {
        padding: 1rem !important;
    }

    .header-content article {
        font-size: 0.9375rem !important;
    }

    .bottom-tagline.custom-shade .carousel {
        padding-right: 0 !important;
    }

    .bottom-tagline.custom-shade .carousel-inner h3 {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }

    .contact-Banner {
        position: relative !important;
        width: 100%;
    }

    .float-heading {
        bottom: 0;
        padding: 0 1rem;
    }

    footer.page-footer .row > [class*="col-"],
    footer.nc-footer .row > [class*="col-"] {
        margin-bottom: 1.5rem;
    }
}

@media only screen and (max-width: 767px) {
    /* Override legacy float timeline rules */
    ul.timeline.nc-timeline > li > .timeline-panel {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
    }

    ul.timeline.nc-timeline > li > .timeline-badge {
        position: relative !important;
        left: auto !important;
        float: none !important;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .navbar-brand img {
        max-height: 48px;
        width: auto;
    }

    .navbar ul.nav a {
        line-height: 1.4 !important;
        padding: 12px 15px !important;
    }

    .navbar .navbar-nav li a {
        line-height: 1.4 !important;
    }

    .header,
    .header.new {
        padding-top: 64px !important;
    }

    .header h1,
    .header-content h1 {
        word-wrap: break-word;
    }

    .breadcrumb {
        float: none !important;
        text-align: center;
        margin-top: 0.5rem;
    }

    .margin-top-16.pull-right {
        float: none !important;
        text-align: center;
    }

    .carousel-inner .item img,
    .carousel-inner .img-thumbnail {
        max-height: 260px;
    }

    .carousel-control {
        width: 10%;
    }

    .indus-container {
        margin-top: 64px;
        height: auto !important;
    }

    .indus-container .flex-container {
        -webkit-overflow-scrolling: touch;
    }

    .headline-wrapper .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .headline-wrapper .text-center .btn + .btn,
    .headline-wrapper .text-center a.btn + a.btn {
        margin-left: 0 !important;
    }

    .collapse.in > .row {
        padding: 1rem 0.5rem;
    }

    .blog-post-holder {
        font-size: 0.9375rem;
        line-height: 1.6;
        padding: 0 0.25rem;
    }

    .nc-timeline-cta-wrapper {
        padding: 0 0.5rem;
    }

    .page-footer .btn-success,
    .nc-footer .btn-success {
        display: block;
        width: 100%;
        text-align: center;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent inline fixed-width blocks from overflowing */
    [style*="width:250px"],
    [style*="width:340px"] {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media only screen and (max-width: 480px) {
    .carousel-inner .item img,
    .carousel-inner .img-thumbnail {
        max-height: 200px;
    }

    .header-content-wrapper::before,
    .header-content-wrapper.new::before {
        background: linear-gradient(105deg, rgba(26, 26, 26, 0.88) 0%, rgba(26, 26, 26, 0.6) 100%) !important;
    }

    footer .btn-social-icon {
        margin-bottom: 0.5rem;
    }
}
