/**
 * Connection Cards Layout Styles
 * Starts as a copy of the Grid Cards styles so this layout can diverge
 * without touching every other page that uses Grid Cards.
 */

.ga26-connection-cards {
    width: 100%;
    padding: 5vw;
}

.ga26-connection-cards__headline {
    font-family: 'Grack', sans-serif !important;
    margin: 0 auto 40px auto;
    text-align: center;
    font-weight: 500;
    text-transform: uppercase;
    max-width: 700px;
    color: #000000; /* Always black, not the page colour family */
}

/* Tighter gap when a subhead follows; headline-only keeps the 40px above */
.ga26-connection-cards__headline--has-subhead {
    margin-bottom: 20px;
}

.ga26-connection-cards__subhead {
    max-width: 800px;
    margin: 0 auto 60px auto;
    text-align: center;
}

.ga26-connection-cards__subhead p {
    font-family: 'Noto Serif' !important;
    font-style: normal;
    font-weight: 400;
    font-size: 26px;
    letter-spacing: -.15px;
    line-height: 1.4em;
    margin: 0 0 20px 0;
}

.ga26-connection-cards__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 400px));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    justify-content: center;
}

.ga26-connection-cards__card {
    display: flex;
    flex-direction: column;
    background-color: #d0d0d0;
    padding: 30px 20px 50px 20px;
    border-radius: 32px;
}

/* Dynamic background colors - LIGHT values */
.ga26-flexible-content[data-menu-color="blue"] .ga26-connection-cards__card {
    background-color: #00aeef;
}

.ga26-flexible-content[data-menu-color="purple"] .ga26-connection-cards__card {
    background-color: #c6168d;
}

.ga26-flexible-content[data-menu-color="red"] .ga26-connection-cards__card {
    background-color: #f15922;
}

.ga26-flexible-content[data-menu-color="yellow"] .ga26-connection-cards__card {
    background-color: #fcaf17;
}

.ga26-flexible-content[data-menu-color="green"] .ga26-connection-cards__card {
    background-color: #20bdbe;
}

.ga26-flexible-content[data-menu-color="black"] .ga26-connection-cards__card {
    background-color: #d0d0d0;
}

/* Lever colors - fixed per lever, override the page color family.
   Same specificity as the rules above but declared later, so these win. */
.ga26-flexible-content[data-menu-color] .ga26-connection-cards__card--elevate {
    background-color: #0089d0; /* Blue - MEDIUM */
}

.ga26-flexible-content[data-menu-color] .ga26-connection-cards__card--practice {
    background-color: #01a490; /* Green - MEDIUM */
}

.ga26-flexible-content[data-menu-color] .ga26-connection-cards__card--embed {
    background-color: #fcaf17; /* Yellow - LIGHT */
}

.ga26-flexible-content[data-menu-color] .ga26-connection-cards__card--create {
    background-color: #f47920; /* Yellow - MEDIUM */
}

.ga26-flexible-content[data-menu-color] .ga26-connection-cards__card--invite {
    background-color: #ed1c24; /* Red - MEDIUM */
}

.ga26-flexible-content[data-menu-color] .ga26-connection-cards__card--support {
    background-color: #92278f; /* Purple - MEDIUM */
}

/* Video link colour - matches each lever's card background */
.ga26-connection-cards__card--elevate .ga26-connection-cards__video {
    color: #0089d0; /* Blue - MEDIUM */
}

.ga26-connection-cards__card--practice .ga26-connection-cards__video {
    color: #01a490; /* Green - MEDIUM */
}

.ga26-connection-cards__card--embed .ga26-connection-cards__video {
    color: #fcaf17; /* Yellow - LIGHT */
}

.ga26-connection-cards__card--create .ga26-connection-cards__video {
    color: #f47920; /* Yellow - MEDIUM */
}

.ga26-connection-cards__card--invite .ga26-connection-cards__video {
    color: #ed1c24; /* Red - MEDIUM */
}

.ga26-connection-cards__card--support .ga26-connection-cards__video {
    color: #92278f; /* Purple - MEDIUM */
}

/* Video link - a white box that opens the lightbox.
   Text and icon take the card's lever colour via currentColor. */
