/* Site-wide usability and responsive improvements. */
:root {
    --site-focus: var(--brand-teal-deep);
    --site-surface: #fff;
    --site-shadow: 0 16px 48px rgb(20 35 65 / 12%);
}

html {
    scroll-padding-top: 6rem;
    scroll-behavior: smooth;
}

body {
    overflow-x: clip;
}

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

img {
    height: auto;
}

a,
button,
input,
select,
textarea,
[tabindex]:not([tabindex="-1"]) {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid var(--site-focus) !important;
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 2000;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.75rem 1rem;
    transform: translateY(-160%);
    border-radius: 0.5rem;
    background: #101a2a;
    color: #fff;
    font-weight: 700;
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
    color: #fff;
}

#main-content:focus {
    outline: none;
}

.header-area {
    transition: box-shadow 180ms ease, background-color 180ms ease;
}

.header-area.header-scrolled {
    box-shadow: 0 8px 28px rgb(20 35 65 / 9%);
}

.header-area .header-left .menu-bar,
.header-area .navbar-wrapper .close-menu-bar {
    appearance: none;
    padding: 0;
    border: 0;
    cursor: pointer;
}

.header-area .header-left .menu-bar img,
.header-area .navbar-wrapper .close-menu-bar img {
    display: inline-block;
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
}

.header-area .navbar-wrapper .close-menu-bar img {
    width: 20px;
    height: 20px;
}

.header-area .navbar-wrapper > ul > li > a,
.footer-area a {
    text-underline-offset: 0.2em;
}

.back-to-top {
    position: fixed;
    z-index: 1010;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--brand-teal);
    color: #fff;
    box-shadow: var(--site-shadow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.75rem);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease, background-color 180ms ease;
}

.back-to-top:hover {
    background: var(--brand-teal-deep);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top i {
    font-size: 1.25rem;
}

.project-filter-section {
    padding: 1.5rem 0 2.5rem;
}

.project-filter-panel {
    display: grid;
    grid-template-columns: minmax(13rem, 1.2fr) minmax(14rem, 1.5fr) minmax(10rem, 0.8fr) auto;
    align-items: end;
    gap: 1.25rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid rgb(0 168 132 / 12%);
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--brand-paper), #fff 70%);
    box-shadow: 0 12px 36px rgb(20 35 65 / 6%);
}

.project-filter-copy h2 {
    margin: 0.2rem 0;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.project-filter-copy p {
    margin: 0;
    color: #5e6878;
}

.project-filter-controls label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.project-filter-controls input,
.project-filter-controls select {
    width: 100%;
    min-height: 3rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid #c9d2e1;
    border-radius: 0.55rem;
    background: #fff;
    color: #172235;
}

.project-filter-status {
    margin: 0 0 0.75rem;
    color: #46546a;
    font-weight: 700;
    white-space: nowrap;
}

.project-filter-empty {
    margin: 1rem 0 0;
    padding: 1rem;
    border-radius: 0.75rem;
    background: var(--brand-paper);
    color: #26354a;
}

.licence-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.5rem;
    margin-top: 0.35rem;
    padding: 0.55rem 0.8rem;
    border-radius: 0.5rem;
    background: var(--brand-teal);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.licence-download:hover {
    background: var(--brand-teal-deep);
    color: #fff;
}

.pictures-portion .pic[role="button"] {
    cursor: zoom-in;
}

.gallery-lightbox .modal-content {
    border: 1px solid rgb(255 255 255 / 12%);
    background: #101722;
    color: #fff;
}

.gallery-lightbox .modal-header,
.gallery-lightbox .modal-footer {
    border-color: rgb(255 255 255 / 14%);
}

.gallery-lightbox .modal-body {
    display: grid;
    min-height: 16rem;
    place-items: center;
    padding: clamp(0.75rem, 2vw, 1.5rem);
}

.gallery-lightbox .modal-body img {
    display: block;
    width: 100%;
    max-height: min(72vh, 54rem);
    object-fit: contain;
}

.gallery-lightbox .modal-title {
    margin: 0;
    font-size: 1.15rem;
}

.gallery-lightbox .btn-close {
    opacity: 0.9;
}

.service4-area .section-header h2 {
    color: #fff;
}

.projects-section-header h2,
.private-project-header h2 {
    margin: 12px 0 20px;
    color: var(--brand-ink);
}

.gallery-lightbox .modal-footer {
    gap: 0.75rem;
}

#galleryImageCount {
    margin-inline: auto;
    font-variant-numeric: tabular-nums;
}

[data-project-card][hidden],
.projects-section[hidden],
.private-project-area[hidden],
.project-filter-empty[hidden] {
    display: none !important;
}

@media (max-width: 991px) {
    .project-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-filter-copy {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575px) {
    html {
        scroll-padding-top: 4.5rem;
    }

    .project-filter-panel {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-filter-copy {
        grid-column: auto;
    }

    .project-filter-status {
        margin: 0;
    }

    .back-to-top {
        width: 2.9rem;
        height: 2.9rem;
    }

    .copyright-area .custom-row {
        gap: 1rem;
        justify-content: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
