/* General Reset and Styling */

.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row ::deep a, .top-row .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
    }

    .top-row a:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }
.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 100px); /* Subtract header height */
    height: calc(100vh - 100px); /* Subtract header height */
}

main {
    flex-grow: 1; /* Allow main to take up remaining space */
    flex-shrink: 1; /* Allow main to shrink if needed */
    min-width: 0; /* Prevent horizontal overflow issues */
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    padding: 20px;
    background-color: white;
    box-sizing: border-box; /* Include padding in the width/height calculations */
}
html, body {
    font-family: 'Uni Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-y: hidden;
}

.login-overlay {
    position: fixed; /* Ensure it's fixed to the viewport */
    top: 0; /* Start at the very top */
    left: 0; /* Start at the very left */
    width: 100vw; /* Full viewport width */
    height: 100vh; /* Full viewport height */
    background-color: rgba(0, 0, 0, 0.9); /* Semi-transparent black background */
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    z-index: 9999; /* Ensure it's above all other elements */
}

.login-box {
    width: 300px;
    height: 200px;
    background-color: white;
    padding: 20px;
    box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5); /* Optional: Adds a shadow for better visibility */
    display: flex;
    flex-direction: column;
    justify-content: space-around; /* Adjusts spacing between elements */
}

    .login-box form {
        display: flex;
        flex-direction: column;
    }

    .login-box input[type="text"],
    .login-box input[type="password"],
    .login-box button {
        margin-bottom: 10px; /* Adds space between form elements */
    }

/* Style for the site header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
    background-color: #ffffff;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Style for the site slogan */
.site-slogan {
    margin: 0;
    font-size: 2.3em;
    font-weight: bold;
    color: #303640;
    white-space: nowrap;
}

/* Right-aligned container */
.header-right {
    display: flex;
    align-items: center;
}

/* Site header title (logo link) */
.site-header__title {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    margin-right: 20px;
}

/* Style for the site logo */
.site-logo {
    height: 34px;
}

/* Style for the hamburger menu */
.hamburger-menu {
    height: 34px;
    cursor: pointer;
}


/* Style for the main content area */
main {
    flex-grow: 1;
    background-color: white;
    padding: 20px;
    box-sizing: border-box;
    margin-top: 0;
}
.page {
    overflow-y: hidden !important;
}

/* Style for the results section */
.results {
    padding: 20px;
    box-sizing: border-box;
}

/* Style for the h3 to make it a bit smaller */
.search-parameters h3 {
    margin-bottom: 0.75rem; /* Adjust spacing below the heading */
}

/* General layout for search parameters and filter sections */
.search-parameters {
    margin-bottom: 4rem; /* More space between the two sections */
}

    /* Space between labels and controls */
    .search-parameters p,
    .filter-section p {
        margin: 0; /* Remove extra space above/below labels */
        font-style: oblique;
        font-weight: bold;
        margin-bottom: 0.25rem; /* Less space between label and the control */
    }

    /* Space between the controls and the next label */
    .search-parameters select,
    .search-parameters input[type="text"],
    .search-parameters button {
        margin-bottom: 1.5rem; /* More space below controls */
    }

    /* Make controls fill the entire width, respecting the 20px margin on the sidebar */
    .search-parameters select,
    .search-parameters input[type="text"],
    .search-parameters button {
        width: 100%; /* Fill the width, no extra margin needed */
        padding: 0.5rem;
        box-sizing: border-box; /* Ensure padding is inside the width */
    }

    /* Active button (enabled) styles */
    .search-parameters button {
        display: block;
        margin-top: 1rem; /* Space above the button */
        background-color: #90c300;
        color: black;
        border: none;
        font-size: 1.2em;
        cursor: pointer;
    }


div.search-result:hover {
    background-color: #90c300; /* Light green on hover */
}

/* Styling for the clickable h4 inside the entry box */
div.search-result h4 {
    font-size: 1.5rem;
    font-style: oblique;
    font-weight: bold;
    margin: .2rem 0 .5rem .3rem; /* Add some space between h4 and the list */
}

/* Styling for the fields */
div.search-result p {
    padding: 0.1rem;
    margin: 0.1rem;
    color: black;
}

/* Styling the nav links */
.nav-menu {
    padding: 0.25rem;
    margin-left: 0.1rem; /* Add 20px margin on the left */
    margin-right: 0.1rem; /* Add 20px margin on the right */
    width: 100%;

}

.nav-menu a {
    color: white;
    text-decoration: none; 
}

    .nav-menu a:hover {
        color: #90c300;
    }

/* First-level <li> styling */
.nav-menu > nav > ul > li > a {
    font-size: 120%;
    font-weight: bold;
    font-style: italic;
    color: darkgray;
    list-style-type: none;
}
.nav-menu > nav > ul > li {
    margin: 1em 0 0 0;
}

