p {
    display: flex;
    justify-content: center;
    padding-left: 20px;
    padding-right: 20px;
}

.details-section p {
    text-align: left;
    line-height: 1.6; 
}


.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background-color: #302d2db7;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 50px;
    margin-bottom: 50px;
}

.image-details-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.image-section {
    position: relative;
    width: 55%; /* Default width for larger screens */
}

.art-image {
    width: 100%;
    height: auto;
}

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.nav.left {
    left: 0;
}

.nav.right {
    right: 0;
}

.nav.left:hover,
.nav.right:hover {
    background-color: white;
    color: rgba(0, 0, 0, 0.6);
}

.details-section {
    width: 40%; /* Default width for larger screens */
    padding-left: 20px;
}

.details-section p {
    margin-bottom: 10px;
}

.description-section {
    margin-top: 20px;
}

.description-section h3 {
    margin-bottom: 10px;
}

.description-section p {
    line-height: 1.5;
}

h3 {
    justify-content: left;
}

h4 {
    color: whitesmoke;
    text-align: center;
}

/* The Modal (background) */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Allow scrolling if needed */
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.9);
}

/* Modal Content (image) */
.modal-content {
    margin: auto;
    display: block;
    max-width: 90%; /* Adjusted max-width to allow more flexibility */
    max-height: 80vh; /* Limit height to 80% of the viewport height */
}

/* Close Button */
.close {
    position: absolute;
    top: 30px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.image-section img {
    cursor: pointer;
    max-width: 100%; /* Ensure images in the gallery fit within their container */
    height: auto; /* Maintain aspect ratio */
}

/* Media Queries */

/* For tablets (screen width 768px and smaller) */
@media (max-width: 768px) {
    .image-details-container {
        flex-direction: column; /* Stack sections vertically */
        align-items: center; /* Center align the items */
    }

    .image-section,
    .details-section {
        width: 100%; /* Full width on smaller screens */
        padding-left: 0; /* Remove left padding */
        padding-right: 0; /* Remove right padding */
    }

    .details-section {
        margin-top: 20px; /* Add spacing between sections */
    }
}

/* For mobile phones (screen width 480px and smaller) */
@media (max-width: 480px) {
    .container {
        padding: 20px; /* Smaller padding for mobile */
    }

    h3 {
        font-size: 18px; /* Smaller font size for headers */
    }

    .details-section p {
        font-size: 14px; /* Smaller font size for paragraph text */
    }

    .description-section h3 {
        font-size: 16px; /* Smaller font size for description headers */
    }

    .nav {
        padding: 8px; /* Smaller padding for navigation buttons */
    }

    .nav.left, .nav.right {
        font-size: 14px; /* Smaller font size for navigation */
    }

    .footer {
        margin-top: 20px; /* Less margin above the footer */
        padding: 10px; /* Less padding for footer */
    }

    h4 {
        font-size: 14px; /* Smaller footer heading */
    }
}
