:root {
    --primary-gradient: linear-gradient(
        to top,
        rgba(138, 43, 226, 0.9) 0%,
        rgba(138, 43, 226, 0) 50%
    );
    --glass-bg: rgba(255, 255, 255, 0.2);
}

/* Main Card Container */
.card {
    position: relative;
    /* default width allows flex layout to sit side by side; width control overrides if set */
    width: auto;
    max-width: 350px;
    height: var(--card-height, 500px);
    border-radius: 24px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Gradient Overlay */
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    top: auto;
    height: 60%;
    background: var(--overlay-gradient, var(--primary-gradient));
    z-index: 1;
    pointer-events: none;
}

/* Play Button Area */
.play-button-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Pulse Animation */
@keyframes simple-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.outer-ring {
    width: var(--play-button-size, 80px);
    height: var(--play-button-size, 80px);
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    animation: simple-pulse 2s infinite;
}

.inner-circle {
    width: calc(var(--play-button-size, 80px) * 0.5625);
    height: calc(var(--play-button-size, 80px) * 0.5625);
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.inner-circle:hover {
    transform: scale(1.1);
}

.play-icon {
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #8a2be2;
}

/* Text Content */
.content {
    position: absolute;
    bottom: 30px;
    left: 25px;
    /* keep left-aligned, no right inset so text wraps naturally */
    color: #ffffff;
    z-index: 3;
    transition: transform 0.3s ease;
}

.content:hover {
    transform: translateY(-5px);
}

.quote {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 15px;
}

.name {
    font-size: 1rem;
    opacity: 0.9;
    transition: transform 0.3s ease;
}


.name:hover {
    transform: translateY(-3px);
}

/* Wrapper layout for multiple cards */
.pce-profiles-wrapper {
    position: relative;
    overflow: hidden; /* hide overflowing cards for marquee */
}

.pce-marquee-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: var(--cards-gap, 20px);
    /* CSS animation disabled - using JavaScript for better drag control */
    will-change: transform;
    /* Direction control */
    --marquee-direction: left;
}

/* Pause on hover functionality */
.pce-profiles-wrapper[data-pause-hover="yes"]:hover .pce-marquee-track:not(.dragging) {
    animation-play-state: paused !important;
}

.pce-marquee-track .card {
    flex: 0 0 auto;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .card {
        max-width: 100%;
    }

    .quote {
        font-size: 1.05rem;
    }
}

/* hide play button when there is no video link */
.card:not(.has-video) .play-button-container {
    display: none;
}

/* wrapper cursor changes for drag interaction */
.pce-profiles-wrapper {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: pan-y; /* Allow vertical scrolling but disable horizontal touch action */
}

.pce-profiles-wrapper.dragging {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: none; /* Disable all touch actions during drag */
}

.pce-profiles-wrapper.dragging .pce-marquee-track {
    animation-play-state: paused !important;
    transition: none; /* Remove transitions during drag for immediate response */
}

/* Smooth transition when resuming animation */
.pce-marquee-track.resuming {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Lightbox Styles */
.pce-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pce-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pce-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    padding-top: 56.25%;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.pce-lightbox-overlay.active .pce-lightbox-content {
    transform: scale(1) translateY(0);
}

.pce-lightbox-content iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 16px;
}

.pce-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.pce-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(90deg);
    border-color: rgba(255, 255, 255, 0.3);
}

.pce-lightbox-close:active {
    transform: scale(0.95) rotate(90deg);
}

/* Loading spinner for video */
.pce-lightbox-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: lightbox-spinner 1s linear infinite;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pce-lightbox-content.loading::before {
    opacity: 1;
}

@keyframes lightbox-spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .pce-lightbox-content {
        width: 95%;
        max-width: none;
        margin: 20px;
        padding-top: 56.25%;
    }
    
    .pce-lightbox-close {
        top: -45px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .pce-lightbox-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
    }
    
    .pce-lightbox-content iframe {
        border-radius: 0;
    }
    
    .pce-lightbox-close {
        top: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(10px);
    }
}
