/* Keep hero captions readable without hiding the main subject of each slide. */
.home-hero .carousel-item::after {
    background: linear-gradient(
        to top,
        rgba(2, 16, 38, .88) 0,
        rgba(2, 16, 38, .58) 32%,
        rgba(2, 16, 38, 0) 64%
    );
}

.home-hero .carousel-caption {
    right: auto;
    bottom: clamp(1rem, 3vw, 2rem);
    left: max(1rem, calc((100vw - 1176px) / 2));
    width: min(720px, calc(100% - 2rem));
    padding: clamp(.85rem, 2vw, 1.25rem) clamp(1rem, 2.5vw, 1.5rem);
    border-left: 5px solid var(--swaas-gold);
    background: rgba(3, 25, 58, .82);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
    text-align: left;
    transform: none;
    backdrop-filter: blur(2px);
}

.home-hero .carousel-caption .hero-kicker {
    margin-bottom: .4rem;
}

.home-hero .carousel-caption h1,
.home-hero .carousel-caption h2 {
    margin-bottom: .4rem;
    font-size: clamp(1.45rem, 3vw, 2.35rem);
    line-height: 1.12;
}

.home-hero .carousel-caption p {
    max-width: 680px;
    margin-bottom: .75rem;
    font-size: clamp(.88rem, 1.25vw, 1rem);
    line-height: 1.45;
}

.home-hero .carousel-caption .swaas-button {
    min-height: 40px;
    padding: .45rem 1rem;
}

@media (max-width: 575.98px) {
    .home-hero .carousel-item {
        height: 390px;
    }

    .home-hero .carousel-item::after {
        background: linear-gradient(to top, rgba(2, 16, 38, .94), rgba(2, 16, 38, 0) 72%);
    }

    .home-hero .carousel-caption {
        bottom: .65rem;
        left: .75rem;
        width: calc(100% - 1.5rem);
        padding: .75rem .85rem;
    }

    .home-hero .carousel-caption h1,
    .home-hero .carousel-caption h2 {
        font-size: 1.3rem;
    }

    .home-hero .carousel-caption p {
        display: -webkit-box;
        margin-bottom: .55rem;
        overflow: hidden;
        font-size: .82rem;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .home-hero .carousel-caption .swaas-button {
        width: auto;
        min-height: 38px;
        padding: .38rem .8rem;
        font-size: .88rem;
    }
}

/* On phones and small tablets, separate the caption from the photograph. */
@media (max-width: 767.98px) {
    .home-hero .carousel-item {
        height: auto;
        min-height: 0;
        background: #031b3c;
    }

    .home-hero .carousel-item > img {
        display: block;
        width: 100%;
        height: clamp(220px, 64vw, 280px);
        object-fit: contain;
        object-position: center;
        background: #031b3c;
    }

    .home-hero .carousel-item::after {
        display: none;
    }

    .home-hero .carousel-caption {
        position: relative;
        inset: auto;
        width: 100%;
        padding: 1rem 1rem 1.15rem;
        border-top: 4px solid var(--swaas-gold);
        border-left: 0;
        background: #031b3c;
        box-shadow: none;
        backdrop-filter: none;
    }

    .home-hero .carousel-caption h1,
    .home-hero .carousel-caption h2 {
        margin-bottom: .55rem;
        font-size: clamp(1.35rem, 7vw, 1.8rem);
        line-height: 1.16;
        overflow-wrap: anywhere;
    }

    .home-hero .carousel-caption p {
        display: block;
        max-width: none;
        margin-bottom: .8rem;
        overflow: visible;
        font-size: .9rem;
        line-height: 1.45;
        -webkit-line-clamp: unset;
    }

    .home-hero .carousel-control-prev,
    .home-hero .carousel-control-next {
        top: 0;
        bottom: auto;
        height: clamp(220px, 64vw, 280px);
    }
}
