@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Arlekino video gallery — mint/teal cards to match the pricing table */

.ap-videos {
    --arl-mint-50:  #f3fbf8;
    --arl-mint-100: #e8f7f1;
    --arl-text-900: #0f1f1e;
    --arl-text-600: #6b7b75;
    --arl-accent:   #6bbe56;
    --arl-border:   rgba(70, 150, 130, 0.16);

    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
    display: grid;
    grid-template-columns: repeat(var(--ap-video-cols, 3), minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--arl-text-900);
    box-sizing: border-box;
}

.ap-videos *,
.ap-videos *::before,
.ap-videos *::after {
    box-sizing: border-box;
}

.ap-video-card {
    margin: 0;
    background: var(--arl-mint-50);
    border: 1px solid var(--arl-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(100, 180, 160, 0.12);
    /* No hover effects/transitions on the card: repainting around a <video>
       triggers solid-color flashes on Windows (Multi-Plane Overlay driver bug). */
}

.ap-video-card__media {
    position: relative;
    background: #0f1f1e;
    line-height: 0;
}

.ap-video-card video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
}

/* Hard reset: the theme/Elementor kit styles <button> globally (blue background
   on hover etc.). The idle overlay is a full-size button, so without this the
   whole video turns solid blue on hover. */
.ap-videos button.ap-video-play,
.ap-videos button.ap-video-play:hover,
.ap-videos button.ap-video-play:focus,
.ap-videos button.ap-video-play:active,
.ap-videos button.ap-vc-btn,
.ap-videos button.ap-vc-btn:hover,
.ap-videos button.ap-vc-btn:focus,
.ap-videos button.ap-vc-btn:active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    color: inherit !important;
    min-width: 0 !important;
    min-height: 0 !important;
    text-shadow: none !important;
    outline: none;
}

.ap-video-card__media:fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.ap-video-card__media:fullscreen video {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
}

/* Idle-state overlay: big play button, no native controls ever */
.ap-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.ap-video-card.is-started .ap-video-play {
    opacity: 0;
    pointer-events: none;
}

.ap-video-play__btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(15, 31, 30, 0.35);
    transition: background 0.2s ease;
}

.ap-video-play:hover .ap-video-play__btn,
.ap-video-play:focus-visible .ap-video-play__btn {
    background: #fff;
}

.ap-video-play__btn svg {
    width: 32px;
    height: 32px;
    margin-left: 4px;
    fill: var(--arl-accent, #6bbe56);
}

.ap-video-card__duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(15, 31, 30, 0.75);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 999px;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.2s ease;
}

.ap-video-card__duration:empty {
    display: none;
}

.ap-video-card.is-started .ap-video-card__duration {
    opacity: 0;
}

/* Custom control bar (Arlekino green) */
.ap-video-controls {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(15, 31, 30, 0.72);
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    line-height: 0;
}

.ap-video-card.is-started .ap-video-controls {
    opacity: 1;
    pointer-events: auto;
}

.ap-vc-btn {
    background: none;
    border: 0;
    padding: 4px;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ap-vc-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
    transition: fill 0.15s ease;
}

.ap-vc-btn:hover svg,
.ap-vc-btn:focus-visible svg {
    fill: var(--arl-accent, #6bbe56);
}

.ap-vc-icon-pause,
.ap-vc-icon-muted {
    display: none;
}

.ap-video-card.is-playing .ap-vc-icon-play {
    display: none;
}

.ap-video-card.is-playing .ap-vc-icon-pause {
    display: block;
}

.ap-video-card.is-muted .ap-vc-icon-vol {
    display: none;
}

.ap-video-card.is-muted .ap-vc-icon-muted {
    display: block;
}

.ap-vc-seek {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(to right, #6bbe56 0%, rgba(255, 255, 255, 0.28) 0%);
    cursor: pointer;
    outline: none;
    margin: 0;
    padding: 0;
    border: 0;
}

.ap-vc-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #6bbe56;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.ap-vc-seek::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #6bbe56;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.ap-vc-seek::-moz-range-track {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.ap-vc-seek::-moz-range-progress {
    height: 5px;
    border-radius: 999px;
    background: #6bbe56;
}

.ap-vc-time {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

/* Volume: slider expands on hover next to the mute icon */
.ap-vc-vol {
    display: flex;
    align-items: center;
    gap: 0;
}

.ap-vc-volume {
    width: 0;
    opacity: 0;
    transition: width 0.2s ease, opacity 0.2s ease, margin 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(to right, #6bbe56 100%, rgba(255, 255, 255, 0.28) 100%);
    cursor: pointer;
    outline: none;
    margin: 0;
    padding: 0;
    border: 0;
}

.ap-vc-vol:hover .ap-vc-volume,
.ap-vc-vol:focus-within .ap-vc-volume {
    width: 60px;
    opacity: 1;
    margin-right: 4px;
}

.ap-vc-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #6bbe56;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.ap-vc-volume::-moz-range-thumb {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #6bbe56;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.ap-vc-volume::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.ap-vc-volume::-moz-range-progress {
    height: 4px;
    border-radius: 999px;
    background: #6bbe56;
}

.ap-video-card figcaption {
    padding: 10px 14px 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .ap-videos {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 420px) {
    .ap-videos {
        grid-template-columns: 1fr;
    }
}