/* Nested <li> styling (second-level or deeper) */
.nav-menu li li {
    font-size: 100%;
    font-weight: normal;
    font-style: normal;
    list-style-type: square;
    color: white;
    margin: 0.3em 0;
}
/* Style for the sidebar */
.sidebar {
    background-color: #303640;
    color: white;
    padding: 20px;
    box-sizing: border-box;
    position: fixed; /* Ensure the sidebar remains in place */
    top: 0;
    left: 0; /* Align the sidebar to the left */
    height: 100vh; /* Full height of the viewport */
    width: 400px; /* Fixed width for wide screens */
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    z-index: 1000; /* Ensure it appears above the main content */
}


@media (max-width: 640.98px) {

    /* Header: logo left, slogan+hamburger stacked on the right, all in one row */
    .site-header {
        display: flex;
        flex-direction: row; /* row, not column */
        align-items: center;
        justify-content: space-between;
        width: 100%;
        position: fixed;
        height: 60px; /* keep if you rely on 134px elsewhere */
        top: 0;
        z-index: 1001;
        background-color: #ffffff;
        box-sizing: border-box;
        padding: 0 10px;
        flex-wrap: nowrap; /* don't wrap to second line */
    }

    /* Logo container */
    .site-header__title {
        width: auto; /* no forced 75% */
        margin-right: auto; /* push the right block to the edge */
    }

    /* Logo: responsive height, shrinks as screen narrows */
    .site-logo {
        height: clamp(24px, 6vw, 34px);
        object-fit: contain;
    }

    /* Right side: slogan on top, hamburger below, both right-aligned */
    .header-bottom {
        display: flex;
        flex-direction: column-reverse; /* slogan on top, hamburger below */
        align-items: flex-end; /* right-align both */
        justify-content: center;
        width: auto; /* IMPORTANT: no 100%, so it stays on same row as logo */
        gap: 4px;
        height: auto;
    }

    .hamburger-menu {
        display: block;
        height: 28px; /* slightly smaller on tiny screens */
        cursor: pointer;
    }

    /* Slogan: responsive font size */
    .site-slogan {
        margin: 0;
        font-size: clamp(1.2rem, 4vw, 1.8rem);
        font-weight: bold;
        white-space: nowrap;
        text-align: right; /* to match wide-screen style */
    }

    /* Sidebar for small screens (unchanged behavior) */
    .sidebar {
        position: fixed;
        top: 60px; /* still matching header height */
        left: 0;
        width: 90%;
        height: calc(100vh - 134px);
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .page.sidebar-hidden .sidebar {
        transform: translateX(0);
    }

    .page {
        display: flex;
        flex-direction: column;
        margin-top: 60px;
        min-height: calc(100vh - 134px);
    }
}




@media (min-width: 641px) {
    .sidebar {
        flex-shrink: 0;
        flex-grow: 0;
        position: relative;
        height: auto;
        width: 400px;
        transform: none; /* Sidebar always visible */
    }

    .site-header {
        position: relative;
        z-index: auto;
        height: 100px;
        width: 100%;
        margin: 0;
    }

    .site-slogan {
        font-size: 2.4em; /* Original font size */
    }

    .page {
        flex-direction: row;
        margin-top: 0; /* Reset margin-top */
    }

    .hamburger-menu {
        display: none; /* Hide on large screens */
    }
}

/* Styling for the entry box */
div.search-result {
    background-color: white;
    padding: 0.2rem;
    margin: 1rem 0;
    cursor: pointer; /* Make the whole box clickable */
    transition: background-color 0.3s ease;
}

a {
    text-decoration: none;
    color: #333;
}

div.search-result:hover {
    background-color: #90c300; /* Light green on hover */
}

/* Styling for the clickable h4 inside the entry box */
div.search-result h4 {
    font-size: 1.5rem;
    font-style: oblique;
    font-weight: bold;
    color: gray;
    margin: .2rem 0 .5rem .3rem; /* Add some space between h4 and the list */
}

/* Styling for the fields */
div.search-result p {
    padding: 0.1rem;
    margin: 0.1rem;
    color: black;
}
.comment-modal {
    display: none; /* Modal is hidden by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    width: 400px;
}

    .comment-modal textarea {
        width: 100%;
        margin-bottom: 10px;
    }

.comment-status {
    padding: 5px;
    border-radius: 4px;
}

.overlay {
    display: none; /* Overlay is hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.modal-buttons {
    margin-top: 10px;
}

.hidden {
    display: none;
}
.comment-button {
    display: inline-block;
    height: 35px;
    width: 120px;
    line-height: 35px; /* Center the text vertically */
    text-align: center; /* Center the text horizontally */
    color: black;
    text-decoration: none;
    border-radius: 8px; /* Rounded corners */
    font-size: 14pt;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s; /* Smooth hover effects */
    margin-right: 10px;
}

    .comment-button:hover {
        color: black;
        transform: scale(1.05); /* Slightly enlarge on hover */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow on hover */
    }
