/* 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;
    margin-top: 100px;
    min-height: calc(100vh - 100px);
    height: calc(100vh - 100px);
}

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 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
    padding: 0 20px;
    background-color: #ffffff;
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px; /* space between hamburger and logo */
}

.header-right {
    display: flex;
    align-items: center;
}

.hamburger-menu {
    height: 34px;
    cursor: pointer;
}
/* Style for the site slogan */
.site-slogan {
    margin: 0;
    font-size: 2.3em;
    font-weight: bold;
    color: #303640;
    white-space: nowrap;
}

/* 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: 50px;
}


/* 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: #f00010;
        color: black;
        border: none;
        font-size: 1.2em;
        cursor: pointer;
    }


div.search-result:hover {
    background-color: #f00010; /* 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: #f00010;
    }

/* 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 */
}



/* 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: #f00010; /* 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;
}

.coming_soon_container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: calc(100vh - 100px);
    margin-top: 100px;
    padding: 20px;
    box-sizing: border-box;
}

.coming_soon {
    margin: 80px auto;
    padding: 20px;
    max-width: 500px;
    height: 140px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1.5;
    color: #FFFFFF;
    background-color: #808080;
    border: 5px solid #D1050C;
    border-radius: 20px;
    box-sizing: border-box;
}




@media (max-width: 640.98px) {

    /* Header: logo left, slogan+hamburger stacked on the right, all in one row */
    .site-header {
        height: 60px;
        padding: 0 10px;
    }

    .header-left {
        gap: 10px;
    }

    .header-right {
        display: flex;
        align-items: center;
    }

    .site-slogan {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
        white-space: nowrap;
    }

    /* 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, 50px);
        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 */

    /* 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 {
        flex-direction: row;
    }

    /* LEFT: hamburger + logo */
    .header-left {
        justify-content: flex-start;
    }

    /* RIGHT: slogan only */
    .header-right {
        justify-content: flex-end;
        flex: 1;
    }

    .site-slogan {
        font-size: 2.4em;
        text-align: right;
        margin: 0;
    }
    /* Right side of header: "Manuals" on top, hamburger below, both right-aligned */
    /*.header-bottom {
        display: flex;
        flex-direction: column-reverse;*/ /* puts the slogan on top, hamburger below */
        /*align-items: flex-end;*/ /* right-align */
        /*justify-content: center;
        gap: 6px;
    }*/

    .page {
        flex-direction: row;
        margin-top: 100px;
    }

    /*.hamburger-menu {
        display: none;*/ /* Hide on large screens */
    /*}*/


    /* When the page has .sidebar-hidden on wide screens, hide the sidebar */
    .page.sidebar-hidden .sidebar {
        display: none;
    }

}
