/* ==========================================================================
   Dynamics 360 Job Application Page Stylesheet
   ========================================================================== */

/* Main Container */
.job-apply-page-wrapper {
    background-color: #ffffff;
    width: 100%;
}

.job-apply-container {
    max-width: var(--home-content-max-width, 75.9375vw);
    margin: 0 auto;
    padding: 140px 15px 100px 15px; /* Spacing to clear header and footer */
}

/* Parallel Layout Grid */
.job-apply-row {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    position: relative;
}

/* Columns */
.form-column {
    flex: 1 1 45%;
    min-width: 0; /* Prevents flex items from overflowing */
}

.divider-column {
    flex: 0 0 1px;
    width: 1px;
    background-color: #e2e8f0;
    align-self: stretch;
    min-height: 100%;
}

.desc-column {
    flex: 1 1 50%;
    min-width: 0;
}

/* ==========================================================================
   Right Column: Job Description Styling
   ========================================================================== */
.job-desc-header {
    margin-bottom: 40px;
}

.job-desc-title {
    font-family: var(--font-heavy);
    font-weight: 900;
    font-size: clamp(2rem, 3.5vw, 3rem);
    line-height: 1.15;
    color: var(--text-black);
    margin-top: 0;
    margin-bottom: 24px;
}

.job-desc-meta {
    font-family: var(--font-regular);
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.6;
}

.job-desc-meta-item {
    font-weight: 500;
}

.job-desc-breadcrumbs {
    color: var(--text-gray);
    margin-top: 8px;
    font-size: 0.85rem;
}

.job-desc-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 30px 0;
}

/* Content Sections */
.job-desc-body {
    font-family: var(--font-regular);
    color: #2d3748;
    font-size: 1rem;
    line-height: 1.7;
}

.job-section {
    margin-bottom: 40px;
}

.job-section-title {
    font-family: var(--font-bold);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text-black);
    margin-top: 0;
    margin-bottom: 18px;
    letter-spacing: -0.01em;
}

.job-section p {
    margin-top: 0;
    margin-bottom: 16px;
    color: #4a5568;
}

.job-section ul {
    margin-top: 0;
    margin-bottom: 20px;
    padding-left: 20px;
    list-style-type: none; /* Custom bullets */
}

.job-section li {
    position: relative;
    margin-bottom: 12px;
    padding-left: 15px;
    color: #4a5568;
}

.job-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1.1;
    top: 2px;
}

/* ==========================================================================
   Right Column: WordPress Form Styling
   ========================================================================== */
.form-header {
    margin-bottom: 30px;
}

.form-title {
    font-family: var(--font-bold);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--text-black);
    margin-top: 0;
    margin-bottom: 10px;
}

.form-subtitle {
    font-family: var(--font-regular);
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 0;
}

/* WordPress Form Fields Alignment & Wrappers */
.job-application-form-wrap .wpcf7 form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.job-application-form-wrap .wpcf7 form p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
}

.job-application-form-wrap .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.job-application-form-wrap .wpcf7-label,
.job-application-form-wrap .wpcf7 form label {
    display: block !important;
    width: 100% !important;
    font-family: var(--font-bold) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: var(--text-gray) !important;
    margin-top: 20px !important;
    margin-bottom: 6px !important;
}

/* Style ALL inputs, selects, and textareas */
.job-application-form-wrap .wpcf7-form-control:not([type="submit"]):not([type="file"]),
.job-application-form-wrap .wpcf7 input:not([type="submit"]):not([type="file"]),
.job-application-form-wrap .wpcf7 select,
.job-application-form-wrap .wpcf7 textarea {
    width: 100% !important;
    background-color: var(--light-gray-bg) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    padding: 14px 18px !important;
    font-family: var(--font-regular) !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    color: var(--text-black) !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    margin-top: 4px !important;
}

