/* =========================================================
   Scoped variables and box sizing
   ========================================================= */

.home-project-slider-wrapper {
    --project-gold: #c9a543;
    --project-white: #ffffff;
    --project-dark: #26343d;
    --project-muted: rgba(255, 255, 255, 0.8);
    --project-card-radius: 40px;
    --project-slider-radius: 0 0 48px 0;
    --project-heading-font: "Rajdhani", sans-serif;
    --project-body-font: "Open Sans", sans-serif;

    width: 100%;
    padding:0 0 72px;
}

.home-project-slider-wrapper,
.home-project-slider-wrapper *,
.home-project-slider-wrapper *::before,
.home-project-slider-wrapper *::after {
    box-sizing: border-box;
}

/* =========================================================
   Carousel container
   ========================================================= */

.home-project-slider {
    position: relative;
    width: min(100%, 1440px);
    margin-inline: auto;
    overflow: visible;
    /* background: #5c7181; */
    border-radius: var(--project-slider-radius);
}

.home-project-slider .splide__track {
    overflow: hidden;
    border-radius: 46px;
}

.home-project-slider .splide__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-project-slider .splide__slide {
    margin: 0;
    list-style: none;
}

/* =========================================================
   Slide
   ========================================================= */

.home-project-slide {
    position: relative;
    min-height: clamp(570px, 43vw, 700px);
    overflow: hidden;

    /*
     * The ACF image is supplied as an inline background-image
     * on this list item by ProjectsCarousel.php.
     */
    background-color: #5c7181;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.home-project-slide__inner {
    position: relative;
    z-index: 0;
    display: flex;
    align-items: center;
    min-height: inherit;
    overflow: hidden;
    isolation: isolate;
}

/* =========================================================
   Content positioning
   ========================================================= */

.home-project-slide__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding:
        clamp(32px, 3.5vw, 52px)
        clamp(32px, 3.6vw, 58px);
}

/* =========================================================
   Glass content card
   ========================================================= */

.home-project-slide__card {
    display: flex;
    flex-direction: column;
    width: min(500px, 42vw);
    /* min-height: clamp(470px, 36vw, 570px); */
    padding:
        clamp(34px, 3.4vw, 52px)
        clamp(30px, 3.3vw, 48px);
    overflow: hidden;
    color: var(--project-white);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--project-card-radius);
    background: linear-gradient(
        to bottom,
        rgba(186, 183, 173, 0.3) 1%,
        rgba(73, 69, 56, 0.2) 3%,
        rgba(73, 69, 56, 0.7) 90%,
        rgba(73, 69, 56, 0.7) 90%,
        rgba(73, 69, 56, 0.7) 90%
    );
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow:
        0 26px 55px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.17);

    /*
     * Visible by default so the content remains usable when
     * JavaScript does not initialize.
     */
    opacity: 1;
    transform: none;
}

/*
 * Animate cards only after Splide has initialized.
 */
.home-project-slider.is-initialized
.home-project-slide__card {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition:
        opacity 600ms ease 160ms,
        transform 750ms cubic-bezier(0.22, 1, 0.36, 1) 160ms;
}

