/* Apply Montserrat font to the entire body */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    color: #FFF;
    font-size: 16px; /* Base font size */
}

/* Header styling */
header {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align items to the left */
    background: #000;
    padding: 10px 20px; /* Add padding around the content */
    color: #fff;
    width: 100%;
    height: auto; /* Automatic height */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000; /* Ensure header stays on top */
}

/* Logo styling */
header .logo {
    margin-right: 20px; /* Add space between logo and navigation */
}

header .logo img {
    width: 5vw; /* Adjust logo size */
}

/* Navigation styling */
nav {
    flex: 1;
    display: flex;
    justify-content: flex-start; /* Align navigation next to the logo */
    align-items: center;
}

nav ul {
    display: flex; /* Display navigation items in a row */
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 20px; /* Add space between navigation items */
}

nav ul li {
    width: auto; /* Ensure each navigation item is sized based on its content */
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 10px 15px; /* Adjust padding for clickable area */
    display: block;
}

nav ul li a:hover {
    background: #555;
    border-radius: 5px; /* Add border radius for hover effect */
}

/* Main content area */
main {
    padding: 20px;
    padding-top: 4vh;
    padding-bottom: 10vh; /* Ensure footer does not overlap */
    flex: 1;
    background: url('background.jpg');
    background-size: cover; /* Cover ensures full background */
}

/* Gallery section styling */
#gallery {
    padding: 20px;
}

#gallery h1 {
    font-size: 3rem; /* Adjust for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
}

#gallery h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem; /* Increased readability */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjust for consistency */
    gap: 10px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item img:hover {
    transform: scale(1.1);
}

.gallery-item figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6); /* Match with base CSS */
    color: #fff;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

/* Lightbox styling */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.lightbox-content {
    display: flex;
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-sizing: border-box;
}

.lightbox-img {
    max-width: 60%; /* Adjust as needed */
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px 0 0 8px; /* Rounded corners on the image side */
}

.lightbox-blurb {
    padding: 20px;
    color: #fff;
    max-width: 40%; /* Adjust as needed */
    box-sizing: border-box;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.5); /* 50% opacity background */
    border-radius: 0 8px 8px 0; /* Rounded corners on the blurb side */
    display: flex;
    justify-content: center;
    align-items: center; /* Center content vertically */
    text-align: center; /* Center text horizontally */
    flex: 1; /* Allow the blurb to take up remaining space */
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2.5rem; /* Use rem for consistency */
    font-weight: bold;
    cursor: pointer;
}

/* Footer styling */
footer {
    font-size: 1rem; /* Use rem for consistency */
    background: #000;
    color: #fff;
    text-align: center; /* Center-align all text */
    padding: 10px 0;
    width: 100%;
    position: fixed;
    bottom: 0;
    display: flex;
    flex-direction: column; /* Stack content vertically */
    align-items: center; /* Center all content horizontally */
    z-index: 10; /* Ensure footer is above other content */
}

/* Social media section styling */
footer .social-media {
    display: flex;
    justify-content: center; /* Center social media links within their section */
    gap: 5px; /* Space between social media links */
    margin-top: 10px; /* Add some space between text and social media links */
}

/* Social media links styling */
footer .social-media a {
    color: #fff;
    text-decoration: none;
}

footer .social-media a:hover {
    text-decoration: underline;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    header {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row; /* Adjust for better mobile layout */
        padding: 10px; /* Add padding for better spacing */
    }

    header .logo img {
        width: 15vw; /* Adjust to match base CSS */
        margin: 10px 0;
    }

    nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px; /* Adjust gap to match base CSS */
    }

    nav ul li a {
        padding: 10px; /* Adjust padding to match base CSS */
        font-size: 0.9rem; /* Adjust font size */
    }

    main {
        margin-left: 0;
        padding-top: calc(15vh); /* Adjust padding for consistency */
    }

    footer {
        width: 100%;
        left: 0;
        padding: 15px 10px; /* Adjust padding for better spacing */
    }

    footer .social-media {
        gap: 10px; /* Adjust gap to match base CSS */
    }

    #gallery {
        padding: 10px; /* Reduce padding to fit content on smaller screens */
    }

    .gallery-grid {
        grid-template-columns: 1fr; /* Stack items in a single column on mobile */
        grid-template-rows: repeat(auto-fit, minmax(150px, auto)); /* Adjust rows to fit content */
    }

    .gallery-item img {
        max-width: 100%; /* Ensure images do not overflow */
        height: auto; /* Maintain aspect ratio */
    }
}
