/**
 * AK Job Portal - Frontend Stylesheet
 * Brand: AK Associates
 * Font: WordPress Theme Default with Georgia / Serif Fallback
 */

:root {
    --ak-primary: #1a1f36;
    --ak-primary-hover: #101426;
    --ak-gold: #d4af37;
    --ak-accent: #0284c7;
    --ak-urgent: #e03131;
    --ak-urgent-bg: #fff5f5;
    --ak-urgent-border: #ffc9c9;
    --ak-bg-light: #f8fafc;
    --ak-card-bg: #ffffff;
    --ak-text-main: #1e293b;
    --ak-text-muted: #64748b;
    --ak-border: #e2e8f0;
    --ak-font-stack: inherit, Georgia, 'Times New Roman', Times, serif;
    --ak-radius: 12px;
    --ak-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    --ak-shadow-hover: 0 12px 30px -4px rgba(15, 23, 42, 0.14);
}

.ak-job-portal-wrapper,
.ak-single-job-wrapper {
    font-family: var(--ak-font-stack);
    color: var(--ak-text-main);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.ak-job-portal-wrapper *,
.ak-single-job-wrapper * {
    box-sizing: border-box;
}

/* =========================================================
   1. FILTER & SEARCH BAR
   ========================================================= */
.ak-filter-container {
    background: #ffffff;
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius);
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.ak-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.ak-filter-col {
    flex: 1 1 200px;
}

.ak-search-input-wrap {
    position: relative;
    flex: 2 1 300px;
}

.ak-filter-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    opacity: 0.7;
    pointer-events: none;
}

.ak-search-input-wrap .ak-form-control {
    padding-left: 40px !important;
}

.ak-form-control {
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid var(--ak-border);
    border-radius: 8px;
    background-color: #fff;
    color: var(--ak-text-main);
    transition: all 0.2s ease-in-out;
}

.ak-form-control:focus {
    outline: none;
    border-color: var(--ak-primary);
    box-shadow: 0 0 0 3px rgba(26, 31, 54, 0.12);
}

.ak-checkbox-col {
    flex: 0 0 auto;
}

.ak-urgent-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.ak-urgent-filter-label input[type="checkbox"] {
    display: none;
}

.ak-urgent-pill {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #e03131;
    background: #fff5f5;
    border: 1px solid #ffc9c9;
    transition: all 0.2s ease;
}

.ak-urgent-filter-label input[type="checkbox"]:checked + .ak-urgent-pill {
    background: #e03131;
    color: #ffffff;
    border-color: #e03131;
    box-shadow: 0 3px 8px rgba(224, 49, 49, 0.3);
}

.ak-btn-col {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
}

.ak-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.ak-btn-primary {
    background: var(--ak-primary);
    color: #ffffff !important;
}

.ak-btn-primary:hover {
    background: var(--ak-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 31, 54, 0.2);
}

.ak-btn-reset {
    background: #f1f5f9;
    color: #475569 !important;
    border: 1px solid var(--ak-border);
}

.ak-btn-reset:hover {
    background: #e2e8f0;
}

/* Results header */
.ak-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ak-results-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--ak-text-muted);
}

/* =========================================================
   2. JOBS GRID & CARD LAYOUT
   ========================================================= */
.ak-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.ak-job-card {
    background: var(--ak-card-bg);
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--ak-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.ak-job-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ak-shadow-hover);
    border-color: #cbd5e1;
}

.ak-job-card.ak-card-urgent {
    border-color: #ffc9c9;
    background: linear-gradient(180deg, #fffbfb 0%, #ffffff 100%);
}

.ak-job-card.ak-card-urgent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e03131, #f59f00);
    border-radius: var(--ak-radius) var(--ak-radius) 0 0;
}

.ak-card-top {
    margin-bottom: 12px;
}

.ak-badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ak-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.ak-badge-urgent {
    background: #fff5f5;
    color: #e03131;
    border: 1px solid #ffc9c9;
}

.ak-pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #e03131;
    border-radius: 50%;
    margin-right: 5px;
    animation: akPulse 1.5s infinite;
}

@keyframes akPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(224, 49, 49, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(224, 49, 49, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(224, 49, 49, 0); }
}

.ak-badge-category {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.ak-badge-type {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.ak-card-title {
    font-size: 19px;
    font-weight: 700;
    margin: 8px 0 14px;
    line-height: 1.35;
}

.ak-card-title a {
    color: var(--ak-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ak-card-title a:hover {
    color: var(--ak-accent);
}

.ak-card-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 15px;
    font-size: 13.5px;
    color: #475569;
}

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

.ak-meta-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.ak-salary-highlight {
    color: #047857;
    font-weight: 700;
}

.ak-salary-not-disclosed {
    color: #64748b;
    font-style: italic;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 12px;
}

.ak-card-excerpt {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 20px;
    flex-grow: 1;
}

.ak-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--ak-border);
    padding-top: 16px;
    margin-top: auto;
}

.ak-posted-date {
    font-size: 12px;
    color: #94a3b8;
}

.ak-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ak-primary);
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ak-card-btn:hover {
    background: var(--ak-accent);
    transform: translateX(3px);
}

