﻿/* CAP SOFTWARE / PRESENTACIÓN MULTIMEDIA RESPONSIVA */
.cm-gallery {
    --cm-navy: #102a50;
    --cm-blue: #215fc8;
    --cm-line: #dce7f2;
    --cm-muted: #647995;
    margin-block: 24px 12px;
    font-family: inherit;
    color: var(--cm-navy);
}

    .cm-gallery *, .cm-gallery *::before, .cm-gallery *::after {
        box-sizing: border-box;
    }

.cm-gallery-heading {
    padding-bottom: 16px;
}

.cm-gallery-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .13em;
    color: #2075cf;
    margin-bottom: 9px;
}

.cm-gallery-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

    .cm-gallery-header-row p {
        color: var(--cm-muted);
        font-size: 14px;
        line-height: 1.65;
        margin: 0;
    }

.cm-gallery-count {
    font-size: 12px;
    letter-spacing: .13em;
    font-weight: 850;
    color: var(--cm-blue);
    white-space: nowrap;
}

.cm-stage {
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg,#f1f6fe,#e9f0fb);
    border: 1px solid var(--cm-line);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(15,45,90,.08);
}

.cm-slide {
    margin: 0;
}

    .cm-slide[hidden] {
        display: none !important;
    }

    .cm-slide.cm-slide-enter.cm-enter-forward {
        animation: cm-appear-forward .62s cubic-bezier(.2,.75,.2,1) both;
    }

    .cm-slide.cm-slide-enter.cm-enter-back {
        animation: cm-appear-back .62s cubic-bezier(.2,.75,.2,1) both;
    }

