/* ============================================================
   TendWorks Careers Module — careers.css
   Additive only. Does not override existing style.css rules.
   ============================================================ */

/* ------------------------------------------------------------------
   Filter Bar
   ------------------------------------------------------------------ */
.careers-filter-bar {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.careers-filter-bar .form-control,
.careers-filter-bar .form-select {
    border-radius: 8px;
    height: 48px;
    border: 1px solid #e0e0e0;
    font-size: 0.93rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.careers-filter-bar .form-control:focus,
.careers-filter-bar .form-select:focus {
    border-color: var(--primary-color, #6a0dad);
    box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.12);
}

.careers-filter-bar .filter-search-wrap {
    position: relative;
}

.careers-filter-bar .filter-search-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #999;
    pointer-events: none;
}

.careers-filter-bar .filter-search-wrap .form-control {
    padding-left: 38px;
}

#filter-reset {
    height: 48px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid #ccc;
    color: #555;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#filter-reset:hover {
    border-color: #999;
    color: #222;
    background: #f0f0f0;
}

/* ------------------------------------------------------------------
   Job Count Label
   ------------------------------------------------------------------ */
.careers-count-label {
    font-size: 0.92rem;
    color: #666;
    margin-bottom: 4px;
}

.careers-count-label strong {
    color: #222;
}

/* ------------------------------------------------------------------
   Spinner & Empty State
   ------------------------------------------------------------------ */
#jobs-spinner {
    padding: 60px 0;
}

#no-jobs-msg {
    padding: 60px 20px;
    text-align: center;
    color: #888;
}

#no-jobs-msg i {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
    opacity: 0.35;
}

#no-jobs-msg h5 {
    color: #444;
    margin-bottom: 8px;
}

/* ------------------------------------------------------------------
   Career Card
   ------------------------------------------------------------------ */
.career-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.career-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.13);
}

/* Card image container */
.career-card-img {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.career-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.career-card:hover .career-card-img img {
    transform: scale(1.04);
}

/* Job type badge overlaid on image */
.career-type-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.03em;
    box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}

.career-type-badge.internship {
    background: #fff8e1;
    color: #b45309;
}

/* Card body */
.career-card-body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.career-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.career-meta span {
    font-size: 0.8rem;
    color: #777;
    display: flex;
    align-items: center;
    gap: 4px;
}

.career-meta i {
    font-size: 0.85rem;
}

.career-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
    line-height: 1.35;
}

.career-desc {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 18px;
}

/* Card action buttons row */
.career-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;
}

/* View details button — inherits btn-main but smaller */
.career-card-body .btn-main {
    display: inline-block;
    align-self: flex-start;
    padding: 9px 22px;
    font-size: 0.85rem;
}

/* Apply Now — outlined secondary button */
.btn-career-apply {
    display: inline-block;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid var(--primary-color, #6a0dad);
    color: var(--primary-color, #6a0dad);
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.btn-career-apply:hover {
    background: var(--primary-color, #6a0dad);
    color: #fff;
    text-decoration: none;
}

/* ------------------------------------------------------------------
   Card grid animation — fade in on render (replaces WOW for dynamic)
   ------------------------------------------------------------------ */
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.career-item {
    animation: cardFadeIn 0.42s ease both;
}

/* Stagger delay per nth child (max 9 items visible) */
.career-item:nth-child(1) { animation-delay: 0.05s; }
.career-item:nth-child(2) { animation-delay: 0.10s; }
.career-item:nth-child(3) { animation-delay: 0.15s; }
.career-item:nth-child(4) { animation-delay: 0.20s; }
.career-item:nth-child(5) { animation-delay: 0.25s; }
.career-item:nth-child(6) { animation-delay: 0.30s; }
.career-item:nth-child(7) { animation-delay: 0.35s; }
.career-item:nth-child(8) { animation-delay: 0.40s; }
.career-item:nth-child(9) { animation-delay: 0.45s; }

/* ------------------------------------------------------------------
   Job Detail Page
   ------------------------------------------------------------------ */

/* Hero meta chips */
.jd-meta-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.jd-chip {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
}

/* Back link */
.jd-back-link {
    font-size: 0.88rem;
    color: #666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 28px;
    transition: color 0.2s;
}

.jd-back-link:hover {
    color: #222;
}

/* Content section */
.jd-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-color, #6a0dad);
    margin-bottom: 10px;
}

.jd-content h4 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 14px;
}

.jd-list {
    padding-left: 20px;
    margin-bottom: 0;
}

.jd-list li {
    font-size: 0.93rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 6px;
}

.jd-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 36px 0;
}

/* Sidebar */
.jd-sidebar-card {
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
}

.jd-sidebar-card .jd-sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
}

.jd-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 0.875rem;
}

.jd-info-row i {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.jd-info-row .jd-info-label {
    color: #999;
    font-size: 0.75rem;
    display: block;
    line-height: 1.2;
}

.jd-info-row .jd-info-value {
    color: #222;
    font-weight: 600;
    display: block;
}

.jd-sidebar-card .btn-main {
    width: 100%;
    text-align: center;
    margin-top: 8px;
    display: block;
    padding: 13px;
}

/* Apply Form Section */
.apply-form-section {
    background: #f8f9fa;
}

.apply-form-wrap {
    background: #fff;
    border-radius: 14px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.apply-form-wrap .field-set {
    margin-bottom: 18px;
}

.apply-form-wrap .form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.apply-form-wrap .form-control:focus {
    border-color: var(--primary-color, #6a0dad);
    box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.12);
}

#apply-success {
    display: none;
    margin-top: 16px;
    padding: 14px 18px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    color: #065f46;
    font-size: 0.9rem;
}

#apply-error {
    display: none;
    margin-top: 16px;
    padding: 14px 18px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    font-size: 0.9rem;
}

/* ------------------------------------------------------------------
   Responsive tweaks
   ------------------------------------------------------------------ */
@media (max-width: 767px) {
    .careers-filter-bar {
        padding: 20px 18px;
    }

    .career-card-img {
        height: 180px;
    }

    .apply-form-wrap {
        padding: 24px 20px;
    }

    .jd-sidebar-card {
        position: static;
        margin-top: 32px;
    }

    .jd-meta-chips {
        gap: 8px;
    }
}
