:root {
    --blue: #1E3A8A;
    --light-purple: #E6E6FA;
    --orange: #F5A623;
    --yellow: #FFD700;
    --white: #FFFFFF;
    --black: #000000;
    --gray: #808080;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--light-purple);
    position: relative; /* For absolute positioning of popup */
}

header {
    background: var(--blue);
    color: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 60px;
}

header h1 {
    margin: 0;
    font-size: 24px;
}

nav {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-left: auto;
}

nav button, nav input {
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.career-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.career-choice span {
    color: var(--white);
    font-size: 14px;
}

.career-search-box {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--white), #f0f0f5);
    border: 1px solid var(--gray);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.input-wrapper {
    position: relative;
    width: 250px; /* Match input width */
}

#career-search {
    background: transparent;
    color: var(--black);
    border: none;
    width: 100%;
    padding: 8px 30px 8px 15px; /* Space for clear button */
    outline: none;
    font-style: italic;
}

#career-search:focus {
    background: var(--white);
    font-style: normal;
}

#career-search[list="career-suggestions"]::-webkit-datalist {
    max-height: 200px;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--gray);
    border-radius: 5px;
}

#career-suggestions {
    max-height: 200px;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--gray);
    border-radius: 5px;
}

#career-suggestions option {
    padding: 8px;
    color: var(--black);
}

#clear-btn {
    display: none; /* Hidden by default */
    background: transparent;
    color: var(--gray);
    border: none;
    font-size: 16px;
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    line-height: 1;
}

#clear-btn:hover {
    color: var(--orange);
}

#search-btn {
    background: linear-gradient(135deg, var(--blue), #2a4db9);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#search-btn:hover {
    /*background: linear-gradient(135deg, #2a4db9, var(--blue));*/
    transform: translateY(-1px);
	background: var(--orange);
}

.content-layout {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 0 30px 0;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-end; /* Align content at the bottom */
}

.mission-container {
    flex: 0 0 100%; /* Full width for mission title */
    text-align: center;
    order: -1; /* Move to the top */
    margin-bottom: 20px;
}

.mission-container h1 {
    margin: 20px 0;
    font-size: 28px;
    color: var(--black);
}

.subheader-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 20px;
}

.flowchart-subheader {
    color: var(--black);
    font-size: 20px;
    margin: 0 20px;
    text-align: center;
    text-decoration: underline;
    flex: 0 0 200px;
}

.description-subheader {
    color: var(--black);
    font-size: 20px;
    margin: 0 20px;
    text-align: center;
    text-decoration: underline;
    flex: 1;
    max-width: 600px;
}

.flowchart-section {
    flex: 0 0 200px; /* Fixed width for flowchart */
    margin: 0 20px;
}

.flowchart {
    width: 100%;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    background: var(--light-purple);
    padding: 5px;
}

.circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-weight: bold;
    font-size: 16px;
    margin: 15px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.circle.blue {
    background: var(--blue);
}

.circle.yellow {
    background: var(--yellow);
}

.circle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--orange);
}

.arrow {
    font-size: 28px;
    color: var(--orange);
    margin: -10px 0 0 0;
    position: relative;
    top: -5px;
}

.description-section {
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
}

main {
    flex: 1;
}

h2 {
    color: var(--black);
    font-size: 28px;
    margin-bottom: 20px;
}

h2 .highlight-blue {
    color: var(--blue);
}

.category {
    margin-bottom: 30px;
}

.category h3 {
    color: var(--black);
    font-size: 22px;
    margin-bottom: 15px;
}

.category h3 .highlight {
    color: var(--orange);
}

.category dl {
    margin: 0;
}

.category dt {
    font-weight: bold;
    color: var(--orange);
    margin-top: 10px;
}

.category dd {
    margin: 0 0 10px 20px;
    color: var(--black);
}

.learn-more {
    background: var(--blue);
    color: var(--white);
    padding: 12px 25px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    margin-top: 20px;
    transition: background 0.3s ease;
    position: relative; /* For popup positioning reference */
}

.learn-more .highlight {
    color: var(--orange);
}

.learn-more:hover {
    background: var(--orange);
}

#custom-popup {
    display: none;
    position: absolute;
    background: var(--black);
    color: var(--white);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    font-size: 14px;
}

@media (max-width: 800px) {
    header {
        padding: 10px 15px;
    }

    header h1 {
        font-size: 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .career-search-box {
        flex-direction: row;
        gap: 5px;
        padding: 5px;
    }

    .input-wrapper {
        width: auto;
        flex: 1;
    }

    #career-search, #search-btn {
        width: auto;
        flex: 1;
        font-size: 12px;
        padding: 6px 25px 6px 10px; /* Adjusted for mobile */
    }

    #career-search[list="career-suggestions"]::-webkit-datalist {
        max-height: 150px;
        overflow-y: auto;
    }

    #career-suggestions {
        max-height: 150px;
        overflow-y: auto;
    }

    #clear-btn {
        font-size: 14px;
        right: 5px;
    }

    .flowchart-section {
        flex: 0 0 150px;
        margin: 0 10px;
    }

    .flowchart {
        padding: 10px;
    }

    .circle {
        width: 50px;
        height: 50px;
        font-size: 14px;
    }

    .arrow {
        font-size: 24px;
        margin: -8px 0 0 0;
        top: -3px;
    }

    .description-section {
        flex: 1;
        max-width: 100%;
        margin: 0 10px;
    }

    h2 {
        font-size: 24px;
    }

    .category h3 {
        font-size: 20px;
    }

    .category dt, .category dd {
        font-size: 14px;
    }

    .learn-more {
        font-size: 12px;
        padding: 5px 2px;
    }

    #custom-popup {
        font-size: 12px;
        padding: 8px;
    }
}

/* Add this to make .highlight-blue work globally */
.highlight-blue {
    color: var(--blue);
}

/* Attempt to hide default dropdown arrow in browsers */
#career-search {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* For Firefox */
#career-search::-ms-expand {
    display: none;
}