/* UCATZ responsive fixes.
   Desktop colors, type, and section order stay as they are.
   These rules only stop clipping, overlap, and horizontal overflow. */

img,
video,
svg,
canvas {
    max-width: 100%;
    height: auto;
}

iframe {
    max-width: 100%;
}

/* Staff link is inline-white on a white bar, so it disappears. */
.navbar-elixir .navbar-nav .nav-link {
    color: #294a70 !important;
}

/* The 20px menu is wider than the navbar on every laptop width. */
@media (max-width: 1399.98px) {
    .navbar-expand-lg .navbar-toggler {
        display: inline-flex !important;
        align-items: center;
        border: 0;
    }

    .navbar-expand-lg .navbar-collapse {
        display: none !important;
        flex-basis: 100%;
    }

    .navbar-expand-lg .navbar-collapse.show,
    .navbar-expand-lg .navbar-collapse.collapsing {
        display: block !important;
        max-height: 70vh;
        overflow-y: auto;
        background: #fff;
        padding: 0.25rem 0.5rem 1rem;
    }

    .navbar-expand-lg .navbar-nav {
        flex-direction: column !important;
        align-items: stretch;
        font-size: 16px !important;
    }

    .navbar-expand-lg .nav-item,
    .navbar-expand-lg .nav-link,
    .navbar-expand-lg .dropdown-item {
        white-space: normal;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    .navbar-expand-lg .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        transform: none !important;
        border: 0;
        box-shadow: none;
        background: #f7f9fc;
    }

    .navbar-brand img {
        width: 112px !important;
        height: auto;
    }
}

@media (min-width: 1400px) {
    .navbar-elixir .container {
        max-width: min(1480px, calc(100vw - 2rem));
    }

    .navbar-elixir .navbar-nav {
        font-size: 15px !important;
    }

    .navbar-elixir .nav-link {
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
        white-space: nowrap;
    }

    .navbar-brand img {
        width: 112px !important;
        height: auto;
    }
}

@media (max-width: 991.98px) {
    #ct5,
    h3.first-txt {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        font-size: 14px !important;
        line-height: 1.35 !important;
        text-align: center !important;
        margin: 0;
        padding: 0.35rem 0.75rem !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    body > b,
    body > a,
    b[style*="22px"] {
        font-size: 14px !important;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    body > img {
        max-width: 36px;
        height: auto;
        vertical-align: middle;
    }

    .marquee,
    marquee {
        display: block;
        width: 100% !important;
        max-width: 100%;
        font-size: 14px !important;
        line-height: 1.4;
    }

    p,
    li,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    a,
    td,
    th,
    label,
    .btn {
        overflow-wrap: anywhere;
    }

    .theme-slider .btn,
    .swiper .btn,
    .bg-holder + .container .btn {
        white-space: normal !important;
        height: auto !important;
        max-width: 100%;
        font-size: 14px !important;
        line-height: 1.45 !important;
    }

    .theme-slider .px-5,
    .swiper .px-5 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .news-grid,
    .quick-links {
        grid-template-columns: 1fr !important;
    }

    .news-section,
    .principal-box,
    .course-card,
    .quick-link,
    .cta-box,
    .achievement-box,
    .popup-content,
    .quick-contact-content,
    .newsletter-popup-content {
        max-width: 100%;
        box-sizing: border-box;
    }

    .footer-section > .container > .row {
        margin-left: 0;
        margin-right: 0;
    }

    table {
        display: table !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: fixed;
    }

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

    input,
    select,
    textarea,
    .form-control,
    .form-select,
    .btn {
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    .fixed-bottom {
        font-size: 13px;
        line-height: 1.35;
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }

    .fixed-bottom a {
        display: inline-block;
        max-width: 100%;
        white-space: normal;
    }

    body {
        padding-bottom: 3.4rem;
    }

    .news-section h1,
    .courses-header,
    .section-title,
    .cta-title {
        font-size: 1.55rem !important;
        line-height: 1.25;
    }

    .stat-box {
        padding: 1.15rem 0.7rem;
    }

    .stat-number {
        font-size: 1.8rem !important;
    }

    .principal-image {
        width: min(180px, 60vw) !important;
        height: min(180px, 60vw) !important;
    }

    .footer-section .p-5 {
        padding: 1.25rem !important;
    }

    footer img {
        width: 140px !important;
        height: auto;
    }

    .popup-content,
    .quick-contact-content,
    .newsletter-popup-content {
        width: calc(100% - 1.25rem) !important;
        max-width: calc(100% - 1.25rem) !important;
        padding: 1.4rem 1rem !important;
    }

    .popup-buttons,
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .popup-buttons .btn,
    .cta-buttons .btn {
        width: 100%;
        margin: 0;
    }

    .accessibility-widget {
        top: auto;
        bottom: 13rem;
        left: 12px;
        transform: none;
    }

    .quick-contact-float {
        left: 12px;
        bottom: 8.6rem;
        padding: 12px;
        border-radius: 50%;
    }

    .quick-contact-float span {
        display: none;
    }

    .whatsapp-float {
        left: 12px;
        bottom: 4.6rem;
    }

    .apply-float {
        left: auto;
        right: 12px;
        bottom: 4.6rem;
    }

    .back-to-top {
        right: 12px;
        bottom: 8.2rem;
    }
}

@media (max-width: 359.98px) {
    .navbar-brand img {
        width: 96px !important;
    }

    #ct5,
    .marquee,
    marquee,
    body > b,
    body > a {
        font-size: 13px !important;
    }
}
