/* Card, client caption, and arrow styling apply to both the
   original slider and the v2 filmstrip/backdrop upgrade — only
   the dots-as-filmstrip and section backdrop below are v2-only. */

/* Widen the card so it fills more of the section, bounded by the
   viewport rather than the theme's 1260px site container. Pair
   with the JS's slick('setPosition') call — without that, Slick
   still renders the card at its old cached pixel width and only
   the canvas around it grows. */
.amp-projects-slider,
.amp-projects-slider-v2 {
    position: relative;
    max-width: 1900px;
    margin: 0 auto;
    padding: 0 56px;
}

.amp-projects-slider .item .img-fill,
.amp-projects-slider-v2 .item .img-fill {
    height: 620px;
    border-radius: 2px;
    box-shadow: 0 40px 90px -30px rgba(0,0,0,0.6);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

.amp-projects-slider .item .img-fill div.text,
.amp-projects-slider-v2 .item .img-fill div.text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0 20px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(13,13,22,1) 100%);
}

@media only screen and (min-width: 1025px) {
    .amp-projects-slider .item .img-fill div.text,
    .amp-projects-slider-v2 .item .img-fill div.text {
        padding-left: 41%;
    }
    .amp-projects-slider .item h2,
    .amp-projects-slider-v2 .item h2 {
        font: var(--heading-font);
        font-size: calc( 120 / var(--base-font-size) * 1rem );
        line-height: 1em;
        font-weight: 700;
    }
}

.amp-projects-slider .item h2,
.amp-projects-slider-v2 .item h2 {
    max-width: 780px;
    overflow-wrap: break-word;
}

.amp-projects-slider .client,
.amp-projects-slider-v2 .client {
    font-weight: 100;
    letter-spacing: var(--letter-spacing-wde);
    line-height: 1.1em;
    display: flex;
    flex-wrap: wrap;
    column-gap: 30px;
    align-items: center;
}

.amp-projects-slider .client div.title,
.amp-projects-slider-v2 .client div.title {
    font-weight: 100;
    letter-spacing: var(--letter-spacing-wde);
    line-height: 1.1em;
    padding-bottom: 15px;
    max-width: 75%;
}

@media only screen and (min-width: 1025px) {
    .amp-projects-slider .client div.title,
    .amp-projects-slider-v2 .client div.title {
        max-width: 100%;
    }
}

.amp-projects-slider .client img,
.amp-projects-slider-v2 .client img {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--text-color);
    box-sizing: initial;
}

.amp-projects-slider .client > div[class^='vc_btn'],
.amp-projects-slider-v2 .client > div[class^='vc_btn'] {
    margin-bottom: 15px;
    flex: 0 0 100%;
    margin-top: 35px;
}

@media only screen and (min-width: 1025px) {
    .amp-projects-slider .client > div[class^='vc_btn'],
    .amp-projects-slider-v2 .client > div[class^='vc_btn'] {
        margin-top: 0;
    }
}

.amp-projects-slider .client > div[class^='vc_btn'] > a,
.amp-projects-slider-v2 .client > div[class^='vc_btn'] > a {
    min-width: 0;
}

.amp-projects-slider .slick-arrow,
.amp-projects-slider-v2 .slick-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto;
}

.amp-projects-slider .slick-prev,
.amp-projects-slider-v2 .slick-prev {
    right: 64px;
}

.amp-projects-slider .slick-next,
.amp-projects-slider-v2 .slick-next {
    right: 32px;
}

/* Original 01/08 pager positioning — only the old slider still uses
   Slick's default dot markup; v2 replaces it with the filmstrip
   below. */
.amp-projects-slider .slick-dots {
    position: absolute;
    top: auto;
    right: 0;
    bottom: 20px;
    left: 0;
    margin: auto;
}

@media only screen and (min-width: 1025px) {
    .amp-projects-slider .slick-dots {
        top: calc(50% - 5px);
        right: auto;
        bottom: auto;
        left: calc(100%);
    }
}

/* Filmstrip thumbnails, rendered through Slick's own dots (see
   customPaging in projects-slider.js) rather than a hand-built
   sibling element — Slick already manages click-to-navigate and
   the active-dot class for us. */
