/* =====================================================================
   CD&C  |  Testimonials + "See Our Work in Action" video rail
   File: addition/css/cdc-video-stories.css
   ===================================================================== */

#cdc-vs {
    --vs-green: #8b8f6b;
    --vs-gold: #a4ac74;
    --vs-dark: #2b3a31;

    position: relative;
    overflow: hidden;
    padding: 110px 0 90px;
    background-color: var(--vs-dark);
    color: #fff;
}

/* background photo + wash */
#cdc-vs .cdc-vs-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    z-index: 0;
}

#cdc-vs .cdc-vs-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(38, 52, 44, .90);
}

#cdc-vs .cdc-vs-inner {
    position: relative;
    z-index: 2;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 30px;
}

/* =====================================================================
   QUOTES
   ===================================================================== */
#cdc-vs .cdc-vs-quotes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 55px;
}

#cdc-vs .cdc-vs-quote {
    display: flex;
    gap: 26px;
    align-items: flex-start;
}

#cdc-vs .cdc-vs-num {
    font-size: 74px;
    line-height: .9;
    font-weight: 700;
    color: var(--vs-gold);
    opacity: .75;
    flex-shrink: 0;
}

#cdc-vs .cdc-vs-quote h3 {
    font-size: 30px;
    line-height: 1.25;
    font-weight: 700;
    color: #fff;
    margin: 0 0 14px;
}

#cdc-vs .cdc-vs-quote p {
    font-size: 15.5px;
    line-height: 1.8;
    font-weight: 300;
    color: rgba(255, 255, 255, .82);
    margin: 0 0 16px;
}

#cdc-vs .cdc-vs-by {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, .70);
}

#cdc-vs .cdc-vs-by img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

#cdc-vs .cdc-vs-by b {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

#cdc-vs .cdc-vs-stars {
    color: var(--vs-gold);
    letter-spacing: 2px;
    font-size: 13px;
}

/* =====================================================================
   RAIL HEADING
   ===================================================================== */
#cdc-vs .cdc-vs-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}

#cdc-vs .cdc-vs-head h2 {
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    white-space: nowrap;
}

#cdc-vs .cdc-vs-head .line {
    height: 1px;
    background: rgba(255, 255, 255, .28);
    flex: 1;
    max-width: 220px;
}

#cdc-vs .cdc-vs-head svg { width: 24px; height: 24px; opacity: .8; }

/* =====================================================================
   VIDEO RAIL
   ===================================================================== */
#cdc-vs .cdc-vs-railwrap { position: relative; }

#cdc-vs .cdc-vs-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#cdc-vs .cdc-vs-rail::-webkit-scrollbar { display: none; }

#cdc-vs .cdc-vs-card {
    position: relative;
    flex: 0 0 auto;
    width: 205px;
    aspect-ratio: 9 / 16;
    border: 0;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    background: #1b241f;
    transition: transform .35s ease, box-shadow .35s ease;
}

#cdc-vs .cdc-vs-card video,
#cdc-vs .cdc-vs-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    pointer-events: none;
}

#cdc-vs .cdc-vs-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, .55) 0%,
        rgba(0, 0, 0, .10) 38%,
        rgba(0, 0, 0, .15) 62%,
        rgba(0, 0, 0, .70) 100%);
}

#cdc-vs .cdc-vs-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
#cdc-vs .cdc-vs-card:hover video,
#cdc-vs .cdc-vs-card:hover img { transform: scale(1.06); }

#cdc-vs .cdc-vs-card .t {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 2;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    text-align: left;
}

#cdc-vs .cdc-vs-card .time {
    position: absolute;
    bottom: 14px;
    left: 16px;
    z-index: 2;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

#cdc-vs .cdc-vs-card .play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    border: 1.5px solid rgba(255, 255, 255, .85);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
}

#cdc-vs .cdc-vs-card .play svg { width: 18px; height: 18px; fill: #fff; margin-left: 3px; }

#cdc-vs .cdc-vs-card:hover .play {
    background: var(--vs-green);
    border-color: var(--vs-green);
    transform: translate(-50%, -50%) scale(1.08);
}

/* ---- arrows ---- */
#cdc-vs .cdc-vs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: #23301f;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
    transition: all .3s ease;
}

#cdc-vs .cdc-vs-arrow svg { width: 18px; height: 18px; fill: currentColor; }
#cdc-vs .cdc-vs-arrow:hover { background: var(--vs-green); color: #fff; }
#cdc-vs .cdc-vs-arrow[disabled] { opacity: .35; cursor: default; }

#cdc-vs .cdc-vs-prev { left: -22px; }
#cdc-vs .cdc-vs-next { right: -22px; }

/* ---- dots ---- */
#cdc-vs .cdc-vs-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

#cdc-vs .cdc-vs-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, .35);
    cursor: pointer;
    transition: all .3s ease;
}

#cdc-vs .cdc-vs-dots button.on {
    width: 26px;
    background: var(--vs-gold);
}

