/* Cy-Promo Cyberpunk Widget Styles */
.cy-promo-widget {
    background: #262626;
    color: #FFFFFF;
    font-family: 'Courier New', monospace;
    border: 2px solid #FF5331;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 83, 49, 0.3);
    max-width: 100%;
}

/* Title */
.cy-promo-title {
    background: linear-gradient(45deg, #FF5331, #ff6b47);
    color: #FFFFFF;
    padding: 15px 20px;
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid #FF5331;
    text-shadow: 0 0 10px rgba(255, 83, 49, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cy-promo-title i {
    font-size: 20px;
}

/* Carousel Container */
.cy-promo-carousel-container {
    padding: 20px;
    overflow: hidden;
    position: relative;
}

.cy-promo-carousel {
    display: flex;
    gap: 20px;
    /* Only apply will-change when animating */
    transition: none;
}

.cy-promo-carousel:not(.cy-static-display) {
    will-change: transform;
}

/* Static display mode */
.cy-promo-carousel.cy-static-display {
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Promo Cards */
.cy-promo-card {
    min-width: 280px;
    max-width: 280px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
}

/* Cloned cards are now fully interactive */
.cy-promo-card.cloned {
    /* Removed pointer-events: none - cloned cards are now clickable */
    opacity: 1; /* Ensure cloned cards are visible */
}

.cy-promo-card:hover {
    border-color: #FF5331;
    box-shadow: 0 0 25px rgba(255, 83, 49, 0.4);
    transform: scale(1.05);
    z-index: 10; /* Ensure hovered card appears above others */
}

/* Improved glitch effect */
.cy-promo-card.cy-glitching {
    animation: glitchEffect 0.3s ease;
}

.cy-promo-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    width: 100%;
}

.cy-promo-image {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #333;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cy-promo-scan-line {
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FF5331, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: scanLine 1.5s ease-in-out infinite;
    transform: translateY(-50%);
}

.cy-promo-card:hover .cy-promo-scan-line {
    opacity: 1;
}

.cy-promo-content {
    padding: 15px;
}

.cy-promo-content h4 {
    color: #FF5331;
    font-size: 16px;
    margin: 0 0 8px 0;
    font-weight: bold;
    line-height: 1.3;
    /* Prevent text overflow */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cy-promo-content p {
    color: #FFFFFF;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    opacity: 0.8;
    /* Prevent text overflow */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Animations */
@keyframes scanLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes glitchEffect {
    0%, 100% { 
        transform: translate(0);
        filter: none;
    }
    10% { 
        transform: translate(-1px, 1px);
        filter: hue-rotate(45deg);
    }
    20% { 
        transform: translate(-1px, -1px);
        filter: hue-rotate(90deg);
    }
    30% { 
        transform: translate(1px, 1px);
        filter: hue-rotate(135deg);
    }
    40% { 
        transform: translate(1px, -1px);
        filter: contrast(1.5);
    }
    50% { 
        transform: translate(-0.5px, 0.5px);
        filter: brightness(1.2);
    }
    60% { 
        transform: translate(0.5px, -0.5px);
        filter: saturate(1.5);
    }
    70% { 
        transform: translate(-0.5px, -0.5px);
        filter: sepia(0.3);
    }
    80% { 
        transform: translate(0.5px, 0.5px);
        filter: blur(0.5px);
    }
    90% { 
        transform: translate(0, 0.5px);
        filter: invert(0.1);
    }
}

/* Pulse animation for enhanced cyberpunk feel */
@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 0 25px rgba(255, 83, 49, 0.4); 
    }
    50% { 
        box-shadow: 0 0 35px rgba(255, 83, 49, 0.6), 
                    0 0 45px rgba(255, 83, 49, 0.3); 
    }
}

/* Add subtle pulse to hovered cards */
.cy-promo-card:hover {
    animation: pulse 2s infinite;
}

/* Performance optimizations */
.cy-promo-carousel {
    transform: translateZ(0); /* Force GPU acceleration */
    backface-visibility: hidden;
}

.cy-promo-card {
    transform: translateZ(0); /* Force GPU acceleration for cards */
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cy-promo-widget {
        border-radius: 10px;
    }
    
    .cy-promo-title {
        font-size: 16px;
        padding: 12px 15px;
        letter-spacing: 1px;
    }
    
    .cy-promo-title i {
        font-size: 18px;
    }
    
    .cy-promo-carousel-container {
        padding: 15px;
    }
    
    .cy-promo-card {
        min-width: 220px;
        max-width: 220px;
    }
    
    .cy-promo-image {
        height: 120px;
    }
    
    .cy-promo-content {
        padding: 12px;
    }
    
    .cy-promo-content h4 {
        font-size: 15px;
    }
    
    .cy-promo-content p {
        font-size: 13px;
    }
    
    .cy-promo-carousel {
        gap: 15px;
    }
    
    /* Disable animations on mobile for better performance */
    .cy-promo-card.cy-glitching {
        animation: none;
    }
}

@media (max-width: 480px) {
    .cy-promo-title {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .cy-promo-title i {
        font-size: 16px;
    }
    
    .cy-promo-carousel-container {
        padding: 12px;
    }
    
    .cy-promo-card {
        min-width: 200px;
        max-width: 200px;
    }
    
    .cy-promo-image {
        height: 100px;
    }
    
    .cy-promo-content {
        padding: 10px;
    }
    
    .cy-promo-content h4 {
        font-size: 14px;
        -webkit-line-clamp: 1; /* Single line on very small screens */
    }
    
    .cy-promo-content p {
        font-size: 12px;
        -webkit-line-clamp: 2; /* Fewer lines on very small screens */
    }
    
    .cy-promo-carousel {
        gap: 12px;
    }
    
    /* Reduce hover effects on small screens */
    .cy-promo-card:hover {
        transform: scale(1.02); /* Less dramatic scaling */
    }
}