/* Dashboard & Example Showcase Styles */

.examples-section {
    margin-top: 60px;
}

.examples-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 40px;
}

/* Desktop: Force side-by-side layout */
@media (min-width: 1024px) {
    .examples-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.example-item {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.03) 0%, rgba(0, 0, 0, 0.6) 100%);
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.example-item:nth-child(1) {
    animation-delay: 0.1s;
}

.example-item:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.example-item:hover {
    border-color: rgba(20, 184, 166, 0.5);
    box-shadow: 0 12px 40px rgba(20, 184, 166, 0.2);
    transform: translateY(-4px);
}

.example-media {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    background: rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.example-media video,
.example-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    cursor: pointer;
}

.example-item:hover .example-media video,
.example-item:hover .example-media img {
    transform: scale(1.02);
}

.example-caption {
    padding: 24px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 300;
    margin: 0;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .examples-grid {
        gap: 30px;
    }

    .example-caption {
        padding: 20px;
        font-size: 1rem;
    }

    /* Hide videos on mobile */
    .example-media video {
        display: none;
    }

    /* Show GIFs as background images on mobile */
    #service-01 .example-item:nth-child(1) .example-media {
        background-image: url('../media/dashboard-pd-example.gif');
        background-size: cover;
        background-position: center;
    }

    #service-01 .example-item:nth-child(2) .example-media {
        background-image: url('../media/dashboard-pd-insights.gif');
        background-size: cover;
        background-position: center;
    }

    #service-02 .example-item:nth-child(1) .example-media {
        background-image: url('../media/dashboard-analytics-1.gif');
        background-size: cover;
        background-position: center;
    }

    #service-02 .example-item:nth-child(2) .example-media {
        background-image: url('../media/dashboard-analytics-2.gif');
        background-size: cover;
        background-position: center;
    }
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    z-index: 10001;
}

.lightbox-close:hover {
    color: #14b8a6;
    text-shadow: 0 0 20px rgba(20, 184, 166, 0.6);
    transform: scale(1.1);
}

#lightboxVideo {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
    .lightbox-content {
        width: 95%;
    }

    .lightbox-close {
        top: -40px;
        font-size: 2.5rem;
    }
}