@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #debe73; /* Background color */
    color: #f1ede2; /* Text color */
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

header {
    position: fixed; /* Keep the header fixed at the top */
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.1); /* Transparent black */
    padding: 10px 20px;
    z-index: 1000; /* Ensure header stays on top of other content */
    box-sizing: border-box; /* Include padding in width calculation */
}

.header-left h1 {
    margin: 0;
    font-style: italic;
}

.header-right a {
    text-decoration: none;
    margin-left: 10px;
    font-size: 20px;
}

/* Ensure main content is below header */
main {
    padding-top: 70px; /* Adjust based on header height to avoid overlap */
    display: flex; /* Use flexbox to arrange the sections */
    flex-wrap: wrap; /* Allow wrapping for responsiveness */
    box-sizing: border-box;
    min-height: calc(100vh - 70px); /* Ensure minimum height is the full viewport minus header */
    overflow: hidden; /* Prevent scrolling beyond content */
}

/* Artwork Section */
#artworks {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.artwork {
    position: relative; /* Enable positioning for overlay */
    text-align: center;
    flex-grow: 1;
    max-width: calc(33.33% - 20px); /* Space each item */
}

.artwork img {
    width: 100%; /* Full width of container */
    height: auto;
}

.artwork-info {
    padding-left: 30%;
}

.artwork h2 {
    position: absolute;
    top: 50%; /* Center vertically */
    left: 0;
    width: 100%;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.4); /* Transparent background */
    color: #f1ede2;
    font-weight: 400;
    font-size: 30px;
    opacity: 0; /* Initially hidden */
    transition: opacity 0.3s, transform 0.3s; /* Transition effects */
    transform: translateY(-50%);
}

.artwork:hover h2 {
    opacity: 1; /* Show on hover */
}

/* Info Section */
.info {
    width: 30%;
    padding-right: 20px;
    position: sticky;
    top: 100px; /* Space from top to avoid overlap with fixed header */
    max-height: calc(100vh - 70px); /* Prevent content from exceeding viewport height */
    overflow-y: auto; /* Enable scrolling for overflowing content */
}

/* Documentation Section */
.documentation {
    width: 50%;
    padding: 10px 20px;
    max-height: calc(100vh - 70px); /* Prevent content from exceeding viewport height */
    overflow-y: auto; /* Add vertical scrollbar if needed */
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Maintain 16:9 aspect ratio */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.gallery-img {
    display: block; /* Block element for images */
    width: 100%; /* Full width of container */
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 20px;
}

/* General Link Styles */
a {
    color: #f1ede2;
    text-decoration: none;
}

/* Responsive Design for Mobile */
@media only screen and (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-right {
        margin-top: 10px;
        width: 100%;
        display: flex;
        justify-content: space-around;
    }

    .header-right a {
        margin-left: 0;
        font-size: 18px;
    }

    main {
        flex-direction: column; /* Stack content vertically on mobile */
        padding: 20px; /* Add padding for mobile */
        padding-top: 120px; /* Increased padding for smaller screens to avoid overlap */
        min-height: calc(100vh - 120px); /* Adjust height for mobile */
    }

    .info, .documentation {
        width: 100%;
        padding: 10px 0;
        max-height: none; /* Remove max-height restriction on mobile */
    }

    .artwork {
        max-width: 100%; /* Full width for mobile */
        margin-bottom: 20px;
    }

    .artwork-info {
        padding-left: 0; /* Remove left padding for mobile */
        text-align: center;
    }

    .artwork h2 {
        font-size: 24px;
        bottom: 0;
        position: relative; /* Adjust to avoid overlapping images */
        margin-top: 10px; /* Add margin to space out text from images */
        opacity: 1; /* Make text always visible */
        background-color: transparent; /* Remove background on mobile */
        color: #f1ede2; /* Ensure text color is readable */
    }

    .video-container {
        height: auto;
        padding-top: 0;
    }
}

@media only screen and (max-width: 480px) {
    .header-left h1 {
        font-size: 18px;
    }

    .header-right a {
        font-size: 16px;
    }

    .artwork h2 {
        font-size: 20px;
    }
}
