.job-filter-controls {
    margin-bottom: 20px;
	max-width: 1200px;
    margin: 0 auto 30px;
}

/* Existing Modal styling */
.job-filter-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #070707;
}

.job-filter-modal-content {
    background-color: #333;
    margin: 5dvh auto;
    padding: 20px;
    /* Set a small bottom padding just to provide some spacing above the button if needed */
    padding-bottom: 20px;
    border: solid 5px #ccb145;
    max-width: 90vw;
    border-radius: 10px;
    position: relative;
    height: 90dvh;
    overflow-y: hidden;
}

.job-filter-close {
	color: #aaa;
    float: right;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    margin: 0px -5px 0 15px;
    line-height: 10px;
}

.job-filter-close:hover,
.job-filter-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.job-filter-form {
    display: flex;
    flex-direction: row;
    gap: 1%;
    margin-top: 10px;
}

.job-filter-form h4 {
    margin: 10px 0 5px;
    color: #fff;
}


.job-filter-form label {
    margin-right: 15px;
}

/* Existing dropdown rules (if applicable) */
.filter-checkboxes {
    display: block;
}
.filter-dropdown-container {
    display: none;
}
@media (max-width: 728px) {
    .filter-checkboxes {
        display: none;
    }
    .filter-dropdown-container {
        display: block;
    }
}

/* New CSS for Grid Layout and Tabs */

/* Each filter section for Paikkakunnat and Toimialat */
.filter-section {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccb145;
    border-radius: 5px;
    background-color: #444;
	margin-top: 30px;
	overflow-y: scroll;
	max-height: 75dvh;
}

#paikkakunnat {
		width: 58%;
		float: left;
}

#toimialat {
		width: 42%;
		float: left;
		height:100%;
}

/* width */
.filter-section::-webkit-scrollbar {
  width: 8px;
	border-radius: 5px;
}

/* Track */
.filter-section::-webkit-scrollbar-track {
  	background: #464646;
	border-radius: 5px;
}

/* Handle */
.filter-section::-webkit-scrollbar-thumb {
  background: #ccb145;
	border-radius: 5px;
}

/* Handle on hover */
.filter-section::-webkit-scrollbar-thumb:hover {
  background: #555;
	border-radius: 5px;
}


/* Checkbox groups arranged using flex in column direction */
.checkbox-group {
    display: flex;
    gap: 0px;
    margin-bottom: 10px;
    flex-direction: column;
}

/* Parent grid to arrange groups; using the .filter-section as grid container */
.filter-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px 0px;
}

.filter-section h4 {
    grid-column: 1 / -1; /* Makes the first div span all columns */
    width: 100%; /* Ensures it takes the full width */
    text-align: left; /* Optional: Center align text */
    font-weight: bold;
}

/* Mobile Tabbed Interface */
.tabs {
    display: none;
}
.tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    background-color: #555;
    color: #fff;
    cursor: pointer;
    border: 1px solid #ccb145;
}
.tab.active {
    background-color: #ccb145;
    color: #333;
}

/* Suodata button now inside modal content; style as block element at bottom of form */
.suodata-button {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ccb145;
    color: #333;
    text-align: center;
    padding: 10px 0;
    font-weight: bold;
    border-top: 1px solid #333;
    z-index: 10; /* Ensure it stays on top */
}
.suodata-button {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ccb145;
    color: #333;
    text-align: center;
    padding: 10px 0;
    font-weight: bold;
    border-top: 1px solid #333;
    z-index: 10;
	max-width: 90vw;
    margin: 0 5vw 5px;
    border-radius: 0px 0px 10px 10px;
}
.suodata-button button:hover {
    background-color: #a88c33;
}

/* Mobile adjustments: show tabs and display one section at a time */
@media (max-width: 728px) {
    .tabs {
        display: flex;
        margin-bottom: 10px;
    }
    .filter-section {
        display: none;
    }
    .filter-section.active {
        display: block;
    }
	
	.job-filter-modal-content {
    	max-width: 95vw;
		padding: 20px 12px;
	}
	
	.suodata-button {
		margin: 0 2.5vw 5px;
		max-width: 95vw;
	}
	
	.job-filter-close {
    margin: 20px 0px 0 15px;
	}
	
	#paikkakunnat {
		width: 100%;
		float: left;
	}

	#toimialat {
		width: 100%;
		float: left;
	}
	.filter-section {
	margin-top: 10px;
	}
}
