/* ==========================================
   Chain Gallery
========================================== */

.chain-gallery-section {

    padding: 80px 20px;

    background: #fffdf8;
}

.gallery-container {

    max-width: 1300px;

    margin: auto;
}

.chain-gallery-section h1 {

    text-align: center;

    font-size: 3rem;

    color: #222;

    margin-bottom: 10px;
}

.gallery-subtitle {

    text-align: center;

    color: #666;

    margin-bottom: 40px;

    font-size: 1.05rem;
}

#chain-gallery {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(250px, 1fr)
        );

    gap: 20px;
}

.gallery-item {

    overflow: hidden;

    border-radius: 16px;

    cursor: pointer;

    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);

    transition: 0.3s ease;
}

.gallery-item:hover {

    transform: translateY(-6px);
}

.gallery-item img {

    width: 100%;

    height: 320px;

    object-fit: cover;

    display: block;

    transition: transform 0.3s ease;
}

.gallery-item:hover img {

    transform: scale(1.05);
}

/* ==========================================
   Fullscreen Modal
========================================== */

#image-modal {

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.92);

    display: none;

    justify-content: center;

    align-items: center;

    z-index: 9999;

    cursor: zoom-out;

    padding: 20px;
}

#image-modal.active {

    display: flex;
}

#modal-image {

    max-width: 95%;

    max-height: 95vh;

    border-radius: 12px;

    box-shadow: 0 0 40px rgba(255, 255, 255, 0.15);

    animation: zoomIn 0.25s ease;
}

@keyframes zoomIn {

    from {

        transform: scale(0.8);

        opacity: 0;
    }

    to {

        transform: scale(1);

        opacity: 1;
    }
}

/* ==========================================
   Mobile
========================================== */

@media (max-width: 768px) {

    .chain-gallery-section {

        padding: 60px 15px;
    }

    .chain-gallery-section h1 {

        font-size: 2rem;
    }

    #chain-gallery {

        grid-template-columns: repeat(2, 1fr);

        gap: 12px;
    }

    .gallery-item img {

        height: 180px;
    }
}
