/* --- CONTAINER LAYOUT --- */
.search-hdr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 24px auto;
    width: 70%;
    max-width: 900px;
}

/* --- FORM STYLING --- */
.search-hdr-container form {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 20px;
    background-color: #f1f1f1;
    border-radius: 50px;
    width: 100%;
    margin: 0 auto;
    border: 1px solid transparent;
}

/* --- INPUT GROUP --- */
.input-group.search-input {
    display: flex;
    align-items: center;
    background-color: inherit;
    border-radius: 25px;
    padding: 0 10px;
    height: 40px;
    flex: 4.5;
    position: relative;
}

.input-group.search-input i {
    margin-right: 8px;
    font-size: 1.2rem;
    color: #555;
    display: flex;
    align-items: center;
}

.input-group.search-input input[type="text"] {
    border: none;
    outline: none;
    width: 80%;
    height: 100%;
    line-height: normal;
    background: transparent;
    font-size: 1rem;
    padding: 0 4px;
}

/* --- CLEAR BUTTON --- */
.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    cursor: pointer;
    color: #555;
    font-size: 1rem;
    z-index: 2;
}

.clear-btn:hover {
    color: #000;
}

.input-group.search-input input:not(:placeholder-shown) + .clear-btn {
    display: block;
}

/* --- SEARCH BUTTON (optional) --- */
.search-btn {
    padding: 8px 18px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.search-btn:hover {
    background-color: #0056b3;
}

/* --- FORM FOCUS EFFECT --- */
.search-hdr-container form:focus-within {
    border: 1px solid #cccccc;
    background-color: white;
}


/* --- SEARCH RESULTS --- */
.search-results-wrapper {
    width: 80%;
    max-width: 1200px;
    margin: 40px auto;
}


.results-header {
    display: inline-block;
    background-color: #E5E4E2;
    padding: 4px 8px;
    text-transform: uppercase;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 16px;
    border-radius: 8px;
}



.results-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}


.results-grid.top-five {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

/* --- JOB ITEM CARD --- */
.job-item {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    padding: 0; /* remove inner padding, use inner divs instead */
    aspect-ratio: 1 / 1; /* square */
    overflow: hidden;
    transition: all 0.2s ease;
}

.job-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* small shadow */
    border: 1px solid darkblue;
}


/* --- TOP HALF --- */
.job-item .top-section {
    flex: 0 0 30%; /* 30% height */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* code anchored bottom */
    align-items: center;
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #eee; /* optional divider */
}

.job-item .top-section .job-title {
    font-weight: 600;
    font-size: 1rem;
}

.job-item .top-section .job-code {
    font-size: 0.9rem;
    color: #555;
    margin-top: 4px;
}

/* --- BOTTOM HALF --- */
.job-item .bottom-section {
    flex: 1; /* take remaining 70% */
    padding: 8px;
    text-align: center;
    overflow-wrap: break-word; /* wrap long text */
    display: flex;
    align-items: flex-start; /* anchor at top */
    justify-content: center;
}

.job-item .bottom-section .specific-title {
    font-size: 0.85rem;
    color: #333;
    line-height: 1.2;
}

.results-grid .job-item {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* top half / bottom half */
    align-items: center;
    text-align: center;
    padding: 10px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    transition: all 0.2s ease;
}

.results-grid .job-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid darkblue;
}