.job-application-form-wrap .wpcf7-form-control:not([type="submit"]):not([type="file"]):focus,
.job-application-form-wrap .wpcf7 input:not([type="submit"]):not([type="file"]):focus,
.job-application-form-wrap .wpcf7 select:focus,
.job-application-form-wrap .wpcf7 textarea:focus {
    background-color: #ffffff !important;
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 3px rgba(52, 92, 173, 0.1) !important;
}

/* Reset nested fields that inherit label styles */
.job-application-form-wrap .wpcf7 form label input,
.job-application-form-wrap .wpcf7 form label select,
.job-application-form-wrap .wpcf7 form label textarea {
    font-family: var(--font-regular) !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Textarea custom sizing */
.job-application-form-wrap .wpcf7 textarea {
    min-height: 120px !important;
    resize: vertical !important;
}

/* File Upload Field Custom Styling */
.job-application-form-wrap .wpcf7-form-control[type="file"],
.job-application-form-wrap .wpcf7 input[type="file"] {
    display: block !important;
    width: 100% !important;
    padding: 10px 14px !important;
    background-color: var(--light-gray-bg) !important;
    border: 1px dashed #cbd5e0 !important;
    border-radius: 4px !important;
    font-family: var(--font-regular) !important;
    font-size: 0.85rem !important;
    color: var(--text-gray) !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    margin-top: 6px !important;
}

.job-application-form-wrap .wpcf7-form-control[type="file"]:hover,
.job-application-form-wrap .wpcf7 input[type="file"]:hover {
    border-color: var(--primary-blue) !important;
    background-color: #eef4ff !important;
}

/* CF7 Submit Button - Aligned with Theme */
.job-application-form-wrap .wpcf7-submit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: var(--font-bold) !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    line-height: 1 !important;
    padding: 14px 36px !important;
    background-color: var(--primary-blue) !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    width: auto !important;
    margin-top: 15px !important;
    box-shadow: none !important;
}

.job-application-form-wrap .wpcf7-submit:hover {
    background-color: transparent !important;
    border-color: var(--primary-blue) !important;
    color: var(--primary-blue) !important;
    transform: translateY(-2px) !important;
}

/* CF7 Success/Error messages formatting */
.job-application-form-wrap .wpcf7-response-output {
    margin: 15px 0 0 0 !important;
    padding: 12px 18px !important;
    border-radius: 4px !important;
    border: 1px solid transparent !important;
    font-family: var(--font-regular) !important;
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
}

.job-application-form-wrap .wpcf7-mail-sent-ok {
    border-color: #48bb78 !important;
    background-color: #f0fff4 !important;
    color: #38a169 !important;
}

.job-application-form-wrap .wpcf7-validation-errors {
    border-color: #ecc94b !important;
    background-color: #fffdf5 !important;
    color: #d69e2e !important;
}

.job-application-form-wrap .wpcf7-not-valid-tip {
    font-family: var(--font-regular) !important;
    font-size: 0.75rem !important;
    color: #e53e3e !important;
    margin-top: 4px !important;
    display: block !important;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

/* Tablet View (max-width: 991px) */
@media (max-width: 991px) {
    .job-apply-container {
        padding: 120px 15px 60px 15px;
    }
    
    .job-apply-row {
        flex-direction: column; /* Description on top, application form below naturally */
        gap: 50px;
    }
    
    .form-column,
    .desc-column {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .divider-column {
        display: none; /* Hide vertical separator */
    }
    
    /* Add a horizontal line instead */
    .desc-column::after {
        content: "";
        display: block;
        height: 1px;
        background-color: #e2e8f0;
        margin-top: 40px;
        width: 100%;
    }
}

/* Mobile View (max-width: 767px) */
@media (max-width: 767px) {
    .job-apply-container {
        padding: 100px 15px 40px 15px;
    }
    
    .job-desc-title {
        font-size: 1.8rem;
        margin-bottom: 16px;
    }
    
    .job-desc-meta {
        font-size: 0.85rem;
    }
    
    .job-section-title {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .form-title {
        font-size: 1.35rem;
    }
    
    .wpcf7-submit {
        width: 100% !important; /* Full width button on mobile */
    }
}
