* {
    box-sizing: border-box; /* Ensure consistent box sizing */
}

body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure the body fills the viewport */
}

header, footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    width: 100%;
}

footer {
    margin-top: auto; /* Push footer to the bottom */
}

.gallery {
    max-width: 1200px; /* Increased max width for larger images */
    margin: 0 auto; /* Center the gallery */
    padding: 2rem 1rem;
    flex: 1; /* Allow gallery to grow */
}

.photo-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem; /* Space between items */
}

.photo-item.left {
    flex-direction: row; /* Left-aligned items */
}

.photo-item.right {
    flex-direction: row-reverse; /* Right-aligned items */
}

.image-container {
    position: relative;
    flex: 1; /* Allow image container to take space */
    margin-right: 1rem; /* Space between image and description */
}

.image-container img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    max-height: 500px; /* Increased height for larger display */
    object-fit: cover; /* Ensures the image fits the container */
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay */
    opacity: 0; /* Start hidden */
    transition: opacity 0.3s; /* Smooth transition */
}

.image-container:hover .overlay {
    opacity: 1; /* Show overlay on hover */
}

.description {
    flex: 1; /* Allow description to take space */
    margin-left: 1rem; /* Space between description and image */
}

.footer-creator {
    color: #ffcc00; /* Improved contrast color for footer text */
}

/* Responsive Design */
@media (max-width: 600px) {
    .photo-item {
        flex-direction: column; /* Stack items on smaller screens */
    }

    .image-container {
        margin-right: 0; /* Remove right margin */
        margin-bottom: 1rem; /* Add bottom margin */
    }

    .description {
        margin-left: 0; /* Remove left margin */
    }
}