.home-project-slider.is-initialized
.home-project-slide.is-active
.home-project-slide__card {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.home-project-slider.is-initialized
.home-project-slide:not(.is-active)
.home-project-slide__card {
    pointer-events: none;
}

@supports not (
    (-webkit-backdrop-filter: blur(1px)) or
    (backdrop-filter: blur(1px))
) {
    .home-project-slide__card {
        background: rgba(49, 76, 98, 0.92);
    }
}

/* =========================================================
   Company logo
   ========================================================= */

.home-project-slide__logo {
    display: flex;
    align-items: flex-start;
    min-height: 68px;
    margin-bottom: auto;
    padding-bottom: clamp(40px, 4vw, 68px);
}

.home-project-slide__logo img {
    display: block;
    width: auto;
    max-width: min(190px, 72%);
    max-height: 76px;
    object-fit: contain;
    object-position: left top;
}

/*
 * Keep the title area lower when no company logo is supplied.
 */
.home-project-slide__card
> .home-project-slide__title:first-child {
    margin-top: auto;
}

/* =========================================================
   Project title
   ========================================================= */

.home-project-slide__title {
    margin: 0 0 14px;
    color: var(--project-white);
    font-family: var(--project-heading-font);
    font-size: clamp(25px, 2vw, 34px);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.home-project-slide__title a {
    color: inherit;
    text-decoration: none!important;
    font-weight:600;
}

.home-project-slide__title a:hover {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

.home-project-slide__title a:focus-visible {
    color: inherit;
    outline: 2px solid var(--project-white);
    outline-offset: 5px;
}

/* =========================================================
   Project description
   ========================================================= */

.home-project-slide__description {
    max-width: 45ch;
    margin-bottom: 30px;
    color: var(--project-muted);
    font-family: var(--project-body-font);
    font-size: clamp(13px, 1vw, 15px);
    font-weight: 300;
    line-height: 1.7;
}

.home-project-slide__description p {
    margin: 0 0 12px;
}

.home-project-slide__description p:last-child {
    margin-bottom: 0;
}

/* =========================================================
   View-project button
   ========================================================= */

.home-project-slide__button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    align-self: flex-start;
    gap: 16px;
    width: min(100%, 220px);
    min-height: 46px;
    padding: 5px 5px 5px 18px;
    color: var(--project-white);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    font-family: var(--project-heading-font);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.025em;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        color 200ms ease,
        background-color 200ms ease,
        transform 200ms ease;
}

.home-project-slide__button:hover,
.home-project-slide__button:focus-visible {
    color: var(--project-dark);
    background: var(--project-white);
    transform: translateY(-2px);
}

.home-project-slide__button:focus-visible {
    outline: 2px solid var(--project-white);
    outline-offset: 4px;
}

.home-project-slide__button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 35px;
    width: 35px;
    height: 35px;
    color: var(--project-dark);
    background: var(--project-white);
    border-radius: 50%;
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    transition:
        color 200ms ease,
        background-color 200ms ease,
        transform 200ms ease;
}

.home-project-slide__button:hover
.home-project-slide__button-icon,
.home-project-slide__button:focus-visible
.home-project-slide__button-icon {
    color: var(--project-white);
    background: var(--project-dark);
    transform: translateX(2px);
}

/* =========================================================
   Custom navigation
   ========================================================= */

.home-project-slider__navigation {
    position: absolute;
    z-index: 20;
    right: 16px;
    bottom: 26px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/*
 * Extra selector specificity prevents Astra's global button
 * styling from overriding these controls.
 */
.home-project-slider
.home-project-slider__previous,
.home-project-slider
.home-project-slider__next {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    width: 34px;
    min-width: 34px;
    height: 46px;
    min-height: 0;
    margin: 0;
    padding: 0;
    color: var(--project-white);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 300;
    line-height: 1;
    text-transform: none;
    cursor: pointer;
    opacity: 1;
    transform: none;
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.home-project-slider
.home-project-slider__previous:hover,
.home-project-slider
.home-project-slider__next:hover {
    color: var(--project-white);
    background: transparent;
    border: 0;
    opacity: 0.7;
}

.home-project-slider
.home-project-slider__previous:hover {
    transform: translateX(-2px);
}

.home-project-slider
.home-project-slider__next:hover {
    transform: translateX(2px);
}

.home-project-slider
.home-project-slider__previous:focus-visible,
.home-project-slider
.home-project-slider__next:focus-visible {
    color: var(--project-white);
    background: transparent;
    outline: 2px solid var(--project-white);
    outline-offset: 2px;
}

.home-project-slider
.home-project-slider__previous:disabled,
.home-project-slider
.home-project-slider__next:disabled {
    cursor: default;
    opacity: 0.35;
    transform: none;
}

/* =========================================================
   Circular slide counter
   ========================================================= */

.home-project-slider__counter {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    color: var(--project-white);
    background: var(--project-gold);
    border: 7px solid rgba(34, 47, 56, 0.2);
    border-radius: 50%;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-family: var(--project-body-font);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.home-project-slider__counter span:nth-child(2) {
    margin-inline: 2px;
    opacity: 0.75;
}

/* =========================================================
   Splide pagination
   ========================================================= */

.home-project-slider > .splide__pagination {
    position: absolute;
    z-index: 10;
    right: auto;
    bottom: -48px;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    margin: 0;
    padding: 0;
    transform: translateX(-50%);
}

.home-project-slider
.splide__pagination li {
    display: flex;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.home-project-slider
.splide__pagination__page {
    display: block;
    appearance: none;
    width: 8px;
    min-width: 8px;
    height: 8px;
    min-height: 8px;
    margin: 0;
    padding: 0;
    background: #a4a8ab;
    border: 0;
    border-radius: 999px;
    box-shadow: none;
    opacity: 1;
    transform: none;
    transition:
        width 220ms ease,
        min-width 220ms ease,
        background-color 220ms ease;
}

.home-project-slider
.splide__pagination__page:hover {
    background: #565c61;
    opacity: 1;
}

.home-project-slider
.splide__pagination__page.is-active {
    width: 19px;
    min-width: 19px;
    background: #111111;
    transform: none;
}

.home-project-slider
.splide__pagination__page:focus-visible {
    outline: 2px solid var(--project-blue);
    outline-offset: 3px;
}

/* =========================================================
   Single-slide state
   ========================================================= */

.home-project-slider.is-single-slide
.home-project-slider__navigation,
.home-project-slider.is-single-slide
.splide__pagination {
    display: none;
}

/* =========================================================
   Medium screens
   ========================================================= */

@media (max-width: 1100px) {
    .home-project-slide {
        min-height: 650px;
    }

    .home-project-slide__card {
        width: min(510px, 57vw);
        min-height: 520px;
    }

    .home-project-slide__logo {
        padding-bottom: 48px;
    }
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 820px) {
    .home-project-slide__content {
        padding:
            30px
            28px
            112px;
    }

    .home-project-slide__card {
        width: min(530px, 72vw);
    }

    .home-project-slider__navigation {
        right: 12px;
        bottom: 18px;
    }
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 767px) {
    .home-project-slider-wrapper {
        padding:
            12px
            12px
            64px;
    }

    .home-project-slider {
        --project-slider-radius: 0 0 30px 0;
    }

    .home-project-slider .splide__track {
        border-radius: 0 0 28px 0;
    }

    .home-project-slide {
        min-height: 740px;
        background-position: center center;
    }

    .home-project-slide__inner {
        align-items: flex-end;
    }

    .home-project-slide__overlay {
        background:
            linear-gradient(
                0deg,
                rgba(17, 31, 41, 0.88) 0%,
                rgba(17, 31, 41, 0.5) 43%,
                rgba(17, 31, 41, 0.1) 78%
            ),
            linear-gradient(
                90deg,
                rgba(31, 72, 105, 0.3) 0%,
                rgba(31, 72, 105, 0.08) 100%
            );
    }

    .home-project-slide__content {
        padding:
            20px
            20px
            105px;
    }

    .home-project-slide__card {
        width: 100%;
        min-height: 0;
        padding: 28px 24px;
        border-radius: 28px;
    }

    .home-project-slide__logo {
        min-height: 0;
        margin-bottom: 34px;
        padding-bottom: 0;
    }

    .home-project-slide__logo img {
        max-width: 160px;
        max-height: 64px;
    }

    .home-project-slide__title {
        font-size: clamp(25px, 7vw, 32px);
    }

    .home-project-slide__description {
        margin-bottom: 24px;
    }

    .home-project-slide__button {
        width: 100%;
    }

    .home-project-slider__navigation {
        right: 10px;
        bottom: 16px;
        gap: 4px;
    }

    .home-project-slider__counter {
        flex-basis: 68px;
        width: 68px;
        height: 68px;
        border-width: 6px;
        font-size: 12px;
    }

    .home-project-slider
    .home-project-slider__previous,
    .home-project-slider
    .home-project-slider__next {
        width: 29px;
        min-width: 29px;
        font-size: 21px;
    }

    .home-project-slider > .splide__pagination {
        bottom: -42px;
    }
}

/* =========================================================
   Small mobile screens
   ========================================================= */

@media (max-width: 420px) {
    .home-project-slide {
        min-height: 700px;
    }

    .home-project-slide__content {
        padding:
            16px
            16px
            100px;
    }

    .home-project-slide__card {
        padding: 25px 20px;
    }

    .home-project-slide__description {
        font-size: 13px;
    }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .home-project-slide__card,
    .home-project-slide__button,
    .home-project-slide__button-icon,
    .home-project-slider
    .home-project-slider__previous,
    .home-project-slider
    .home-project-slider__next,
    .home-project-slider
    .splide__pagination__page {
        transition: none;
    }

    .home-project-slider.is-initialized
    .home-project-slide__card,
    .home-project-slider.is-initialized
    .home-project-slide.is-active
    .home-project-slide__card {
        transform: none;
    }
}