/* No jobs found */
.ak-no-jobs-found {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px dashed var(--ak-border);
    border-radius: var(--ak-radius);
}

.ak-no-jobs-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.ak-no-jobs-found h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: var(--ak-primary);
}

.ak-no-jobs-found p {
    color: var(--ak-text-muted);
    max-width: 450px;
    margin: 0 auto 20px;
}

/* =========================================================
   3. SINGLE JOB PAGE (2-COLUMN LAYOUT)
   ========================================================= */
.ak-single-container {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}

.ak-single-left-column {
    flex: 1 1 62%;
    min-width: 0;
}

.ak-single-right-column {
    flex: 0 0 38%;
    min-width: 320px;
    position: sticky;
    top: 30px;
}

.ak-job-header {
    background: #ffffff;
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius);
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--ak-shadow);
}

.ak-job-main-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--ak-primary);
    margin: 0 0 6px;
    line-height: 1.25;
}

.ak-company-byline {
    font-size: 15px;
    color: var(--ak-accent);
    font-weight: 600;
    margin-bottom: 20px;
}

.ak-single-meta-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 16px;
}

.ak-single-meta-box {
    display: flex;
    flex-direction: column;
}

.ak-meta-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 4px;
}

.ak-meta-val {
    font-size: 14.5px;
    font-weight: 600;
    color: #0f172a;
}

.ak-meta-val.ak-salary-text {
    color: #047857;
}

/* Formatted Description Card */
.ak-job-content-card {
    background: #ffffff;
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius);
    padding: 32px;
    margin-bottom: 25px;
    box-shadow: var(--ak-shadow);
}

.ak-section-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--ak-primary);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid #f1f5f9;
}

.ak-formatted-content {
    font-size: 15.5px;
    line-height: 1.75;
    color: #334155;
}

.ak-formatted-content p {
    margin-bottom: 16px;
}

.ak-formatted-content ul,
.ak-formatted-content ol {
    margin: 16px 0 16px 24px;
    padding: 0;
}

.ak-formatted-content li {
    margin-bottom: 8px;
}

.ak-formatted-content strong,
.ak-formatted-content b {
    color: #0f172a;
    font-weight: 700;
}

.ak-formatted-content em,
.ak-formatted-content i {
    font-style: italic;
}

.ak-company-box {
    background: #f8fafc;
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius);
    padding: 24px;
}

.ak-company-box-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ak-company-logo-img {
    max-height: 44px;
    max-width: 140px;
    background: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* =========================================================
   4. RIGHT COLUMN - APPLICATION FORM
   ========================================================= */
.ak-form-card {
    background: #ffffff;
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius);
    padding: 28px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.ak-form-card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid #f1f5f9;
}

.ak-form-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ak-primary);
    margin: 0 0 10px;
}

.ak-auto-fill-position {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
}

.ak-auto-fill-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #166534;
}

.ak-auto-fill-title {
    font-size: 14.5px;
    color: #14532d;
}

.ak-form-group {
    margin-bottom: 16px;
}

.ak-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.ak-required {
    color: #e03131;
}

.ak-input,
.ak-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid var(--ak-border);
    border-radius: 8px;
    background-color: #ffffff;
    color: var(--ak-text-main);
    transition: all 0.2s ease;
}

.ak-input:focus,
.ak-textarea:focus {
    outline: none;
    border-color: var(--ak-primary);
    box-shadow: 0 0 0 3px rgba(26, 31, 54, 0.12);
}

.ak-textarea {
    resize: vertical;
    min-height: 75px;
}

.ak-file-upload-wrapper {
    background: #f8fafc;
    border: 1.5px dashed var(--ak-border);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.ak-file-input {
    width: 100%;
    font-size: 13px;
    cursor: pointer;
}

.ak-file-hint {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    margin-top: 6px;
}

.ak-submit-button {
    width: 100%;
    background: var(--ak-primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    padding: 13px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.ak-submit-button:hover:not(:disabled) {
    background: #0f1426;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 31, 54, 0.25);
}

.ak-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.ak-privacy-notice {
    font-size: 11.5px;
    color: #94a3b8;
    text-align: center;
    margin: 14px 0 0;
    line-height: 1.4;
}

/* Alert Boxes */
.ak-form-alert {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.ak-alert-success {
    background: #ebfbee;
    border: 1px solid #b2f2bb;
    color: #2b8a3e;
}

.ak-alert-error {
    background: #fff5f5;
    border: 1px solid #ffc9c9;
    color: #c92a2a;
}

/* =========================================================
   5. RESPONSIVE DESIGN
   ========================================================= */
@media (max-width: 900px) {
    .ak-single-container {
        flex-direction: column;
    }

    .ak-single-right-column {
        width: 100%;
        position: static;
    }
}

@media (max-width: 600px) {
    .ak-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ak-jobs-grid {
        grid-template-columns: 1fr;
    }

    .ak-btn-col {
        flex-direction: column;
    }

    .ak-btn {
        width: 100%;
    }

    .ak-job-header {
        padding: 20px;
    }

    .ak-job-main-title {
        font-size: 22px;
    }
}
