/* Artwork horizontal layout with wrapping */

.artwork-gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0 auto 60px auto;
    width: 80%;
    padding: 20px 0;
    justify-content: center;
}

.gallery-row {
    display: contents;
}

.artwork-item {
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    flex-shrink: 0;
    height: 200px;
    width: auto;
}

.artwork-item:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.artwork-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
    display: block;
}

.artwork-item:hover img {
    transform: scale(1.02);
}

.footer-text {
    text-align: center;
    font-size: 1.5rem;
    color: #fff;
    margin-top: 40px;
    padding: 20px;
    border-top: 2px solid #fff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    margin: 2% auto;
    max-width: 70vw;
    max-height: 90vh;
    background-color: #111;
    border: 2px solid #333;
    border-radius: 5px;
    overflow: auto;
    animation: slideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    background-color: #000;
    display: block;
    flex-shrink: 0;
}

.modal-info {
    padding: 30px;
    flex-shrink: 0;
    background-color: #111;
}

.modal-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-medium {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 15px;
    font-style: italic;
}

.modal-description {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.6;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background-color: rgba(0, 0, 0, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #333;
}

.close:hover {
    color: #fff;
    background-color: rgba(255, 0, 0, 0.8);
    border-color: #fff;
}

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

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 20px;
    }

    .title {
        font-size: 2rem;
    }

    .container {
        padding: 20px;
    }

    .artwork-gallery {
        width: 95%;
        gap: 15px;
    }

    .artwork-item {
        height: 250px;
    }

    .modal-content {
        margin: 1% auto;
        max-width: 95vw;
        max-height: 95vh;
    }

    .modal-info {
        padding: 20px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-medium {
        font-size: 1rem;
    }

    .modal-description {
        font-size: 1rem;
    }

    .close {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .artwork-gallery {
        width: 98%;
        gap: 10px;
    }

    .artwork-item {
        height: 200px;
    }

    .modal-content {
        max-width: 98vw;
        max-height: 98vh;
    }

    .modal-info {
        padding: 15px;
    }

    .modal-title {
        font-size: 1.3rem;
    }
}