/* =====================================================================
   VIDEO MODAL
   ===================================================================== */
#cdc-vs-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(8, 12, 10, .94);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 24px;
    opacity: 0;
    transition: opacity .28s ease;
}

#cdc-vs-modal.open {
    display: flex;
    opacity: 1;
}

#cdc-vs-modal .stage {
    position: relative;
    width: 100%;
    max-width: 400px;
    transition: transform .34s cubic-bezier(.22,.7,.3,1), opacity .28s ease;
}

#cdc-vs-modal video {
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 82vh;
    border-radius: 18px;
    background: #000;
    display: block;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}

#cdc-vs-modal .cap {
    text-align: center;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-top: 16px;
    letter-spacing: .2px;
}

/* slide animation between clips */
#cdc-vs-modal .stage.out-l { transform: translateX(-46px); opacity: 0; }
#cdc-vs-modal .stage.out-r { transform: translateX(46px);  opacity: 0; }
#cdc-vs-modal .stage.in-r  { animation: cdcInR .34s cubic-bezier(.22,.7,.3,1); }
#cdc-vs-modal .stage.in-l  { animation: cdcInL .34s cubic-bezier(.22,.7,.3,1); }

@keyframes cdcInR {
    from { transform: translateX(46px);  opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}
@keyframes cdcInL {
    from { transform: translateX(-46px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

/* modal arrows */
#cdc-vs-modal .mnav {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    background: rgba(255, 255, 255, .10);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s ease;
}

#cdc-vs-modal .mnav svg { width: 22px; height: 22px; fill: currentColor; }

#cdc-vs-modal .mnav:hover {
    background: #8b8f6b;
    border-color: #8b8f6b;
    transform: scale(1.07);
}

#cdc-vs-modal .x {
    position: absolute;
    top: 22px;
    right: 26px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background .3s ease;
}

#cdc-vs-modal .x:hover { background: #8b8f6b; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media only screen and (max-width: 1399px) {
    #cdc-vs .cdc-vs-prev { left: 6px; }
    #cdc-vs .cdc-vs-next { right: 6px; }
}

@media only screen and (max-width: 991px) {
    #cdc-vs { padding: 80px 0 70px; }

    #cdc-vs .cdc-vs-quotes {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 40px;
    }

    #cdc-vs .cdc-vs-quote h3 { font-size: 26px; }
    #cdc-vs .cdc-vs-num { font-size: 60px; }
}

/* ---- phones: quote 01, then the rail, then quote 02 ---- */
@media only screen and (max-width: 767px) {

    #cdc-vs { padding: 60px 0 55px; }

    #cdc-vs .cdc-vs-inner { padding: 0 20px; }

    #cdc-vs .cdc-vs-stack {
        display: flex;
        flex-direction: column;
    }

    #cdc-vs .cdc-vs-quotes {
        display: contents;
    }

    #cdc-vs .cdc-vs-quote:nth-child(1) { order: 1; margin-bottom: 40px; }
    #cdc-vs .cdc-vs-head           { order: 2; }
    #cdc-vs .cdc-vs-railwrap       { order: 3; margin-bottom: 44px; }
    #cdc-vs .cdc-vs-quote:nth-child(2) { order: 4; }

    #cdc-vs .cdc-vs-quote {
        display: block;
    }

    #cdc-vs .cdc-vs-num {
        font-size: 52px;
        margin-bottom: 10px;
    }

    #cdc-vs .cdc-vs-quote h3 {
        font-size: 25px;
        margin-bottom: 12px;
    }

    #cdc-vs .cdc-vs-quote p {
        font-size: 15px;
        line-height: 1.7;
    }

    #cdc-vs .cdc-vs-head h2 { font-size: 21px; }
    #cdc-vs .cdc-vs-head .line { max-width: 90px; }

    #cdc-vs .cdc-vs-card {
        width: 63vw;
        max-width: 250px;
    }

    #cdc-vs .cdc-vs-rail { gap: 14px; }

    /* arrows off on touch - swiping is natural there */
    #cdc-vs .cdc-vs-arrow { display: none; }

    #cdc-vs .cdc-vs-dots { margin-top: 22px; }

    #cdc-vs-modal { gap: 0; padding: 16px; }
    #cdc-vs-modal .stage { max-width: 100%; }
    #cdc-vs-modal video { max-height: 72vh; }

    /* arrows drop below the clip on a phone */
    #cdc-vs-modal .mnav {
        position: absolute;
        bottom: 26px;
        width: 48px;
        height: 48px;
    }
    #cdc-vs-modal .mprev { left: 26%; }
    #cdc-vs-modal .mnext { right: 26%; }
    #cdc-vs-modal .cap { margin-top: 12px; font-size: 15px; }
    #cdc-vs-modal .x { top: 14px; right: 14px; }
}

@media only screen and (max-width: 460px) {
    #cdc-vs .cdc-vs-quote h3 { font-size: 22px; }
    #cdc-vs .cdc-vs-card { width: 68vw; }
}