/**
 * FF Home Desktop - Efekty tylko dla strony głównej na desktopie
 * Tylko dla min-width: 1024px
 */

/* ============================================
   GRID - 4 kafelki w rzędzie, 2 rzędy (8 kafelków)
   ============================================ */

@media (min-width: 1024px) {
    .ff-home-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 24px;
        max-width: 1400px;
        margin: 0 auto;
        padding: 24px 0;
    }

    /* Fade-in kafelków przy wejściu na stronę - dla wszystkich galerii */
    .home-gallery .ff-card {
        opacity: 0;
        transform: translateY(12px);
        animation: ff-card-fade-in 0.5s ease-out forwards;
    }

    /* Opóźnienia dla kafelków - pierwsza galeria (8 kafelków) */
    .ff-home-grid .ff-card:nth-child(1) { animation-delay: 0.00s; }
    .ff-home-grid .ff-card:nth-child(2) { animation-delay: 0.05s; }
    .ff-home-grid .ff-card:nth-child(3) { animation-delay: 0.10s; }
    .ff-home-grid .ff-card:nth-child(4) { animation-delay: 0.15s; }
    .ff-home-grid .ff-card:nth-child(5) { animation-delay: 0.20s; }
    .ff-home-grid .ff-card:nth-child(6) { animation-delay: 0.25s; }
    .ff-home-grid .ff-card:nth-child(7) { animation-delay: 0.30s; }
    .ff-home-grid .ff-card:nth-child(8) { animation-delay: 0.35s; }
    
    /* Opóźnienia dla pozostałych galerii (6 kafelków) */
    .home-gallery:not(.ff-home-grid) .ff-card:nth-child(1) { animation-delay: 0.00s; }
    .home-gallery:not(.ff-home-grid) .ff-card:nth-child(2) { animation-delay: 0.05s; }
    .home-gallery:not(.ff-home-grid) .ff-card:nth-child(3) { animation-delay: 0.10s; }
    .home-gallery:not(.ff-home-grid) .ff-card:nth-child(4) { animation-delay: 0.15s; }
    .home-gallery:not(.ff-home-grid) .ff-card:nth-child(5) { animation-delay: 0.20s; }
    .home-gallery:not(.ff-home-grid) .ff-card:nth-child(6) { animation-delay: 0.25s; }

    @keyframes ff-card-fade-in {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Lightbox overlay */
    .ff-lightbox-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(8px);
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .ff-lightbox-overlay.active {
        opacity: 1;
        pointer-events: all;
    }
    
    /* Gdy lightbox jest zamykany, upewnij się że nie blokuje interakcji */
    .ff-lightbox-overlay:not(.active) {
        pointer-events: none !important;
    }

    .ff-lightbox-content {
        background: #1a1a1a;
        border-radius: 16px;
        padding: 24px;
        max-width: 600px;
        width: 90%;
        max-height: 90vh;
        overflow-y: auto;
        position: relative;
        transform: scale(0.9);
        transition: transform 0.3s ease;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    .ff-lightbox-overlay.active .ff-lightbox-content {
        transform: scale(1);
    }

    .ff-lightbox-image {
        width: 100%;
        border-radius: 12px;
        margin-bottom: 16px;
        display: block;
    }

    .ff-lightbox-title {
        font-size: 20px;
        font-weight: 600;
        color: #fff;
        margin-bottom: 12px;
        line-height: 1.4;
    }

    .ff-lightbox-author {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.7);
        margin-bottom: 16px;
    }

    .ff-lightbox-author a {
        color: #4CAF50;
        text-decoration: none;
    }

    .ff-lightbox-author a:hover {
        text-decoration: underline;
    }

    .ff-lightbox-stats {
        display: flex;
        gap: 20px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .ff-lightbox-stat {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8);
    }

    .ff-lightbox-stat img {
        width: 16px;
        height: 16px;
    }

    .ff-lightbox-button {
        display: inline-block;
        padding: 12px 24px;
        background: #4CAF50;
        color: #fff;
        text-decoration: none;
        border-radius: 8px;
        font-weight: 600;
        transition: background 0.2s ease;
    }

    .ff-lightbox-button:hover {
        background: #45a049;
    }

    .ff-lightbox-close {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: 50%;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s ease;
        z-index: 10000;
        pointer-events: auto;
    }

    .ff-lightbox-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .ff-lightbox-close:active {
        background: rgba(255, 255, 255, 0.3);
    }
}

