/* --- GLOBAL RESET & VARIABLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Lexend", sans-serif;
}

:root {
    --main-background: #18181a;
    --main-text: #F3F5F7;
    --accent: #435ade;
    --col-2: #58585f;
    --col-3: #6d6d75;
    --col-4: #91919b;
}

body {
    background-color: var(--main-background);
    padding-top: 5rem;
}

/* --- NAVBAR BASE --- */
.navbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 15%;
    background-color: var(--accent);
    color: var(--main-text);
    z-index: 100;
    position: fixed;
    top: 0;
    height: 5rem;
}

#navtext { cursor: pointer; }

/* --- SEARCH BAR CONTAINER --- */
.navbar_container_center {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 2rem;
    position: relative; /* Crucial for results alignment */
    z-index: 101;
}

/* The White Bar */
#search_bar {
    display: flex;
    align-items: center;
    background-color: var(--main-text);
    border-radius: 1.5rem;
    padding: 0 1rem;
    height: 3rem;
    width: 100%;
}

.navbar_container_center img { height: 1.5rem; margin-right: 0.5rem; }

.navbar_container_center input {
    border: none;
    background-color: transparent;
    width: 100%;
    height: 100%;
    color: var(--main-background);
    font-size: 1rem;
    outline: none;
}

/* --- SEARCH RESULTS --- */
.search_results_list {
    display: none; /* Hidden by default */
    position: absolute;
    top: 3.5rem; /* Sits right under the white bar */
    left: 0;
    width: 100%;
    background-color: var(--main-text);
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    max-height: 300px;
    overflow-y: auto;
}

.navbar_container_center.active .search_results_list {
    display: flex;
    flex-direction: column;
}

.search_item {
    display: flex;
    flex-direction: column; /* Stacks text vertically */
    padding: 0.8rem 1rem;
    color: var(--main-background);
    text-decoration: none;
    transition: background 0.2s;
    border-radius: 0.5rem;
}

.search_item b, 
.search_item strong {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.search_item span {
    font-size: 0.75rem; /* Small font */
    color: #888; /* Soft gray */
    text-transform: lowercase; /* Keeps it clean */
    display: block;
    margin: 0;
    opacity: 1; /* Ensure it's not too faded */
}

.search_item:hover {
    background-color: #cecece;
}

/* --- RIGHT LINKS --- */
.navbar_container_right { display: flex; gap: 2rem; }
.navbar_container_right a { text-decoration: none; color: var(--main-text); }

/* --- HAMBURGER --- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.hamburger span { width: 25px; height: 3px; background-color: var(--main-text); }

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 1100px) { .navbar { padding: 0 5%; } }

@media (max-width: 768px) {
    .navbar { padding: 0 1.5rem; }
    .hamburger { display: flex; }

    /* Hide desktop version of search/links */
    .navbar_container_center, 
    .navbar_container_right {
        display: none;
    }

    /* Mobile Dropdown Open State */
    .navbar.menu-open .navbar_container_center {
        display: flex;
        position: absolute;
        top: 5rem;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 1rem 1.5rem;
        background-color: var(--accent); /* Keeps background blue */
    }

    .navbar.menu-open .navbar_container_right {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 10rem; /* Below the search container */
        left: 0;
        width: 100%;
        background-color: var(--accent);
        padding: 0 1.5rem 2rem 1.5rem;
        gap: 0;
    }

    .navbar_container_right a {
        padding: 1.2rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* Results stay white on mobile too */
    .search_results_list {
        top: 4.5rem;
        width: calc(100% - 3rem);
        left: 1.5rem;
    }
}