/* TECHNICAL DEMONSTRATIONS - GIF STYLING */

.technical-demos-section {
    padding: 120px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.demos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.demo-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.demo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 102, 255, 0.15);
}

.demo-visual {
    position: relative;
    background: #1f2937;
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
    border: 2px solid rgba(0, 102, 255, 0.3);
}

/* Placeholder image prima che GIF carichi */
.demo-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Thumbnails specifici per demo-visual usando data-thumb attribute */
.demo-visual[data-thumb="anti-keylogger"]::before {
    background-image: url('../images/gifs/thumbnails/anti-keylogger-thumb.png');
}

.demo-visual[data-thumb="exploit-guard"]::before {
    background-image: url('../images/gifs/thumbnails/exploit-guard-thumb.png');
}

.demo-visual[data-thumb="threat-intelligence"]::before {
    background-image: url('../images/gifs/thumbnails/threat-intelligence-thumb.png');
}

.demo-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(1);
    position: relative;
    z-index: 2;
}

.demo-visual:hover .demo-gif {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.demo-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 102, 255, 0.95);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 6px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
    z-index: 10;
}

.demo-info {
    padding: 24px;
}

.demo-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.3;
}

.demo-description {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
}

/* Video Section Updates */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.video-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.12);
}

.video-wrapper {
    position: relative;
    background: #1f2937;
    aspect-ratio: 16/9;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(0, 102, 255, 0.3);
}

/* Placeholder image prima che GIF carichi */
.video-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Thumbnails specifici per ogni GIF usando data-thumb attribute */
.video-wrapper[data-thumb="anti-keylogger"]::before {
    background-image: url('../images/gifs/thumbnails/anti-keylogger-thumb.png');
}

.video-wrapper[data-thumb="exploit-guard"]::before {
    background-image: url('../images/gifs/thumbnails/exploit-guard-thumb.png');
}

.video-wrapper[data-thumb="threat-intelligence"]::before {
    background-image: url('../images/gifs/thumbnails/threat-intelligence-thumb.png');
}

.video-wrapper .demo-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(1);
    position: relative;
    z-index: 2;
}

.video-wrapper:hover .demo-gif {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.video-info {
    padding: 24px;
}

.video-title {
    font-size: 19px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
    line-height: 1.3;
}

.video-description {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
}

/* Zoom Overlay Icon */
.zoom-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 102, 255, 0.95);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.4);
}

.video-wrapper:hover .zoom-overlay,
.demo-visual:hover .zoom-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.zoom-overlay svg {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* Play Button Overlay for video preview */
.video-wrapper::after {
    content: 'LIVE DEMO';
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 102, 255, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    backdrop-filter: blur(8px);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.4);
}

.demo-visual::after {
    content: 'LIVE DEMO';
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 102, 255, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    backdrop-filter: blur(8px);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.4);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 102, 255, 0.3);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #ffffff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 59, 48, 0.8);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .technical-demos-section {
        padding: 80px 0;
    }

    .demos-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .demo-info,
    .video-info {
        padding: 20px;
    }

    .demo-title {
        font-size: 18px;
    }

    .demo-description {
        font-size: 14px;
    }

    .demo-badge {
        font-size: 10px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .demos-grid {
        grid-template-columns: 1fr;
    }

    .demo-visual {
        aspect-ratio: 4/3;
    }

    .demo-badge {
        top: 12px;
        right: 12px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .technical-demos-section {
        background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
    }

    .demo-card,
    .video-card {
        background: #1f2937;
        border: 1px solid #374151;
    }

    .demo-title,
    .video-title {
        color: #f9fafb;
    }

    .demo-description,
    .video-description {
        color: #9ca3af;
    }
}

/* Loading State for GIFs */
.demo-gif[loading="lazy"] {
    background: linear-gradient(90deg, #1f2937 0%, #374151 50%, #1f2937 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Print Optimization */
@media print {
    .demo-card,
    .video-card {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .demo-gif {
        display: none;
    }

    .demo-badge {
        background: #0066ff;
    }
}
