/* Grid Layout */
.visualization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
    margin: 0 auto;
    max-width: 1200px;
}

.grid-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.slide-content {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.slide-content img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.slide-content p {
    margin: 15px 0;
    padding: 0 15px;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
}

/* Open Image Button */
.open-image-btn {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 5;
    font-size: 0.9rem;
}

.grid-item:hover .open-image-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.open-image-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: translateX(-50%) translateY(-7px);
}

/* Fullscreen Overlay (same as before) */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.fullscreen-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.fullscreen-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
}

.close-fullscreen {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-fullscreen:hover {
    background: rgba(255,255,255,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .visualization-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .slide-content img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .visualization-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .slide-content img {
        height: 180px;
    }

    .open-image-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        bottom: 10px;
    }
}
