body {
    font-family: monospace, sans-serif;
    margin: 20px;
    background-color: #3d3d3d;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header, footer {
    background-color: #000000;
    color: white;
    padding: 10px;
    text-align: center;
}

footer {
    display: flex; /* Use flexbox for alignment */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    height: 50px; /* Ensure consistent height for proper alignment */
    text-align: center; /* Center-align text */
}

footer button {
    margin-left: 10px;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    background-color: #333;
    color: white;
    cursor: pointer;
}

footer button:hover {
    background-color: #555;
}

.footer-image {
    float: right;
}

.footer-box {
    background-color: black; /* Box color */
    padding: 10px; /* Match footer padding */
    text-align: center; /* Center-align content */
    margin: 0 auto 5px auto; /* Center horizontally and add spacing below */
    border-radius: 5px; /* Slightly round the corners */
    width: fit-content; /* Adjust width to fit content */
}

.footer-box .footer-image {
    float: none; /* Reset float for proper alignment */
    display: inline-block; /* Display images inline */
    margin-left: 5px; /* Add spacing between images */
}

main {
    margin: 20px 0;
    flex: 1;
}

.content {
    display: flex;
    justify-content: space-between;
    gap: 10px; /* Add spacing between the container, sidebar, and gallery */
}

.container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    flex: 3;
    margin-right: 10px; /* Add spacing to the right of the container */
    min-height: 150px; /* Ensure enough height for all text */
}

.sidebar {
    background-color: #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    margin-left: 10px;
    min-height: auto; /* Allow height to adjust based on content */
    height: auto; /* Ensure it grows to fit all text */
    overflow: visible; /* Prevent clipping of content */
}

.sidebar h2 {
    margin-top: 0;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar ul li a {
    text-decoration: none;
    color: #333;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

.home-button {
    display: inline-block;
    padding: 5px 10px;
    background-color: black; /* Match footer box color */
    color: white; /* Contrast text color */
    text-decoration: none;
    border-radius: 5px; /* Match rounded corners */
    border: 1px solid white; /* Add a subtle border */
    margin: 0 auto; /* Center horizontally */
}

.home-button:hover {
    background-color: #333333; /* Slightly lighter black for hover effect */
    color: #f1f1f1; /* Slightly lighter text color */
}

.white-box {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    margin: 20px 0;
    overflow: hidden; /* Prevent content overflow */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Larger minimum size for sleekness */
    gap: 20px; /* Increase spacing for a cleaner look */
    align-items: center; /* Center images vertically */
    justify-items: center; /* Center images horizontally */
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 10px; /* Slightly larger rounding for a modern look */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Softer shadow for elegance */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effect */
}

.gallery-grid img:hover {
    transform: scale(1.05); /* Slight zoom on hover */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

.gallery-grid img:active {
    transform: scale(1); /* Reset zoom on click */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Reset shadow on click */
}

.photo-gallery {
    margin-top: 10px; /* Add spacing above the gallery */
}

.photo-gallery h2 {
    color: white; /* Set gallery header text color to white */
    text-align: center; /* Center-align the header text */
    margin-bottom: 20px; /* Add spacing below the header */
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Adjust for smaller screens */
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* Single column for very small screens */
    }
}
