/* 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('../assets/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)); /* Responsive grid */
    gap: 10px; /* Space between grid items */
}

.gallery-item {
    position: relative;
    overflow: hidden; /* Hide overflowing parts of images */
    aspect-ratio: 4 / 3; /* Maintain a consistent aspect ratio for all images */
    background: #000; /* Add a background colour to fill gaps if images don't cover */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure images cover the entire container without distortion */
    display: block;
    transition: transform 0.3s ease; /* Add a hover effect for aesthetics */
    cursor: pointer;
}

.gallery-item img:hover {
    transform: scale(1.1); /* Slight zoom on hover */
}

.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 {
        padding: 10px;
        overflow-x: auto; /* Allow horizontal scrolling if content overflows */
        white-space: nowrap; /* Prevent wrapping of header items */
    }

    header .logo {
        margin-right: 10px; /* Reduce margin for better fit */
    }

    header .logo img {
        width: 15vw; /* Adjust logo size for smaller screens */
        max-width: 120px; /* Ensure the logo does not get too large */
    }

    nav ul {
        gap: 10px; /* Reduce gap between navigation items */
    }

    nav ul li a {
        padding: 10px;
        font-size: 0.9rem; /* Adjust font size for smaller screens */
    }

    main {
        padding-top: calc(60px + 10px); /* Adjust padding-top to ensure no overlap with fixed header */
    }

    footer {
        padding: 15px 10px;
    }

    footer .social-media {
        gap: 10px;
    }

    #gallery {
        padding: 10px;
    }

    .gallery-grid {
        grid-template-columns: 1fr; /* Stack items in a single column on mobile */
    }

    .gallery-item img {
        max-width: 100%;
        height: auto;
    }
}