/* Video Showcase — heading + intro + 3-up portrait video cards (Figma section #7). */
.video-showcase {
    padding: 82px 0 92px;
    text-align: center;
}
/* Align the container with the hero text (beat the bundle's .container width:85% <1600px). */
.video-showcase .container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0 86px;
    box-sizing: border-box;
}
@media (max-width: 991px) {
    .video-showcase .container { padding: 0 24px; }
}
/* Match Figma's darker green for this section; the brand --ct-green (#22B24C)
   stays the palette value used by the background_color selector elsewhere. */
.video-showcase.bg--green {
    background-color: #299729;
}
.video-showcase__heading {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 4vw, 51px);
    margin: 0 0 18px;
}
.video-showcase__intro {
    color: #fff;
    font-family: 'Albert Sans', sans-serif;
    font-size: clamp(15px, 1.2vw, 18px);
    line-height: 1.6;
    max-width: 1000px;
    margin: 0 auto 50px;
}
.video-showcase__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.video-showcase__card {
    position: relative;
    cursor: pointer;
}
.video-showcase__card .vimeo-placeholder {
    padding-top: 158%;          /* tall portrait cards (376 x 604 in Figma) */
    border-radius: 0;
}
/* Orange play square in the bottom-left corner (Figma). It's a child of
   .vimeo-placeholder, so theme-function.js's .empty() removes it on play. */
.video-showcase .vimeo-placeholder .play-button {
    top: auto;
    left: 0;
    bottom: 0;
    transform: none;
    width: 88px;
    height: 88px;
    background: var(--ct-orange) url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='29'%20height='33'%20viewBox='0%200%2029%2033'%20fill='none'%3E%3Cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0%200L14.388%208.184L28.644%2016.5L14.388%2024.684L0%2033V16.5V0Z'%20fill='white'/%3E%3C/svg%3E") no-repeat center;
    background-size: 28px 32px;
}
.video-showcase__title {
    color: #fff;
    margin-top: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 18px;
}
@media (max-width: 991px) {
    .video-showcase__grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .video-showcase__card .vimeo-placeholder { padding-top: 120%; }
}

/* ------------------------------------------------------------
   Video popup (built in theme-function.js, appended to <body>).
   Fade in/out, dim overlay matching the hamburger menu, top-right
   close button. Deliberately no body scroll-lock — the page stays
   scrollable while the popup is open.
   ------------------------------------------------------------ */
.vs-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    visibility: hidden;
    opacity: 0;
    transition: opacity .25s ease, visibility 0s linear .25s;
}
.vs-modal.is-open {
    visibility: visible;
    opacity: 1;
    transition: opacity .25s ease;
}
.vs-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}
.vs-modal__dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;                /* shrink-wrap the portrait video frame */
    max-width: 92vw;
}
.vs-modal__video {
    position: relative;
    aspect-ratio: 9 / 16;       /* portrait video — frame matches the clip, no letterboxing */
    /* Drive the frame by HEIGHT so the width follows the portrait ratio.
       min() keeps it inside the viewport on any screen: capped at 900px,
       never taller than 88vh, and never wider than 92vw. */
    height: min(88vh, 900px, calc(92vw * 16 / 9));
    width: auto;
    background: #000;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}
.vs-modal__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.vs-modal__close {
    position: absolute;
    top: -20px;
    right: -20px;                /* hugging the popup's top-right corner */
    z-index: 2;
    width: 40px;
    height: 40px;
    padding: 0;
    background: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.vs-modal__close-x {
    position: relative;
    display: block;
    width: 28px;
    height: 28px;
    margin: 0 auto;
}
.vs-modal__close-x::before,
.vs-modal__close-x::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 3px;
    width: 80%;
    height: 3px;
    background: #000;
}
.vs-modal__close-x::before { transform: translateY(-50%) rotate(45deg); }
.vs-modal__close-x::after  { transform: translateY(-50%) rotate(-45deg); }

@media (max-width: 767px) {
    .video-showcase { padding: 60px 0; }
}
