/* Import Open Sans font */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wdth,wght@0,75..100,300..800;1,75..100,300..800&display=swap');

/* Global font family */
.job-list-container,
.job-list-container *,
.job-application-modal,
.job-application-modal * {
    font-family: 'Open Sans', Arial, sans-serif !important;
}

input, select, textarea {
    border: 1px solid #ddd !important;
}

/* Job List Container */
.job-list-container {
    direction: rtl;
    text-align: right;
    margin-bottom: 40px;
}

.job-list-title {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Job Filters */
.job-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 5px;
}

.job-filter {
    flex: 1;
    min-width: 0;
}

.job-category-select,
.job-search-input {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
}

/* Job List */
.job-list {
    display: block;
    margin-bottom: 10px;
}

/* Job Card */
.job-card {
    background-color: #fff;
    border-radius: 35px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

.job-card-content {
    padding: 0 20px 20px;
    font-size: 16px;
    line-height: 24px;
}

.job-card-header {

}

.job-card-title {
    font-family: "Open Sans", Sans-serif;
    border-radius: 8px 8px 0 0;
    font-size: 22px;
    margin: 0 0 15px 0;
    color: #fff !important;
    font-weight: bold !important;
    background-image: linear-gradient(120deg, #faa916 0%, #449dd1 85%);
    padding: 10px 20px;
}

.job-card-location-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.job-card-meta-label {
    font-weight: bold;
    margin-left: 5px;
}

.job-card-description-section, .job-card-requirements-section {
    margin-bottom: 20px;
}

.job-card-description-header, .job-card-requirements-header {
    font-weight: bold;
    color: #2a2a2a;
    margin-bottom: 0;
}

.job-card-description, .job-card-requirements {
    line-height: 1.2;
    color: #000;
}

.job-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.job-card-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.job-card-info-item {
    display: flex;
    align-items: center;
}

.job-apply-btn {
    background-image: linear-gradient(120deg, #faa916 0%, #449dd1 85%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-image 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}

.job-apply-btn:hover {
    background-image: linear-gradient(120deg, #d3a44f 0%, #319ed9 85%);
}

/* Application Modal */
.job-application-modal {
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
}

.job-application-modal.modal-open {
    display: flex;
}

.job-application-modal-content {
    background-color: #fff;
    max-width: 600px;
    width: 90%;
    box-shadow: 2px 8px 23px 3px rgba(0,0,0,.2);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    margin: 0;
    background-image: url('../img/gness-form-background-image.png');
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
}

.job-application-modal .modal-content {
    background-color: transparent;
}

.dialog-header {
    padding: 15px 20px;
    box-shadow: 0 0 8px rgba(0,0,0,.1);
    color: #fff !important;
    background-image: linear-gradient(120deg, #faa916 0%, #449dd1 85%);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dialog-header-content h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1;
    font-weight: 600;
}

.dialog-lightbox-close-button {
    cursor: pointer;
    font-size: 22px;
    color: #fff;
    transition: all .3s;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: none;
    background: none;
}

.dialog-lightbox-close-button:hover {
    color: #afafaf;
    background: none;
}

.dialog-lightbox-close-button i {
    font-size: 22px;
    line-height: 1;
    display: block;
}

/* If Elementor icons are not loading properly, use a fallback X */
.dialog-lightbox-close-button i.eicon-close:before {
    content: "×";
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 24px;
}

/* RTL fix */
.job-application-modal[dir="rtl"] .dialog-lightbox-close-button,
body.rtl .dialog-lightbox-close-button {
    right: auto;
    left: 15px;
}

.dialog-message {
    padding: 25px;
}

.job-application-form {
    color: #000;
}

.job-application-form .form-row {
    display: flex;
    gap: 20px;
}

.job-application-form .form-column {
    flex: 1;
}

.job-application-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #000;
    font-size: 17px;
}

.job-application-form input[type="text"],
.job-application-form input[type="email"],
.job-application-form input[type="tel"] {
    width: 100%;
    border-radius: 15px;
    color: #000;
    margin-bottom: 5px;
    padding: .5rem 1rem;
    line-height: 1;
    text-align: right;
}

/* Upload section styling */
.upload-section {
    align-items: center;
}

.upload-label {
    font-weight: 500;
}

.resume-upload-btn {
    flex: 1;
    display: inline-block;
    padding: 11px 12px;
    background-image: linear-gradient(120deg, #faa916 0%, #449dd1 85%);
    color: #fff !important;
    transition: background-image 0.2s ease;
    border-radius: 25px;
    cursor: pointer;
    text-align: center;
}

.resume-upload-btn:hover {
    background-image: linear-gradient(120deg, #d3a44f 0%, #319ed9 85%);
}


.resume-upload-btn:hover {
    background-color: #333;
}

.file-name-display {
    margin-top: 8px;
    display: block;
    color: #000;
}

/* Job number section styling */
.job-number-section {
    margin: 0;
}

.job-number-section label {
    display: block;
    margin-bottom: 8px;
    color: #000;
    font-weight: 500;
}

#job-number {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    background-color: #f5f5f5 !important;
    color: #000 !important;
    margin-left: 0 !important;
    line-height: 1;
}

/* Consent section styling */
.consent-section {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 7px;
}

.consent-section label {
    color: #000;
    font-weight: normal;
}

/* Submit button styling */
.submit-application-btn {
    width: 100%;
    padding: 8px 12px;
    background-image: linear-gradient(120deg, #faa916 0%, #449dd1 85%);
    color: #fff;
    transition: background-image 0.2s ease;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 20px;
}

.submit-application-btn:hover {
    background-image: linear-gradient(120deg, #d3a44f 0%, #319ed9 85%);
    transition: all 0.2s ease;
}

.submit-application-btn:hover {
    background-color: #333;
}

/* Modal title styling */
.dialog-header-content h2 {
    color: #fff;
}

/* Loading state */
.job-loading {
    padding: 30px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 5px;
    color: #666;
}

/* Pagination */
.job-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 4px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.page-numbers.current {
    background-color: #000;
    color: white;
}

.page-numbers:hover:not(.current) {
    background-color: #e0e0e0;
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .job-filters {
        flex-wrap: wrap;
    }
    
    .job-filter {
        min-width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .job-application-modal-content {
        width: 95%;
        margin: 0;
    }
    
    .dialog-message {
        padding: 15px;
    }
    
    .job-card-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .job-apply-btn {
        align-self: flex-end;
    }
}

/* No results message */
.job-no-results {
    padding: 30px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 5px;
    color: #666;
}

/* Make all text inputs use Open Sans */
input, select, button, textarea {
    font-family: 'Open Sans', Arial, sans-serif;
}

/* Hide the actual file input */
#resume-upload {
    display: none;
}

.job-application-modal .dialog-header, .job-application-modal .dialog-message {
    font-family: 'Open Sans', Arial, sans-serif !important;
}

/* Form input styling */
.job-application-form input[type="text"],
.job-application-form input[type="email"],
.job-application-form input[type="tel"] {
    font-family: 'Open Sans', Arial, sans-serif !important;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 15px;
}