/* Shared responsive rules: desktop, tablet and mobile */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

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

iframe {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
}

.container,
.container-fluid,
.row,
[class*="col-"] {
    min-width: 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: calc(100% - 72px);
    white-space: normal;
    line-height: 1.25;
}

.navbar-brand img {
    flex: 0 0 auto;
    max-width: 52px;
    height: auto;
}

.navbar-toggler {
    flex: 0 0 auto;
}

.navbar-collapse {
    max-height: calc(100vh - 76px);
    overflow-y: auto;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    max-width: 100%;
}

input, select, textarea, button {
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6, p, a, li, span {
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: .75rem;
        padding: .5rem 0 1rem;
    }

    .navbar-nav .nav-link {
        padding: .7rem .25rem;
    }

    section {
        background-attachment: scroll !important;
    }
}

@media (max-width: 767.98px) {
    .container,
    .container-fluid {
        --bs-gutter-x: 1.5rem;
    }

    h1, .display-1, .display-2, .display-3, .display-4, .display-5 {
        font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
        line-height: 1.25;
    }

    h2 {
        font-size: clamp(1.45rem, 6vw, 2rem);
        line-height: 1.3;
    }

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

    .p-5 {
        padding: 1.5rem !important;
    }

    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .btn {
        min-height: 44px;
        white-space: normal;
    }

    .card,
    .service-list-card,
    .article-card,
    .project-card {
        height: auto !important;
    }

    footer .row > * {
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: .88rem !important;
        max-width: calc(100% - 60px);
    }

    .navbar-brand img {
        max-width: 40px;
    }

    .navbar-toggler {
        padding: .3rem .5rem;
    }

    .row {
        --bs-gutter-x: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: .35rem;
    }

    .pagination .page-link {
        min-width: 40px;
        min-height: 40px;
        display: grid;
        place-items: center;
    }
}