.ga26-connection-cards__video {
    position: relative;
    align-self: center;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    /* margin-top:auto takes the card's leftover height, so the button sits on
       the bottom edge and lines up across a row regardless of copy length */
    margin: auto 0 0 0;
    padding: 10px 15px;
    border: 0;
    border-radius: 12px;
    background-color: #fff;
    cursor: pointer;
    font-family: 'Cachet Pro', sans-serif;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: -.5px;
    text-align: left;
    color: #636466; /* Fallback only - a lever colour overrides this */
}

.ga26-connection-cards__video:hover .ga26-connection-cards__video-label,
.ga26-connection-cards__video:focus-visible .ga26-connection-cards__video-label {
    text-decoration: underline;
}

.ga26-connection-cards__play {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: block;
}

/* Stroked circle, solid triangle - both follow the button's colour */
.ga26-connection-cards__play circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.ga26-connection-cards__play polygon {
    fill: currentColor;
    stroke: none;
}

/* Video lightbox - appended to <body>, so it sits outside the card block */
.ga26-video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5vw;
    background-color: rgba(0, 0, 0, .85);
}

.ga26-video-lightbox[hidden] {
    display: none !important;
}

.ga26-video-lightbox__inner {
    position: relative;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
}

.ga26-video-lightbox__frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background-color: #000;
}

.ga26-video-lightbox__close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    color: #fff;
    line-height: 1;
}

.ga26-video-lightbox__close svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
}

/* Stop the page behind the lightbox from scrolling */
body.ga26-video-lightbox-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .ga26-video-lightbox__close {
        top: -42px;
        width: 32px;
        height: 32px;
    }
}

/* SIMPLIFIED MODE - Remove background (must come after color rules) */
.ga26-connection-cards--simplified .ga26-connection-cards__card {
    background-color: transparent !important;
    padding: 0;
}

.ga26-connection-cards__icon {
    margin: 0 auto 20px auto; /* Centred, since it no longer fills the card */
    position: relative;
    width: 50%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 20px;
}

/* SIMPLIFIED MODE - Remove rounded corners and show full image */
.ga26-connection-cards--simplified .ga26-connection-cards__icon {
    border-radius: 0;
    aspect-ratio: auto;
    height: auto;
}

.ga26-connection-cards__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Shows the whole icon, never cropped */
    display: block;
}

/* SIMPLIFIED MODE - Show full image without cropping */
.ga26-connection-cards--simplified .ga26-connection-cards__image {
    position: relative;
    object-fit: contain;
    height: auto;
}

.ga26-connection-cards__title {
    font-family: 'Cachet Pro', sans-serif !important;
    margin: 15px 5%;
    text-align: center;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: -1px;
    color: #fff;
    line-height: 1em !important;
}

/* SIMPLIFIED MODE - Change title to MEDIUM color */
.ga26-flexible-content[data-menu-color="blue"] .ga26-connection-cards--simplified .ga26-connection-cards__title {
    color: #0089d0;
}

.ga26-flexible-content[data-menu-color="purple"] .ga26-connection-cards--simplified .ga26-connection-cards__title {
    color: #92278f;
}

.ga26-flexible-content[data-menu-color="red"] .ga26-connection-cards--simplified .ga26-connection-cards__title {
    color: #ed1c24;
}

.ga26-flexible-content[data-menu-color="yellow"] .ga26-connection-cards--simplified .ga26-connection-cards__title {
    color: #f47920;
}

.ga26-flexible-content[data-menu-color="green"] .ga26-connection-cards--simplified .ga26-connection-cards__title {
    color: #01a490;
}

.ga26-flexible-content[data-menu-color="black"] .ga26-connection-cards--simplified .ga26-connection-cards__title {
    color: #636466;
}

.ga26-connection-cards__copy {
    font-family: 'Noto Serif', serif;
    margin: 0 5% 36px 5%;
    color: #fff;
    font-size: 20px;
    text-align: center;
    line-height: 1.6em;
}

.ga26-connection-cards__copy p {
    color: #fff;
}

/* SIMPLIFIED MODE - Change copy text to medium grey */
.ga26-connection-cards--simplified .ga26-connection-cards__copy {
    color: #636466;
}

.ga26-connection-cards--simplified .ga26-connection-cards__copy p {
    color: #636466;
}

/* TOOLKIT CTA - sits below the cards, over white.
   Thick bordered box with the copy centred in it; the download button
   straddles the bottom border, centred on it. */
