/* D40 Compleet Jobs Frontend Styles */

/* Simple Search Box */
.d40-simple-search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: auto;
}

.d40-simple-search-container {
    display: flex;
    gap: 10px;
    width: 100%;
}

.d40-simple-search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 100px;
    font-size: 16px;
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

.d40-simple-search-input:focus {
    outline: none;
    border-color: var(--e-global-color-7f82147, #667eea);
}

.d40-simple-search-button {
    padding: 12px 30px;
    background: var(--e-global-color-7f82147, #667eea);
    color: white;
    border: 2px solid var(--e-global-color-7f82147, #667eea);
    border-radius: 5px;
    font-weight: 600;
    font-size: 16px;
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.d40-simple-search-button:hover {
    color: var(--e-global-color-7f82147);
    background-color: #FFFFFF;
    border-color: var(--e-global-color-7f82147);
}

/* Simple Search Box Mobile */
@media (max-width: 768px) {
    .d40-simple-search-container {
        flex-direction: column;
    }
    
    .d40-simple-search-input {
        width: 100%;
    }
    
    .d40-simple-search-button {
        width: 100%;
    }
}

/* Container */
.d40-job-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Header */
.d40-job-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    text-align: center;
}

.d40-header-content {
    flex: 1;
    text-align: center;
}

h2.d40-job-title {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    line-height: 1;
}

.d40-job-id {
    margin-bottom: 15px;
}

.d40-job-meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.d40-job-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.d40-header-image {
    flex-shrink: 0;
}

.d40-featured-image {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
}

/* Main Grid */
.d40-job-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar */
.d40-job-sidebar {
    background: #f8f9fa;
    padding: 30px 25px;
    border-radius: 8px;
    text-align: center;
}

.d40-sidebar-image-top {
    margin-bottom: 25px;
    text-align: center;
}

.d40-sidebar-image-top img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.d40-job-sidebar > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.d40-job-sidebar img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.d40-job-sidebar-section {
    margin-bottom: 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.d40-job-sidebar-section:last-child {
    margin-bottom: 0;
}

.d40-sidebar-icon {
    margin-bottom: 10px;
    width: 40px;
    height: 40px;
}

h3.d40-sidebar-title {
    margin: 0 0 5px 0;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 600;
    text-align: center;
}

.d40-sidebar-text {
    margin: 0;
    color: #666;
    text-align: center;
}

.d40-sidebar-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

/* Job Info Section */
.d40-job-info {
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.d40-job-info:last-child {
    border-bottom: none;
}

/* Text Module Section */
.d40-textmodule-section {
    margin-bottom: 40px;
    padding: 20px 0;
}

.d40-textmodule-section p {
    color: #555;
}

.d40-textmodule-section p b {
    color: var(--e-global-color-7f82147);
}

.d40-textmodule-section:last-child {
    border-bottom: none;
}

.d40-textmodule-section h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--e-global-color-7f82147);
}

.d40-section-title {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    color: var(--e-global-color-7f82147);
}

.d40-textmodule-content {
    line-height: 1.8;
    color: #555;
}

.d40-textmodule-content p {
    margin-bottom: 15px;
}

.d40-textmodule-content b,
.d40-textmodule-content strong {
    font-weight: 600;
}

.d40-textmodule-content u {
    text-decoration: underline;
}

/* Bottom Info Section */
.d40-bottom-info {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.d40-bottom-info-title {
    margin-bottom: 20px;
}

.d40-job-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.d40-job-info-table tr {
    border-bottom: 1px solid #ddd;
}

.d40-job-info-table tr:last-child {
    border-bottom: none;
}

.d40-info-heading {
    padding: 10px 0;
    padding-right: 30px;
    font-weight: 600;
}

.d40-info-value {
    padding: 10px 0;
    font-weight: 400;
}

.d40-contact-title {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.d40-contact-person {
    margin-bottom: 20px;
}

.d40-contact-email {
    color: var(--e-global-color-7f82147, #667eea);
}

.d40-apply-section-center {
    text-align: center;
    margin: 30px 0 20px 0;
}

.d40-callback-link {
    text-align: center;
}

.d40-callback {
    color: #27617e;
    text-decoration: none;
}

.d40-required {
    color: red;
}

.d40-privacy-link {
    color: #27617e;
}

/* Apply Section */
.d40-apply-section {
    margin-bottom: 30px;
    text-align: center;
}

/* Apply Button */
a.d40-apply-button {
    display: inline-block;
    background: var(--e-global-color-7f82147, #667eea);
    color: white;
    padding: 15px 50px;
    border-radius: 100px 100px 100px 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.2s;
    border: 2px solid var(--e-global-color-7f82147, #667eea);
}

a.d40-apply-button:hover {
    color: var(--e-global-color-7f82147);
    background-color: #FFFFFF;
    border-color: var(--e-global-color-7f82147);
}

/* Modal */
.d40-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.d40-modal.active {
    display: flex;
}

.d40-modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.d40-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.d40-modal-close:hover {
    color: #333;
}

.d40-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.d40-modal-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    display: none;
}

.d40-application-form .d40-form-group {
    margin-bottom: 20px;
}

.d40-application-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.d40-application-form input[type="text"],
.d40-application-form input[type="email"],
.d40-application-form input[type="tel"],
.d40-application-form input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.d40-application-form input:focus {
    outline: none;
    border-color: var(--e-global-color-7f82147, #667eea);
}

.d40-application-form .d40-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.d40-application-form input[type="checkbox"] {
    width: auto;
}

button.d40-modal-submit {
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    display: inline-block;
    background: var(--e-global-color-7f82147, #667eea);
    color: white;
    padding: 15px 50px;
    border-radius: 100px 100px 100px 100px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.2s;
    border: 2px solid var(--e-global-color-7f82147, #667eea);
    cursor: pointer;
}

button.d40-modal-submit:hover {
    color: var(--e-global-color-7f82147);
    background-color: #FFFFFF;
    border-color: var(--e-global-color-7f82147);
    border-width: 2px;
}

button.d40-modal-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Filter Section */
.d40-job-filter {
    margin-bottom: 30px;
}

.d40-filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.d40-filter-field {
    flex: 1;
    min-width: 200px;
}

.d40-filter-field input,
.d40-filter-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
    color: #333;
    background-color: #fff;
}

.d40-filter-field input:focus,
.d40-filter-field select:focus {
    outline: none;
    border-color: var(--e-global-color-7f82147, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.d40-filter-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
    padding-right: 30px;
}

/* Search/Filter Button */
button.d40-filter-submit {
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 22px;
    color: white;
    background-color: var(--e-global-color-7f82147, #667eea);
    border-color: var(--e-global-color-7f82147, #667eea);
    border-style: solid;
    border-width: 2px 2px 2px 2px;
    padding: 20px 30px;
    align-self: stretch;
    cursor: pointer;
    border-radius: 100px 100px 100px 100px;
    transition: all 0.2s;
}

button.d40-filter-submit:hover, button.d40-filter-submit:focus {
    color: var(--e-global-color-7f82147);
    background-color: #FFFFFF;
    border-color: var(--e-global-color-7f82147);
    border-width: 2px;
}

button.d40-filter-reset {
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 22px;
    background: #f8f9fa;
    color: #333;
    padding: 20px 30px;
    border: 2px solid #ddd;
    border-radius: 100px 100px 100px 100px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s;
}

button.d40-filter-reset:hover {
    background: #e9ecef;
    border-width: 2px;
}

/* Results Section */
.d40-job-results {
    margin-top: 30px;
}

.d40-results-loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.d40-job-item {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.d40-job-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

h3.d40-job-title, .d40-job-title a {
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.d40-job-title a:hover {
    text-decoration: underline;
}

.d40-job-meta {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.d40-job-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.d40-job-meta-item svg {
    color: var(--e-global-color-7f82147, #667eea);
}

.d40-job-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Job Details Button */
a.d40-job-apply-btn {
    font-family: "Montserrat", Sans-serif;
    width: 284px;
    padding: 10px 0px 10px 0px;
    color: var(--e-global-color-7f82147, #667eea);
    background-color: var(--e-global-color-164a950, #f0f0f0);
    border-style: solid;
    border-width: 2px 2px 2px 2px;
    border-color: var(--e-global-color-7f82147, #667eea);
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    display: inline-block;
    text-align: center;
    transition: all 0.2s;
}

a.d40-job-apply-btn:hover {
    background-color: var(--e-global-color-7f82147, #667eea);
    color: white;
}

/* Pagination */
.d40-results-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.d40-pagination-page {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    text-decoration: none;
    color: #333;
}

.d40-pagination-page:hover {
    background: #f8f9fa;
}

.d40-pagination-page.active {
    background: var(--e-global-color-7f82147, #667eea);
    color: white;
    border-color: var(--e-global-color-7f82147, #667eea);
}

.d40-pagination-page.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.d40-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {

    .d40-job-meta-list {
      text-align: left;
       } 

    .d40-job-container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .d40-job-header {
        flex-direction: column;
        text-align: center;
    }
    
    .d40-job-grid {
        grid-template-columns: 1fr;
    }
    
    .d40-job-sidebar {
        text-align: center;
    }
    
    .d40-bottom-info {
        grid-template-columns: 1fr;
    }
    
    h2 {
        font-size: 1.6em;
    }
    
    .d40-job-apply-btn {
        width: auto;
        padding: 10px 25px;
    }
}