.amp-projects-slider-v2 .slick-dots {
    position: static;
    display: flex;
    width: 100%;
    gap: 12px;
    max-width: 1900px;
    margin: 16px auto 0;
    padding: 0;
    list-style: none;
}

/* Countering style.css's .slick-slider .slick-dots li { position:
   absolute; opacity: 0 } desktop rule for the old pager — same
   specificity, so every property it sets needs an explicit override
   here to keep these as normal flex items. */
.amp-projects-slider-v2 .slick-dots li {
    position: relative;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 96px;
    opacity: 1;
    cursor: pointer;
}

.amp-projects-slider-v2 .slick-dots li button {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.amp-projects-slider-v2 .slick-dots li button:hover {
    opacity: 0.85;
}

.amp-projects-slider-v2 .slick-dots li.slick-active {
    opacity: 1;
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.amp-projects-slider-v2 .slick-dots li.slick-active button {
    opacity: 1;
}

.amp-projects-slider-v2 .slick-dots button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(5,6,10,0.45);
}

.amp-projects-slider-v2 .slick-dots .thumb-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.amp-projects-slider-v2 .slick-dots .thumb-logo {
    position: absolute;
    inset: 14%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amp-projects-slider-v2 .slick-dots .thumb-logo img {
    height: 60%;
    width: auto;
    max-width: 82%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

@media only screen and (max-width: 1024px) {
    .amp-projects-slider,
    .amp-projects-slider-v2 {
        padding: 0 0px;
    }
    .amp-projects-slider-v2 .slick-dots {
        position: absolute;
        top: auto;
        right: 0;
        bottom: 20px;
        left: 0;
        width: 50vw;
        display: flex;
        justify-content: space-between;
        margin: 0 auto;
        gap: 0;
    }
    .amp-projects-slider-v2 .slick-dots li {
        width: 30px;
        height: 30px;
        border: 1px solid transparent;
        border-radius: 50%;
        background: transparent;
        outline: none;
        overflow: hidden;
    }
    .amp-projects-slider-v2 .slick-dots li button {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        text-indent: 100%;
        white-space: nowrap;
        overflow: hidden;
        opacity: 1;
    }
    .amp-projects-slider-v2 .slick-dots li.slick-active {
        border-color: var(--accent-color);
        background: var(--inverse-color);
        outline: none;
    }
    .amp-projects-slider-v2 .slick-dots button::after,
    .amp-projects-slider-v2 .slick-dots .thumb-image,
    .amp-projects-slider-v2 .slick-dots .thumb-logo {
        display: none;
    }
}

/* Section backdrop: blurred, darkened copy of the active slide's
   photo. Targeted via :has(.amp-projects-slider-v2) rather than
   WPBakery's auto-generated vc_custom_XXXXXXX class, which
   regenerates (breaking every rule here) whenever a Design Options
   value changes on this section — this selector just means
   "whichever section contains the slider," which never changes.
   Also breaks the section out of the theme's --site-width
   container (1260px) so it can reach full browser width. */
.vc_section:has(.amp-projects-slider-v2) {
    position: relative;
    background-color: #05060a;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: -50vw;
    margin-right: -50vw;
}

.vc_section:has(.amp-projects-slider-v2)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,6,10,0.15), rgba(5,6,10,0.4));
    z-index: 0;
    pointer-events: none;
}

.vc_section:has(.amp-projects-slider-v2) .vc_row,
.vc_section:has(.amp-projects-slider-v2) .amp-projects-slider-v2 {
    position: relative;
    z-index: 1;
}

/* Two stacked layers crossfaded via opacity (projects-slider.js) —
   a plain CSS custom-property swap on a single background can't be
   animated, so the smooth transition needs real, separately
   fadeable elements. The blur renders on a quarter-size copy of
   the image then gets scaled back up with a GPU transform —
   blurring a large area is expensive regardless of how fast the
   image downloads, and this cuts the blurred pixel count to 1/16th
   while looking the same once softened. */
.amp-projects-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 25%;
    height: 25%;
    transform: scale(4);
    transform-origin: top left;
    z-index: 0;
    pointer-events: none;
}

.amp-projects-backdrop-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(6px) brightness(0.85) saturate(1.35);
    opacity: 0;
    transition: opacity 1s ease;
}

.amp-projects-backdrop-layer.is-active {
    opacity: 1;
}