.ga26-connection-toolkit {
    /* Shared by the border and the button's offset, so the button stays
       centred on the border if the thickness ever changes */
    --ga26-toolkit-border: 6px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 200px;
    max-width: 760px;
    margin: 80px auto 0 auto;
    padding: 50px 40px;
    border: var(--ga26-toolkit-border) solid #000;
    border-radius: 32px; /* Matches the card corner radius */
    background-color: #fff;
}

/* Mirrors .ga26-two-column-feature__headline, recoloured for white ground
   and centred. */
.ga26-connection-toolkit__headline {
    /* !important beats the global `p` rule in style.css, which sets Noto Serif */
    font-family: 'Grack', sans-serif !important;
    margin: 0 0 10px 0;
    font-style: normal;
    font-weight: 500;
    font-size: 36px !important;
    letter-spacing: .5px;
    line-height: 1.2em !important;
    text-transform: uppercase;
    text-align: center;
    color: #000 !important;
}

/* The wrapper carries the positioning, so the button itself stays a plain box */
.ga26-connection-toolkit__button-wrapper {
    position: absolute;
    left: 50%;
    /* Pull down by half the border so the button centres on it, not on the
       padding box edge that `bottom: 0` would use */
    bottom: calc(var(--ga26-toolkit-border) / -2);
    transform: translate(-50%, 50%);
    max-width: calc(100% - 40px);
}

/* Same treatment as the cards' video buttons, in black and grey */
.ga26-connection-toolkit__button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    max-width: 100%;
    padding: 15px 25px;
    border: 0;
    border-radius: 12px;
    background-color: #000;
    cursor: pointer;
    font-family: 'Cachet Pro', sans-serif;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: -.5px;
    text-align: left;
    text-decoration: none;
    color: #fff;
}

.ga26-connection-toolkit__button:hover .ga26-connection-toolkit__label,
.ga26-connection-toolkit__button:focus-visible .ga26-connection-toolkit__label {
    text-decoration: underline;
}

.ga26-connection-toolkit__icon {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: block;
}

/* Stroked circle and arrow, both following the button's colour */
.ga26-connection-toolkit__icon circle,
.ga26-connection-toolkit__icon polyline,
.ga26-connection-toolkit__icon line {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Tablet: step the subhead down before the mobile rules take over at 768px */
@media only screen and (max-width: 980px) {
    .ga26-connection-cards__subhead p {
        font-size: 18px !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .ga26-connection-cards {
        padding: 10%;
    }
    
    .ga26-connection-cards__grid {
        grid-template-columns: 1fr;
        gap: 5vw;
    }
    
    .ga26-connection-cards__card {
        padding: 30px;
        border-radius: 15px;
    }

    .ga26-connection-cards__title {
        margin: 0 0 0 0;
        font-weight: 400;
        font-size: 26px !important;
    }

    .ga26-connection-cards__headline {
        margin: 40px auto 20px auto;
    }

    .ga26-connection-cards__subhead p {
        font-size: 18px !important;
        text-align: center;
    }

    .ga26-connection-cards__video {
        font-size: 16px;
        line-height: 1em;
    }

    .ga26-connection-cards__copy {
        margin: 0 0 25px 0;
    }

    /* Smaller, less-rounded icon on mobile; base stays 50% / 20px */
    .ga26-connection-cards__icon {
        width: 30%;
        border-radius: 10px;
    }

    .ga26-connection-toolkit {
        --ga26-toolkit-border: 4px;
        /* Taller than the desktop proportion: the button overlaps the bottom
           border, so this keeps it clear of the centred copy even if a long
           label does wrap */
        min-height: 180px;
        /* Bottom margin clears the button, which hangs half its height below
           the border */
        margin-top: 60px;
        margin-bottom: 60px;
        padding: 35px 20px;
        border-radius: 15px; /* Matches the mobile card radius */
    }

    .ga26-connection-toolkit__headline {
        font-size: 24px !important;
    }

    /* `left: auto` drops the wrapper back to its static position, which the
       box's `justify-content: center` already centres - so it no longer needs
       shifting back by half its own width. The desktop 40px inset is also what
       squeezes the button on a phone (it is measured off the box's padding box,
       already narrow here), so widen it to keep the label on one line. */
    .ga26-connection-toolkit__button-wrapper {
        left: auto;
        transform: translate(0, 50%);
        max-width: calc(100% - 8px);
    }

    .ga26-connection-toolkit__button {
        gap: 8px;
        padding: 10px 14px;
        font-size: 16px;
    }

    .ga26-connection-toolkit__icon {
        width: 22px;
        height: 22px;
    }
}