@keyframes cm-appear-forward {
    from {
        opacity: 0;
        transform: translateX(16px) scale(.992);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes cm-appear-back {
    from {
        opacity: 0;
        transform: translateX(-16px) scale(.992);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.cm-autoplay-meter {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #d3e5f5;
    z-index: 2;
    pointer-events: none;
}

    .cm-autoplay-meter span {
        display: block;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg,#2876ea,#3ad5c5);
        transform: scaleX(0);
        transform-origin: left;
    }

.cm-gallery[data-cm-advancing="true"] .cm-autoplay-meter span {
    animation: cm-meter var(--cm-autoplay-duration,6500ms) linear forwards;
}

@keyframes cm-meter {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

.cm-viewport {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    height: clamp(290px,42vw,600px);
    padding: 22px;
    background: radial-gradient(circle at 48% 15%,#fcfeff,#ebf2fd 70%);
}

.cm-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: 100%;
    border-radius: 13px;
    overflow: hidden;
    cursor: zoom-in;
    box-shadow: 0 8px 24px rgba(24,48,90,.13);
    background: #fff;
}

    .cm-preview > img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        filter: none !important;
        image-rendering: auto;
    }

.cm-expand-hint {
    position: absolute;
    bottom: 14px;
    right: 14px;
    padding: 9px 13px;
    background: #102a50ed;
    color: white;
    border-radius: 9px;
    font-weight: 700;
    font-size: 12px;
}

.cm-video-preview {
    background: linear-gradient(130deg,#091d38,#153e69 65%,#0c595f);
    box-shadow: none;
    cursor: pointer;
    text-decoration: none;
}

    .cm-video-preview > img {
        position: absolute;
        inset: 0;
        object-fit: contain;
        background: #0b1b33;
        opacity: .85;
    }

.cm-video-background {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #d7e9ff;
    padding: 28px;
}

    .cm-video-background span {
        color: #77e4d8;
        font-size: 12px;
        letter-spacing: .2em;
        font-weight: 800;
    }

    .cm-video-background strong {
        font-size: clamp(20px,3vw,38px);
        line-height: 1.2;
        max-width: 600px;
        color: white;
    }

.cm-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
    justify-content: center;
    background: #092548df;
    border: 1px solid #ffffff6a;
    border-radius: 99px;
    width: 112px;
    height: 112px;
    box-shadow: 0 15px 42px #0006;
    color: white;
}

    .cm-play span {
        font-size: 30px;
        margin-left: 4px;
    }

    .cm-play small {
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
    }

.cm-caption {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 14px;
    row-gap: 7px;
    background: #fff;
    padding: 18px 25px;
    border-top: 1px solid var(--cm-line);
}

    .cm-caption .cm-type {
        font-size: 10px;
        font-weight: 850;
        color: #0a827a;
        padding: 6px 9px;
        border-radius: 6px;
        background: #e2f8f4;
        letter-spacing: .09em;
    }

    .cm-caption strong {
        font-size: clamp(15px,1.4vw,19px);
        line-height: 1.4;
        color: var(--cm-navy);
    }

    .cm-caption p {
        width: 100%;
        margin: 0;
        color: var(--cm-muted);
        font-size: 13px;
        line-height: 1.65;
    }

.cm-navigation {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    gap: 16px;
    margin-top: 16px;
    align-items: start;
}

.cm-arrows {
    display: flex;
    gap: 9px;
}

    .cm-arrows button {
        width: 47px;
        height: 47px;
        display: grid;
        place-items: center;
        border: 1px solid var(--cm-line);
        border-radius: 12px;
        background: white;
        color: var(--cm-navy);
        cursor: pointer;
        font-size: 22px;
        line-height: 1;
    }

        .cm-arrows button:hover {
            background: #e9f2fe;
            border-color: #79a9df;
        }

        .cm-arrows button.cm-autoplay-toggle {
            display: inline-flex;
            width: auto;
            padding: 0 13px;
            gap: 7px;
            font-size: 12px;
            font-weight: 800;
            white-space: nowrap;
        }

.cm-autoplay-toggle [data-cm-toggle-icon] {
    min-width: 13px;
    text-align: center;
    font-size: 13px;
}

.cm-autoplay-toggle[aria-pressed="true"] {
    background: #e8f3ff;
    border-color: #96bde8;
}

.cm-thumbs {
    display: flex;
    min-width: 0;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 1px 1px 11px;
    scrollbar-width: thin;
    scrollbar-color: #bad0e8 transparent;
}

.cm-thumb {
    width: 124px;
    min-width: 124px;
    flex: 0 0 124px;
    padding: 5px;
    text-align: left;
    border: 2px solid transparent;
    background: #fff;
    border-radius: 12px;
    cursor: pointer;
    color: var(--cm-navy);
    box-shadow: 0 2px 12px #1841790a;
}

    .cm-thumb[aria-current="true"] {
        border-color: #2075db;
        background: #edf5ff;
    }

.cm-thumb-visual {
    position: relative;
    height: 65px;
    border-radius: 6px;
    background: linear-gradient(135deg,#173963,#0a6782);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

    .cm-thumb-visual img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.cm-thumb-play {
    font-size: 22px;
}

.cm-video-mark {
    position: absolute;
    bottom: 4px;
    right: 4px;
    padding: 4px 6px;
    background: #062347e6;
    border-radius: 5px;
    color: white;
    font-size: 9px;
}

.cm-thumb-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 750;
    padding: 8px 3px 4px;
}

.cm-gallery a:focus-visible, .cm-gallery button:focus-visible, .cm-modal button:focus-visible {
    outline: 3px solid #188ad8;
    outline-offset: 3px;
}

.cm-modal {
    width: min(96vw,1480px);
    max-width: 1480px;
    height: min(94vh,980px);
    max-height: 94vh;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #0b172a;
    color: white;
    box-shadow: 0 30px 100px #000b;
    overflow: hidden;
}

    .cm-modal::backdrop {
        background: #030b1ae8;
        backdrop-filter: blur(5px);
    }

.cm-modal-body {
    position: relative;
    height: 100%;
    padding: 50px 16px 16px;
}

.cm-modal-close {
    position: absolute;
    top: 9px;
    right: 11px;
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    background: #ffffff20;
    color: white;
    border: 1px solid #ffffff70;
    border-radius: 8px;
    font-size: 19px;
    cursor: pointer;
}

.cm-modal-media {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .cm-modal-media img, .cm-modal-media video {
        display: block;
        max-width: 100%;
        max-height: calc(94vh - 115px);
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .cm-modal-media video {
        width: min(100%,1180px);
    }

    .cm-modal-media p {
        font-size: 13px;
        line-height: 1.4;
        text-align: center;
        color: #d7e5fb;
        margin: 0;
    }

.cm-home-feature {
    background: linear-gradient(165deg,#f5f9ff,#ebf4fe);
}

.cm-home-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.cm-home-link {
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    color: #1261be;
}

.cm-home-feature .cm-gallery {
    max-width: 1080px;
    margin-inline: auto;
}

@media(max-width:700px) {
    .cm-gallery-header-row {
        align-items: center;
    }

    .cm-viewport {
        height: clamp(255px,80vw,450px);
        padding: 10px;
    }

    .cm-stage {
        border-radius: 17px;
    }

    .cm-preview {
        border-radius: 8px;
    }

    .cm-caption {
        padding: 14px;
    }

    .cm-expand-hint {
        font-size: 11px;
        bottom: 7px;
        right: 7px;
        padding: 6px 9px;
    }

    .cm-navigation {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .cm-thumbs {
        width: 100%;
    }

    .cm-thumb {
        width: 108px;
        min-width: 108px;
        flex-basis: 108px;
    }

    .cm-thumb-visual {
        height: 60px;
    }

    .cm-home-head {
        display: block;
    }

    .cm-home-link {
        display: inline-block;
        margin-top: 14px;
    }

    .cm-play {
        width: 90px;
        height: 90px;
    }

    .cm-arrows button.cm-autoplay-toggle {
        padding: 0 14px;
    }
}

@media(prefers-reduced-motion:reduce) {
    .cm-gallery * {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }

    .cm-autoplay-toggle, .cm-autoplay-meter {
        display: none !important;
    }
}
