/* Site-specific additions to the Sandbox template styles. */

/* Breadcrumbs on dark page headers */
.breadcrumb-light .breadcrumb-item,
.breadcrumb-light .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb-light .breadcrumb-item a:hover {
    color: #fff;
    text-decoration: underline;
}

.breadcrumb-light .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-light .breadcrumb-item.active {
    color: #fff;
}

/* Images keep their intrinsic aspect ratio when CSS sets only one dimension */
img[width][height] {
    height: auto;
}

/* Hero video poster: shown instead of an autoplaying video */
.video-poster {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Numbered steps used for workflow and approach sections */
.step-number {
    flex-shrink: 0;
}

/* Long words (URLs, programme names) must not cause horizontal scrolling on phones */
.text-break-anywhere {
    overflow-wrap: anywhere;
}

/* Dropdown links inside the dark mobile menu */
@media (max-width: 991.98px) {
    .navbar .dropdown-menu .dropdown-item {
        white-space: normal;
    }
}

/* The template sets a[href^=tel] { color: inherit }, which overrides button colours */
.btn[href^="tel"] {
    color: var(--bs-btn-color);
}

.btn[href^="tel"]:hover,
.btn[href^="tel"]:focus-visible {
    color: var(--bs-btn-hover-color);
}

main a[href^="tel"]:not(.btn) {
    color: var(--bs-primary);
}

/* Phone screenshots in project galleries */
.phone-shot {
    max-width: 280px;
    margin-inline: auto;
    display: block;
}

/* Project carousel: equal-height cards, with room for their shadows inside the clipped track */
.project-carousel .swiper {
    padding: 0.75rem 0.75rem 2.5rem;
    margin: -0.75rem -0.75rem -1.5rem;
}

.project-carousel .swiper-slide {
    height: auto;
}

/* Without JavaScript, the cards wrap into a grid instead of a clipped single row */
.project-carousel .swiper:not(.swiper-initialized) .swiper-wrapper {
    flex-wrap: wrap;
    gap: 30px;
}

.project-carousel .swiper:not(.swiper-initialized) .swiper-slide {
    width: 100%;
}

@media (min-width: 768px) {
    .project-carousel .swiper:not(.swiper-initialized) .swiper-slide {
        width: calc((100% - 30px) / 2);
    }
}

@media (min-width: 992px) {
    .project-carousel .swiper:not(.swiper-initialized) .swiper-slide {
        width: calc((100% - 60px) / 3);
    }
}

/* The template keeps button labels on one line. On narrow screens a long label
   would widen the page and push it sideways, so labels wrap instead. */
@media (max-width: 767.98px) {
    .btn {
        white-space: normal;
        max-width: 100%;
        overflow-wrap: break-word;
    }
}
