/* Base Styles */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: #fff;
    font-family: 'Montserrat', sans-serif;
    color: #333;
}

/* Homepage Link Colors */
.home-page a {
    color: #5aa516;
}

.home-page a:hover {
    color: #0f5d02;
}

/* Navigation Link Active State */
.nav-link-active {
    color: #0f5d02 !important;
    border-bottom: 4px solid #fe5600 !important;
    font-weight: bold !important;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.logo {
    text-align: center;
    margin-bottom: 10px;
    z-index: 10; /* Ensure logo is in front */
    position: relative;
}

.logo img {
    max-height: 150px;
}

/* Hamburger Menu */
.hamburger {
    display: none; /* Hidden by default, displayed on smaller screens */
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-menu li {
    margin: 0 10px;
}

.nav-menu a {
    color: #007BFF;
    text-decoration: none;
    font-size: 1rem;
}

.nav-menu a:hover {
    text-decoration: underline;
}

/* Navigation Container */
.nav-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 10px 0;
    z-index: 10; /* Ensure navigation is in front */
    position: relative;
}

.nav-link {
    color: #5aa516;
    text-decoration: none;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: #0f5d02;
    background-color: rgba(90, 165, 22, 0.1);
}

.nav-link i {
    margin-right: 5px;
}

/* Search Bar and Button */
.search-container {
    margin: 20px auto;
}

.search-bar {
    width: 80%;
    max-width: 600px;
    margin: 20px auto;
    display: flex;
    align-items: stretch;
}

.search-bar input {
    padding: 10px;
    flex: 1;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 5px 0 0 5px;
    color: #333;
    font-size: 16px;
}

.search-button {
    background-color: rgb(90, 165, 22); /* Button color */
    border: 1px solid #ccc; /* Match the input field's border */
    border-left: none; /* Merge with input field */
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button i {
    color: rgb(15, 92, 2); /* Icon color */
    font-size: 20px;
    text-shadow: 1px 1px 2px white; /* White highlights */
}

.search-button:hover {
    background-color: rgb(75, 150, 20); /* Slightly darker green on hover */
}

/* Ensure consistent height */
.search-bar input,
.search-button {
    height: 48px;
}

/* Featured Title */
.featured-title {
    font-size: 2rem;
    margin: 20px auto;
    text-align: center;
    color: #333;
}

/* Carousel Styles */
.carousel-container {
    margin: 40px auto;
    max-width: 800px;
    position: relative;
}

.carousel {
    position: relative;
    width: 100%;
    background-color: black; /* Black background for letterboxing */
}

.slide {
    display: none;
    width: 100%;
    text-align: center;
}

.slide.active {
    display: block;
}

.slide img {
    max-width: 100%;
    max-height: 500px; /* Set maximum height for the image */
    width: auto;
    height: auto;
    object-fit: contain; /* Ensure images are resized without cropping */
    background-color: black;
}

/* Blurb Below the Carousel */
.blurb {
    background-color: #000;
    color: #fff;
    font-size: 1rem;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prev-slide,
.next-slide {
    cursor: pointer;
    color: #fff;
    font-size: 2rem;
    user-select: none;
    background-color: transparent;
    border: none;
    padding: 0 10px;
}

.blurb-content {
    text-align: center;
    flex: 1;
}

.blurb-text {
    margin: 0;
}

.slide-number {
    font-size: 0.9rem;
    color: #fff;
    margin-top: 5px;
}

/* Large Image View Styles */
.large-image-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 999;
    flex-direction: column;
}

.large-image-view img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

.large-image-caption {
    color: #fff;
    margin-top: 10px;
    font-size: 18px;
    text-align: center;
}

/* Footer Styles */
footer {
    margin-top: 40px;
    padding: 20px 0;
    font-size: 1rem;
    color: #999;
    text-align: center;
}

footer a {
    color: #007BFF;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    /* Adjust carousel for smaller screens */
    .carousel-container {
        width: 100%;
        margin: 20px auto;
    }

    .carousel {
        width: 100%;
    }

    .slide img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
        background-color: black;
    }

    /* Stack search bar and create button vertically */
    .search-create-row {
        flex-direction: column;
        width: 90%;
        align-items: stretch;
    }

    .search-create-row .create-dropdown-wrapper {
        width: 100%;
    }

    .search-create-row .create-dropdown-wrapper > button {
        width: 100%;
        justify-content: center;
    }

    /* Fix the search bar layout */
    .search-bar {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }

    .search-bar input {
        width: 100%;
        margin-bottom: 10px;
        border-radius: 5px;
        border: 1px solid #ccc;
        height: 48px; /* Ensure consistent height */
        box-sizing: border-box;
    }

    .search-button {
        width: 100%;
        border-radius: 5px;
        padding: 10px;
        border: 1px solid #ccc;
        height: 48px; /* Ensure consistent height */
        box-sizing: border-box;
    }

    .search-button i {
        margin: 0 auto;
    }

    /* Ensure the right border of the search field is visible */
    .search-bar input {
        border-right: 1px solid #ccc;
    }

    /* Responsive navigation container */
    .nav-container {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        padding: 10px;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        margin: 2px 0;
    }

    /* Adjust navigation menu */
    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        padding: 10px;
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .hamburger .bar {
        width: 25px;
        height: 3px;
        background-color: #333;
        margin: 4px 0;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: #fff;
        border: 1px solid #ccc;
        z-index: 1000;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #ccc;
        margin: 0;
    }

    .nav-menu a {
        padding: 15px;
        width: 100%;
        display: block;
        color: #007BFF;
        text-decoration: none;
    }

    .nav-menu a:hover {
        background-color: #f0f0f0;
    }

    /* Adjust logo size */
    .logo img {
        max-height: 100px;
    }

    /* Footer adjustments if needed */
    footer {
        font-size: 0.9rem;
    }
}
