body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0px;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    background-image: linear-gradient(to bottom, #3498db, #2ecc71);
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ccc;
    
}

.header h1 {
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
    margin-top: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    line-height: 1.1;
}

.nav-bar-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.nav-bar {
    display: flex;
    width: 30%;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    border-radius: 10px;
    background-color: #505050;
}

.nav-button {
    background-color: #f1c40f;
    border: none;
    color: #333;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-button img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.nav-button:hover {
    background-color: #e67e22;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.nav-button.active {
    background-color: #e67e22;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    align-items: flex-start; /* Align items to the top */
}

.artwork-item {
    width: 200px;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin: 10px;
}

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

.artwork-item img {
    width: 200px;
    height: 200px;
    object-fit: cover;
}

.artwork-details {
    padding: 15px;
    flex-grow: 1; /* Allow description area to size based on content */
}

.artwork-details p {
    margin: 0;
    word-wrap: break-word;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
}

.modal-image-container {
    width: 80vw; 
    height: 80vh; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.modal-content {/* CHANGE MODAL IMAGE ATTRIBUTES HERE*/
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /*width: 80%;*/
    height: 90%;
    /* overflow: auto;*/ /* no scroll bars */
}

#modalImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    touch-action: none; /* Disable browser's default touch interactions */
    -webkit-user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    cursor: grab; /* Shows that the image can be moved when zoomed */
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center center;
    
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

#modalImage:active {
    cursor: grabbing; /* Changes when actively panning */
}

#modalImage.panning {
    transition: transform 0ms; /* Disable any transition during active panning */
}

.modal-content-wrapper { 
    width: 100%;
    height: calc(100% - 50px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#modalCaption {
    margin-top: 10px;
    color: #ccc;
    padding: 10px 0;
}

.modal-top-controls {
    position: absolute;
    top: 10px;
    right: 10px;
}

.zoom-controls {
    position: absolute;
    /*width: 15vw;*/
    gap: 10px;
    top: 10px;
    left: auto;  /* Remove left positioning */
    right: 10px; /* Position to the right */
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.modal-btn {
    background-color: #fff;
    width: 40px;
    height: 40px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 25%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: -5px 5px 7px #7777778e;
}

.modal-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

#closeModalBtn {
    border-radius: 50%; /* Makes it perfectly round */
    font-size: 18px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: background-color 0.3s ease;
}

#closeModalBtn:hover {
    background-color: rgba(255, 100, 100, 0.9); /* Reddish tint on hover */
}

#infoBtn {
    font-weight: bold;
    font-size: 22px;
}

@media (max-width: 1080px) {
    .gallery {
        gap: 0px;
    }
    .artwork-item {
        width: 150px;
    }
    .artwork-item img {
        width: 150px;
        height: 150px;
    }
    .nav-bar {
    width: 70%;
    }
    .nav-button img {
    padding: 0;
    margin: 0;
    }
    
    .modal-content {
    width: 78%;
    height: 60%;
    }
    .zoom-controls {
    position: absolute;
    /*width: 50%;*/
    /*gap: 10px;*/
}
}
